@univerjs/docs-drawing-ui 1.0.0-rc.0 → 1.0.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.
Files changed (47) hide show
  1. package/lib/cjs/index.js +3281 -2066
  2. package/lib/cjs/locale/ar-SA.js +0 -1
  3. package/lib/cjs/locale/ca-ES.js +0 -1
  4. package/lib/cjs/locale/de-DE.js +0 -1
  5. package/lib/cjs/locale/en-US.js +0 -1
  6. package/lib/cjs/locale/es-ES.js +0 -1
  7. package/lib/cjs/locale/fa-IR.js +0 -1
  8. package/lib/cjs/locale/fr-FR.js +0 -1
  9. package/lib/cjs/locale/id-ID.js +0 -1
  10. package/lib/cjs/locale/it-IT.js +0 -1
  11. package/lib/cjs/locale/ja-JP.js +0 -1
  12. package/lib/cjs/locale/ko-KR.js +0 -1
  13. package/lib/cjs/locale/pl-PL.js +0 -1
  14. package/lib/cjs/locale/pt-BR.js +0 -1
  15. package/lib/cjs/locale/ru-RU.js +0 -1
  16. package/lib/cjs/locale/sk-SK.js +0 -1
  17. package/lib/cjs/locale/vi-VN.js +0 -1
  18. package/lib/cjs/locale/zh-CN.js +0 -1
  19. package/lib/cjs/locale/zh-HK.js +0 -1
  20. package/lib/cjs/locale/zh-TW.js +0 -1
  21. package/lib/es/index.js +3278 -2071
  22. package/lib/index.css +83 -0
  23. package/lib/index.js +3278 -2071
  24. package/lib/types/commands/commands/doc-drawing-group.d.ts +19 -0
  25. package/lib/types/commands/commands/group-doc-drawing.command.d.ts +2 -4
  26. package/lib/types/commands/commands/ungroup-doc-drawing.command.d.ts +2 -4
  27. package/lib/types/commands/operations/mobile/open-drawing-panel.operation.d.ts +17 -0
  28. package/lib/types/config/config.d.ts +1 -0
  29. package/lib/types/controllers/mobile/components.controller.d.ts +20 -0
  30. package/lib/types/controllers/mobile/drawing-popup-menu.controller.d.ts +56 -0
  31. package/lib/types/controllers/mobile/ui.controller.d.ts +24 -0
  32. package/lib/types/controllers/render-controllers/doc-drawing-crop.d.ts +2 -1
  33. package/lib/types/controllers/render-controllers/doc-drawing-transform-update.controller.d.ts +12 -4
  34. package/lib/types/controllers/render-controllers/doc-drawing-update.render-controller.d.ts +3 -1
  35. package/lib/types/controllers/render-controllers/mobile/doc-drawing-update.render-controller.d.ts +22 -0
  36. package/lib/types/index.d.ts +3 -0
  37. package/lib/types/menu/drawing-popup-menu.controller.d.ts +5 -3
  38. package/lib/types/mobile-plugin.d.ts +32 -0
  39. package/lib/types/services/doc-drawing-floating-toolbar-adapter.service.d.ts +2 -1
  40. package/lib/types/views/doc-image-panel/MobileDocDrawingPanel.d.ts +16 -0
  41. package/lib/types/views/doc-image-panel/MobileDocDrawingPosition.d.ts +17 -0
  42. package/lib/types/views/doc-image-panel/MobileDocDrawingTextWrap.d.ts +17 -0
  43. package/lib/types/views/doc-image-panel/component-name.d.ts +1 -0
  44. package/lib/types/views/doc-image-panel/use-doc-drawing-position.d.ts +46 -0
  45. package/lib/types/views/doc-image-panel/use-doc-drawing-text-wrap.d.ts +41 -0
  46. package/lib/umd/index.js +1 -1
  47. package/package.json +16 -15
