@univerjs-pro/boards-ui 1.0.0-alpha.3
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/README.md +46 -0
- package/lib/cjs/index.js +1 -0
- package/lib/cjs/locale/ar-SA.js +1 -0
- package/lib/cjs/locale/ca-ES.js +1 -0
- package/lib/cjs/locale/de-DE.js +1 -0
- package/lib/cjs/locale/en-US.js +1 -0
- package/lib/cjs/locale/es-ES.js +1 -0
- package/lib/cjs/locale/fa-IR.js +1 -0
- package/lib/cjs/locale/fr-FR.js +1 -0
- package/lib/cjs/locale/id-ID.js +1 -0
- package/lib/cjs/locale/it-IT.js +1 -0
- package/lib/cjs/locale/ja-JP.js +1 -0
- package/lib/cjs/locale/ko-KR.js +1 -0
- package/lib/cjs/locale/pl-PL.js +1 -0
- package/lib/cjs/locale/pt-BR.js +1 -0
- package/lib/cjs/locale/ru-RU.js +1 -0
- package/lib/cjs/locale/sk-SK.js +1 -0
- package/lib/cjs/locale/vi-VN.js +1 -0
- package/lib/cjs/locale/zh-CN.js +1 -0
- package/lib/cjs/locale/zh-HK.js +1 -0
- package/lib/cjs/locale/zh-TW.js +1 -0
- package/lib/cjs/shape-preset-labels-C4G0G9GI.js +1 -0
- package/lib/es/index.js +1 -0
- package/lib/es/locale/ar-SA.js +1 -0
- package/lib/es/locale/ca-ES.js +1 -0
- package/lib/es/locale/de-DE.js +1 -0
- package/lib/es/locale/en-US.js +1 -0
- package/lib/es/locale/es-ES.js +1 -0
- package/lib/es/locale/fa-IR.js +1 -0
- package/lib/es/locale/fr-FR.js +1 -0
- package/lib/es/locale/id-ID.js +1 -0
- package/lib/es/locale/it-IT.js +1 -0
- package/lib/es/locale/ja-JP.js +1 -0
- package/lib/es/locale/ko-KR.js +1 -0
- package/lib/es/locale/pl-PL.js +1 -0
- package/lib/es/locale/pt-BR.js +1 -0
- package/lib/es/locale/ru-RU.js +1 -0
- package/lib/es/locale/sk-SK.js +1 -0
- package/lib/es/locale/vi-VN.js +1 -0
- package/lib/es/locale/zh-CN.js +1 -0
- package/lib/es/locale/zh-HK.js +1 -0
- package/lib/es/locale/zh-TW.js +1 -0
- package/lib/es/shape-preset-labels-092BdVw3.js +1 -0
- package/lib/index.css +1229 -0
- package/lib/index.js +1 -0
- package/lib/locale/ar-SA.js +1 -0
- package/lib/locale/ca-ES.js +1 -0
- package/lib/locale/de-DE.js +1 -0
- package/lib/locale/en-US.js +1 -0
- package/lib/locale/es-ES.js +1 -0
- package/lib/locale/fa-IR.js +1 -0
- package/lib/locale/fr-FR.js +1 -0
- package/lib/locale/id-ID.js +1 -0
- package/lib/locale/it-IT.js +1 -0
- package/lib/locale/ja-JP.js +1 -0
- package/lib/locale/ko-KR.js +1 -0
- package/lib/locale/pl-PL.js +1 -0
- package/lib/locale/pt-BR.js +1 -0
- package/lib/locale/ru-RU.js +1 -0
- package/lib/locale/sk-SK.js +1 -0
- package/lib/locale/vi-VN.js +1 -0
- package/lib/locale/zh-CN.js +1 -0
- package/lib/locale/zh-HK.js +1 -0
- package/lib/locale/zh-TW.js +1 -0
- package/lib/shape-preset-labels-092BdVw3.js +1 -0
- package/lib/types/commands/operations/board-container-child-contextmenu.operation.d.ts +18 -0
- package/lib/types/commands/operations/board-container-contextmenu.operation.d.ts +18 -0
- package/lib/types/commands/operations/board-selection.operation.d.ts +14 -0
- package/lib/types/commands/operations/board-swimlane-contextmenu.operation.d.ts +23 -0
- package/lib/types/common/board-shortcuts.d.ts +98 -0
- package/lib/types/common/connector-presets.d.ts +22 -0
- package/lib/types/common/connector-routing-preference.d.ts +11 -0
- package/lib/types/common/settings-actions.d.ts +26 -0
- package/lib/types/common/shape-presets.d.ts +58 -0
- package/lib/types/common/sticky-colors.d.ts +4 -0
- package/lib/types/common/theme-presets.d.ts +2 -0
- package/lib/types/common/toolbar-tools.d.ts +17 -0
- package/lib/types/components/object-list-panel/board-object-list-state.d.ts +27 -0
- package/lib/types/config/config.d.ts +92 -0
- package/lib/types/const.d.ts +26 -0
- package/lib/types/controllers/board-clipboard-shortcut.controller.d.ts +25 -0
- package/lib/types/controllers/board-connector-floating-toolbar.render-controller.d.ts +30 -0
- package/lib/types/controllers/board-connector-interaction.render-controller.d.ts +158 -0
- package/lib/types/controllers/board-container-membership.render-controller.d.ts +27 -0
- package/lib/types/controllers/board-element-selection.controller.d.ts +63 -0
- package/lib/types/controllers/board-element-transform.controller.d.ts +52 -0
- package/lib/types/controllers/board-element-transformer-config.util.d.ts +27 -0
- package/lib/types/controllers/board-grid.render-controller.d.ts +14 -0
- package/lib/types/controllers/board-grouping-shortcut.controller.d.ts +20 -0
- package/lib/types/controllers/board-history-shortcut.controller.d.ts +16 -0
- package/lib/types/controllers/board-ink-interaction.render-controller.d.ts +124 -0
- package/lib/types/controllers/board-layout-shortcut.controller.d.ts +20 -0
- package/lib/types/controllers/board-mermaid-import.controller.d.ts +9 -0
- package/lib/types/controllers/board-order-shortcut.controller.d.ts +16 -0
- package/lib/types/controllers/board-pending-insert.render-controller.d.ts +27 -0
- package/lib/types/controllers/board-render-object-cleanup.util.d.ts +7 -0
- package/lib/types/controllers/board-render.controller.d.ts +36 -0
- package/lib/types/controllers/board-selection-overlay.render-controller.d.ts +30 -0
- package/lib/types/controllers/board-selection-shortcut.controller.d.ts +20 -0
- package/lib/types/controllers/board-settings-shortcut.controller.d.ts +20 -0
- package/lib/types/controllers/board-shape-adjust.render-controller.d.ts +68 -0
- package/lib/types/controllers/board-shape-floating-toolbar.render-controller.d.ts +29 -0
- package/lib/types/controllers/board-shape-text-float-menu.render-controller.d.ts +9 -0
- package/lib/types/controllers/board-swimlane-lane-shortcut.controller.d.ts +23 -0
- package/lib/types/controllers/board-swimlane-resize.render-controller.d.ts +33 -0
- package/lib/types/controllers/board-text-editing.render-controller.d.ts +46 -0
- package/lib/types/controllers/board-theme-follow-univer.controller.d.ts +10 -0
- package/lib/types/controllers/board-tool-shortcut.controller.d.ts +22 -0
- package/lib/types/controllers/board-ui.controller.d.ts +9 -0
- package/lib/types/controllers/board-view-shortcut.controller.d.ts +29 -0
- package/lib/types/controllers/board-viewport-input.render-controller.d.ts +27 -0
- package/lib/types/index.d.ts +27 -0
- package/lib/types/locale/ar-SA.d.ts +3 -0
- package/lib/types/locale/ca-ES.d.ts +3 -0
- package/lib/types/locale/de-DE.d.ts +3 -0
- package/lib/types/locale/en-US.d.ts +659 -0
- package/lib/types/locale/es-ES.d.ts +3 -0
- package/lib/types/locale/fa-IR.d.ts +3 -0
- package/lib/types/locale/fr-FR.d.ts +3 -0
- package/lib/types/locale/id-ID.d.ts +3 -0
- package/lib/types/locale/it-IT.d.ts +3 -0
- package/lib/types/locale/ja-JP.d.ts +3 -0
- package/lib/types/locale/ko-KR.d.ts +3 -0
- package/lib/types/locale/pl-PL.d.ts +3 -0
- package/lib/types/locale/pt-BR.d.ts +3 -0
- package/lib/types/locale/ru-RU.d.ts +3 -0
- package/lib/types/locale/shared/shape-preset-labels.d.ts +153 -0
- package/lib/types/locale/sk-SK.d.ts +3 -0
- package/lib/types/locale/types.d.ts +3 -0
- package/lib/types/locale/vi-VN.d.ts +3 -0
- package/lib/types/locale/zh-CN.d.ts +3 -0
- package/lib/types/locale/zh-HK.d.ts +3 -0
- package/lib/types/locale/zh-TW.d.ts +3 -0
- package/lib/types/menu/board-container-child-contextmenu.menu.d.ts +5 -0
- package/lib/types/menu/board-container-child-contextmenu.schema.d.ts +2 -0
- package/lib/types/menu/board-container-contextmenu.menu.d.ts +9 -0
- package/lib/types/menu/board-container-contextmenu.schema.d.ts +2 -0
- package/lib/types/menu/board-contextmenu.d.ts +7 -0
- package/lib/types/menu/board-swimlane-contextmenu.menu.d.ts +8 -0
- package/lib/types/menu/board-swimlane-contextmenu.schema.d.ts +2 -0
- package/lib/types/plugin.d.ts +21 -0
- package/lib/types/render-adapters/board-element-render-adapter.d.ts +63 -0
- package/lib/types/render-objects/board-adjust-point-object.d.ts +27 -0
- package/lib/types/render-objects/board-connector-affordance-object.d.ts +21 -0
- package/lib/types/render-objects/board-connector-endpoint-object.d.ts +29 -0
- package/lib/types/render-objects/board-connector-object.d.ts +58 -0
- package/lib/types/render-objects/board-connector-quick-connect-preview-object.d.ts +22 -0
- package/lib/types/render-objects/board-connector-snap-object.d.ts +16 -0
- package/lib/types/render-objects/board-connector-waypoint-object.d.ts +51 -0
- package/lib/types/render-objects/board-container-membership-object.d.ts +19 -0
- package/lib/types/render-objects/board-document-text-render.util.d.ts +61 -0
- package/lib/types/render-objects/board-grid-object.d.ts +17 -0
- package/lib/types/render-objects/board-guide-object.d.ts +29 -0
- package/lib/types/render-objects/board-image-object.d.ts +16 -0
- package/lib/types/render-objects/board-ink-draft-object.d.ts +16 -0
- package/lib/types/render-objects/board-ink-eraser-draft-object.d.ts +18 -0
- package/lib/types/render-objects/board-ink-pen-editor-object.d.ts +39 -0
- package/lib/types/render-objects/board-ink-stage-action-button-object.d.ts +32 -0
- package/lib/types/render-objects/board-ink-tool-cursor-object.d.ts +19 -0
- package/lib/types/render-objects/board-pending-insert-object.d.ts +35 -0
- package/lib/types/render-objects/board-selection-marquee-object.d.ts +28 -0
- package/lib/types/render-objects/board-shape-object.d.ts +75 -0
- package/lib/types/render-objects/board-swimlane-resize-object.d.ts +33 -0
- package/lib/types/services/board-canvas-pop-manager.service.d.ts +22 -0
- package/lib/types/services/board-clipboard-resource-adapter.service.d.ts +54 -0
- package/lib/types/services/board-clipboard.service.d.ts +54 -0
- package/lib/types/services/board-connector-tool.service.d.ts +11 -0
- package/lib/types/services/board-container-rename.service.d.ts +20 -0
- package/lib/types/services/board-container-tool.service.d.ts +12 -0
- package/lib/types/services/board-dom-layer.service.d.ts +31 -0
- package/lib/types/services/board-element-edit.service.d.ts +124 -0
- package/lib/types/services/board-element-insert.service.d.ts +40 -0
- package/lib/types/services/board-element-state.service.d.ts +83 -0
- package/lib/types/services/board-find.service.d.ts +22 -0
- package/lib/types/services/board-image-insert.service.d.ts +23 -0
- package/lib/types/services/board-ink-edit.service.d.ts +33 -0
- package/lib/types/services/board-ink-pen-adapter.service.d.ts +22 -0
- package/lib/types/services/board-mermaid-import.service.d.ts +82 -0
- package/lib/types/services/board-render-scene.service.d.ts +9 -0
- package/lib/types/services/board-selection-overlay.service.d.ts +13 -0
- package/lib/types/services/board-selection.service.d.ts +18 -0
- package/lib/types/services/board-settings-action.service.d.ts +21 -0
- package/lib/types/services/board-settings.service.d.ts +13 -0
- package/lib/types/services/board-shape-intrinsic-size.service.d.ts +34 -0
- package/lib/types/services/board-side-panel.service.d.ts +37 -0
- package/lib/types/services/board-swimlane-lane-rename.service.d.ts +18 -0
- package/lib/types/services/board-text-editing.service.d.ts +45 -0
- package/lib/types/services/board-tool.service.d.ts +85 -0
- package/lib/types/services/board-ui-state.service.d.ts +98 -0
- package/lib/types/services/board-viewport.service.d.ts +15 -0
- package/lib/types/utils/board-alignment-guides.util.d.ts +27 -0
- package/lib/types/utils/board-clipboard.util.d.ts +40 -0
- package/lib/types/utils/board-connector-adjacency.util.d.ts +7 -0
- package/lib/types/utils/board-connector-affordance.util.d.ts +15 -0
- package/lib/types/utils/board-connector-hit-test.util.d.ts +14 -0
- package/lib/types/utils/board-connector-label.util.d.ts +17 -0
- package/lib/types/utils/board-connector-marker-anchor.util.d.ts +17 -0
- package/lib/types/utils/board-connector-marker.util.d.ts +13 -0
- package/lib/types/utils/board-connector-move.util.d.ts +8 -0
- package/lib/types/utils/board-connector-quick-connect.util.d.ts +22 -0
- package/lib/types/utils/board-connector-render-bounds.util.d.ts +11 -0
- package/lib/types/utils/board-connector-router.util.d.ts +62 -0
- package/lib/types/utils/board-connector-routing.util.d.ts +53 -0
- package/lib/types/utils/board-connector-selection.util.d.ts +10 -0
- package/lib/types/utils/board-connector-snap-highlight.util.d.ts +10 -0
- package/lib/types/utils/board-connector-snap.util.d.ts +25 -0
- package/lib/types/utils/board-connector-waypoint.util.d.ts +71 -0
- package/lib/types/utils/board-container-membership-overlay.util.d.ts +19 -0
- package/lib/types/utils/board-container-membership-update.util.d.ts +10 -0
- package/lib/types/utils/board-container-spatial-index.util.d.ts +16 -0
- package/lib/types/utils/board-container-target.util.d.ts +17 -0
- package/lib/types/utils/board-container-title-label.util.d.ts +20 -0
- package/lib/types/utils/board-container-toolbar.util.d.ts +40 -0
- package/lib/types/utils/board-draft-insert-position.util.d.ts +13 -0
- package/lib/types/utils/board-find.util.d.ts +25 -0
- package/lib/types/utils/board-floating-toolbar-anchor.util.d.ts +2 -0
- package/lib/types/utils/board-free-polyline-draft.util.d.ts +24 -0
- package/lib/types/utils/board-grid.util.d.ts +21 -0
- package/lib/types/utils/board-image-file.util.d.ts +11 -0
- package/lib/types/utils/board-image.util.d.ts +31 -0
- package/lib/types/utils/board-insert-config.util.d.ts +32 -0
- package/lib/types/utils/board-insert.util.d.ts +23 -0
- package/lib/types/utils/board-interaction-config.util.d.ts +19 -0
- package/lib/types/utils/board-mermaid-preview.util.d.ts +4 -0
- package/lib/types/utils/board-render-dirty.util.d.ts +8 -0
- package/lib/types/utils/board-render-page.util.d.ts +19 -0
- package/lib/types/utils/board-scene-input-lock.util.d.ts +7 -0
- package/lib/types/utils/board-selection-delete.util.d.ts +20 -0
- package/lib/types/utils/board-selection-geometry.util.d.ts +31 -0
- package/lib/types/utils/board-selection-hit-test.util.d.ts +17 -0
- package/lib/types/utils/board-selection-interaction.util.d.ts +23 -0
- package/lib/types/utils/board-selection-move.util.d.ts +17 -0
- package/lib/types/utils/board-selection-normalize.util.d.ts +3 -0
- package/lib/types/utils/board-selection-overlay.util.d.ts +15 -0
- package/lib/types/utils/board-selection-resize.util.d.ts +6 -0
- package/lib/types/utils/board-shape-editor.util.d.ts +9 -0
- package/lib/types/utils/board-shape-outline.util.d.ts +53 -0
- package/lib/types/utils/board-shape-text-document.util.d.ts +20 -0
- package/lib/types/utils/board-shape-theme.util.d.ts +4 -0
- package/lib/types/utils/board-shortcut-preconditions.util.d.ts +3 -0
- package/lib/types/utils/board-snap-session.util.d.ts +62 -0
- package/lib/types/utils/board-spacing-guides.util.d.ts +24 -0
- package/lib/types/utils/board-swimlane-focus.util.d.ts +11 -0
- package/lib/types/utils/board-swimlane-resize.util.d.ts +25 -0
- package/lib/types/utils/board-view-shortcut.util.d.ts +40 -0
- package/lib/types/utils/board-viewport-input.util.d.ts +35 -0
- package/lib/types/utils/board-viewport.util.d.ts +45 -0
- package/lib/types/views/BoardCanvasView.d.ts +1 -0
- package/lib/types/views/BoardConnectorFloatingToolbar.d.ts +17 -0
- package/lib/types/views/BoardConnectorQuickShapeMenu.d.ts +12 -0
- package/lib/types/views/BoardContainerRenamePopup.d.ts +6 -0
- package/lib/types/views/BoardDomLayerView.d.ts +8 -0
- package/lib/types/views/BoardFloatingPanelLayer.d.ts +1 -0
- package/lib/types/views/BoardFloatingToolPanel.d.ts +98 -0
- package/lib/types/views/BoardLeftToolbar.d.ts +1 -0
- package/lib/types/views/BoardMermaidImportDialog.d.ts +1 -0
- package/lib/types/views/BoardMindMapTemplateThumbnailIcon.d.ts +8 -0
- package/lib/types/views/BoardObjectListPanel.d.ts +1 -0
- package/lib/types/views/BoardSettingsMenu.d.ts +2 -0
- package/lib/types/views/BoardShapeFloatingToolbar.d.ts +16 -0
- package/lib/types/views/BoardShapePanel.d.ts +1 -0
- package/lib/types/views/BoardShapeTextEditorContainer.d.ts +24 -0
- package/lib/types/views/BoardShapeTextFloatToolbar.d.ts +1 -0
- package/lib/types/views/BoardShortcutHelpDrawer.d.ts +1 -0
- package/lib/types/views/BoardSwimlaneLaneRenamePopup.d.ts +6 -0
- package/lib/types/views/BoardTableSizePicker.d.ts +18 -0
- package/lib/types/views/BoardWorkbench.d.ts +1 -0
- package/lib/types/views/BoardZoomControls.d.ts +1 -0
- package/lib/types/views/board-floating-panel-layout.d.ts +33 -0
- package/lib/types/views/use-board-palette-pending-insert-drag.d.ts +9 -0
- package/lib/types/views/use-board-panel-outside-pointer-down.d.ts +5 -0
- package/lib/umd/index.js +1 -0
- package/lib/umd/locale/ar-SA.js +1 -0
- package/lib/umd/locale/ca-ES.js +1 -0
- package/lib/umd/locale/de-DE.js +1 -0
- package/lib/umd/locale/en-US.js +1 -0
- package/lib/umd/locale/es-ES.js +1 -0
- package/lib/umd/locale/fa-IR.js +1 -0
- package/lib/umd/locale/fr-FR.js +1 -0
- package/lib/umd/locale/id-ID.js +1 -0
- package/lib/umd/locale/it-IT.js +1 -0
- package/lib/umd/locale/ja-JP.js +1 -0
- package/lib/umd/locale/ko-KR.js +1 -0
- package/lib/umd/locale/pl-PL.js +1 -0
- package/lib/umd/locale/pt-BR.js +1 -0
- package/lib/umd/locale/ru-RU.js +1 -0
- package/lib/umd/locale/sk-SK.js +1 -0
- package/lib/umd/locale/vi-VN.js +1 -0
- package/lib/umd/locale/zh-CN.js +1 -0
- package/lib/umd/locale/zh-HK.js +1 -0
- package/lib/umd/locale/zh-TW.js +1 -0
- package/package.json +97 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { IBoardConnectorPoint } from '@univerjs-pro/boards';
|
|
2
|
+
import type { IBasicShapeData } from '@univerjs-pro/engine-shape';
|
|
3
|
+
export interface IBoardShapeOutlineBounds {
|
|
4
|
+
left: number;
|
|
5
|
+
top: number;
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
}
|
|
9
|
+
export interface IBoardShapeOutlineSegment {
|
|
10
|
+
start: IBoardConnectorPoint;
|
|
11
|
+
end: IBoardConnectorPoint;
|
|
12
|
+
}
|
|
13
|
+
export interface IBoardShapeNearestBoundaryPoint {
|
|
14
|
+
outlineIndex?: number;
|
|
15
|
+
segmentIndex: number;
|
|
16
|
+
segmentT: number;
|
|
17
|
+
boundaryRatio?: number;
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
distance: number;
|
|
21
|
+
normal: IBoardConnectorPoint;
|
|
22
|
+
}
|
|
23
|
+
export interface IBoardShapePathOutlineSegment extends IBoardShapeOutlineSegment {
|
|
24
|
+
outlineIndex: number;
|
|
25
|
+
segmentIndex: number;
|
|
26
|
+
startLength: number;
|
|
27
|
+
length: number;
|
|
28
|
+
}
|
|
29
|
+
export interface IBoardShapePathOutline {
|
|
30
|
+
segments: IBoardShapePathOutlineSegment[];
|
|
31
|
+
totalLength: number;
|
|
32
|
+
}
|
|
33
|
+
export interface IResolveBoardShapePathOutlineOptions {
|
|
34
|
+
shapeType: string | undefined;
|
|
35
|
+
bounds: IBoardShapeOutlineBounds;
|
|
36
|
+
shapeData?: IBasicShapeData;
|
|
37
|
+
}
|
|
38
|
+
export interface IResolveBoardShapePathBoundaryPointOptions extends IResolveBoardShapePathOutlineOptions {
|
|
39
|
+
outlineIndex?: number;
|
|
40
|
+
segmentIndex: number;
|
|
41
|
+
segmentT: number;
|
|
42
|
+
boundaryRatio?: number;
|
|
43
|
+
}
|
|
44
|
+
export declare function normalizeBoardVector(vector: IBoardConnectorPoint): IBoardConnectorPoint;
|
|
45
|
+
export declare function clampBoardValue(value: number, min: number, max: number): number;
|
|
46
|
+
export declare function resolveBoardShapePathOutline(options: IResolveBoardShapePathOutlineOptions): IBoardShapePathOutline | null;
|
|
47
|
+
export declare function resolveBoardShapePolygonOutlineVertices(shapeType: string | undefined, bounds: IBoardShapeOutlineBounds): IBoardConnectorPoint[] | null;
|
|
48
|
+
export declare function resolveBoardPolygonBoundarySegment(vertices: readonly IBoardConnectorPoint[], segmentIndex: number): IBoardShapeOutlineSegment;
|
|
49
|
+
export declare function resolveBoardPointOnSegment(start: IBoardConnectorPoint, end: IBoardConnectorPoint, t: number): IBoardConnectorPoint;
|
|
50
|
+
export declare function resolveBoardClockwisePolygonSegmentNormal(start: IBoardConnectorPoint, end: IBoardConnectorPoint): IBoardConnectorPoint;
|
|
51
|
+
export declare function resolveNearestBoardPolygonBoundaryPoint(point: IBoardConnectorPoint, vertices: readonly IBoardConnectorPoint[]): IBoardShapeNearestBoundaryPoint | null;
|
|
52
|
+
export declare function resolveNearestBoardShapeBoundaryPoint(point: IBoardConnectorPoint, options: IResolveBoardShapePathOutlineOptions): IBoardShapeNearestBoundaryPoint | null;
|
|
53
|
+
export declare function resolveBoardShapeBoundaryPoint(options: IResolveBoardShapePathBoundaryPointOptions): IBoardShapeNearestBoundaryPoint | null;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { IShapeTextDataModel } from '@univerjs-pro/engine-shape';
|
|
2
|
+
import type { IDocumentData, ITextStyle } from '@univerjs/core';
|
|
3
|
+
import { HorizontalAlign, VerticalAlign, WrapStrategy } from '@univerjs/core';
|
|
4
|
+
export interface IBoardPlainTextToDocumentOptions {
|
|
5
|
+
horizontalAlign?: HorizontalAlign;
|
|
6
|
+
id?: string;
|
|
7
|
+
textStyle?: ITextStyle;
|
|
8
|
+
verticalAlign?: VerticalAlign;
|
|
9
|
+
wrapStrategy?: WrapStrategy;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated Use `IShapeTextDataModel<IDocumentData, HorizontalAlign, VerticalAlign>`
|
|
13
|
+
* from `@univerjs-pro/engine-shape`. This alias remains for board UI
|
|
14
|
+
* compatibility while all products converge on the shared shape-text model.
|
|
15
|
+
*/
|
|
16
|
+
export type IBoardShapeTextModel = IShapeTextDataModel<IDocumentData, HorizontalAlign, VerticalAlign>;
|
|
17
|
+
export declare function plainTextToBoardDocumentData(text: string, options?: IBoardPlainTextToDocumentOptions): IDocumentData;
|
|
18
|
+
export declare function cloneBoardTextDocument(editorId: string, documentData: IDocumentData): IDocumentData;
|
|
19
|
+
export declare function documentDataToBoardPlainText(documentData: IDocumentData): string;
|
|
20
|
+
export declare function getBoardShapeTextModel(shapeText: unknown): IBoardShapeTextModel | null;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { IBoardElementData, IBoardPageElement, IBoardThemeData } from '@univerjs-pro/boards';
|
|
2
|
+
export declare function resolveBoardUIThemePrimaryColor(themeData?: IBoardThemeData): string;
|
|
3
|
+
export declare function resolveBoardUIShapeElementTheme(element: IBoardPageElement, themeData?: IBoardThemeData): IBoardPageElement;
|
|
4
|
+
export declare function resolveBoardUIElementDataTheme(elementDataItem: IBoardElementData, themeData?: IBoardThemeData): IBoardElementData;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { IContextService } from '@univerjs/core';
|
|
2
|
+
import type { IBoardElementStateService } from '../services/board-element-state.service';
|
|
3
|
+
export declare function isBoardShortcutAvailable(contextService: IContextService, elementStateService: IBoardElementStateService): boolean;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export type BoardSnapAxis = 'x' | 'y';
|
|
2
|
+
export interface IBoardSnapGuide {
|
|
3
|
+
id: string;
|
|
4
|
+
axis: BoardSnapAxis;
|
|
5
|
+
position: number;
|
|
6
|
+
}
|
|
7
|
+
export interface IBoardSnapSessionConfig {
|
|
8
|
+
enterThreshold?: number;
|
|
9
|
+
exitThreshold?: number;
|
|
10
|
+
breakawayThreshold?: number;
|
|
11
|
+
softThreshold?: number;
|
|
12
|
+
hardThreshold?: number;
|
|
13
|
+
softMaxStrength?: number;
|
|
14
|
+
cooldownMs?: number;
|
|
15
|
+
}
|
|
16
|
+
export interface IBoardSnapAxisOptions {
|
|
17
|
+
axis: BoardSnapAxis;
|
|
18
|
+
value: number;
|
|
19
|
+
guide: IBoardSnapGuide | null;
|
|
20
|
+
now?: number;
|
|
21
|
+
}
|
|
22
|
+
export interface IBoardSnapAxisResult {
|
|
23
|
+
snapped: boolean;
|
|
24
|
+
value: number;
|
|
25
|
+
guide: IBoardSnapGuide | null;
|
|
26
|
+
}
|
|
27
|
+
export interface IBoardConnectorAxisSnapOptions {
|
|
28
|
+
anchor: {
|
|
29
|
+
x: number;
|
|
30
|
+
y: number;
|
|
31
|
+
};
|
|
32
|
+
point: {
|
|
33
|
+
x: number;
|
|
34
|
+
y: number;
|
|
35
|
+
};
|
|
36
|
+
threshold: number;
|
|
37
|
+
}
|
|
38
|
+
export interface IBoardConnectorAxisSnapResult {
|
|
39
|
+
point: {
|
|
40
|
+
x: number;
|
|
41
|
+
y: number;
|
|
42
|
+
};
|
|
43
|
+
axis: 'horizontal' | 'vertical';
|
|
44
|
+
guide: IBoardSnapGuide;
|
|
45
|
+
}
|
|
46
|
+
export declare class BoardSnapSession {
|
|
47
|
+
private readonly _enterThreshold;
|
|
48
|
+
private readonly _exitThreshold;
|
|
49
|
+
private readonly _breakawayThreshold;
|
|
50
|
+
private readonly _softThreshold;
|
|
51
|
+
private readonly _hardThreshold;
|
|
52
|
+
private readonly _softMaxStrength;
|
|
53
|
+
private readonly _cooldownMs;
|
|
54
|
+
private _activeGuideId;
|
|
55
|
+
private _activeGuideStartValue;
|
|
56
|
+
private readonly _releasedGuideUntil;
|
|
57
|
+
constructor(config?: IBoardSnapSessionConfig);
|
|
58
|
+
reset(): void;
|
|
59
|
+
resolveAxisSnap(options: IBoardSnapAxisOptions): IBoardSnapAxisResult;
|
|
60
|
+
private _resolveSnappedValue;
|
|
61
|
+
}
|
|
62
|
+
export declare function resolveBoardConnectorAxisSnap(options: IBoardConnectorAxisSnapOptions): IBoardConnectorAxisSnapResult | null;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { IBoardElementData } from '@univerjs-pro/boards';
|
|
2
|
+
import type { IBoardSelectionRect } from './board-selection-geometry.util';
|
|
3
|
+
export type BoardSpacingGuideAxis = 'horizontal' | 'vertical';
|
|
4
|
+
export interface IBoardSpacingGuidePoint {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
}
|
|
8
|
+
export interface IBoardSpacingGuide {
|
|
9
|
+
axis: BoardSpacingGuideAxis;
|
|
10
|
+
distance: number;
|
|
11
|
+
sourceElementId: string;
|
|
12
|
+
sourceId: string;
|
|
13
|
+
start: IBoardSpacingGuidePoint;
|
|
14
|
+
end: IBoardSpacingGuidePoint;
|
|
15
|
+
label: IBoardSpacingGuidePoint;
|
|
16
|
+
}
|
|
17
|
+
export interface IResolveBoardElementSpacingGuidesOptions {
|
|
18
|
+
activeRect: IBoardSelectionRect;
|
|
19
|
+
activeIds: string[];
|
|
20
|
+
elementData: Record<string, IBoardElementData>;
|
|
21
|
+
elementOrder: string[];
|
|
22
|
+
maxDistance?: number;
|
|
23
|
+
}
|
|
24
|
+
export declare function resolveBoardElementSpacingGuides(options: IResolveBoardElementSpacingGuidesOptions): IBoardSpacingGuide[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { IBoardElementData } from '@univerjs-pro/boards';
|
|
2
|
+
import type { IBoardFocusedSwimlaneLane } from '../services/board-element-state.service';
|
|
3
|
+
export interface IResolveBoardFocusedSwimlaneLaneAtPointOptions {
|
|
4
|
+
elementData: Record<string, IBoardElementData>;
|
|
5
|
+
containerId: string;
|
|
6
|
+
point: {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export declare function resolveBoardFocusedSwimlaneLaneAtPoint(options: IResolveBoardFocusedSwimlaneLaneAtPointOptions): IBoardFocusedSwimlaneLane | null;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { IBoardConnectorPoint, IBoardContainerElement, IBoardRect } from '@univerjs-pro/boards';
|
|
2
|
+
export interface IBoardSwimlaneLaneResizeHandle {
|
|
3
|
+
containerId: string;
|
|
4
|
+
laneId: string;
|
|
5
|
+
nextLaneId: string;
|
|
6
|
+
orientation: 'horizontal' | 'vertical';
|
|
7
|
+
origin: IBoardConnectorPoint;
|
|
8
|
+
initialSize: number;
|
|
9
|
+
minSize: number;
|
|
10
|
+
line: {
|
|
11
|
+
start: IBoardConnectorPoint;
|
|
12
|
+
end: IBoardConnectorPoint;
|
|
13
|
+
};
|
|
14
|
+
hitBounds: IBoardRect;
|
|
15
|
+
}
|
|
16
|
+
export interface IResolveBoardSwimlaneLaneResizeHandlesOptions {
|
|
17
|
+
hitSlop?: number;
|
|
18
|
+
}
|
|
19
|
+
export interface IBoardSwimlaneLaneResizeDraft {
|
|
20
|
+
containerId: string;
|
|
21
|
+
laneId: string;
|
|
22
|
+
size: number;
|
|
23
|
+
}
|
|
24
|
+
export declare function resolveBoardSwimlaneLaneResizeHandles(container: IBoardContainerElement, outerBounds: IBoardRect, options?: IResolveBoardSwimlaneLaneResizeHandlesOptions): IBoardSwimlaneLaneResizeHandle[];
|
|
25
|
+
export declare function resolveBoardSwimlaneLaneResizeDraft(handle: IBoardSwimlaneLaneResizeHandle, point: IBoardConnectorPoint): IBoardSwimlaneLaneResizeDraft;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { BoardModel, IBoardElementData, IBoardElementService } from '@univerjs-pro/boards';
|
|
2
|
+
import type { BoardViewShortcutAction } from '../common/board-shortcuts';
|
|
3
|
+
import type { IResolvedBoardInteractionConfig } from './board-interaction-config.util';
|
|
4
|
+
import type { IBoardViewportPoint, IBoardViewportSize, IBoardViewportTransform } from './board-viewport.util';
|
|
5
|
+
interface IBoardViewShortcutContext {
|
|
6
|
+
unitId: string;
|
|
7
|
+
subUnitId: string;
|
|
8
|
+
}
|
|
9
|
+
interface IBoardViewShortcutStateService {
|
|
10
|
+
setZoomRatioAtViewportPoint: (zoomRatio: number, viewportPoint: IBoardViewportPoint) => void;
|
|
11
|
+
setViewportTransform: (viewport: IBoardViewportTransform) => void;
|
|
12
|
+
}
|
|
13
|
+
interface IBoardViewShortcutViewportService {
|
|
14
|
+
fitContent: (boardModel: BoardModel, options: {
|
|
15
|
+
viewportSize: IBoardViewportSize;
|
|
16
|
+
padding: number;
|
|
17
|
+
zoom: IResolvedBoardInteractionConfig;
|
|
18
|
+
}) => void;
|
|
19
|
+
}
|
|
20
|
+
export interface IApplyBoardViewShortcutOptions {
|
|
21
|
+
action: BoardViewShortcutAction;
|
|
22
|
+
boardModel: BoardModel;
|
|
23
|
+
boardContext?: IBoardViewShortcutContext | null;
|
|
24
|
+
selectedIds: string[];
|
|
25
|
+
boardElementService: Pick<IBoardElementService, 'getElementData'> | {
|
|
26
|
+
getElementData: (unitId: string, subUnitId: string) => Record<string, IBoardElementData>;
|
|
27
|
+
};
|
|
28
|
+
stateService: IBoardViewShortcutStateService;
|
|
29
|
+
viewportService: IBoardViewShortcutViewportService;
|
|
30
|
+
interactionConfig: IResolvedBoardInteractionConfig;
|
|
31
|
+
viewportSize: IBoardViewportSize;
|
|
32
|
+
viewportCenterPoint: IBoardViewportPoint;
|
|
33
|
+
preventDefault: () => void;
|
|
34
|
+
dispatchEvent?: (event: Event) => void;
|
|
35
|
+
requestFullscreen?: () => void | Promise<void>;
|
|
36
|
+
exitFullscreen?: () => void | Promise<void>;
|
|
37
|
+
getFullscreenElement?: () => unknown;
|
|
38
|
+
}
|
|
39
|
+
export declare function applyBoardViewShortcut(options: IApplyBoardViewShortcutOptions): boolean;
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { IResolvedBoardInteractionConfig } from './board-interaction-config.util';
|
|
2
|
+
import type { IBoardViewportPoint } from './board-viewport.util';
|
|
3
|
+
export declare const BOARD_WHEEL_LINE_HEIGHT = 16;
|
|
4
|
+
export declare const BOARD_WHEEL_PAGE_HEIGHT = 800;
|
|
5
|
+
export declare const BOARD_WHEEL_ZOOM_DELTA_BASE = 100;
|
|
6
|
+
export interface IBoardWheelEventLike {
|
|
7
|
+
clientX: number;
|
|
8
|
+
clientY: number;
|
|
9
|
+
ctrlKey?: boolean;
|
|
10
|
+
deltaMode?: number;
|
|
11
|
+
deltaX: number;
|
|
12
|
+
deltaY: number;
|
|
13
|
+
metaKey?: boolean;
|
|
14
|
+
shiftKey?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface IBoardViewportInputRect {
|
|
17
|
+
left: number;
|
|
18
|
+
top: number;
|
|
19
|
+
}
|
|
20
|
+
export type IBoardWheelViewportAction = {
|
|
21
|
+
type: 'none';
|
|
22
|
+
} | {
|
|
23
|
+
type: 'pan';
|
|
24
|
+
delta: IBoardViewportPoint;
|
|
25
|
+
} | {
|
|
26
|
+
type: 'zoomAtPoint';
|
|
27
|
+
viewportPoint: IBoardViewportPoint;
|
|
28
|
+
zoomFactor: number;
|
|
29
|
+
};
|
|
30
|
+
export interface IResolveBoardWheelViewportActionOptions {
|
|
31
|
+
event: IBoardWheelEventLike;
|
|
32
|
+
interactionConfig: Pick<IResolvedBoardInteractionConfig, 'trackpadPanEnabled' | 'wheelPanFactor' | 'wheelZoomFactor' | 'wheelZoomWithModifier' | 'zoomWheelFactor'>;
|
|
33
|
+
viewportRect: IBoardViewportInputRect;
|
|
34
|
+
}
|
|
35
|
+
export declare function resolveBoardWheelViewportAction({ event, interactionConfig, viewportRect, }: IResolveBoardWheelViewportActionOptions): IBoardWheelViewportAction;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
export declare const BOARD_MIN_ZOOM_RATIO = 0.1;
|
|
3
|
+
export declare const BOARD_MAX_ZOOM_RATIO = 4;
|
|
4
|
+
export interface IBoardViewportPoint {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
}
|
|
8
|
+
export interface IBoardViewportTransform {
|
|
9
|
+
zoomRatio: number;
|
|
10
|
+
panOffset: IBoardViewportPoint;
|
|
11
|
+
}
|
|
12
|
+
export interface IBoardViewportRect {
|
|
13
|
+
left: number;
|
|
14
|
+
top: number;
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
}
|
|
18
|
+
export interface IBoardViewportSize {
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
}
|
|
22
|
+
export interface IBoardViewportZoomConfig {
|
|
23
|
+
maxZoomRatio?: number;
|
|
24
|
+
minZoomRatio?: number;
|
|
25
|
+
}
|
|
26
|
+
export interface IResolveBoardViewportZoomAtPointOptions {
|
|
27
|
+
viewport: IBoardViewportTransform;
|
|
28
|
+
nextZoomRatio: number;
|
|
29
|
+
viewportPoint: IBoardViewportPoint;
|
|
30
|
+
zoom?: IBoardViewportZoomConfig;
|
|
31
|
+
}
|
|
32
|
+
export interface IResolveBoardViewportFitRectOptions {
|
|
33
|
+
rect: IBoardViewportRect;
|
|
34
|
+
viewportSize: IBoardViewportSize;
|
|
35
|
+
padding?: number;
|
|
36
|
+
zoom?: IBoardViewportZoomConfig;
|
|
37
|
+
}
|
|
38
|
+
export declare function clampBoardZoomRatio(zoomRatio: number, config?: IBoardViewportZoomConfig): number;
|
|
39
|
+
export declare function resolveBoardViewportZoomAtPoint(options: IResolveBoardViewportZoomAtPointOptions): IBoardViewportTransform;
|
|
40
|
+
export declare function resolveBoardViewportFitRect(options: IResolveBoardViewportFitRectOptions): IBoardViewportTransform;
|
|
41
|
+
export declare function getBoardPointFromClient(element: HTMLElement, clientX: number, clientY: number, viewport: IBoardViewportTransform, zoom?: IBoardViewportZoomConfig): {
|
|
42
|
+
x: number;
|
|
43
|
+
y: number;
|
|
44
|
+
};
|
|
45
|
+
export declare function createBoardViewportRectStyle(rect: IBoardViewportRect, viewport: IBoardViewportTransform, zoom?: IBoardViewportZoomConfig): CSSProperties;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function BoardCanvasView(): import("react").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { IBoardConnectorStyle } from '@univerjs-pro/boards';
|
|
2
|
+
import type { IShapeData } from '@univerjs-pro/engine-shape';
|
|
3
|
+
export declare const BOARD_CONNECTOR_FLOATING_TOOLBAR_KEY = "board.connector.floating-toolbar";
|
|
4
|
+
interface IBoardConnectorFloatingToolbarExtraProps {
|
|
5
|
+
unitId: string;
|
|
6
|
+
subUnitId: string;
|
|
7
|
+
elementId: string;
|
|
8
|
+
}
|
|
9
|
+
interface IBoardConnectorFloatingToolbarProps {
|
|
10
|
+
popup: {
|
|
11
|
+
extraProps?: IBoardConnectorFloatingToolbarExtraProps;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export declare function connectorStyleToShapeStrokeData(style: IBoardConnectorStyle): IShapeData;
|
|
15
|
+
export declare function shapeStrokeToBoardConnectorStylePatch(shapeData?: IShapeData): Partial<IBoardConnectorStyle>;
|
|
16
|
+
export declare function BoardConnectorFloatingToolbar({ popup }: IBoardConnectorFloatingToolbarProps): import("react").JSX.Element | null;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { BoardShapeType } from '@univerjs-pro/boards';
|
|
2
|
+
export declare const BOARD_CONNECTOR_QUICK_SHAPE_MENU_KEY = "board.connector.quick-shape-menu";
|
|
3
|
+
interface IBoardConnectorQuickShapeMenuExtraProps {
|
|
4
|
+
onSelect?: (shapeType: BoardShapeType | string) => void;
|
|
5
|
+
}
|
|
6
|
+
interface IBoardConnectorQuickShapeMenuProps {
|
|
7
|
+
popup: {
|
|
8
|
+
extraProps?: IBoardConnectorQuickShapeMenuExtraProps;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export declare function BoardConnectorQuickShapeMenu({ popup }: IBoardConnectorQuickShapeMenuProps): import("react").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface IBoardContainerRenamePopupProps {
|
|
2
|
+
initialTitle: string;
|
|
3
|
+
onCancel: () => void;
|
|
4
|
+
onSubmit: (title: string) => void | Promise<void>;
|
|
5
|
+
}
|
|
6
|
+
export declare function BoardContainerRenamePopup(props: IBoardContainerRenamePopupProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { BoardModel } from '@univerjs-pro/boards';
|
|
2
|
+
import type { IBoardViewportTransform, IBoardViewportZoomConfig } from '../utils/board-viewport.util';
|
|
3
|
+
export interface IBoardDomLayerViewProps {
|
|
4
|
+
boardModel: BoardModel | null | undefined;
|
|
5
|
+
interactionConfig: IBoardViewportZoomConfig;
|
|
6
|
+
viewportTransform: IBoardViewportTransform;
|
|
7
|
+
}
|
|
8
|
+
export declare function BoardDomLayerView({ boardModel, interactionConfig, viewportTransform, }: IBoardDomLayerViewProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function BoardFloatingPanelLayer(): import("react").JSX.Element;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import type { LocaleKey } from '../locale/types';
|
|
2
|
+
import type { BoardMindMapTemplateThumbnailVariant } from './BoardMindMapTemplateThumbnailIcon';
|
|
3
|
+
import { BoardToolType } from '@univerjs-pro/boards';
|
|
4
|
+
type BoardMindMapPresetStructureKind = 'mindmap-horizontal' | 'mindmap-vertical' | 'tree-right' | 'tree-left' | 'tree-alternate' | 'timeline-horizontal' | 'timeline-vertical';
|
|
5
|
+
interface IBoardMindMapPresetChild {
|
|
6
|
+
text?: string;
|
|
7
|
+
orderKey?: string;
|
|
8
|
+
side?: 'left' | 'right' | 'top' | 'bottom';
|
|
9
|
+
collapsed?: boolean;
|
|
10
|
+
branchColorKey?: string;
|
|
11
|
+
foreignAttributes?: Record<string, string>;
|
|
12
|
+
}
|
|
13
|
+
interface IBoardMindMapPresetBlueprintNode {
|
|
14
|
+
text?: string;
|
|
15
|
+
orderKey?: string;
|
|
16
|
+
side?: 'left' | 'right' | 'top' | 'bottom';
|
|
17
|
+
collapsed?: boolean;
|
|
18
|
+
branchColorKey?: string;
|
|
19
|
+
foreignAttributes?: Record<string, string>;
|
|
20
|
+
children: IBoardMindMapPresetBlueprintNode[];
|
|
21
|
+
}
|
|
22
|
+
interface IResolvedBoardMindMapPresetBlueprintNode extends Omit<IBoardMindMapPresetBlueprintNode, 'children' | 'text'> {
|
|
23
|
+
text: string;
|
|
24
|
+
children: IResolvedBoardMindMapPresetBlueprintNode[];
|
|
25
|
+
}
|
|
26
|
+
interface IBoardMindMapInsertPreset {
|
|
27
|
+
key: string;
|
|
28
|
+
thumbnail: BoardMindMapTemplateThumbnailVariant;
|
|
29
|
+
labelKey: LocaleKey;
|
|
30
|
+
structureKind: BoardMindMapPresetStructureKind;
|
|
31
|
+
children: IBoardMindMapPresetChild[];
|
|
32
|
+
blueprint?: {
|
|
33
|
+
title?: string;
|
|
34
|
+
root: IBoardMindMapPresetBlueprintNode;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
interface IBoardMindMapTemplateGroup {
|
|
38
|
+
key: string;
|
|
39
|
+
labelKey: LocaleKey;
|
|
40
|
+
presets: IBoardMindMapInsertPreset[];
|
|
41
|
+
}
|
|
42
|
+
export declare const BOARD_MIND_MAP_TEMPLATE_GROUPS: IBoardMindMapTemplateGroup[];
|
|
43
|
+
export declare function resolveMindMapPresetInsertTemplate(preset: IBoardMindMapInsertPreset, nodeText: string): {
|
|
44
|
+
structureKind: BoardMindMapPresetStructureKind;
|
|
45
|
+
children: {
|
|
46
|
+
text: string;
|
|
47
|
+
orderKey?: string;
|
|
48
|
+
side?: "left" | "right" | "top" | "bottom";
|
|
49
|
+
collapsed?: boolean;
|
|
50
|
+
branchColorKey?: string;
|
|
51
|
+
foreignAttributes?: Record<string, string>;
|
|
52
|
+
}[];
|
|
53
|
+
blueprint: {
|
|
54
|
+
title: string | undefined;
|
|
55
|
+
root: IResolvedBoardMindMapPresetBlueprintNode;
|
|
56
|
+
} | undefined;
|
|
57
|
+
};
|
|
58
|
+
declare const BOARD_CONTAINER_PRESETS: readonly [{
|
|
59
|
+
readonly key: "custom";
|
|
60
|
+
readonly labelKey: "boards-ui.panel.customContainer";
|
|
61
|
+
readonly width: 720;
|
|
62
|
+
readonly height: 405;
|
|
63
|
+
readonly variant: "custom";
|
|
64
|
+
}, {
|
|
65
|
+
readonly key: "16-9";
|
|
66
|
+
readonly labelKey: "boards-ui.panel.containerRatio16By9";
|
|
67
|
+
readonly width: 720;
|
|
68
|
+
readonly height: 405;
|
|
69
|
+
readonly variant: "wide";
|
|
70
|
+
}, {
|
|
71
|
+
readonly key: "4-3";
|
|
72
|
+
readonly labelKey: "boards-ui.panel.containerRatio4By3";
|
|
73
|
+
readonly width: 630;
|
|
74
|
+
readonly height: 472.5;
|
|
75
|
+
readonly variant: "standard";
|
|
76
|
+
}, {
|
|
77
|
+
readonly key: "1-1";
|
|
78
|
+
readonly labelKey: "boards-ui.panel.containerRatio1By1";
|
|
79
|
+
readonly width: 495;
|
|
80
|
+
readonly height: 495;
|
|
81
|
+
readonly variant: "square";
|
|
82
|
+
}, {
|
|
83
|
+
readonly key: "a4";
|
|
84
|
+
readonly labelKey: "boards-ui.panel.containerA4";
|
|
85
|
+
readonly width: 472.5;
|
|
86
|
+
readonly height: 668.25;
|
|
87
|
+
readonly variant: "a4";
|
|
88
|
+
}];
|
|
89
|
+
export declare function ContainerPresetThumbnail({ variant }: {
|
|
90
|
+
variant: typeof BOARD_CONTAINER_PRESETS[number]['variant'];
|
|
91
|
+
}): import("react").JSX.Element;
|
|
92
|
+
export declare function SwimlanePresetIcon({ orientation }: {
|
|
93
|
+
orientation: 'vertical' | 'horizontal';
|
|
94
|
+
}): import("react").JSX.Element;
|
|
95
|
+
export declare function BoardFloatingToolPanelContent(props: {
|
|
96
|
+
activePanelTool: BoardToolType;
|
|
97
|
+
}): import("react").JSX.Element;
|
|
98
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function BoardLeftToolbar(): import("react").JSX.Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function BoardMermaidImportDialog(): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SVGProps } from 'react';
|
|
2
|
+
export declare const BOARD_MIND_MAP_TEMPLATE_THUMBNAIL_VARIANTS: readonly ["mindmap-right", "mindmap-left", "mindmap-vertical", "mindmap-horizontal", "tree-right", "tree-left", "tree-alternate", "timeline-horizontal", "timeline-vertical"];
|
|
3
|
+
export type BoardMindMapTemplateThumbnailVariant = typeof BOARD_MIND_MAP_TEMPLATE_THUMBNAIL_VARIANTS[number];
|
|
4
|
+
interface IBoardMindMapTemplateThumbnailIconProps extends SVGProps<SVGSVGElement> {
|
|
5
|
+
variant: BoardMindMapTemplateThumbnailVariant;
|
|
6
|
+
}
|
|
7
|
+
export declare function BoardMindMapTemplateThumbnailIcon(props: IBoardMindMapTemplateThumbnailIconProps): import("react").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function BoardObjectListPanel(): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { IShapeData, ShapeTypeEnum } from '@univerjs-pro/engine-shape';
|
|
2
|
+
export declare const BOARD_SHAPE_FLOATING_TOOLBAR_KEY = "board.shape.floating-toolbar";
|
|
3
|
+
interface IBoardShapeFloatingToolbarExtraProps {
|
|
4
|
+
unitId: string;
|
|
5
|
+
subUnitId: string;
|
|
6
|
+
elementId: string;
|
|
7
|
+
shapeType?: ShapeTypeEnum;
|
|
8
|
+
shapeData?: IShapeData;
|
|
9
|
+
}
|
|
10
|
+
interface IBoardShapeFloatingToolbarProps {
|
|
11
|
+
popup: {
|
|
12
|
+
extraProps?: IBoardShapeFloatingToolbarExtraProps;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export declare function BoardShapeFloatingToolbar(props: IBoardShapeFloatingToolbarProps): import("react").JSX.Element | null;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function BoardShapePanel(): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { IBoardElementData } from '@univerjs-pro/boards';
|
|
2
|
+
import type { ICustomShapeTextData, IShapeRect } from '@univerjs-pro/engine-shape';
|
|
3
|
+
import type { ITransformState, Nullable } from '@univerjs/core';
|
|
4
|
+
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
5
|
+
export declare const BoardShapeTextEditorContainer: import("react").MemoExoticComponent<() => import("react").JSX.Element>;
|
|
6
|
+
export declare function resolveBoardShapeTextEditorTransform(options: {
|
|
7
|
+
elementData: IBoardElementData | undefined;
|
|
8
|
+
elementDataMap?: Record<string, IBoardElementData>;
|
|
9
|
+
renderManagerService: IRenderManagerService;
|
|
10
|
+
shapeId: string;
|
|
11
|
+
unitId: string;
|
|
12
|
+
}): Nullable<ITransformState>;
|
|
13
|
+
export declare function shouldAllowBoardShapeTextHostShrink(elementData: IBoardElementData | undefined): boolean;
|
|
14
|
+
export declare function shouldDeferBoardShapeTextHostSizeUpdateDuringEditing(elementData: IBoardElementData | undefined): boolean;
|
|
15
|
+
export declare function previewBoardShapeTextHostSize(options: {
|
|
16
|
+
elementData: IBoardElementData;
|
|
17
|
+
height: number;
|
|
18
|
+
renderManagerService: IRenderManagerService;
|
|
19
|
+
unitId: string;
|
|
20
|
+
width: number;
|
|
21
|
+
}): boolean;
|
|
22
|
+
export declare function getBoardShapeTextEditingContentStyle(_elementData: IBoardElementData | undefined): undefined;
|
|
23
|
+
export declare function resolveBoardConnectorLabelTextEditorRect(rect: IShapeRect): IShapeRect;
|
|
24
|
+
export declare function resolveBoardShapeTextData(elementData: IBoardElementData): ICustomShapeTextData;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function BoardShapeTextFloatToolbar(): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function BoardShortcutHelpDrawer(): import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface IBoardSwimlaneLaneRenamePopupProps {
|
|
2
|
+
initialTitle: string;
|
|
3
|
+
onCancel: () => void;
|
|
4
|
+
onSubmit: (title: string) => void | Promise<void>;
|
|
5
|
+
}
|
|
6
|
+
export declare function BoardSwimlaneLaneRenamePopup(props: IBoardSwimlaneLaneRenamePopupProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface IBoardTableSize {
|
|
2
|
+
rows: number;
|
|
3
|
+
columns: number;
|
|
4
|
+
}
|
|
5
|
+
export interface IBoardTableSizePickerProps {
|
|
6
|
+
initialRows?: number;
|
|
7
|
+
initialColumns?: number;
|
|
8
|
+
maxGridRows?: number;
|
|
9
|
+
maxGridColumns?: number;
|
|
10
|
+
minRows?: number;
|
|
11
|
+
minColumns?: number;
|
|
12
|
+
maxRows?: number;
|
|
13
|
+
maxColumns?: number;
|
|
14
|
+
direction?: 'ltr' | 'rtl';
|
|
15
|
+
onConfirm: (size: IBoardTableSize) => void;
|
|
16
|
+
}
|
|
17
|
+
export declare function normalizeBoardTableSizeValue(value: number, min: number, max: number): number;
|
|
18
|
+
export declare function BoardTableSizePicker(props: IBoardTableSizePickerProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function BoardWorkbench(): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function BoardZoomControls(): import("react").JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export declare const BOARD_FLOATING_DRAWER_RIGHT = 20;
|
|
2
|
+
export declare const BOARD_FLOATING_DRAWER_GAP = 20;
|
|
3
|
+
export declare const BOARD_FLOATING_DRAWER_WIDTH = 388;
|
|
4
|
+
export declare const BOARD_FLOATING_DRAWER_MIN_WIDTH = 320;
|
|
5
|
+
export declare const BOARD_FLOATING_DRAWER_MAX_WIDTH = 420;
|
|
6
|
+
export declare const BOARD_FLOATING_DRAWER_Z_INDEX = 19;
|
|
7
|
+
export interface IBoardFloatingPanelReservedRect {
|
|
8
|
+
bottom: number;
|
|
9
|
+
left: number;
|
|
10
|
+
right: number;
|
|
11
|
+
top: number;
|
|
12
|
+
}
|
|
13
|
+
export interface IBoardFloatingPanelViewportRect {
|
|
14
|
+
height: number;
|
|
15
|
+
width: number;
|
|
16
|
+
}
|
|
17
|
+
export interface IBoardFloatingPanelLayoutInput {
|
|
18
|
+
bottomControlRect?: IBoardFloatingPanelReservedRect | null;
|
|
19
|
+
direction?: 'ltr' | 'rtl';
|
|
20
|
+
leftToolbarRect?: IBoardFloatingPanelReservedRect | null;
|
|
21
|
+
maxWidth?: number;
|
|
22
|
+
minWidth?: number;
|
|
23
|
+
preferredWidth?: number;
|
|
24
|
+
topControlRect?: IBoardFloatingPanelReservedRect | null;
|
|
25
|
+
viewportRect: IBoardFloatingPanelViewportRect;
|
|
26
|
+
}
|
|
27
|
+
export interface IBoardFloatingPanelLayout {
|
|
28
|
+
bottom: number;
|
|
29
|
+
right: number;
|
|
30
|
+
top: number;
|
|
31
|
+
width: number;
|
|
32
|
+
}
|
|
33
|
+
export declare function resolveBoardFloatingPanelLayout(input: IBoardFloatingPanelLayoutInput): IBoardFloatingPanelLayout;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { MouseEvent, PointerEvent } from 'react';
|
|
2
|
+
export interface IUseBoardPalettePendingInsertDragOptions {
|
|
3
|
+
beginDrag: () => void;
|
|
4
|
+
cancelDrag: () => void;
|
|
5
|
+
}
|
|
6
|
+
export declare function useBoardPalettePendingInsertDrag(options: IUseBoardPalettePendingInsertDragOptions): {
|
|
7
|
+
onClickCapture: (event: MouseEvent<HTMLElement>) => void;
|
|
8
|
+
onPointerDown: (event: PointerEvent<HTMLElement>) => void;
|
|
9
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { RefObject } from 'react';
|
|
2
|
+
export interface IBoardPanelOutsidePointerDownOptions {
|
|
3
|
+
ignoreSelectors?: string[];
|
|
4
|
+
}
|
|
5
|
+
export declare function useBoardPanelOutsidePointerDown(panelRef: RefObject<HTMLElement | null>, enabled: boolean, onOutsidePointerDown: () => void, options?: IBoardPanelOutsidePointerDownOptions): void;
|