@univerjs/docs-ui 1.0.0-beta.0 → 1.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +960 -254
- package/lib/cjs/locale/ar-SA.js +17 -8
- package/lib/cjs/locale/ca-ES.js +17 -8
- package/lib/cjs/locale/de-DE.js +17 -8
- package/lib/cjs/locale/en-US.js +17 -8
- package/lib/cjs/locale/es-ES.js +17 -8
- package/lib/cjs/locale/fa-IR.js +17 -8
- package/lib/cjs/locale/fr-FR.js +17 -8
- package/lib/cjs/locale/id-ID.js +17 -8
- package/lib/cjs/locale/it-IT.js +17 -8
- package/lib/cjs/locale/ja-JP.js +17 -8
- package/lib/cjs/locale/ko-KR.js +17 -8
- package/lib/cjs/locale/pl-PL.js +17 -8
- package/lib/cjs/locale/pt-BR.js +17 -8
- package/lib/cjs/locale/ru-RU.js +17 -8
- package/lib/cjs/locale/sk-SK.js +17 -8
- package/lib/cjs/locale/vi-VN.js +17 -8
- package/lib/cjs/locale/zh-CN.js +17 -8
- package/lib/cjs/locale/zh-HK.js +17 -8
- package/lib/cjs/locale/zh-TW.js +17 -8
- package/lib/es/index.js +962 -258
- package/lib/es/locale/ar-SA.js +17 -8
- package/lib/es/locale/ca-ES.js +17 -8
- package/lib/es/locale/de-DE.js +17 -8
- package/lib/es/locale/en-US.js +17 -8
- package/lib/es/locale/es-ES.js +17 -8
- package/lib/es/locale/fa-IR.js +17 -8
- package/lib/es/locale/fr-FR.js +17 -8
- package/lib/es/locale/id-ID.js +17 -8
- package/lib/es/locale/it-IT.js +17 -8
- package/lib/es/locale/ja-JP.js +17 -8
- package/lib/es/locale/ko-KR.js +17 -8
- package/lib/es/locale/pl-PL.js +17 -8
- package/lib/es/locale/pt-BR.js +17 -8
- package/lib/es/locale/ru-RU.js +17 -8
- package/lib/es/locale/sk-SK.js +17 -8
- package/lib/es/locale/vi-VN.js +17 -8
- package/lib/es/locale/zh-CN.js +17 -8
- package/lib/es/locale/zh-HK.js +17 -8
- package/lib/es/locale/zh-TW.js +17 -8
- package/lib/index.css +154 -16
- package/lib/index.js +962 -258
- package/lib/locale/ar-SA.js +17 -8
- package/lib/locale/ca-ES.js +17 -8
- package/lib/locale/de-DE.js +17 -8
- package/lib/locale/en-US.js +17 -8
- package/lib/locale/es-ES.js +17 -8
- package/lib/locale/fa-IR.js +17 -8
- package/lib/locale/fr-FR.js +17 -8
- package/lib/locale/id-ID.js +17 -8
- package/lib/locale/it-IT.js +17 -8
- package/lib/locale/ja-JP.js +17 -8
- package/lib/locale/ko-KR.js +17 -8
- package/lib/locale/pl-PL.js +17 -8
- package/lib/locale/pt-BR.js +17 -8
- package/lib/locale/ru-RU.js +17 -8
- package/lib/locale/sk-SK.js +17 -8
- package/lib/locale/vi-VN.js +17 -8
- package/lib/locale/zh-CN.js +17 -8
- package/lib/locale/zh-HK.js +17 -8
- package/lib/locale/zh-TW.js +17 -8
- package/lib/types/commands/commands/clipboard.inner.command.d.ts +8 -2
- package/lib/types/commands/commands/doc-select-all.command.d.ts +2 -0
- package/lib/types/commands/commands/replace-content.command.d.ts +1 -0
- package/lib/types/config/config.d.ts +1 -0
- package/lib/types/controllers/render-controllers/doc-ime-input.controller.d.ts +3 -2
- package/lib/types/controllers/render-controllers/doc-input.controller.d.ts +1 -1
- package/lib/types/controllers/render-controllers/doc-paragraph-placeholder.render-controller.d.ts +1 -1
- package/lib/types/controllers/render-controllers/doc.render-controller.d.ts +2 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/locale/en-US.d.ts +16 -7
- package/lib/types/services/doc-ime-input-manager.service.d.ts +17 -0
- package/lib/types/services/doc-menu-style.service.d.ts +3 -2
- package/lib/types/services/doc-render-background.d.ts +1 -1
- package/lib/types/services/selection/doc-selection-render.service.d.ts +2 -0
- package/lib/types/services/selection/text-range.d.ts +3 -0
- package/lib/types/views/doc-statistics/DocStatistics.d.ts +16 -0
- package/lib/types/views/doc-statistics/use-doc-statistics.d.ts +30 -0
- package/lib/types/views/list-type-picker/Picker.d.ts +1 -4
- package/lib/umd/index.js +9 -9
- package/lib/umd/locale/ar-SA.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/id-ID.js +1 -1
- package/lib/umd/locale/it-IT.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/pl-PL.js +1 -1
- package/lib/umd/locale/pt-BR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-HK.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +8 -8
|
@@ -24,6 +24,9 @@ interface ICacheParams {
|
|
|
24
24
|
export declare class DocIMEInputManagerService extends RxDisposable implements IRenderModule {
|
|
25
25
|
private readonly _context;
|
|
26
26
|
private _previousActiveRange;
|
|
27
|
+
private _previousDocRanges;
|
|
28
|
+
private _compositionRange;
|
|
29
|
+
private _previousSelectionOptions;
|
|
27
30
|
private _undoMutationParamsCache;
|
|
28
31
|
private _redoMutationParamsCache;
|
|
29
32
|
constructor(_context: IRenderContext<DocumentDataModel>);
|
|
@@ -35,11 +38,25 @@ export declare class DocIMEInputManagerService extends RxDisposable implements I
|
|
|
35
38
|
setUndoRedoMutationParamsCache({ undoCache, redoCache }: ICacheParams): void;
|
|
36
39
|
getActiveRange(): Nullable<ITextRangeWithStyle>;
|
|
37
40
|
setActiveRange(range: Nullable<ITextRangeWithStyle>): void;
|
|
41
|
+
getCompositionRange(): Nullable<ITextRangeWithStyle>;
|
|
42
|
+
setCompositionRange(range: Nullable<ITextRangeWithStyle>): void;
|
|
43
|
+
getPreviousDocRanges(): ITextRangeWithStyle[];
|
|
44
|
+
setPreviousDocRanges(ranges: ITextRangeWithStyle[]): void;
|
|
45
|
+
getPreviousSelectionOptions(): Nullable<{
|
|
46
|
+
[key: string]: boolean;
|
|
47
|
+
}>;
|
|
48
|
+
setPreviousSelectionOptions(options: Nullable<{
|
|
49
|
+
[key: string]: boolean;
|
|
50
|
+
}>): void;
|
|
38
51
|
pushUndoRedoMutationParams(undoParams: IRichTextEditingMutationParams, redoParams: IRichTextEditingMutationParams): void;
|
|
39
52
|
fetchComposedUndoRedoMutationParams(): {
|
|
40
53
|
redoMutationParams: IRichTextEditingMutationParams;
|
|
41
54
|
undoMutationParams: IRichTextEditingMutationParams;
|
|
42
55
|
previousActiveRange: ITextRangeWithStyle;
|
|
56
|
+
previousDocRanges: ITextRangeWithStyle[];
|
|
57
|
+
previousSelectionOptions: Nullable<{
|
|
58
|
+
[key: string]: boolean;
|
|
59
|
+
}>;
|
|
43
60
|
} | null;
|
|
44
61
|
dispose(): void;
|
|
45
62
|
}
|
|
@@ -14,15 +14,16 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import type { ITextStyle, Nullable } from '@univerjs/core';
|
|
17
|
-
import { Disposable, IUniverInstanceService } from '@univerjs/core';
|
|
17
|
+
import { Disposable, IUniverInstanceService, ThemeService } from '@univerjs/core';
|
|
18
18
|
import { DocSelectionManagerService } from '@univerjs/docs';
|
|
19
19
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
20
20
|
export declare class DocMenuStyleService extends Disposable {
|
|
21
21
|
private readonly _textSelectionManagerService;
|
|
22
22
|
private readonly _univerInstanceService;
|
|
23
23
|
private readonly _renderManagerService;
|
|
24
|
+
private readonly _themeService;
|
|
24
25
|
private _cacheStyle;
|
|
25
|
-
constructor(_textSelectionManagerService: DocSelectionManagerService, _univerInstanceService: IUniverInstanceService, _renderManagerService: IRenderManagerService);
|
|
26
|
+
constructor(_textSelectionManagerService: DocSelectionManagerService, _univerInstanceService: IUniverInstanceService, _renderManagerService: IRenderManagerService, _themeService: ThemeService);
|
|
26
27
|
private _init;
|
|
27
28
|
private _listenDocRangeChange;
|
|
28
29
|
getStyleCache(): Nullable<ITextStyle>;
|
|
@@ -26,4 +26,4 @@ export interface IResolvedDocRenderBackground {
|
|
|
26
26
|
docBackgroundFillColor?: string;
|
|
27
27
|
}
|
|
28
28
|
export declare function resolveDocRenderBackground(options: IResolveDocRenderBackgroundOptions): IResolvedDocRenderBackground;
|
|
29
|
-
export declare function getDefaultDocCanvasBackgroundColor(documentFlavor?: DocumentFlavor, isEditor?: boolean): "
|
|
29
|
+
export declare function getDefaultDocCanvasBackgroundColor(documentFlavor?: DocumentFlavor, isEditor?: boolean): "transparent" | "var(--univer-gray-100)" | "var(--univer-gray-0)";
|
|
@@ -86,6 +86,7 @@ export declare class DocSelectionRenderService extends RxDisposable implements I
|
|
|
86
86
|
get isOnPointerEvent(): boolean;
|
|
87
87
|
get isFocusing(): boolean;
|
|
88
88
|
get canFocusing(): boolean;
|
|
89
|
+
cancelPointerSelection(): void;
|
|
89
90
|
constructor(_context: IRenderContext<DocumentDataModel>, _layoutService: ILayoutService, _logService: ILogService, _univerInstanceService: IUniverInstanceService, _docSkeletonManagerService: DocSkeletonManagerService, _embedInteractionBoundaryService?: IDocEmbedInteractionBoundaryService | undefined, _embedRuntimeFocusCoordinator?: IDocEmbedRuntimeFocusCoordinator | undefined);
|
|
90
91
|
private _listenCurrentUnitChange;
|
|
91
92
|
get activeViewPort(): import("@univerjs/engine-render").Viewport;
|
|
@@ -134,6 +135,7 @@ export declare class DocSelectionRenderService extends RxDisposable implements I
|
|
|
134
135
|
private _removeAllTextRanges;
|
|
135
136
|
private _removeAllRectRanges;
|
|
136
137
|
private _removeAllCollapsedTextRanges;
|
|
138
|
+
private _hideCollapsedCaretsForVisibleSelection;
|
|
137
139
|
private _deactivateAllTextRanges;
|
|
138
140
|
private _deactivateAllRectRanges;
|
|
139
141
|
private _addTextRangesToCache;
|
|
@@ -47,6 +47,7 @@ export declare class TextRange implements IDocRange {
|
|
|
47
47
|
private _anchorShape;
|
|
48
48
|
private _cursorList;
|
|
49
49
|
private _anchorBlinkTimer;
|
|
50
|
+
private _anchorActiveStroke;
|
|
50
51
|
constructor(_scene: Scene, _document: Documents, _docSkeleton: DocumentSkeleton, anchorNodePosition?: Nullable<INodePosition>, focusNodePosition?: Nullable<INodePosition>, style?: ITextSelectionStyle, _segmentId?: string, _segmentPage?: number);
|
|
51
52
|
private _anchorBlink;
|
|
52
53
|
get startOffset(): number | undefined;
|
|
@@ -76,5 +77,7 @@ export declare class TextRange implements IDocRange {
|
|
|
76
77
|
private _isCollapsed;
|
|
77
78
|
private _createOrUpdateRange;
|
|
78
79
|
private _createOrUpdateAnchor;
|
|
80
|
+
private _getAnchorActiveStroke;
|
|
81
|
+
private _getAnchorBackgroundColor;
|
|
79
82
|
private _setCursorList;
|
|
80
83
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
export declare function DocStatistics(): import("react").JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
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 { IDocumentStatistics, ITextRangeParam } from '@univerjs/core';
|
|
17
|
+
import type { DocumentSkeleton } from '@univerjs/engine-render';
|
|
18
|
+
interface IDocLayoutStatistics {
|
|
19
|
+
pages: number;
|
|
20
|
+
lines: number;
|
|
21
|
+
}
|
|
22
|
+
export interface IDocStatisticsViewState {
|
|
23
|
+
document: IDocumentStatistics & IDocLayoutStatistics;
|
|
24
|
+
selection: (IDocumentStatistics & IDocLayoutStatistics) | null;
|
|
25
|
+
loading: boolean;
|
|
26
|
+
showPages: boolean;
|
|
27
|
+
}
|
|
28
|
+
export declare function getDocLayoutStatistics(skeleton: DocumentSkeleton | null, ranges?: Readonly<ITextRangeParam>[], calculatePages?: boolean): IDocLayoutStatistics;
|
|
29
|
+
export declare function useDocStatistics(calculateLayout?: boolean): IDocStatisticsViewState;
|
|
30
|
+
export {};
|
|
@@ -19,10 +19,7 @@ export interface IListTypePickerBaseProps {
|
|
|
19
19
|
onChange: (value: PresetListType | undefined) => void;
|
|
20
20
|
}
|
|
21
21
|
interface IListTypePickerProps extends IListTypePickerBaseProps {
|
|
22
|
-
options:
|
|
23
|
-
value: PresetListType;
|
|
24
|
-
img: string;
|
|
25
|
-
}[];
|
|
22
|
+
options: PresetListType[];
|
|
26
23
|
}
|
|
27
24
|
export declare const ListTypePicker: (props: IListTypePickerProps) => import("react").JSX.Element;
|
|
28
25
|
export declare const OrderListTypePicker: (props: IListTypePickerBaseProps) => import("react").JSX.Element;
|