@@ -0,0 +1,19 @@
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 { IDrawingGroupUpdateParam } from '@univerjs/drawing';
18
+ /** Change drawing ownership and its text anchors in one undoable document mutation. */
19
+ export declare function changeDocDrawingGroups(accessor: IAccessor, params: IDrawingGroupUpdateParam[] | undefined, ungroup: boolean): boolean;
@@ -14,7 +14,5 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import type { ICommand } from '@univerjs/core';
17
- /**
18
- * The command to insert new defined name
19
- */
20
- export declare const GroupDocDrawingCommand: ICommand;
17
+ import type { IDrawingGroupUpdateParam } from '@univerjs/drawing';
18
+ export declare const GroupDocDrawingCommand: ICommand<IDrawingGroupUpdateParam[]>;
@@ -14,7 +14,5 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import type { ICommand } from '@univerjs/core';
17
- /**
18
- * The command to insert new defined name
19
- */
20
- export declare const UngroupDocDrawingCommand: ICommand;
17
+ import type { IDrawingGroupUpdateParam } from '@univerjs/drawing';
18
+ export declare const UngroupDocDrawingCommand: ICommand<IDrawingGroupUpdateParam[]>;
@@ -0,0 +1,17 @@
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 { ICommand } from '@univerjs/core';
17
+ export declare const SidebarDocDrawingMobileOperation: ICommand;
@@ -14,6 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  export declare const DOCS_DRAWING_UI_PLUGIN_CONFIG_KEY = "docs-drawing-ui.config";
17
+ export declare const DOCS_DRAWING_UI_PLUGIN_NAME = "DOC_DRAWING_UI_PLUGIN";
17
18
  export declare const configSymbol: unique symbol;
18
19
  export interface IUniverDocsDrawingUIConfig {
19
20
  }
@@ -0,0 +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
+ */
16
+ import { Disposable } from '@univerjs/core';
17
+ import { ComponentManager } from '@univerjs/ui';
18
+ export declare class MobileComponentsController extends Disposable {
19
+ constructor(componentManager: ComponentManager);
20
+ }
@@ -0,0 +1,56 @@
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 { ICommandService, IContextService, IPermissionService, IUniverInstanceService, RxDisposable } from '@univerjs/core';
17
+ import { IDocDrawingAdapterService, IDocDrawingService } from '@univerjs/docs-drawing';
18
+ import { DocCanvasPopManagerService } from '@univerjs/docs-ui';
19
+ import { IDrawingManagerService } from '@univerjs/drawing';
20
+ import { IRenderManagerService } from '@univerjs/engine-render';
21
+ import { IMenuManagerService } from '@univerjs/ui';
22
+ import { DocDrawingFloatingToolbarAdapterService } from '../../services/doc-drawing-floating-toolbar-adapter.service';
23
+ export declare class MobileDocDrawingPopupMenuController extends RxDisposable {
24
+ private readonly _drawingManagerService;
25
+ private readonly _canvasPopManagerService;
26
+ private readonly _renderManagerService;
27
+ private readonly _univerInstanceService;
28
+ private readonly _contextService;
29
+ private readonly _drawingAdapterService;
30
+ private readonly _docDrawingService;
31
+ private readonly _floatingToolbarAdapterService;
32
+ private readonly _commandService;
33
+ private readonly _menuManagerService;
34
+ private readonly _permissionService;
35
+ private _initImagePopupMenu;
36
+ private _embeddedRenderUnits;
37
+ private _popupMenuListeners;
38
+ private _disposePopupsByUnit;
39
+ private _popupTargetsByUnit;
40
+ private _isDrawingPanelOpen;
41
+ constructor(_drawingManagerService: IDrawingManagerService, _canvasPopManagerService: DocCanvasPopManagerService, _renderManagerService: IRenderManagerService, _univerInstanceService: IUniverInstanceService, _contextService: IContextService, _drawingAdapterService: IDocDrawingAdapterService, _docDrawingService: IDocDrawingService, _floatingToolbarAdapterService: DocDrawingFloatingToolbarAdapterService, _commandService: ICommandService, _menuManagerService: IMenuManagerService, _permissionService: IPermissionService);
42
+ private _init;
43
+ private _dispose;
44
+ private _clearPopups;
45
+ private _getDisposePopups;
46
+ private _create;
47
+ private _disposePopupMenuListener;
48
+ private _hasCropObject;
49
+ private _handleClearControl;
50
+ private _registerDrawingPopup;
51
+ private _isSamePopupTarget;
52
+ private _popupMenuListener;
53
+ private _canEditDrawing;
54
+ private _getDrawingPopupMenuItems;
55
+ private _getFloatingObjectMenuItems;
56
+ }
@@ -0,0 +1,24 @@
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 { Disposable, ICommandService } from '@univerjs/core';
17
+ import { IMenuManagerService } from '@univerjs/ui';
18
+ export declare class MobileDocDrawingUIController extends Disposable {
19
+ private readonly _menuManagerService;
20
+ private readonly _commandService;
21
+ constructor(_menuManagerService: IMenuManagerService, _commandService: ICommandService);
22
+ private _initCommands;
23
+ private _initMenus;
24
+ }
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+ import type { IDrawingParam } from '@univerjs/core';
16
17
  import type { IDocDrawing, IDrawingDocTransform } from '@univerjs/docs-drawing';
