@univerjs/docs-ui 0.5.5 → 0.6.0-experimental.20250125-1d060b9

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 (25) hide show
  1. package/lib/cjs/index.js +15 -23
  2. package/lib/es/index.js +2810 -2843
  3. package/lib/types/basics/paragraph.d.ts +1 -1
  4. package/lib/types/components/list-type-picker/picker.d.ts +3 -4
  5. package/lib/types/controllers/doc-container-ui-controller.d.ts +1 -1
  6. package/lib/types/facade/f-document.d.ts +3 -0
  7. package/lib/types/facade/f-univer.d.ts +3 -0
  8. package/lib/types/services/editor/editor-manager.service.d.ts +2 -2
  9. package/lib/types/views/count-bar/CountBar.d.ts +16 -2
  10. package/lib/types/views/count-bar/ZoomSlider.d.ts +16 -2
  11. package/lib/types/views/doc-container/DocContainer.d.ts +5 -5
  12. package/lib/types/views/doc-footer/DocFooter.d.ts +16 -2
  13. package/lib/types/views/header-footer/panel/DocHeaderFooterOptions.d.ts +16 -2
  14. package/lib/types/views/header-footer/panel/DocHeaderFooterPanel.d.ts +16 -2
  15. package/lib/types/views/paragraph-setting/Setting.d.ts +1 -2
  16. package/lib/types/views/paragraph-setting/index.d.ts +16 -2
  17. package/lib/types/views/table/create/TableCreate.d.ts +16 -2
  18. package/lib/umd/index.js +17 -25
  19. package/package.json +12 -12
  20. package/LICENSE +0 -176
  21. package/lib/types/commands/commands/__tests__/clipboard.command.spec.d.ts +0 -16
  22. package/lib/types/commands/commands/__tests__/core-editing.command.spec.d.ts +0 -16
  23. package/lib/types/commands/commands/__tests__/create-command-test-bed.d.ts +0 -34
  24. package/lib/types/commands/commands/__tests__/inline-format.command.spec.d.ts +0 -16
  25. package/lib/types/commands/commands/__tests__/replace-content.command.spec.d.ts +0 -16
@@ -1,5 +1,5 @@
1
1
  import { ICustomDecoration, ICustomRange, ICustomTable, IParagraph, ITextRun, ITextStyle, Nullable } from '@univerjs/core';
2
2
  export declare function hasParagraphInTable(paragraph: IParagraph, tables: ICustomTable[]): boolean;
3
- export declare function getTextRunAtPosition(textRuns: ITextRun[], position: number, defaultStyle: ITextStyle, cacheStyle: Nullable<ITextStyle>): ITextRun;
3
+ export declare function getTextRunAtPosition(textRuns: ITextRun[], position: number, defaultStyle: ITextStyle, cacheStyle: Nullable<ITextStyle>, isCellEditor?: boolean): ITextRun;
4
4
  export declare function getCustomRangeAtPosition(customRanges: ICustomRange[], position: number, extendRange?: boolean): ICustomRange<Record<string, any>> | null | undefined;
5
5
  export declare function getCustomDecorationAtPosition(customDecorations: ICustomDecoration[], position: number): ICustomDecoration[];
@@ -1,5 +1,4 @@
1
1
  import { PresetListType } from '@univerjs/core';
2
- import { default as React } from 'react';
3
2
  export interface IListTypePickerBaseProps {
4
3
  value?: PresetListType;
5
4
  onChange: (value: PresetListType | undefined) => void;
@@ -10,7 +9,7 @@ interface IListTypePickerProps extends IListTypePickerBaseProps {
10
9
  img: string;
11
10
  }[];
12
11
  }
13
- export declare const ListTypePicker: (props: IListTypePickerProps) => React.JSX.Element;
14
- export declare const OrderListTypePicker: (props: IListTypePickerBaseProps) => React.JSX.Element;
15
- export declare const BulletListTypePicker: (props: IListTypePickerBaseProps) => React.JSX.Element;
12
+ export declare const ListTypePicker: (props: IListTypePickerProps) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const OrderListTypePicker: (props: IListTypePickerBaseProps) => import("react/jsx-runtime").JSX.Element;
14
+ export declare const BulletListTypePicker: (props: IListTypePickerBaseProps) => import("react/jsx-runtime").JSX.Element;
16
15
  export {};
@@ -22,7 +22,7 @@ export declare class DocContainerUIController {
22
22
  *
23
23
  */
24
24
  changeLocale: (locale: string) => void;
25
- getContentRef(): import('react').RefObject<HTMLDivElement>;
25
+ getContentRef(): import('react').RefObject<HTMLDivElement | null>;
26
26
  UIDidMount(cb: Function): any;
27
27
  getDocContainer(): DocContainer | undefined;
28
28
  }
@@ -1,5 +1,8 @@
1
1
  import { DocumentDataModel, IDocumentData, ICommandService, Injector, IResourceManagerService, IUniverInstanceService } from '@univerjs/core';
2
2
  import { IRenderManagerService } from '@univerjs/engine-render';
3
+ /**
4
+ * @hideconstructor
5
+ */
3
6
  export declare class FDocument {
4
7
  private readonly _documentDataModel;
5
8
  protected readonly _injector: Injector;
@@ -1,5 +1,8 @@
1
1
  import { IDocumentData, FUniver } from '@univerjs/core';
2
2
  import { FDocument } from './f-document';
3
+ /**
4
+ * @ignore
5
+ */
3
6
  export interface IFUniverDocsUIMixin {
4
7
  /**
5
8
  * Create a new document and get the API handler of that document.
@@ -18,7 +18,7 @@ export interface IEditorService {
18
18
  isEditor(editorUnitId: string): boolean;
19
19
  isSheetEditor(editorUnitId: string): boolean;
20
20
  blur$: Observable<unknown>;
21
- blur(): void;
21
+ blur(force?: boolean): void;
22
22
  focus$: Observable<ISuccinctDocRangeParam>;
23
23
  focus(editorUnitId: string): void;
24
24
  getFocusId(): Nullable<string>;
@@ -45,7 +45,7 @@ export declare class EditorService extends Disposable implements IEditorService,
45
45
  getFocusEditor(): Readonly<Nullable<Editor>>;
46
46
  isEditor(editorUnitId: string): boolean;
47
47
  isSheetEditor(editorUnitId: string): boolean;
48
- blur(): void;
48
+ blur(force?: boolean): void;
49
49
  focus(editorUnitId: string): void;
50
50
  dispose(): void;
51
51
  getEditor(id?: string): Readonly<Nullable<Editor>>;
@@ -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;
@@ -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 {};