@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,71 @@
|
|
|
1
|
+
import type { IBoardConnectorElement, IBoardConnectorPoint, IBoardElementData } from '@univerjs-pro/boards';
|
|
2
|
+
export type BoardConnectorEditableSegmentOrientation = 'horizontal' | 'vertical';
|
|
3
|
+
export interface IBoardConnectorEditableSegment {
|
|
4
|
+
connectorId: string;
|
|
5
|
+
segmentIndex: number;
|
|
6
|
+
segmentEndIndex?: number;
|
|
7
|
+
orientation: BoardConnectorEditableSegmentOrientation;
|
|
8
|
+
start: IBoardConnectorPoint;
|
|
9
|
+
end: IBoardConnectorPoint;
|
|
10
|
+
point: IBoardConnectorPoint;
|
|
11
|
+
}
|
|
12
|
+
export interface IBoardConnectorManualWaypointHandle {
|
|
13
|
+
connectorId: string;
|
|
14
|
+
waypointId: string;
|
|
15
|
+
waypointIndex: number;
|
|
16
|
+
point: IBoardConnectorPoint;
|
|
17
|
+
}
|
|
18
|
+
export interface IBoardConnectorCurveAnchorHandle {
|
|
19
|
+
connectorId: string;
|
|
20
|
+
kind: 'anchor' | 'insert';
|
|
21
|
+
segmentIndex: number;
|
|
22
|
+
point: IBoardConnectorPoint;
|
|
23
|
+
anchorId?: string;
|
|
24
|
+
anchorIndex?: number;
|
|
25
|
+
}
|
|
26
|
+
export interface IResolveBoardConnectorEditableSegmentsOptions {
|
|
27
|
+
elementData?: Record<string, IBoardElementData>;
|
|
28
|
+
connectorId?: string;
|
|
29
|
+
minSegmentLength?: number;
|
|
30
|
+
routePoints?: readonly IBoardConnectorPoint[];
|
|
31
|
+
}
|
|
32
|
+
export interface IResolveBoardConnectorSegmentDragUpdateOptions extends IResolveBoardConnectorEditableSegmentsOptions {
|
|
33
|
+
element: IBoardConnectorElement;
|
|
34
|
+
segmentIndex: number;
|
|
35
|
+
segmentEndIndex?: number;
|
|
36
|
+
delta: IBoardConnectorPoint;
|
|
37
|
+
}
|
|
38
|
+
export interface IResolveBoardConnectorInsertWaypointUpdateOptions extends IResolveBoardConnectorEditableSegmentsOptions {
|
|
39
|
+
element: IBoardConnectorElement;
|
|
40
|
+
point: IBoardConnectorPoint;
|
|
41
|
+
tolerance: number;
|
|
42
|
+
}
|
|
43
|
+
export interface IResolveBoardConnectorWaypointDragUpdateOptions extends IResolveBoardConnectorEditableSegmentsOptions {
|
|
44
|
+
element: IBoardConnectorElement;
|
|
45
|
+
waypointId: string;
|
|
46
|
+
point: IBoardConnectorPoint;
|
|
47
|
+
cleanupCollinear?: boolean;
|
|
48
|
+
}
|
|
49
|
+
export interface IResolveBoardConnectorRemoveWaypointUpdateOptions extends IResolveBoardConnectorEditableSegmentsOptions {
|
|
50
|
+
element: IBoardConnectorElement;
|
|
51
|
+
waypointId: string;
|
|
52
|
+
}
|
|
53
|
+
export interface IResolveBoardConnectorCurveAnchorDragUpdateOptions extends IResolveBoardConnectorEditableSegmentsOptions {
|
|
54
|
+
element: IBoardConnectorElement;
|
|
55
|
+
handle: IBoardConnectorCurveAnchorHandle;
|
|
56
|
+
point: IBoardConnectorPoint;
|
|
57
|
+
}
|
|
58
|
+
export interface IResolveBoardConnectorRemoveCurveAnchorUpdateOptions extends IResolveBoardConnectorEditableSegmentsOptions {
|
|
59
|
+
element: IBoardConnectorElement;
|
|
60
|
+
anchorId: string;
|
|
61
|
+
}
|
|
62
|
+
export declare function cleanupBoardConnectorCollinearPoints(points: readonly IBoardConnectorPoint[]): IBoardConnectorPoint[];
|
|
63
|
+
export declare function resolveBoardConnectorEditableSegments(element: IBoardConnectorElement, options?: IResolveBoardConnectorEditableSegmentsOptions): IBoardConnectorEditableSegment[];
|
|
64
|
+
export declare function resolveBoardConnectorManualWaypointHandles(element: IBoardConnectorElement): IBoardConnectorManualWaypointHandle[];
|
|
65
|
+
export declare function resolveBoardConnectorCurveAnchorHandles(element: IBoardConnectorElement, options?: IResolveBoardConnectorEditableSegmentsOptions): IBoardConnectorCurveAnchorHandle[];
|
|
66
|
+
export declare function resolveBoardConnectorCurveAnchorDragUpdate(options: IResolveBoardConnectorCurveAnchorDragUpdateOptions): IBoardConnectorElement;
|
|
67
|
+
export declare function resolveBoardConnectorRemoveCurveAnchorUpdate(options: IResolveBoardConnectorRemoveCurveAnchorUpdateOptions): IBoardConnectorElement;
|
|
68
|
+
export declare function resolveBoardConnectorSegmentDragUpdate(options: IResolveBoardConnectorSegmentDragUpdateOptions): IBoardConnectorElement;
|
|
69
|
+
export declare function resolveBoardConnectorInsertWaypointUpdate(options: IResolveBoardConnectorInsertWaypointUpdateOptions): IBoardConnectorElement | null;
|
|
70
|
+
export declare function resolveBoardConnectorWaypointDragUpdate(options: IResolveBoardConnectorWaypointDragUpdateOptions): IBoardConnectorElement;
|
|
71
|
+
export declare function resolveBoardConnectorRemoveWaypointUpdate(options: IResolveBoardConnectorRemoveWaypointUpdateOptions): IBoardConnectorElement;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { IBoardElementData, IBoardElementTransform, IBoardRect } from '@univerjs-pro/boards';
|
|
2
|
+
import type { IBoardElementSpatialIndex } from './board-container-spatial-index.util';
|
|
3
|
+
export type BoardContainerMembershipOverlayState = 'retained' | 'capture' | 'expel' | 'autosize';
|
|
4
|
+
export interface IBoardContainerMembershipOverlayItem {
|
|
5
|
+
elementId: string;
|
|
6
|
+
containerId: string;
|
|
7
|
+
state: BoardContainerMembershipOverlayState;
|
|
8
|
+
bounds: IBoardRect;
|
|
9
|
+
forced?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface IResolveBoardContainerMembershipOverlayOptions {
|
|
12
|
+
elementData: Record<string, IBoardElementData>;
|
|
13
|
+
elementOrder?: readonly string[];
|
|
14
|
+
activeElementIds: readonly string[];
|
|
15
|
+
forceCaptureElementIds?: readonly string[];
|
|
16
|
+
previewWorldTransforms?: Record<string, IBoardElementTransform>;
|
|
17
|
+
spatialIndex?: IBoardElementSpatialIndex;
|
|
18
|
+
}
|
|
19
|
+
export declare function resolveBoardContainerMembershipOverlay(options: IResolveBoardContainerMembershipOverlayOptions): IBoardContainerMembershipOverlayItem[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IBoardElementData, IUpdateBoardElementsOperationItem } from '@univerjs-pro/boards';
|
|
2
|
+
import type { IBoardElementSpatialIndex } from './board-container-spatial-index.util';
|
|
3
|
+
export interface IResolveBoardContainerMembershipUpdateItemsOptions {
|
|
4
|
+
elementData: Record<string, IBoardElementData>;
|
|
5
|
+
elementOrder?: readonly string[];
|
|
6
|
+
updates: readonly IUpdateBoardElementsOperationItem[];
|
|
7
|
+
forceCaptureElementIds?: readonly string[];
|
|
8
|
+
spatialIndex?: IBoardElementSpatialIndex;
|
|
9
|
+
}
|
|
10
|
+
export declare function resolveBoardContainerMembershipUpdateItems(options: IResolveBoardContainerMembershipUpdateItemsOptions): IUpdateBoardElementsOperationItem[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { IBoardElementData, IBoardRect } from '@univerjs-pro/boards';
|
|
2
|
+
export interface IBoardPoint {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
}
|
|
6
|
+
export interface ICreateBoardElementSpatialIndexOptions {
|
|
7
|
+
unitId: string;
|
|
8
|
+
subUnitId: string;
|
|
9
|
+
elementData: Record<string, IBoardElementData>;
|
|
10
|
+
}
|
|
11
|
+
export interface IBoardElementSpatialIndex {
|
|
12
|
+
queryIntersecting(bounds: IBoardRect): string[];
|
|
13
|
+
queryContainersAtPoint(point: IBoardPoint): string[];
|
|
14
|
+
dispose(): void;
|
|
15
|
+
}
|
|
16
|
+
export declare function createBoardElementSpatialIndex(options: ICreateBoardElementSpatialIndexOptions): IBoardElementSpatialIndex;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { IBoardElementData } from '@univerjs-pro/boards';
|
|
2
|
+
import type { IBoardElementSpatialIndex, IBoardPoint } from './board-container-spatial-index.util';
|
|
3
|
+
import { BoardElementType } from '@univerjs-pro/boards';
|
|
4
|
+
export interface IBoardContainerTarget {
|
|
5
|
+
containerId: string;
|
|
6
|
+
depth: number;
|
|
7
|
+
}
|
|
8
|
+
export interface IResolveBoardContainerTargetAtPointOptions {
|
|
9
|
+
elementData: Record<string, IBoardElementData>;
|
|
10
|
+
elementOrder: readonly string[];
|
|
11
|
+
point: IBoardPoint;
|
|
12
|
+
activeElementIds?: readonly string[];
|
|
13
|
+
activeElementTypes?: Record<string, BoardElementType | string>;
|
|
14
|
+
allowCaptureFromParentedCandidateIds?: readonly string[];
|
|
15
|
+
spatialIndex?: IBoardElementSpatialIndex;
|
|
16
|
+
}
|
|
17
|
+
export declare function resolveBoardContainerTargetAtPoint(options: IResolveBoardContainerTargetAtPointOptions): IBoardContainerTarget | null;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { IBoardContainerElement, IBoardElementData, IBoardRect } from '@univerjs-pro/boards';
|
|
2
|
+
export declare const BOARD_CONTAINER_TITLE_LABEL_HEIGHT = 18;
|
|
3
|
+
export declare const BOARD_CONTAINER_TITLE_LABEL_GAP = 8;
|
|
4
|
+
export declare const BOARD_CONTAINER_TITLE_LABEL_PADDING_X = 5;
|
|
5
|
+
export declare const BOARD_CONTAINER_TITLE_LABEL_PADDING_Y = 3;
|
|
6
|
+
export declare const BOARD_CONTAINER_TITLE_LABEL_FILL = "rgba(248, 250, 252, 0.98)";
|
|
7
|
+
export declare const BOARD_CONTAINER_TITLE_LABEL_STROKE = "rgba(148, 163, 184, 0.95)";
|
|
8
|
+
export declare const BOARD_CONTAINER_TITLE_LABEL_TEXT = "rgba(31, 41, 55, 0.92)";
|
|
9
|
+
export declare const BOARD_CONTAINER_TITLE_LABEL_HIT_TEXT_WIDTH_FACTOR = 8;
|
|
10
|
+
export declare const BOARD_CONTAINER_TITLE_LABEL_DEFAULT_FONT_SIZE = 12;
|
|
11
|
+
export declare function resolveBoardGenericContainerTitleFontSize(element: IBoardElementData['element']): number;
|
|
12
|
+
export declare function resolveBoardGenericContainerTitleLabelHeight(element: IBoardElementData['element']): number;
|
|
13
|
+
export declare function isGenericBoardContainerElement(element: IBoardElementData['element']): element is IBoardContainerElement;
|
|
14
|
+
export declare function resolveBoardGenericContainerTitle(element: IBoardElementData['element']): string;
|
|
15
|
+
export declare function resolveBoardGenericContainerTitleLabelBounds(element: IBoardElementData['element'], bounds: Pick<IBoardRect, 'left' | 'top' | 'width'>, measuredTextWidth?: number): IBoardRect | null;
|
|
16
|
+
export declare function resolveBoardGenericContainerTitleLabelWorldBounds(elementData: Record<string, IBoardElementData>, elementId: string): IBoardRect | null;
|
|
17
|
+
export declare function containsBoardContainerTitleLabelPoint(bounds: IBoardRect | null, point: {
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
}): boolean;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { IBoardContainerElement, IBoardElementData, IBoardSwimlaneData } from '@univerjs-pro/boards';
|
|
2
|
+
import type { IBoardFocusedSwimlaneLane } from '../services/board-element-state.service';
|
|
3
|
+
export interface IBoardContainerToolbarSwimlaneActionOptions {
|
|
4
|
+
createId?: () => string;
|
|
5
|
+
insertIndex?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface IBoardContainerToolbarSwimlaneAction {
|
|
8
|
+
containerId: string;
|
|
9
|
+
addLane: IBoardSwimlaneData['lanes'][number];
|
|
10
|
+
insertIndex: number;
|
|
11
|
+
}
|
|
12
|
+
export interface IBoardContainerToolbarSwimlaneLaneActionOptions {
|
|
13
|
+
defaultToFirstLane?: boolean;
|
|
14
|
+
elementData?: Record<string, IBoardElementData>;
|
|
15
|
+
}
|
|
16
|
+
export interface IBoardContainerToolbarSwimlaneLaneActions {
|
|
17
|
+
containerId: string;
|
|
18
|
+
laneId: string;
|
|
19
|
+
title: string;
|
|
20
|
+
index: number;
|
|
21
|
+
laneCount: number;
|
|
22
|
+
collapsed: boolean;
|
|
23
|
+
locked: boolean;
|
|
24
|
+
hasChildren: boolean;
|
|
25
|
+
canAddAfter: boolean;
|
|
26
|
+
canRemove: boolean;
|
|
27
|
+
canRemoveAndPromote: boolean;
|
|
28
|
+
canRemoveAndDeleteContent: boolean;
|
|
29
|
+
canMovePrevious: boolean;
|
|
30
|
+
canMoveNext: boolean;
|
|
31
|
+
canRename: boolean;
|
|
32
|
+
canToggleCollapsed: boolean;
|
|
33
|
+
removeAndMovePreviousLaneId?: string;
|
|
34
|
+
removeAndMoveNextLaneId?: string;
|
|
35
|
+
canRemoveAndMovePrevious: boolean;
|
|
36
|
+
canRemoveAndMoveNext: boolean;
|
|
37
|
+
}
|
|
38
|
+
export declare function canMoveSelectedElementsOutOfContainer(elementData: Record<string, IBoardElementData>, selectedIds: readonly string[]): boolean;
|
|
39
|
+
export declare function resolveBoardContainerToolbarSwimlaneAction(container: IBoardContainerElement | null | undefined, options?: IBoardContainerToolbarSwimlaneActionOptions): IBoardContainerToolbarSwimlaneAction | null;
|
|
40
|
+
export declare function resolveBoardContainerToolbarSwimlaneLaneActions(container: IBoardContainerElement | null | undefined, focusedLane: IBoardFocusedSwimlaneLane | null | undefined, options?: IBoardContainerToolbarSwimlaneLaneActionOptions): IBoardContainerToolbarSwimlaneLaneActions | null;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface IBoardDraftInsertRect {
|
|
2
|
+
left: number;
|
|
3
|
+
top: number;
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
}
|
|
7
|
+
export interface IResolveBoardDraftInsertPositionOptions {
|
|
8
|
+
draftBounds?: Partial<IBoardDraftInsertRect> | null;
|
|
9
|
+
existingRects?: IBoardDraftInsertRect[];
|
|
10
|
+
preferredPosition?: Pick<IBoardDraftInsertRect, 'left' | 'top'>;
|
|
11
|
+
gap?: number;
|
|
12
|
+
}
|
|
13
|
+
export declare function resolveBoardDraftInsertPosition(options: IResolveBoardDraftInsertPositionOptions): Pick<IBoardDraftInsertRect, 'left' | 'top'>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { IBoardElementData, IBoardTableSearchEntry } from '@univerjs-pro/boards';
|
|
2
|
+
export interface IFindBoardElementsOptions {
|
|
3
|
+
query: string;
|
|
4
|
+
elementData: Record<string, IBoardElementData>;
|
|
5
|
+
elementOrder: string[];
|
|
6
|
+
tableSearchEntries?: Record<string, readonly IBoardTableSearchEntry[]>;
|
|
7
|
+
localeTexts: IBoardFindLocaleTexts;
|
|
8
|
+
}
|
|
9
|
+
export interface IBoardElementFindResult {
|
|
10
|
+
resultId?: string;
|
|
11
|
+
elementId: string;
|
|
12
|
+
subId?: string;
|
|
13
|
+
kind?: BoardElementFindResultKind;
|
|
14
|
+
title: string;
|
|
15
|
+
description: string;
|
|
16
|
+
}
|
|
17
|
+
export type BoardElementFindResultKind = 'element' | 'connector-label' | 'container-title' | 'swimlane-lane-title' | 'table-cell';
|
|
18
|
+
export interface IBoardFindLocaleTexts {
|
|
19
|
+
elementTypes: Record<string, string>;
|
|
20
|
+
shapePresets: Record<string, string>;
|
|
21
|
+
lanePositionLabels: Record<number, string>;
|
|
22
|
+
tableCellPositionLabels: Record<string, string>;
|
|
23
|
+
}
|
|
24
|
+
export declare function collectBoardFindStaticLocaleKeys(): string[];
|
|
25
|
+
export declare function findBoardElements(options: IFindBoardElementsOptions): IBoardElementFindResult[];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { BoardConnectorRouting, BoardConnectorRoutingMode, IBoardConnectorEndpoint, IBoardConnectorPoint, IBoardConnectorWaypoint } from '@univerjs-pro/boards';
|
|
2
|
+
export interface IBoardResolvedConnectorEndpoint {
|
|
3
|
+
endpoint: IBoardConnectorEndpoint;
|
|
4
|
+
point: IBoardConnectorPoint;
|
|
5
|
+
}
|
|
6
|
+
export interface IBoardFreePolylineDraft {
|
|
7
|
+
startEndpoint: IBoardConnectorEndpoint;
|
|
8
|
+
startPoint: IBoardConnectorPoint;
|
|
9
|
+
currentEndpoint: IBoardConnectorEndpoint;
|
|
10
|
+
currentPoint: IBoardConnectorPoint;
|
|
11
|
+
points: IBoardConnectorPoint[];
|
|
12
|
+
}
|
|
13
|
+
export interface IBoardFreePolylineConnectorOptions {
|
|
14
|
+
start: IBoardConnectorEndpoint;
|
|
15
|
+
end: IBoardConnectorEndpoint;
|
|
16
|
+
routing: Extract<BoardConnectorRouting, 'freePolyline'>;
|
|
17
|
+
routingMode: BoardConnectorRoutingMode;
|
|
18
|
+
waypoints: IBoardConnectorWaypoint[];
|
|
19
|
+
}
|
|
20
|
+
export declare function createBoardFreePolylineDraft(resolved: IBoardResolvedConnectorEndpoint): IBoardFreePolylineDraft;
|
|
21
|
+
export declare function updateBoardFreePolylineDraftCurrent(draft: IBoardFreePolylineDraft, resolved: IBoardResolvedConnectorEndpoint): IBoardFreePolylineDraft;
|
|
22
|
+
export declare function appendBoardFreePolylineDraftPoint(draft: IBoardFreePolylineDraft, resolved: IBoardResolvedConnectorEndpoint, threshold: number): IBoardFreePolylineDraft;
|
|
23
|
+
export declare function removeBoardFreePolylineDraftLastPoint(draft: IBoardFreePolylineDraft): IBoardFreePolylineDraft;
|
|
24
|
+
export declare function resolveBoardFreePolylineConnectorOptions(draft: IBoardFreePolylineDraft, connectorId: string): IBoardFreePolylineConnectorOptions;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { IUniverBoardsUIConfig } from '../config/config';
|
|
2
|
+
export interface IResolvedBoardGridConfig {
|
|
3
|
+
gridSize: number;
|
|
4
|
+
lineColor: string;
|
|
5
|
+
majorGridSize: number;
|
|
6
|
+
majorLineColor: string;
|
|
7
|
+
}
|
|
8
|
+
export interface IBoardGridRenderStep {
|
|
9
|
+
worldStep: number;
|
|
10
|
+
screenStep: number;
|
|
11
|
+
majorEvery: number;
|
|
12
|
+
}
|
|
13
|
+
export declare const BOARD_GRID_DEFAULT_CONFIG: IResolvedBoardGridConfig;
|
|
14
|
+
export declare function resolveBoardGridConfig(config?: Pick<IUniverBoardsUIConfig, 'grid'>): IResolvedBoardGridConfig;
|
|
15
|
+
export declare function resolveBoardGridRenderStep(options: {
|
|
16
|
+
gridSize: number;
|
|
17
|
+
majorGridSize: number;
|
|
18
|
+
zoomRatio: number;
|
|
19
|
+
minScreenStep?: number;
|
|
20
|
+
maxScreenStep?: number;
|
|
21
|
+
}): IBoardGridRenderStep;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface IBoardImageLikeFile {
|
|
2
|
+
type?: string;
|
|
3
|
+
}
|
|
4
|
+
export interface IBoardDataTransferLikeItem {
|
|
5
|
+
kind?: string;
|
|
6
|
+
type?: string;
|
|
7
|
+
getAsFile?: () => IBoardImageLikeFile | null;
|
|
8
|
+
}
|
|
9
|
+
export declare function isBoardImageFile(file: IBoardImageLikeFile | null | undefined): file is IBoardImageLikeFile;
|
|
10
|
+
export declare function getFirstBoardImageFile<T extends IBoardImageLikeFile>(files: Iterable<T | null | undefined>): T | null;
|
|
11
|
+
export declare function getFirstBoardImageFileFromItems<T extends IBoardImageLikeFile = IBoardImageLikeFile>(items: Iterable<IBoardDataTransferLikeItem>): T | null;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { IUniverBoardsUIConfig } from '../config/config';
|
|
2
|
+
export declare const BOARD_IMAGE_INSERT_DEFAULT: {
|
|
3
|
+
fallbackWidth: number;
|
|
4
|
+
fallbackHeight: number;
|
|
5
|
+
minEdge: number;
|
|
6
|
+
fitRatio: number;
|
|
7
|
+
minPositionOffset: number;
|
|
8
|
+
};
|
|
9
|
+
export type IResolvedBoardImageInsertConfig = typeof BOARD_IMAGE_INSERT_DEFAULT;
|
|
10
|
+
export interface IBoardImageSize {
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
}
|
|
14
|
+
export interface IBoardImageInsertPoint {
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
}
|
|
18
|
+
export declare function fitBoardImageSize(width: number, height: number, maxWidth: number, maxHeight: number, config?: IResolvedBoardImageInsertConfig): IBoardImageSize;
|
|
19
|
+
export declare function resolveBoardImageInsertConfig(config?: Pick<IUniverBoardsUIConfig, 'insert'>): IResolvedBoardImageInsertConfig;
|
|
20
|
+
export declare function createBoardCenteredImageTransform(pageWidth: number, pageHeight: number, size: IBoardImageSize, config?: IResolvedBoardImageInsertConfig): {
|
|
21
|
+
left: number;
|
|
22
|
+
top: number;
|
|
23
|
+
width: number;
|
|
24
|
+
height: number;
|
|
25
|
+
};
|
|
26
|
+
export declare function createBoardImageTransformAtPoint(point: IBoardImageInsertPoint, size: IBoardImageSize): {
|
|
27
|
+
left: number;
|
|
28
|
+
top: number;
|
|
29
|
+
width: number;
|
|
30
|
+
height: number;
|
|
31
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { IUniverBoardsUIConfig } from '../config/config';
|
|
2
|
+
export interface IResolvedBoardInsertConfig {
|
|
3
|
+
chart: {
|
|
4
|
+
height: number;
|
|
5
|
+
width: number;
|
|
6
|
+
};
|
|
7
|
+
table: {
|
|
8
|
+
cellHeight: number;
|
|
9
|
+
cellWidth: number;
|
|
10
|
+
columns: number;
|
|
11
|
+
height?: number;
|
|
12
|
+
minHeight: number;
|
|
13
|
+
minWidth: number;
|
|
14
|
+
rows: number;
|
|
15
|
+
width?: number;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export declare const BOARD_INSERT_DEFAULT_CONFIG: IResolvedBoardInsertConfig;
|
|
19
|
+
export declare function resolveBoardInsertConfig(config?: Pick<IUniverBoardsUIConfig, 'insert'>): IResolvedBoardInsertConfig;
|
|
20
|
+
export declare function resolveBoardTableInsertSize(options: {
|
|
21
|
+
cellHeight?: number;
|
|
22
|
+
cellWidth?: number;
|
|
23
|
+
columns: number;
|
|
24
|
+
height?: number;
|
|
25
|
+
minHeight?: number;
|
|
26
|
+
minWidth?: number;
|
|
27
|
+
rows: number;
|
|
28
|
+
width?: number;
|
|
29
|
+
}): {
|
|
30
|
+
height: number;
|
|
31
|
+
width: number;
|
|
32
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { IBoardPageElement } from '@univerjs-pro/boards';
|
|
2
|
+
import type { IBoardPendingInsert } from '../services/board-ui-state.service';
|
|
3
|
+
export interface IBoardInsertPoint {
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
}
|
|
7
|
+
export interface IBoardInsertRect {
|
|
8
|
+
left: number;
|
|
9
|
+
top: number;
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
}
|
|
13
|
+
export declare function resolveBoardContainerDragInsertRect(start: IBoardInsertPoint, end: IBoardInsertPoint): IBoardInsertRect;
|
|
14
|
+
export declare function createBoardElementFromPendingInsert(options: {
|
|
15
|
+
pendingInsert: IBoardPendingInsert | null;
|
|
16
|
+
point: IBoardInsertPoint;
|
|
17
|
+
rect?: IBoardInsertRect | null;
|
|
18
|
+
}): IBoardPageElement | null;
|
|
19
|
+
export declare function resolveBoardPendingInsertPreviewRect(options: {
|
|
20
|
+
pendingInsert: IBoardPendingInsert | null;
|
|
21
|
+
point: IBoardInsertPoint;
|
|
22
|
+
rect?: IBoardInsertRect | null;
|
|
23
|
+
}): IBoardInsertRect | null;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { IUniverBoardsUIConfig } from '../config/config';
|
|
2
|
+
export interface IResolvedBoardInteractionConfig {
|
|
3
|
+
alignmentGuideThreshold: number;
|
|
4
|
+
maxZoomRatio: number;
|
|
5
|
+
minElementSize: number;
|
|
6
|
+
minZoomRatio: number;
|
|
7
|
+
pendingInsertPreviewAlpha: number;
|
|
8
|
+
resizeHandleHitPadding: number;
|
|
9
|
+
resizeHandleSize: number;
|
|
10
|
+
spacingGuideMaxDistance: number;
|
|
11
|
+
trackpadPanEnabled: boolean;
|
|
12
|
+
wheelPanFactor: number;
|
|
13
|
+
wheelZoomFactor: number;
|
|
14
|
+
wheelZoomWithModifier: boolean;
|
|
15
|
+
zoomStep: number;
|
|
16
|
+
zoomWheelFactor: number;
|
|
17
|
+
}
|
|
18
|
+
export declare const BOARD_INTERACTION_DEFAULT_CONFIG: IResolvedBoardInteractionConfig;
|
|
19
|
+
export declare function resolveBoardInteractionConfig(config?: Pick<IUniverBoardsUIConfig, 'interaction'>): IResolvedBoardInteractionConfig;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { IBoardImportDiagnostic, IBoardImportDraft } from '@univerjs-pro/boards';
|
|
2
|
+
export declare const MAX_AUTO_MERMAID_PREVIEW_ELEMENTS = 300;
|
|
3
|
+
export declare function shouldAutoRenderMermaidPreview(draft: IBoardImportDraft | null): boolean;
|
|
4
|
+
export declare function areImportDiagnosticsEqual(left: IBoardImportDiagnostic[], right: IBoardImportDiagnostic[]): boolean;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { IBoardElementData, IBoardElementSearch } from '@univerjs-pro/boards';
|
|
2
|
+
export interface IResolveBoardRenderDirtyElementIdsOptions {
|
|
3
|
+
unitId: string;
|
|
4
|
+
subUnitId: string;
|
|
5
|
+
elementData: Record<string, IBoardElementData>;
|
|
6
|
+
updates: readonly IBoardElementSearch[];
|
|
7
|
+
}
|
|
8
|
+
export declare function resolveBoardRenderDirtyElementIds({ unitId, subUnitId, elementData, updates, }: IResolveBoardRenderDirtyElementIdsOptions): string[];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { IBoardPage, IBoardPageSize } from '@univerjs-pro/boards';
|
|
2
|
+
import type { IUniverBoardsUIConfig } from '../config/config';
|
|
3
|
+
export declare const BOARD_RENDER_SCENE_DEFAULT_MIN_SIZE: IBoardPageSize;
|
|
4
|
+
export declare const BOARD_RENDER_SCENE_DEFAULT_FALLBACK_FILL = "#ffffff";
|
|
5
|
+
export declare const BOARD_RENDER_SCENE_DARK_FALLBACK_FILL = "#fcfdff";
|
|
6
|
+
export interface IResolveBoardRenderSceneSizeOptions {
|
|
7
|
+
engineWidth?: number;
|
|
8
|
+
engineHeight?: number;
|
|
9
|
+
sceneWidth?: number;
|
|
10
|
+
sceneHeight?: number;
|
|
11
|
+
minSize?: IBoardPageSize;
|
|
12
|
+
}
|
|
13
|
+
export interface IResolveBoardPageBackgroundFillOptions {
|
|
14
|
+
darkMode?: boolean;
|
|
15
|
+
darkFallbackFill?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare function resolveBoardPageBackgroundFill(page: Pick<IBoardPage, 'background'> | null | undefined, fallbackFill?: string, options?: IResolveBoardPageBackgroundFillOptions): string;
|
|
18
|
+
export declare function resolveBoardRenderSceneMinSize(config?: Pick<IUniverBoardsUIConfig, 'scene'>): IBoardPageSize;
|
|
19
|
+
export declare function resolveBoardRenderSceneSize({ engineWidth, engineHeight, sceneWidth, sceneHeight, minSize, }: IResolveBoardRenderSceneSizeOptions): IBoardPageSize;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface IBoardSceneObjectsEventAdapter {
|
|
2
|
+
disableObjectsEvent: () => void;
|
|
3
|
+
enableObjectsEvent: () => void;
|
|
4
|
+
}
|
|
5
|
+
export declare function setBoardSceneObjectsEventLock(scene: IBoardSceneObjectsEventAdapter, owner: string, locked: boolean): void;
|
|
6
|
+
export declare function releaseBoardSceneObjectsEventLock(scene: IBoardSceneObjectsEventAdapter, owner: string): void;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { IBoardElementData } from '@univerjs-pro/boards';
|
|
2
|
+
export interface IResolveBoardElementSelectionDeleteParamsOptions {
|
|
3
|
+
unitId: string;
|
|
4
|
+
subUnitId: string;
|
|
5
|
+
selectedIds: string[];
|
|
6
|
+
elementData: Record<string, IBoardElementData>;
|
|
7
|
+
}
|
|
8
|
+
export interface IBoardElementSelectionDeleteParam {
|
|
9
|
+
unitId: string;
|
|
10
|
+
subUnitId: string;
|
|
11
|
+
elementId: string;
|
|
12
|
+
}
|
|
13
|
+
export interface IBoardDeleteKeyboardEventLike {
|
|
14
|
+
key: string;
|
|
15
|
+
target: EventTarget | null;
|
|
16
|
+
defaultPrevented?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare function isBoardEditableKeyboardTarget(target: EventTarget | null): boolean;
|
|
19
|
+
export declare function isBoardDeleteKeyboardEvent(event: IBoardDeleteKeyboardEventLike): boolean;
|
|
20
|
+
export declare function resolveBoardElementSelectionDeleteParams(options: IResolveBoardElementSelectionDeleteParamsOptions): IBoardElementSelectionDeleteParam[];
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { IBoardElementData } from '@univerjs-pro/boards';
|
|
2
|
+
import type { IBoardElementSpatialIndex } from './board-container-spatial-index.util';
|
|
3
|
+
export interface IBoardSelectionRect {
|
|
4
|
+
left: number;
|
|
5
|
+
top: number;
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
}
|
|
9
|
+
export interface ISelectBoardElementsByRectOptions {
|
|
10
|
+
elementData: Record<string, IBoardElementData>;
|
|
11
|
+
elementOrder: string[];
|
|
12
|
+
rect: IBoardSelectionRect;
|
|
13
|
+
preciseSelection: boolean;
|
|
14
|
+
spatialIndex?: IBoardElementSpatialIndex;
|
|
15
|
+
}
|
|
16
|
+
export interface IResolveBoardElementsBoundsOptions {
|
|
17
|
+
elementData: Record<string, IBoardElementData>;
|
|
18
|
+
elementOrder: string[];
|
|
19
|
+
includeHidden?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface IBoardElementSelectionResult {
|
|
22
|
+
unitId: string;
|
|
23
|
+
subUnitId: string;
|
|
24
|
+
elementId: string;
|
|
25
|
+
element: IBoardElementData['element'];
|
|
26
|
+
transform: IBoardElementData['transform'];
|
|
27
|
+
}
|
|
28
|
+
export declare function resolveBoardElementBounds(elementDataItem: IBoardElementData, elementData: Record<string, IBoardElementData>): IBoardSelectionRect;
|
|
29
|
+
export declare function isBoardElementVisibleInTree(elementData: Record<string, IBoardElementData>, elementDataItem: IBoardElementData | undefined): elementDataItem is IBoardElementData;
|
|
30
|
+
export declare function selectBoardElementsByRect(options: ISelectBoardElementsByRectOptions): IBoardElementSelectionResult[];
|
|
31
|
+
export declare function resolveBoardElementsBounds(options: IResolveBoardElementsBoundsOptions): IBoardSelectionRect | null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { IBoardElementData } from '@univerjs-pro/boards';
|
|
2
|
+
import type { IBoardElementSpatialIndex } from './board-container-spatial-index.util';
|
|
3
|
+
import type { IBoardSelectionPoint } from './board-selection-interaction.util';
|
|
4
|
+
export interface IHitTestBoardElementAtPointOptions {
|
|
5
|
+
elementData: Record<string, IBoardElementData>;
|
|
6
|
+
elementOrder: string[];
|
|
7
|
+
point: IBoardSelectionPoint;
|
|
8
|
+
spatialIndex?: IBoardElementSpatialIndex;
|
|
9
|
+
}
|
|
10
|
+
export interface IBoardElementHitTestResult {
|
|
11
|
+
unitId: string;
|
|
12
|
+
subUnitId: string;
|
|
13
|
+
elementId: string;
|
|
14
|
+
element: IBoardElementData['element'];
|
|
15
|
+
transform: IBoardElementData['transform'];
|
|
16
|
+
}
|
|
17
|
+
export declare function hitTestBoardElementAtPoint(options: IHitTestBoardElementAtPointOptions): IBoardElementHitTestResult | null;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { IBoardElementData } from '@univerjs-pro/boards';
|
|
2
|
+
import type { IBoardElementSpatialIndex } from './board-container-spatial-index.util';
|
|
3
|
+
import type { IBoardSelectionRect } from './board-selection-geometry.util';
|
|
4
|
+
export declare const BOARD_SELECTION_DRAG_THRESHOLD = 4;
|
|
5
|
+
export interface IBoardSelectionPoint {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
}
|
|
9
|
+
export interface IResolveBoardElementDragSelectionOptions {
|
|
10
|
+
elementData: Record<string, IBoardElementData>;
|
|
11
|
+
elementOrder: string[];
|
|
12
|
+
start: IBoardSelectionPoint;
|
|
13
|
+
end: IBoardSelectionPoint;
|
|
14
|
+
preciseSelection: boolean;
|
|
15
|
+
spatialIndex?: IBoardElementSpatialIndex;
|
|
16
|
+
}
|
|
17
|
+
export interface IResolvedBoardDragSelection {
|
|
18
|
+
rect: IBoardSelectionRect;
|
|
19
|
+
selectedIds: string[];
|
|
20
|
+
}
|
|
21
|
+
export declare function createBoardSelectionRect(start: IBoardSelectionPoint, end: IBoardSelectionPoint): IBoardSelectionRect;
|
|
22
|
+
export declare function isBoardDragSelection(start: IBoardSelectionPoint, end: IBoardSelectionPoint): boolean;
|
|
23
|
+
export declare function resolveBoardDragSelection(options: IResolveBoardElementDragSelectionOptions): IResolvedBoardDragSelection | null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { IBoardElementData } from '@univerjs-pro/boards';
|
|
2
|
+
export interface IBoardSelectionMoveDelta {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
}
|
|
6
|
+
export interface IBoardElementSelectionMoveResult {
|
|
7
|
+
elementId: string;
|
|
8
|
+
element: IBoardElementData['element'];
|
|
9
|
+
transform: IBoardElementData['transform'];
|
|
10
|
+
}
|
|
11
|
+
export type IBoardElementSelectionMoveDelta = IBoardSelectionMoveDelta;
|
|
12
|
+
export interface IResolveBoardElementSelectionMoveOptions {
|
|
13
|
+
selectedIds: string[];
|
|
14
|
+
elementData: Record<string, IBoardElementData>;
|
|
15
|
+
delta: IBoardElementSelectionMoveDelta;
|
|
16
|
+
}
|
|
17
|
+
export declare function resolveBoardElementSelectionMove(options: IResolveBoardElementSelectionMoveOptions): IBoardElementSelectionMoveResult[];
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { IBoardElementData } from '@univerjs-pro/boards';
|
|
2
|
+
export declare function hasSelectedBoardContainerAncestor(elementData: Record<string, IBoardElementData>, elementId: string, selectedIds: ReadonlySet<string>): boolean;
|
|
3
|
+
export declare function resolveBoardSelectionRootElementIds(elementData: Record<string, IBoardElementData>, selectedIds: readonly string[]): string[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { IBoardElementData } from '@univerjs-pro/boards';
|
|
2
|
+
import type { IBoardSelectionRect } from './board-selection-geometry.util';
|
|
3
|
+
export interface IBoardElementSelectionOverlayItem {
|
|
4
|
+
elementId: string;
|
|
5
|
+
rect: IBoardSelectionRect;
|
|
6
|
+
}
|
|
7
|
+
export interface IBoardElementSelectionOverlay {
|
|
8
|
+
items: IBoardElementSelectionOverlayItem[];
|
|
9
|
+
bounds: IBoardSelectionRect;
|
|
10
|
+
}
|
|
11
|
+
export interface IResolveBoardElementSelectionOverlayOptions {
|
|
12
|
+
selectedIds: string[];
|
|
13
|
+
elementData: Record<string, IBoardElementData>;
|
|
14
|
+
}
|
|
15
|
+
export declare function resolveBoardElementSelectionOverlay(options: IResolveBoardElementSelectionOverlayOptions): IBoardElementSelectionOverlay | null;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IBoardElementData, IBoardPageElement, IBoardTextElement } from '@univerjs-pro/boards';
|
|
2
|
+
import type { IShapeData } from '@univerjs-pro/engine-shape';
|
|
3
|
+
import type { IDocumentData } from '@univerjs/core';
|
|
4
|
+
export declare function isBoardShapeEditableElement(element: IBoardPageElement): boolean;
|
|
5
|
+
export declare function isManagedBoardMindMapNode(elementData: IBoardElementData | undefined): boolean;
|
|
6
|
+
export declare function getBoardElementShapeData(element: IBoardPageElement): IShapeData | null;
|
|
7
|
+
export declare function createBoardTextShapeData(element: IBoardTextElement): IShapeData;
|
|
8
|
+
export declare function applyBoardShapeDataPatchToElement(element: IBoardPageElement, patch: IShapeData): IBoardPageElement;
|
|
9
|
+
export declare function documentDataToPlainText(documentData: IDocumentData): string;
|