17
18
  import type { IImageData } from '@univerjs/drawing';
18
- export declare function getDocImageCropUpdates(param: IImageData, docDrawing: IDocDrawing | undefined, renderDrawing: IImageData | undefined | null): IDrawingDocTransform[];
19
+ export declare function getDocImageCropUpdates(param: IDrawingParam & Partial<IImageData>, docDrawing: IDocDrawing | undefined, renderDrawing: IDrawingParam | undefined | null): IDrawingDocTransform[];
@@ -45,7 +45,10 @@ export declare function shouldRefreshDocDrawingTransform(current: DrawingRefresh
45
45
  * anchor remains valid, use the latest model transform so drag/resize/front-
46
46
  * behind changes can paint immediately without rebuilding document pages.
47
47
  */
48
- export declare function getDocsOverlayRuntimeDrawing(skeletonDrawing: Pick<IDocDrawingBase, 'docTransform' | 'layoutType'> & Partial<IDocDrawingBase>, currentDrawing: (Pick<IDocDrawingBase, 'docTransform' | 'layoutType'> & Partial<IDocDrawingBase>) | undefined): Pick<IDocDrawingBase, 'docTransform' | 'layoutType'> & Partial<IDocDrawingBase>;
48
+ export declare function getDocsOverlayRuntimeDrawing(skeletonDrawing: Pick<IDocDrawingBase, 'docTransform' | 'layoutType'> & Partial<IDocDrawingBase>, currentDrawing: (Pick<IDocDrawingBase, 'docTransform' | 'layoutType'> & Partial<IDocDrawingBase>) | undefined, measuredSize?: {
49
+ width: number;
50
+ height: number;
51
+ }): Pick<IDocDrawingBase, 'docTransform' | 'layoutType'> & Partial<IDocDrawingBase>;
49
52
  export type DocumentDrawingPublicationProgress = Pick<IDocumentLayoutProgress, 'generation' | 'didPublish' | 'complete' | 'publishedPageCount' | 'reason' | 'didPublishAnchor'>;
50
53
  interface IDocumentDrawingPublicationNestedPage {
51
54
  notes?: Array<{
@@ -87,14 +90,16 @@ export declare function getDocsDrawingPageClipBounds(config: {
87
90
  pageOffsetTop: number;
88
91
  clipOffsetLeft?: number;
89
92
  clipOffsetTop?: number;
90
- page: Pick<IDocumentSkeletonPage | IDocumentSkeletonHeaderFooter, 'pageWidth' | 'pageHeight'>;
93
+ drawingLayoutType?: PositionedObjectLayoutType;
94
+ overflowClipBounds?: IDrawingClipBounds;
95
+ page: Pick<IDocumentSkeletonPage | IDocumentSkeletonHeaderFooter, 'pageWidth' | 'pageHeight'> & Partial<Pick<IDocumentSkeletonPage, 'type' | 'marginLeft' | 'marginTop'>>;
91
96
  }): IDrawingClipBounds | undefined;
92
97
  export declare function getDocsDrawingClipPage(config: {
93
98
  drawing: Pick<IDrawingParamsWithBehindText, 'behindText'> & {
94
99
  transform?: Pick<ITransformState, 'width' | 'height'>;
95
100
  };
96
101
  hostPage?: Pick<IDocumentSkeletonPage, 'pageWidth' | 'pageHeight'>;
97
- page: Pick<IDocumentSkeletonPage | IDocumentSkeletonHeaderFooter, 'pageWidth' | 'pageHeight'>;
102
+ page: Pick<IDocumentSkeletonPage | IDocumentSkeletonHeaderFooter, 'pageWidth' | 'pageHeight'> & Partial<Pick<IDocumentSkeletonPage, 'type'>>;
98
103
  }): Pick<IDocumentSkeletonPage | IDocumentSkeletonHeaderFooter, 'pageWidth' | 'pageHeight'>;
99
104
  export declare function getDocsPageRelativeDrawingLeft(config: {
100
105
  hostPage: Pick<IDocumentSkeletonPage, 'pageWidth'>;
@@ -115,9 +120,10 @@ export declare function getDocsPageRelativeDrawingTop(config: {
115
120
  height: number;
116
121
  }): number | undefined;
117
122
  export declare function getDocsPageRelativeDrawingAnchorPage(config: {
118
- page: Pick<IDocumentSkeletonPage | IDocumentSkeletonHeaderFooter, 'pageWidth' | 'pageHeight'>;
123
+ page: Pick<IDocumentSkeletonPage | IDocumentSkeletonHeaderFooter, 'pageWidth' | 'pageHeight'> & Partial<Pick<IDocumentSkeletonPage, 'type'>>;
119
124
  clipPage: Pick<IDocumentSkeletonPage | IDocumentSkeletonHeaderFooter, 'pageWidth' | 'pageHeight'>;
120
125
  hostPage?: Pick<IDocumentSkeletonPage, 'pageWidth' | 'pageHeight'>;
126
+ drawingLayoutType?: PositionedObjectLayoutType;
121
127
  }): Pick<IDocumentSkeletonPage | IDocumentSkeletonHeaderFooter, 'pageWidth' | 'pageHeight'> | undefined;
122
128
  export declare function getDocsDrawingBehindText(config: {
123
129
  drawingOrigin: {
@@ -150,12 +156,14 @@ export declare class DocDrawingTransformUpdateController extends Disposable impl
150
156
  private _refreshCurrentDrawing;
151
157
  private _initTransformRefresh;
152
158
  private _refreshDrawing;
159
+ private _includeGroupChildren;
153
160
  private _collectPublishedPageDrawingPositions;
154
161
  private _collectSegmentDrawingPositions;
155
162
  private _getStaleNonMultiDrawings;
156
163
  private _handleMultiDrawingsTransform;
157
164
  private _calculateDrawingPosition;
158
165
  private _collectDrawingPosition;
166
+ private _collectGroupChildren;
159
167
  private _calculateTableCellDrawingPositions;
160
168
  private _calculateColumnGroupDrawingPositions;
161
169
  private _drawingInitializeListener;
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import type { DocumentDataModel } from '@univerjs/core';
17
- import type { IRenderContext, IRenderModule } from '@univerjs/engine-render';
17
+ import type { IRenderContext, IRenderModule, ITransformerConfig } from '@univerjs/engine-render';
18
18
  import { Disposable, ICommandService, IContextService, IImageIoService, IPermissionService, LocaleService } from '@univerjs/core';
19
19
  import { DocSelectionManagerService } from '@univerjs/docs';
20
20
  import { IDocDrawingService } from '@univerjs/docs-drawing';
@@ -57,6 +57,8 @@ export declare class DocDrawingUpdateRenderController extends Disposable impleme
57
57
  private _getDocDrawing;
58
58
  private _groupDrawingListener;
59
59
  private _getCurrentSceneAndTransformer;
60
+ protected _getTransformerInteractionOptions(): ITransformerConfig;
61
+ protected _isDocumentInteractionFocusing(unitId: string): boolean;
60
62
  private _transformDrawingListener;
61
63
  private _focusDrawingListener;
62
64
  private _updateDrawingsEditStatus;
@@ -0,0 +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
+ */
16
+ import { DocDrawingUpdateRenderController } from '../doc-drawing-update.render-controller';
17
+ export declare class MobileDocDrawingUpdateRenderController extends DocDrawingUpdateRenderController {
18
+ protected _getTransformerInteractionOptions(): {
19
+ moveOnlyWhenSelected: boolean;
20
+ };
21
+ protected _isDocumentInteractionFocusing(_unitId: string): boolean;
22
+ }
@@ -28,8 +28,11 @@ export { DocFloatDomController } from './controllers/doc-float-dom.controller';
28
28
  export { DOCS_IMAGE_MENU_ID } from './menu/image.menu';
29
29
  export { menuSchema as DocsDrawingUIMenuSchema } from './menu/schema';
30
30
  export { DOCS_SHAPE_BELOW_MENU_ID, DOCS_SHAPE_MENU_ID } from './menu/shape.menu';
31
+ export { UniverDocsDrawingMobileUIPlugin } from './mobile-plugin';
31
32
  export { UniverDocsDrawingUIPlugin } from './plugin';
32
33
  export { DocDrawingFloatingToolbarAdapterService } from './services/doc-drawing-floating-toolbar-adapter.service';
33
34
  export type { IDocDrawingFloatingToolbarAdapter, IDocDrawingFloatingToolbarButtonItem, IDocDrawingFloatingToolbarItem, IDocDrawingFloatingToolbarOption, IDocDrawingFloatingToolbarParams, IDocDrawingFloatingToolbarSelectItem, } from './services/doc-drawing-floating-toolbar-adapter.service';
34
35
  export { DocDrawingPosition } from './views/doc-image-panel/DocDrawingPosition';
35
36
  export { DocDrawingTextWrap } from './views/doc-image-panel/DocDrawingTextWrap';
37
+ export { MobileDocDrawingPosition } from './views/doc-image-panel/MobileDocDrawingPosition';
38
+ export { MobileDocDrawingTextWrap } from './views/doc-image-panel/MobileDocDrawingTextWrap';
@@ -14,11 +14,11 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { ICommandService, IContextService, IPermissionService, IUniverInstanceService, RxDisposable } from '@univerjs/core';
17
- import { IDocDrawingAdapterService } from '@univerjs/docs-drawing';
17
+ import { IDocDrawingAdapterService, IDocDrawingService } from '@univerjs/docs-drawing';
18
18
  import { DocCanvasPopManagerService } from '@univerjs/docs-ui';
19
19
  import { IDrawingManagerService } from '@univerjs/drawing';
20
20
  import { IRenderManagerService } from '@univerjs/engine-render';
21
- import { IMenuManagerService } from '@univerjs/ui';
21
+ import { IContextMenuService, IMenuManagerService } from '@univerjs/ui';
22
22
  import { DocDrawingFloatingToolbarAdapterService } from '../services/doc-drawing-floating-toolbar-adapter.service';
23
23
  export declare class DocDrawingPopupMenuController extends RxDisposable {
24
24
  private readonly _drawingManagerService;
@@ -27,17 +27,19 @@ export declare class DocDrawingPopupMenuController extends RxDisposable {
27
27
  private readonly _univerInstanceService;
28
28
  private readonly _contextService;
29
29
  private readonly _drawingAdapterService;
30
+ private readonly _docDrawingService;
30
31
  private readonly _floatingToolbarAdapterService;
31
32
  private readonly _commandService;
32
33
  private readonly _menuManagerService;
33
34
  private readonly _permissionService;
35
+ private readonly _contextMenuService;
34
36
  private _initImagePopupMenu;
35
37
  private _embeddedRenderUnits;
36
38
  private _popupMenuListeners;
37
39
  private _disposePopupsByUnit;
38
40
  private _popupTargetsByUnit;
39
41
  private _isDrawingPanelOpen;
40
- constructor(_drawingManagerService: IDrawingManagerService, _canvasPopManagerService: DocCanvasPopManagerService, _renderManagerService: IRenderManagerService, _univerInstanceService: IUniverInstanceService, _contextService: IContextService, _drawingAdapterService: IDocDrawingAdapterService, _floatingToolbarAdapterService: DocDrawingFloatingToolbarAdapterService, _commandService: ICommandService, _menuManagerService: IMenuManagerService, _permissionService: IPermissionService);
42
+ constructor(_drawingManagerService: IDrawingManagerService, _canvasPopManagerService: DocCanvasPopManagerService, _renderManagerService: IRenderManagerService, _univerInstanceService: IUniverInstanceService, _contextService: IContextService, _drawingAdapterService: IDocDrawingAdapterService, _docDrawingService: IDocDrawingService, _floatingToolbarAdapterService: DocDrawingFloatingToolbarAdapterService, _commandService: ICommandService, _menuManagerService: IMenuManagerService, _permissionService: IPermissionService, _contextMenuService: IContextMenuService);
41
43
  private _init;
42
44
  private _dispose;
43
45
  private _clearPopups;
@@ -0,0 +1,32 @@
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 { IUniverDocsDrawingUIConfig } from './config/config';
17
+ import { IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
18
+ import { IRenderManagerService } from '@univerjs/engine-render';
19
+ export declare class UniverDocsDrawingMobileUIPlugin extends Plugin {
20
+ private readonly _config;
21
+ protected _injector: Injector;
22
+ private readonly _renderManagerSrv;
23
+ private readonly _configService;
24
+ static type: UniverInstanceType;
25
+ static pluginName: string;
26
+ static packageName: string;
27
+ static version: string;
28
+ constructor(_config: Partial<IUniverDocsDrawingUIConfig> | undefined, _injector: Injector, _renderManagerSrv: IRenderManagerService, _configService: IConfigService);
29
+ onStarting(): void;
30
+ onReady(): void;
31
+ onRendered(): void;
32
+ }
@@ -15,6 +15,7 @@
15
15
  */
16
16
  import type { IDisposable } from '@univerjs/core';
17
17
  import type { IDocDrawing } from '@univerjs/docs-drawing';
18
+ import type { IValueOption } from '@univerjs/ui';
18
19
  export interface IDocDrawingFloatingToolbarParams {
19
20
  unitId: string;
20
21
  subUnitId: string;
@@ -22,7 +23,7 @@ export interface IDocDrawingFloatingToolbarParams {
22
23
  }
23
24
  export interface IDocDrawingFloatingToolbarOption {
24
25
  icon?: string;
25
- label: unknown;
26
+ label: IValueOption['label'];
26
27
  value: string;
27
28
  }
28
29
  interface IDocDrawingFloatingToolbarBaseItem {
@@ -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 MobileDocDrawingPanel(): import("react").JSX.Element;
@@ -0,0 +1,17 @@
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 { IDocDrawingPositionProps } from './DocDrawingPosition';
17
+ export declare function MobileDocDrawingPosition(props: IDocDrawingPositionProps): import("react").JSX.Element | null;
@@ -0,0 +1,17 @@
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 { IDocDrawingTextWrapProps } from './DocDrawingTextWrap';
17
+ export declare function MobileDocDrawingTextWrap(props: IDocDrawingTextWrapProps): import("react").JSX.Element | null;
@@ -14,3 +14,4 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  export declare const COMPONENT_DOC_DRAWING_PANEL = "COMPONENT_DOC_DRAWING_PANEL";
17
+ export declare const MOBILE_DOC_DRAWING_PANEL_DIALOG_ID = "docs-drawing-ui.mobile-panel";
@@ -0,0 +1,46 @@
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 { IObjectPositionH, IObjectPositionV } from '@univerjs/core';
17
+ import type { IDocDrawingPositionProps } from './DocDrawingPosition';
18
+ import { DocumentFlavor, LocaleService } from '@univerjs/core';
19
+ export declare function useDocDrawingPosition(props: IDocDrawingPositionProps): {
20
+ localeService: LocaleService;
21
+ showPanel: boolean;
22
+ disabled: boolean;
23
+ hPosition: IObjectPositionH;
24
+ vPosition: IObjectPositionV;
25
+ followTextMove: boolean;
26
+ documentFlavor: DocumentFlavor | undefined;
27
+ HORIZONTAL_RELATIVE_FROM: {
28
+ label: string;
29
+ value: string;
30
+ }[];
31
+ VERTICAL_RELATIVE_FROM: ({
32
+ label: string;
33
+ value: string;
34
+ disabled: boolean;
35
+ } | {
36
+ label: string;
37
+ value: string;
38
+ disabled?: undefined;
39
+ })[];
40
+ handlePositionChange: (direction: "positionH" | "positionV", value: IObjectPositionH | IObjectPositionV) => void;
41
+ handleHorizontalRelativeFromChange: (value: string) => void;
42
+ handleVerticalRelativeFromChange: (value: string) => void;
43
+ handleFollowTextMoveCheck: (val: string | number | boolean) => void;
44
+ MIN_OFFSET: number;
45
+ MAX_OFFSET: number;
46
+ };
@@ -0,0 +1,41 @@
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 { Nullable } from '@univerjs/core';
17
+ import type { IDocDrawingTextWrapProps } from './DocDrawingTextWrap';
18
+ import { LocaleService, WrapTextType } from '@univerjs/core';
19
+ import { TextWrappingStyle } from '@univerjs/docs-drawing';
20
+ interface IDistToText {
21
+ distT: number;
22
+ distL: number;
23
+ distB: number;
24
+ distR: number;
25
+ }
26
+ export declare function useDocDrawingTextWrap(props: IDocDrawingTextWrapProps): {
27
+ localeService: LocaleService;
28
+ showPanel: boolean;
29
+ wrappingStyle: TextWrappingStyle;
30
+ wrapText: WrapTextType;
31
+ distToText: IDistToText;
32
+ disableWrapText: boolean;
33
+ disableDistTB: boolean;
34
+ disableDistLR: boolean;
35
+ handleWrappingStyleChange: (value: number | string | boolean) => void;
36
+ handleWrapTextChange: (value: number | string | boolean) => void;
37
+ handleDistToTextChange: (value: Nullable<number>, direction: keyof IDistToText) => void;
38
+ MIN_MARGIN: number;
39
+ MAX_MARGIN: number;
40
+ };
41
+ export {};