@univerjs-pro/boards-ui 1.0.0-beta.0 → 1.0.0-beta.2
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/facade.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/locale/ar-SA.js +1 -1
- package/lib/cjs/locale/ca-ES.js +1 -1
- package/lib/cjs/locale/de-DE.js +1 -1
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/es-ES.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +1 -1
- package/lib/cjs/locale/id-ID.js +1 -1
- package/lib/cjs/locale/it-IT.js +1 -1
- package/lib/cjs/locale/ja-JP.js +1 -1
- package/lib/cjs/locale/ko-KR.js +1 -1
- package/lib/cjs/locale/pl-PL.js +1 -1
- package/lib/cjs/locale/pt-BR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/sk-SK.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-HK.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/cjs/shape-preset-labels-C4G0G9GI.js +1 -1
- package/lib/es/facade.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/locale/ar-SA.js +1 -1
- package/lib/es/locale/ca-ES.js +1 -1
- package/lib/es/locale/de-DE.js +1 -1
- package/lib/es/locale/en-US.js +1 -1
- package/lib/es/locale/es-ES.js +1 -1
- package/lib/es/locale/fa-IR.js +1 -1
- package/lib/es/locale/fr-FR.js +1 -1
- package/lib/es/locale/id-ID.js +1 -1
- package/lib/es/locale/it-IT.js +1 -1
- package/lib/es/locale/ja-JP.js +1 -1
- package/lib/es/locale/ko-KR.js +1 -1
- package/lib/es/locale/pl-PL.js +1 -1
- package/lib/es/locale/pt-BR.js +1 -1
- package/lib/es/locale/ru-RU.js +1 -1
- package/lib/es/locale/sk-SK.js +1 -1
- package/lib/es/locale/vi-VN.js +1 -1
- package/lib/es/locale/zh-CN.js +1 -1
- package/lib/es/locale/zh-HK.js +1 -1
- package/lib/es/locale/zh-TW.js +1 -1
- package/lib/es/shape-preset-labels-092BdVw3.js +1 -1
- package/lib/facade.js +1 -1
- package/lib/index.css +45 -40
- package/lib/index.js +1 -1
- package/lib/locale/ar-SA.js +1 -1
- package/lib/locale/ca-ES.js +1 -1
- package/lib/locale/de-DE.js +1 -1
- package/lib/locale/en-US.js +1 -1
- package/lib/locale/es-ES.js +1 -1
- package/lib/locale/fa-IR.js +1 -1
- package/lib/locale/fr-FR.js +1 -1
- package/lib/locale/id-ID.js +1 -1
- package/lib/locale/it-IT.js +1 -1
- package/lib/locale/ja-JP.js +1 -1
- package/lib/locale/ko-KR.js +1 -1
- package/lib/locale/pl-PL.js +1 -1
- package/lib/locale/pt-BR.js +1 -1
- package/lib/locale/ru-RU.js +1 -1
- package/lib/locale/sk-SK.js +1 -1
- package/lib/locale/vi-VN.js +1 -1
- package/lib/locale/zh-CN.js +1 -1
- package/lib/locale/zh-HK.js +1 -1
- package/lib/locale/zh-TW.js +1 -1
- package/lib/shape-preset-labels-092BdVw3.js +1 -1
- package/lib/types/commands/commands/analyze-board-rendered-layout.command.d.ts +2 -1
- package/lib/types/commands/operations/board-chart-dialog.operation.d.ts +2 -2
- package/lib/types/commands/operations/board-pointer.operation.d.ts +8 -0
- package/lib/types/commands/operations/board-selection.operation.d.ts +4 -2
- package/lib/types/commands/operations/board-ui-control.operation.d.ts +30 -0
- package/lib/types/common/board-shortcuts.d.ts +1 -3
- package/lib/types/config/config.d.ts +29 -2
- package/lib/types/const.d.ts +2 -0
- package/lib/types/controllers/board-clipboard-shortcut.controller.d.ts +2 -21
- package/lib/types/controllers/board-connector-interaction.render-controller.d.ts +1 -0
- package/lib/types/controllers/board-element-selection.controller.d.ts +1 -0
- package/lib/types/controllers/board-element-transform.controller.d.ts +3 -0
- package/lib/types/controllers/board-element-transformer-config.util.d.ts +22 -21
- package/lib/types/controllers/board-grouping-shortcut.controller.d.ts +2 -14
- package/lib/types/controllers/board-history-shortcut.controller.d.ts +2 -8
- package/lib/types/controllers/board-layout-shortcut.controller.d.ts +2 -14
- package/lib/types/controllers/board-order-shortcut.controller.d.ts +2 -10
- package/lib/types/controllers/board-render.controller.d.ts +1 -0
- package/lib/types/controllers/board-selection-shortcut.controller.d.ts +2 -14
- package/lib/types/controllers/board-settings-shortcut.controller.d.ts +2 -14
- package/lib/types/controllers/board-shape-text-float-menu.render-controller.d.ts +5 -4
- package/lib/types/controllers/board-swimlane-lane-shortcut.controller.d.ts +5 -17
- package/lib/types/controllers/board-tool-shortcut.controller.d.ts +5 -16
- package/lib/types/controllers/board-unit-presence.controller.d.ts +6 -0
- package/lib/types/controllers/board-unit-presence.render-controller.d.ts +37 -0
- package/lib/types/controllers/board-view-shortcut.controller.d.ts +2 -23
- package/lib/types/controllers/board-viewport-bar.render-controller.d.ts +43 -0
- package/lib/types/controllers/board-viewport-input.render-controller.d.ts +8 -0
- package/lib/types/facade/f-board-ui.d.ts +19 -0
- package/lib/types/facade/index.d.ts +1 -0
- package/lib/types/index.d.ts +9 -4
- package/lib/types/locale/en-US.d.ts +2 -0
- package/lib/types/plugin.d.ts +7 -0
- package/lib/types/render-adapters/board-element-render-adapter.d.ts +3 -2
- package/lib/types/render-objects/board-connector-object.d.ts +17 -5
- package/lib/types/render-objects/board-shape-object.d.ts +1 -0
- package/lib/types/render-objects/board-viewport-bar-object.d.ts +33 -0
- package/lib/types/services/board-canvas-pop-manager.service.d.ts +3 -1
- package/lib/types/services/board-clipboard.service.d.ts +10 -3
- package/lib/types/services/board-element-edit.service.d.ts +2 -0
- package/lib/types/services/board-embed-integration.service.d.ts +9 -0
- package/lib/types/services/board-find.service.d.ts +1 -0
- package/lib/types/services/board-image-insert.service.d.ts +3 -1
- package/lib/types/services/board-pointer-state.service.d.ts +21 -0
- package/lib/types/services/board-screenshot.service.d.ts +3 -1
- package/lib/types/services/board-settings-menu-contribution.service.d.ts +37 -0
- package/lib/types/services/board-settings.service.d.ts +3 -5
- package/lib/types/services/board-shortcut-runtime.service.d.ts +32 -0
- package/lib/types/services/board-text-editing.service.d.ts +9 -4
- package/lib/types/services/board-tool.service.d.ts +3 -1
- package/lib/types/services/board-toolbar-contribution.service.d.ts +3 -2
- package/lib/types/services/board-ui-state.service.d.ts +2 -1
- package/lib/types/services/board-unit-presence-ui-adapter.service.d.ts +32 -0
- package/lib/types/services/board-viewport.service.d.ts +2 -1
- package/lib/types/utils/board-connector-hit-test.util.d.ts +2 -0
- package/lib/types/utils/board-connector-marker-anchor.util.d.ts +0 -1
- package/lib/types/utils/board-connector-marker.util.d.ts +21 -0
- package/lib/types/utils/board-connector-quick-connect.util.d.ts +1 -0
- package/lib/types/utils/board-connector-render-bounds.util.d.ts +0 -1
- package/lib/types/utils/board-connector-render-geometry.util.d.ts +33 -0
- package/lib/types/utils/board-connector-routing.util.d.ts +13 -1
- package/lib/types/utils/board-page-background-image.util.d.ts +15 -0
- package/lib/types/utils/board-render-page.util.d.ts +10 -5
- package/lib/types/utils/board-shortcut-preconditions.util.d.ts +4 -2
- package/lib/types/utils/board-viewport-bar.util.d.ts +55 -0
- package/lib/types/utils/board-viewport.util.d.ts +1 -0
- package/lib/types/views/BoardConnectorFloatingToolbarControls.d.ts +8 -2
- package/lib/types/views/BoardFloatingToolPanel.d.ts +1 -0
- package/lib/types/views/BoardPageBackgroundView.d.ts +8 -0
- package/lib/types/views/BoardSettingsMenu.d.ts +14 -0
- package/lib/types/views/BoardShapeFloatingToolbar.d.ts +2 -3
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- 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 +19 -19
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IBoardConnectorData, IBoardConnectorElement, IBoardConnectorEndpoint, IBoardConnectorPoint, IBoardElementData, IBoardElementTransform } from '@univerjs-pro/boards';
|
|
1
|
+
import type { IBoardConnectorData, IBoardConnectorElement, IBoardConnectorEndpoint, IBoardConnectorMarker, IBoardConnectorPoint, IBoardElementData, IBoardElementTransform } from '@univerjs-pro/boards';
|
|
2
2
|
import type { IBoardRoutingObstacleIndex, IBoardRoutingSegment } from './board-connector-router.util';
|
|
3
3
|
export interface IBoardConnectorRouteBounds {
|
|
4
4
|
left: number;
|
|
@@ -45,8 +45,10 @@ export interface IResolveBoardConnectorRoutePointsOptions extends IResolveBoardC
|
|
|
45
45
|
};
|
|
46
46
|
resolvedRoutePoints?: readonly IBoardConnectorPoint[];
|
|
47
47
|
routingCache?: BoardConnectorRoutingCache;
|
|
48
|
+
connectorCrossingPenaltyEnabled?: boolean;
|
|
48
49
|
}
|
|
49
50
|
export declare const BOARD_CONNECTOR_MIN_BOUNDS_SIZE = 1;
|
|
51
|
+
export declare const BOARD_CONNECTOR_ROUNDED_CORNER_RADIUS = 16;
|
|
50
52
|
type IBoardConnectorElementData = IBoardElementData & {
|
|
51
53
|
element: IBoardConnectorElement;
|
|
52
54
|
};
|
|
@@ -57,15 +59,22 @@ export declare function isBoardConnectorRouteAlignedWithEndpoints(connectorData:
|
|
|
57
59
|
export declare function normalizeBoardConnectorEndpointManualRoutePoints(connectorData: IBoardConnectorData, options?: IResolveBoardConnectorEndpointOptions): IBoardConnectorData;
|
|
58
60
|
export declare class BoardConnectorRoutingCache {
|
|
59
61
|
private _elementData?;
|
|
62
|
+
private readonly _connectorSceneKeyById;
|
|
63
|
+
private readonly _obstacleKeyByElementId;
|
|
60
64
|
private readonly _obstacleIndexesByExclusion;
|
|
61
65
|
private readonly _routePointsByConnectorId;
|
|
62
66
|
private readonly _crossingRoutePointsByConnectorId;
|
|
63
67
|
invalidate(elementData?: Record<string, IBoardElementData>, invalidatedElementIds?: Iterable<string>): string[];
|
|
68
|
+
private _reset;
|
|
69
|
+
private _syncConnectorSnapshot;
|
|
70
|
+
private _syncObstacleSnapshot;
|
|
71
|
+
private _invalidateDependentRoutes;
|
|
64
72
|
getObstacleIndex(elementData: Record<string, IBoardElementData> | undefined, excludeElementIds: readonly string[]): IBoardRoutingObstacleIndex;
|
|
65
73
|
resolveRoutePoints(connectorData: IBoardConnectorData, options?: IResolveBoardConnectorRoutePointsOptions): IBoardConnectorPoint[];
|
|
66
74
|
private _resolveRouteDependency;
|
|
67
75
|
resolveCrossingRoutePoints(item: IBoardConnectorElementData, elementData: Record<string, IBoardElementData>): IBoardConnectorPoint[];
|
|
68
76
|
}
|
|
77
|
+
export declare function resolveBoardConnectorTerminalPadding(marker: IBoardConnectorMarker | undefined, strokeWidth: number, rounded: boolean): number;
|
|
69
78
|
export declare function resolveBoardConnectorRoutePoints(connectorData: IBoardConnectorData, options?: IResolveBoardConnectorRoutePointsOptions): IBoardConnectorPoint[];
|
|
70
79
|
export declare function resolveBoardConnectorPathCommands(connectorData: IBoardConnectorData, options?: IResolveBoardConnectorRoutePointsOptions): BoardConnectorPathCommand[];
|
|
71
80
|
export declare function resolveBoardConnectorPathBounds(commands: readonly BoardConnectorPathCommand[], fallbackTransform?: IBoardElementTransform): IBoardConnectorRouteBounds;
|
|
@@ -78,8 +87,11 @@ export declare function resolveBoardConnectorPathBounds(commands: readonly Board
|
|
|
78
87
|
*/
|
|
79
88
|
export declare function resolveBoardConnectorPathGeometry(commands: readonly BoardConnectorPathCommand[]): IBoardConnectorPathGeometry | null;
|
|
80
89
|
export declare function trimBoardConnectorPathCommands(commands: readonly BoardConnectorPathCommand[], startTrim: number, endTrim: number): BoardConnectorPathCommand[];
|
|
90
|
+
export declare function resolveBoardConnectorPathLength(commands: readonly BoardConnectorPathCommand[]): number;
|
|
91
|
+
export declare function resolveBoardConnectorRoundedRoutePathLength(points: readonly IBoardConnectorPoint[], cornerRadius?: number): number;
|
|
81
92
|
export declare function hitTestBoardConnectorPath(point: IBoardConnectorPoint, commands: readonly BoardConnectorPathCommand[], tolerance: number): boolean;
|
|
82
93
|
export declare function resolveBoardConnectorRouteBounds(points: readonly IBoardConnectorPoint[], fallbackTransform?: IBoardElementTransform): IBoardConnectorRouteBounds;
|
|
83
94
|
export declare function distanceToBoardConnectorSegment(point: IBoardConnectorPoint, start: IBoardConnectorPoint, end: IBoardConnectorPoint): number;
|
|
95
|
+
export declare function resolveBoardConnectorPolylineLength(points: readonly IBoardConnectorPoint[]): number;
|
|
84
96
|
export declare function trimBoardConnectorRoute(points: readonly IBoardConnectorPoint[], startTrim: number, endTrim: number): IBoardConnectorPoint[];
|
|
85
97
|
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { BoardBackgroundImageFit } from '@univerjs-pro/boards';
|
|
2
|
+
export interface IBoardPageBackgroundImageSource {
|
|
3
|
+
fit: BoardBackgroundImageFit;
|
|
4
|
+
image: HTMLImageElement;
|
|
5
|
+
}
|
|
6
|
+
export interface IDrawBoardPageBackgroundImageOptions {
|
|
7
|
+
cropLeft?: number;
|
|
8
|
+
cropTop?: number;
|
|
9
|
+
frameHeight: number;
|
|
10
|
+
frameWidth: number;
|
|
11
|
+
scaleX?: number;
|
|
12
|
+
scaleY?: number;
|
|
13
|
+
}
|
|
14
|
+
export declare function getBoardPageBackgroundImageSource(unitId: string, subUnitId: string, root?: ParentNode): IBoardPageBackgroundImageSource | null;
|
|
15
|
+
export declare function drawBoardPageBackgroundImage(context: CanvasRenderingContext2D, source: IBoardPageBackgroundImageSource, options: IDrawBoardPageBackgroundImageOptions): void;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type { IBoardPage, IBoardPageSize } from '@univerjs-pro/boards';
|
|
1
|
+
import type { BoardBackgroundImageFit, IBoardPage, IBoardPageSize } from '@univerjs-pro/boards';
|
|
2
2
|
import type { IUniverBoardsUIConfig } from '../config/config';
|
|
3
3
|
export declare const BOARD_RENDER_SCENE_DEFAULT_MIN_SIZE: IBoardPageSize;
|
|
4
|
-
export declare const BOARD_RENDER_SCENE_DEFAULT_FALLBACK_FILL = "
|
|
5
|
-
export declare const BOARD_RENDER_SCENE_DARK_FALLBACK_FILL = "#fcfdff";
|
|
4
|
+
export declare const BOARD_RENDER_SCENE_DEFAULT_FALLBACK_FILL = "gray.50";
|
|
6
5
|
export interface IResolveBoardRenderSceneSizeOptions {
|
|
7
6
|
engineWidth?: number;
|
|
8
7
|
engineHeight?: number;
|
|
@@ -12,8 +11,14 @@ export interface IResolveBoardRenderSceneSizeOptions {
|
|
|
12
11
|
}
|
|
13
12
|
export interface IResolveBoardPageBackgroundFillOptions {
|
|
14
13
|
darkMode?: boolean;
|
|
15
|
-
darkFallbackFill?: string;
|
|
16
14
|
}
|
|
17
|
-
export
|
|
15
|
+
export interface IBoardBackgroundImageDrawRect {
|
|
16
|
+
left: number;
|
|
17
|
+
top: number;
|
|
18
|
+
width: number;
|
|
19
|
+
height: number;
|
|
20
|
+
}
|
|
21
|
+
export declare function resolveBoardPageBackgroundFill(page: Pick<IBoardPage, 'background'> | null | undefined, options?: IResolveBoardPageBackgroundFillOptions): string;
|
|
22
|
+
export declare function resolveBoardBackgroundImageDrawRect(frameWidth: number, frameHeight: number, imageWidth: number, imageHeight: number, fit?: BoardBackgroundImageFit): IBoardBackgroundImageDrawRect;
|
|
18
23
|
export declare function resolveBoardRenderSceneMinSize(config?: Pick<IUniverBoardsUIConfig, 'scene'>): IBoardPageSize;
|
|
19
24
|
export declare function resolveBoardRenderSceneSize({ engineWidth, engineHeight, sceneWidth, sceneHeight, minSize, }: IResolveBoardRenderSceneSizeOptions): IBoardPageSize;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import type { BoardModel } from '@univerjs-pro/boards';
|
|
1
2
|
import type { IContextService, IUniverInstanceService } from '@univerjs/core';
|
|
2
|
-
import type {
|
|
3
|
+
import type { BoardShortcutRuntimeService } from '../services/board-shortcut-runtime.service';
|
|
3
4
|
export declare function isBoardKeyboardOwner(instanceService: IUniverInstanceService, boardUnitId: string): boolean;
|
|
4
|
-
export declare function isBoardShortcutAvailable(contextService: IContextService,
|
|
5
|
+
export declare function isBoardShortcutAvailable(contextService: Pick<IContextService, 'getContextValue'>): boolean;
|
|
6
|
+
export declare function resolveBoardShortcutModel(runtime: BoardShortcutRuntimeService): BoardModel | null;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { IBoardViewportBarPadding } from '../config/config';
|
|
2
|
+
export interface IBoardViewportBarRect {
|
|
3
|
+
height: number;
|
|
4
|
+
left: number;
|
|
5
|
+
top: number;
|
|
6
|
+
width: number;
|
|
7
|
+
}
|
|
8
|
+
export interface IBoardViewportBarNavigationBounds {
|
|
9
|
+
bottom: number;
|
|
10
|
+
left: number;
|
|
11
|
+
right: number;
|
|
12
|
+
top: number;
|
|
13
|
+
}
|
|
14
|
+
export interface IResolvedBoardViewportBarPadding {
|
|
15
|
+
bottom: number;
|
|
16
|
+
left: number;
|
|
17
|
+
right: number;
|
|
18
|
+
top: number;
|
|
19
|
+
}
|
|
20
|
+
export interface IBoardViewportBarSafeArea {
|
|
21
|
+
horizontalEnd?: number;
|
|
22
|
+
horizontalStart?: number;
|
|
23
|
+
verticalEnd?: number;
|
|
24
|
+
verticalStart?: number;
|
|
25
|
+
}
|
|
26
|
+
export interface IBoardViewportBarAxisLayout {
|
|
27
|
+
barRect: IBoardViewportBarRect;
|
|
28
|
+
maxViewportStart: number;
|
|
29
|
+
minViewportStart: number;
|
|
30
|
+
travelLength: number;
|
|
31
|
+
viewportStart: number;
|
|
32
|
+
}
|
|
33
|
+
export interface IBoardViewportBarLayout {
|
|
34
|
+
horizontal: IBoardViewportBarAxisLayout | null;
|
|
35
|
+
vertical: IBoardViewportBarAxisLayout | null;
|
|
36
|
+
}
|
|
37
|
+
export interface IResolveBoardViewportBarLayoutOptions {
|
|
38
|
+
barSize: number;
|
|
39
|
+
edgeOffset: number;
|
|
40
|
+
horizontal: boolean;
|
|
41
|
+
minBarLength: number;
|
|
42
|
+
navigationBounds: IBoardViewportBarNavigationBounds;
|
|
43
|
+
safeArea?: IBoardViewportBarSafeArea;
|
|
44
|
+
vertical: boolean;
|
|
45
|
+
viewport: IBoardViewportBarRect;
|
|
46
|
+
viewportPixelSize: {
|
|
47
|
+
height: number;
|
|
48
|
+
width: number;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
export declare function resolveBoardViewportBarPadding(padding: number | IBoardViewportBarPadding | undefined): IResolvedBoardViewportBarPadding;
|
|
52
|
+
export declare function resolveBoardViewportBarNavigationBounds(contentBounds: IBoardViewportBarRect | null | undefined, viewport: IBoardViewportBarRect, padding: IResolvedBoardViewportBarPadding): IBoardViewportBarNavigationBounds;
|
|
53
|
+
export declare function expandBoardViewportBarNavigationBounds(current: IBoardViewportBarNavigationBounds, target: IBoardViewportBarNavigationBounds): IBoardViewportBarNavigationBounds;
|
|
54
|
+
export declare function resolveBoardViewportBarLayout(options: IResolveBoardViewportBarLayoutOptions): IBoardViewportBarLayout;
|
|
55
|
+
export declare function resolveBoardViewportStartFromBarDrag(layout: IBoardViewportBarAxisLayout, pointerDelta: number): number;
|
|
@@ -49,6 +49,7 @@ export declare function getBoardPointFromClient(element: HTMLElement, clientX: n
|
|
|
49
49
|
x: number;
|
|
50
50
|
y: number;
|
|
51
51
|
};
|
|
52
|
+
export declare function getBoardViewportPoint(boardPoint: IBoardViewportPoint, viewport: IBoardViewportTransform): IBoardViewportPoint;
|
|
52
53
|
/**
|
|
53
54
|
* Maps the board world coordinate system onto the DOM overlay in one
|
|
54
55
|
* compositor-friendly transform. Children of this layer keep their unscaled
|
|
@@ -21,10 +21,16 @@ export declare function MarkerDropdown(props: {
|
|
|
21
21
|
export declare function SettingsDropdown(props: {
|
|
22
22
|
routing?: BoardConnectorRouting;
|
|
23
23
|
style: IBoardConnectorStyle;
|
|
24
|
-
onRouting: (routing: BoardConnectorRouting) => void
|
|
25
|
-
onStyle: (style: Partial<IBoardConnectorStyle>) => void
|
|
24
|
+
onRouting: (routing: BoardConnectorRouting) => void | Promise<void>;
|
|
25
|
+
onStyle: (style: Partial<IBoardConnectorStyle>) => void | Promise<void>;
|
|
26
26
|
}): import("react").JSX.Element;
|
|
27
|
+
export declare function applyConnectorRoutingStyleOption(option: {
|
|
28
|
+
routing: BoardConnectorRouting;
|
|
29
|
+
cornerStyle?: IBoardConnectorStyle['cornerStyle'];
|
|
30
|
+
}, onRouting: (routing: BoardConnectorRouting) => void | Promise<void>, onStyle: (style: Partial<IBoardConnectorStyle>) => void | Promise<void>): Promise<void>;
|
|
27
31
|
export declare function createConnectorLabelRichTextBuilder(label: IBoardConnectorLabel): RichTextBuilder;
|
|
32
|
+
export declare function isConnectorLabelSettingsNestedPopupTarget(target: EventTarget | null): boolean;
|
|
33
|
+
export declare function shouldCloseConnectorLabelStylePanel(panel: Element, target: EventTarget | null): boolean;
|
|
28
34
|
export declare function ConnectorLabelSettingsDropdown(props: {
|
|
29
35
|
label: IBoardConnectorLabel;
|
|
30
36
|
onEditText: () => void;
|
|
@@ -41,6 +41,7 @@ interface IBoardMindMapTemplateGroup {
|
|
|
41
41
|
}
|
|
42
42
|
export declare const BOARD_MIND_MAP_TEMPLATE_GROUPS: IBoardMindMapTemplateGroup[];
|
|
43
43
|
export declare function resolveMindMapPresetInsertTemplate(preset: IBoardMindMapInsertPreset, nodeText: string): {
|
|
44
|
+
rootText: string;
|
|
44
45
|
structureKind: BoardMindMapPresetStructureKind;
|
|
45
46
|
children: {
|
|
46
47
|
text: string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { BoardModel, IBoardImageBackground } from '@univerjs-pro/boards';
|
|
2
|
+
import type { CSSProperties } from 'react';
|
|
3
|
+
export interface IBoardPageBackgroundViewProps {
|
|
4
|
+
boardModel?: BoardModel;
|
|
5
|
+
pageId?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function createBoardPageBackgroundImageStyle(background: IBoardImageBackground): CSSProperties;
|
|
8
|
+
export declare const BoardPageBackgroundView: import("react").MemoExoticComponent<({ boardModel, pageId, }: IBoardPageBackgroundViewProps) => import("react").JSX.Element>;
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import { Button } from '@univerjs/design';
|
|
1
3
|
export declare const BOARD_TOP_RIGHT_MENU_LEADING_PART = "board.top-right-menu.leading";
|
|
2
4
|
export declare const BOARD_SETTINGS_MENU_ACTIONS_PART = "boards-ui.settings-menu.actions";
|
|
5
|
+
type TopRightMenuButtonProps = ComponentProps<typeof Button> & {
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
label: string;
|
|
8
|
+
tooltipVisible?: boolean;
|
|
9
|
+
};
|
|
10
|
+
interface IBoardFindResultTextProps {
|
|
11
|
+
query: string;
|
|
12
|
+
text: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function BoardFindResultText(props: IBoardFindResultTextProps): string | (string | import("react").JSX.Element)[];
|
|
15
|
+
export declare const TopRightMenuButton: import("react").ForwardRefExoticComponent<Omit<TopRightMenuButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
3
16
|
export declare function BoardSettingsMenu(): import("react").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { IShapeData, ShapeTypeEnum } from '@univerjs-pro/engine-shape';
|
|
2
|
+
import type { IPopup } from '@univerjs/ui';
|
|
2
3
|
export declare const BOARD_SHAPE_FLOATING_TOOLBAR_KEY = "board.shape.floating-toolbar";
|
|
3
4
|
interface IBoardShapeFloatingToolbarExtraProps {
|
|
4
5
|
unitId: string;
|
|
@@ -9,9 +10,7 @@ interface IBoardShapeFloatingToolbarExtraProps {
|
|
|
9
10
|
selectionOnly?: boolean;
|
|
10
11
|
}
|
|
11
12
|
interface IBoardShapeFloatingToolbarProps {
|
|
12
|
-
popup:
|
|
13
|
-
extraProps?: IBoardShapeFloatingToolbarExtraProps;
|
|
14
|
-
};
|
|
13
|
+
popup: IPopup<IBoardShapeFloatingToolbarExtraProps>;
|
|
15
14
|
}
|
|
16
15
|
export declare function BoardShapeFloatingToolbar(props: IBoardShapeFloatingToolbarProps): import("react").JSX.Element | null;
|
|
17
16
|
export {};
|
package/lib/umd/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x51e0(){var _0xcbd96e=['setObjectListPanelOpen','8zuDOmD','1439943JsGoCH','3242732XRIENH','FocusBoardElementOperation','2TQHsgD','function','385ilDMyt','extend','@univerjs-pro/boards-ui','getActivePageId','GetBoardObjectListPanelOpenOperation','getObjectListPanelOpen','analyzeRenderedLayout','amd','4937079jGaXtY','25192480APDIox','getScreenshot','getElementViewportPoint','89406zlCnKs','4256046SjKEwR','AnalyzeBoardRenderedLayoutCommand','UniverProBoardsFacade','getSettings','_boardModel','_commandService','CaptureBoardScreenshotCommand','2391621GQlEUN','FBoard','GetBoardSettingsOperation','syncExecuteCommand','SetBoardSettingsOperation'];_0x51e0=function(){return _0xcbd96e;};return _0x51e0();}function _0x5264(_0x57c41d,_0x511fb3){_0x57c41d=_0x57c41d-0x155;var _0x51e090=_0x51e0();var _0x526416=_0x51e090[_0x57c41d];return _0x526416;}(function(_0x2c2aaf,_0x3682bd){var _0xb43675=_0x5264,_0x318ced=_0x2c2aaf();while(!![]){try{var _0x327c97=-parseInt(_0xb43675(0x158))/0x1+parseInt(_0xb43675(0x15b))/0x2*(-parseInt(_0xb43675(0x171))/0x3)+-parseInt(_0xb43675(0x159))/0x4+-parseInt(_0xb43675(0x15d))/0x5*(-parseInt(_0xb43675(0x169))/0x6)+parseInt(_0xb43675(0x165))/0x7+-parseInt(_0xb43675(0x157))/0x8*(parseInt(_0xb43675(0x16a))/0x9)+parseInt(_0xb43675(0x166))/0xa;if(_0x327c97===_0x3682bd)break;else _0x318ced['push'](_0x318ced['shift']());}catch(_0x11ebe5){_0x318ced['push'](_0x318ced['shift']());}}}(_0x51e0,0xcfcfb),function(_0x3cdf56,_0x3ef9a4){var _0x2c2dc4=_0x5264;typeof exports=='object'&&typeof module<'u'?_0x3ef9a4(require('@univerjs-pro/boards-ui'),require('@univerjs-pro/boards/facade')):typeof define==_0x2c2dc4(0x15c)&&define[_0x2c2dc4(0x164)]?define([_0x2c2dc4(0x15f),'@univerjs-pro/boards/facade'],_0x3ef9a4):(_0x3cdf56=typeof globalThis<'u'?globalThis:_0x3cdf56||self,_0x3ef9a4(_0x3cdf56['UniverProBoardsUi'],_0x3cdf56[_0x2c2dc4(0x16c)]));}(this,function(_0x392fc1,_0x3762df){var _0x28b756=_0x5264,_0x4d2199=class extends _0x3762df['FBoard']{[_0x28b756(0x163)](_0x9ad6dd){var _0x51e2ba=_0x28b756;return this['_commandService'][_0x51e2ba(0x174)](_0x392fc1[_0x51e2ba(0x16b)]['id'],{'unitId':this['id'],'subUnitId':this[_0x51e2ba(0x16e)][_0x51e2ba(0x160)](),'focusPadding':_0x9ad6dd});}[_0x28b756(0x167)](_0x3aadee){var _0x119354=_0x28b756;return this[_0x119354(0x16f)]['executeCommand'](_0x392fc1[_0x119354(0x170)]['id'],{..._0x3aadee,'unitId':this['id'],'subUnitId':this['_boardModel'][_0x119354(0x160)]()});}};_0x3762df['FBoard'][_0x28b756(0x15e)](_0x4d2199);var _0x5b23a9=class extends _0x3762df[_0x28b756(0x172)]{[_0x28b756(0x16d)](){var _0x45196b=_0x28b756;return this[_0x45196b(0x16f)][_0x45196b(0x174)](_0x392fc1[_0x45196b(0x173)]['id'],{'unitId':this['id']});}['setSettings'](_0x17c2d4){var _0x5d8a33=_0x28b756;return this[_0x5d8a33(0x16f)][_0x5d8a33(0x174)](_0x392fc1[_0x5d8a33(0x155)]['id'],{'unitId':this['id'],'settings':_0x17c2d4});}[_0x28b756(0x162)](){var _0x49f323=_0x28b756;return this[_0x49f323(0x16f)][_0x49f323(0x174)](_0x392fc1[_0x49f323(0x161)]['id'],{'unitId':this['id']});}[_0x28b756(0x156)](_0x2e18cc){var _0x590aee=_0x28b756;return this[_0x590aee(0x16f)]['syncExecuteCommand'](_0x392fc1['SetBoardObjectListPanelOpenOperation']['id'],{'unitId':this['id'],'open':_0x2e18cc});}['findElementsByText'](_0x2eee24){var _0x18b352=_0x28b756;return this[_0x18b352(0x16f)][_0x18b352(0x174)](_0x392fc1['FindBoardElementsByTextOperation']['id'],{'unitId':this['id'],'query':_0x2eee24});}['focusElement'](_0x36a476,_0x1c4313){var _0x126ed2=_0x28b756;return this[_0x126ed2(0x16f)][_0x126ed2(0x174)](_0x392fc1[_0x126ed2(0x15a)]['id'],{'unitId':this['id'],'elementId':_0x36a476,'viewportPoint':_0x1c4313});}[_0x28b756(0x168)](_0x1985b9){var _0x552958=_0x28b756;return this[_0x552958(0x16f)][_0x552958(0x174)](_0x392fc1['GetBoardElementViewportPointOperation']['id'],{'unitId':this['id'],'elementId':_0x1985b9});}};_0x3762df['FBoard']['extend'](_0x5b23a9);}));
|