@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,61 @@
|
|
|
1
|
+
import type { BooleanNumber, HorizontalAlign, IDocumentData, LocaleService } from '@univerjs/core';
|
|
2
|
+
import type { UniverRenderingContext } from '@univerjs/engine-render';
|
|
3
|
+
import { VerticalAlign, WrapStrategy } from '@univerjs/core';
|
|
4
|
+
import { Documents } from '@univerjs/engine-render';
|
|
5
|
+
/** Context supplied to optional extensions for embedded Board document rendering. */
|
|
6
|
+
export interface IBoardDocumentTextExtensionContext {
|
|
7
|
+
documentData: IDocumentData;
|
|
8
|
+
documents: Documents;
|
|
9
|
+
}
|
|
10
|
+
/** Factory for an optional embedded-document renderer such as LaTeX. */
|
|
11
|
+
export type BoardDocumentTextExtensionFactory = (context: IBoardDocumentTextExtensionContext) => void;
|
|
12
|
+
/**
|
|
13
|
+
* Registers an optional extension for Board's embedded document renderer.
|
|
14
|
+
*
|
|
15
|
+
* Feature packages call this once from an explicit integration entrypoint. Existing and future text render resources
|
|
16
|
+
* receive the extension without introducing a dependency from Boards UI back to the feature package.
|
|
17
|
+
*/
|
|
18
|
+
export declare function registerBoardDocumentTextExtension(factory: BoardDocumentTextExtensionFactory): {
|
|
19
|
+
dispose: () => void;
|
|
20
|
+
};
|
|
21
|
+
export interface IBoardDocumentTextRenderOptions {
|
|
22
|
+
key: string;
|
|
23
|
+
text?: string;
|
|
24
|
+
documentData?: IDocumentData;
|
|
25
|
+
left: number;
|
|
26
|
+
top: number;
|
|
27
|
+
width: number;
|
|
28
|
+
height: number;
|
|
29
|
+
localeService?: LocaleService;
|
|
30
|
+
horizontalAlign?: HorizontalAlign;
|
|
31
|
+
verticalAlign?: VerticalAlign;
|
|
32
|
+
isHorizontal?: boolean;
|
|
33
|
+
wrapStrategy?: WrapStrategy;
|
|
34
|
+
shapeTextOpticalVerticalAlign?: BooleanNumber | boolean;
|
|
35
|
+
clip?: boolean;
|
|
36
|
+
}
|
|
37
|
+
export interface IBoardDocumentTextRenderResources {
|
|
38
|
+
actualHeight: number;
|
|
39
|
+
contentHeight: number;
|
|
40
|
+
dispose: () => void;
|
|
41
|
+
documents: Documents;
|
|
42
|
+
contentVerticalOffset: number;
|
|
43
|
+
minHeight: number;
|
|
44
|
+
opticalVerticalOffset: number;
|
|
45
|
+
width: number;
|
|
46
|
+
}
|
|
47
|
+
export interface IBoardDocumentTextRenderCache {
|
|
48
|
+
signature?: string;
|
|
49
|
+
resources?: IBoardDocumentTextRenderResources;
|
|
50
|
+
}
|
|
51
|
+
export declare function prepareBoardDocumentTextData(documentData: IDocumentData, options: Pick<IBoardDocumentTextRenderOptions, 'horizontalAlign' | 'isHorizontal' | 'verticalAlign' | 'wrapStrategy'> & {
|
|
52
|
+
width: number;
|
|
53
|
+
height: number;
|
|
54
|
+
}): IDocumentData;
|
|
55
|
+
export declare function createBoardDocumentTextRenderResources(options: IBoardDocumentTextRenderOptions & {
|
|
56
|
+
documentData: IDocumentData;
|
|
57
|
+
}): IBoardDocumentTextRenderResources;
|
|
58
|
+
export declare function shouldClipBoardDocumentTextResources(options: Pick<IBoardDocumentTextRenderOptions, 'clip' | 'wrapStrategy'>, documentData: IDocumentData): boolean;
|
|
59
|
+
export declare function drawBoardDocumentTextResources(ctx: UniverRenderingContext, resources: IBoardDocumentTextRenderResources, left: number, top: number, clip: boolean): void;
|
|
60
|
+
export declare function disposeBoardDocumentTextRenderCache(cache?: IBoardDocumentTextRenderCache): void;
|
|
61
|
+
export declare function renderTextWithDocumentModel(ctx: UniverRenderingContext, options: IBoardDocumentTextRenderOptions, cache?: IBoardDocumentTextRenderCache): boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { IViewportInfo, UniverRenderingContext, Vector2 } from '@univerjs/engine-render';
|
|
2
|
+
import type { IResolvedBoardGridConfig } from '../utils/board-grid.util';
|
|
3
|
+
import { BaseObject } from '@univerjs/engine-render';
|
|
4
|
+
export interface IBoardGridObjectState extends IResolvedBoardGridConfig {
|
|
5
|
+
visible: boolean;
|
|
6
|
+
zoomRatio: number;
|
|
7
|
+
}
|
|
8
|
+
export declare const BOARD_GRID_OBJECT_KEY = "board-grid-object";
|
|
9
|
+
export declare const BOARD_GRID_OBJECT_LAYER_INDEX: 0;
|
|
10
|
+
export declare class BoardGridObject extends BaseObject {
|
|
11
|
+
private _state;
|
|
12
|
+
constructor(key?: string, state?: Partial<IBoardGridObjectState>);
|
|
13
|
+
updateState(state?: Partial<IBoardGridObjectState>): void;
|
|
14
|
+
isHit(_coord: Vector2): boolean;
|
|
15
|
+
render(ctx: UniverRenderingContext, bounds: IViewportInfo): this;
|
|
16
|
+
private _drawDots;
|
|
17
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { IViewportInfo, UniverRenderingContext, Vector2 } from '@univerjs/engine-render';
|
|
2
|
+
import { BaseObject } from '@univerjs/engine-render';
|
|
3
|
+
export type BoardGuideOrientation = 'horizontal' | 'vertical';
|
|
4
|
+
export interface IBoardGuideLine {
|
|
5
|
+
orientation: BoardGuideOrientation;
|
|
6
|
+
position: number;
|
|
7
|
+
start: number;
|
|
8
|
+
end: number;
|
|
9
|
+
color?: string;
|
|
10
|
+
label?: {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
};
|
|
14
|
+
labelText?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface IBoardGuideObjectState {
|
|
17
|
+
guides: IBoardGuideLine[];
|
|
18
|
+
zoomRatio?: number;
|
|
19
|
+
}
|
|
20
|
+
export declare const BOARD_GUIDE_OBJECT_KEY = "board-guide-object";
|
|
21
|
+
export declare const BOARD_GUIDE_OBJECT_LAYER_INDEX: 4;
|
|
22
|
+
export declare class BoardGuideObject extends BaseObject {
|
|
23
|
+
private _state;
|
|
24
|
+
constructor(key?: string, state?: Partial<IBoardGuideObjectState>);
|
|
25
|
+
updateState(state?: Partial<IBoardGuideObjectState>): void;
|
|
26
|
+
isHit(_coord: Vector2): boolean;
|
|
27
|
+
render(ctx: UniverRenderingContext, _bounds: IViewportInfo): this;
|
|
28
|
+
private _drawGuideLabel;
|
|
29
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { IBoardImageElement } from '@univerjs-pro/boards';
|
|
2
|
+
import type { IImageIoService } from '@univerjs/core';
|
|
3
|
+
import type { IImageProps } from '@univerjs/engine-render';
|
|
4
|
+
import { ImageSourceType } from '@univerjs/core';
|
|
5
|
+
import { Image } from '@univerjs/engine-render';
|
|
6
|
+
export interface IBoardImageObjectProps extends IImageProps {
|
|
7
|
+
element: IBoardImageElement;
|
|
8
|
+
imageSourceType: ImageSourceType;
|
|
9
|
+
}
|
|
10
|
+
export declare class BoardImageObject extends Image {
|
|
11
|
+
private _element;
|
|
12
|
+
constructor(key: string, props: IBoardImageObjectProps);
|
|
13
|
+
updateElement(element: IBoardImageElement): void;
|
|
14
|
+
getElement(): IBoardImageElement;
|
|
15
|
+
loadSource(imageIoService: IImageIoService): Promise<void>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { IInkSourceModel, IInkStyle } from '@univerjs-pro/ink';
|
|
2
|
+
import type { IViewportInfo, UniverRenderingContext, Vector2 } from '@univerjs/engine-render';
|
|
3
|
+
import { BaseObject } from '@univerjs/engine-render';
|
|
4
|
+
export interface IBoardInkDraftObjectState {
|
|
5
|
+
model: IInkSourceModel | null;
|
|
6
|
+
style: IInkStyle;
|
|
7
|
+
}
|
|
8
|
+
export declare const BOARD_INK_DRAFT_OBJECT_KEY = "board-ink-draft-object";
|
|
9
|
+
export declare const BOARD_INK_DRAFT_OBJECT_LAYER_INDEX: 3;
|
|
10
|
+
export declare class BoardInkDraftObject extends BaseObject {
|
|
11
|
+
private _state;
|
|
12
|
+
constructor(key?: string, state?: Partial<IBoardInkDraftObjectState>);
|
|
13
|
+
updateState(state?: Partial<IBoardInkDraftObjectState>): void;
|
|
14
|
+
isHit(_coord: Vector2): boolean;
|
|
15
|
+
render(ctx: UniverRenderingContext, _bounds: IViewportInfo): this;
|
|
16
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { IInkPoint } from '@univerjs-pro/ink';
|
|
2
|
+
import type { IViewportInfo, UniverRenderingContext, Vector2 } from '@univerjs/engine-render';
|
|
3
|
+
import { BaseObject } from '@univerjs/engine-render';
|
|
4
|
+
export interface IBoardInkEraserDraftObjectState {
|
|
5
|
+
points: IInkPoint[];
|
|
6
|
+
radius: number;
|
|
7
|
+
color: string;
|
|
8
|
+
visible: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const BOARD_INK_ERASER_DRAFT_OBJECT_KEY = "board-ink-eraser-draft-object";
|
|
11
|
+
export declare const BOARD_INK_ERASER_DRAFT_OBJECT_LAYER_INDEX: number;
|
|
12
|
+
export declare class BoardInkEraserDraftObject extends BaseObject {
|
|
13
|
+
private _state;
|
|
14
|
+
constructor(key?: string, state?: Partial<IBoardInkEraserDraftObjectState>);
|
|
15
|
+
updateState(state?: Partial<IBoardInkEraserDraftObjectState>): void;
|
|
16
|
+
isHit(_coord: Vector2): boolean;
|
|
17
|
+
render(ctx: UniverRenderingContext, _bounds: IViewportInfo): this;
|
|
18
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { IInkPenHandleRef, IInkPenModel, IInkPenPathHit, IInkPoint, IInkStyle } from '@univerjs-pro/ink';
|
|
2
|
+
import type { IViewportInfo, UniverRenderingContext, Vector2 } from '@univerjs/engine-render';
|
|
3
|
+
import { BaseObject } from '@univerjs/engine-render';
|
|
4
|
+
export interface IBoardInkPenEditorObjectState {
|
|
5
|
+
model: IInkPenModel | null;
|
|
6
|
+
style: IInkStyle;
|
|
7
|
+
previewPoint?: IInkPoint | null;
|
|
8
|
+
activeHandle?: IInkPenHandleRef | null;
|
|
9
|
+
hoverHandle?: IInkPenHandleRef | null;
|
|
10
|
+
hoverInsert?: IInkPenPathHit | null;
|
|
11
|
+
closeAnchorId?: string | null;
|
|
12
|
+
exitButtonVisible?: boolean;
|
|
13
|
+
exitButtonHovered?: boolean;
|
|
14
|
+
exitButtonLabel?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const BOARD_INK_PEN_EDITOR_OBJECT_KEY = "board-ink-pen-editor-object";
|
|
17
|
+
export declare const BOARD_INK_PEN_EDITOR_OBJECT_LAYER_INDEX: number;
|
|
18
|
+
export interface IBoardInkPenEditorExitButtonRect {
|
|
19
|
+
left: number;
|
|
20
|
+
top: number;
|
|
21
|
+
width: number;
|
|
22
|
+
height: number;
|
|
23
|
+
}
|
|
24
|
+
export declare function getBoardInkPenEditorExitButtonRect(model: IInkPenModel, label: string): IBoardInkPenEditorExitButtonRect;
|
|
25
|
+
export declare function isPointInBoardInkPenEditorExitButton(model: IInkPenModel, label: string, point: IInkPoint): boolean;
|
|
26
|
+
export declare class BoardInkPenEditorObject extends BaseObject {
|
|
27
|
+
private _state;
|
|
28
|
+
constructor(key?: string, state?: Partial<IBoardInkPenEditorObjectState>);
|
|
29
|
+
updateState(state?: Partial<IBoardInkPenEditorObjectState>): void;
|
|
30
|
+
isHit(_coord: Vector2): boolean;
|
|
31
|
+
render(ctx: UniverRenderingContext, _bounds: IViewportInfo): this;
|
|
32
|
+
private _renderPath;
|
|
33
|
+
private _renderControlLines;
|
|
34
|
+
private _renderHandles;
|
|
35
|
+
private _renderAnchor;
|
|
36
|
+
private _renderControlHandle;
|
|
37
|
+
private _renderInsertPreview;
|
|
38
|
+
private _renderExitButton;
|
|
39
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { IInkPoint } from '@univerjs-pro/ink';
|
|
2
|
+
import type { IViewportInfo, UniverRenderingContext, Vector2 } from '@univerjs/engine-render';
|
|
3
|
+
import { BaseObject } from '@univerjs/engine-render';
|
|
4
|
+
export interface IBoardInkStageActionButtonRect {
|
|
5
|
+
left: number;
|
|
6
|
+
top: number;
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
}
|
|
10
|
+
export interface IBoardInkStageActionBoundsRect extends IBoardInkStageActionButtonRect {
|
|
11
|
+
rotation?: number;
|
|
12
|
+
}
|
|
13
|
+
export interface IBoardInkStageActionButtonObjectState {
|
|
14
|
+
rect: IBoardInkStageActionButtonRect | null;
|
|
15
|
+
boundsRect: IBoardInkStageActionBoundsRect | null;
|
|
16
|
+
label: string;
|
|
17
|
+
hovered: boolean;
|
|
18
|
+
visible: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare const BOARD_INK_STAGE_ACTION_BUTTON_OBJECT_KEY = "board-ink-stage-action-button-object";
|
|
21
|
+
export declare const BOARD_INK_STAGE_ACTION_BUTTON_OBJECT_LAYER_INDEX: number;
|
|
22
|
+
export declare function getBoardInkStageActionButtonRect(bounds: IBoardInkStageActionBoundsRect, label: string): IBoardInkStageActionButtonRect;
|
|
23
|
+
export declare function isPointInBoardInkStageActionButton(rect: IBoardInkStageActionButtonRect | null, point: IInkPoint): boolean;
|
|
24
|
+
export declare class BoardInkStageActionButtonObject extends BaseObject {
|
|
25
|
+
private _state;
|
|
26
|
+
constructor(key?: string, state?: Partial<IBoardInkStageActionButtonObjectState>);
|
|
27
|
+
updateState(state?: Partial<IBoardInkStageActionButtonObjectState>): void;
|
|
28
|
+
isHit(_coord: Vector2): boolean;
|
|
29
|
+
render(ctx: UniverRenderingContext, _bounds: IViewportInfo): this;
|
|
30
|
+
private _renderBounds;
|
|
31
|
+
private _renderButton;
|
|
32
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { IInkPoint } from '@univerjs-pro/ink';
|
|
2
|
+
import type { IViewportInfo, UniverRenderingContext, Vector2 } from '@univerjs/engine-render';
|
|
3
|
+
import { BaseObject } from '@univerjs/engine-render';
|
|
4
|
+
export interface IBoardInkToolCursorObjectState {
|
|
5
|
+
point: IInkPoint | null;
|
|
6
|
+
radius: number;
|
|
7
|
+
color: string;
|
|
8
|
+
visible: boolean;
|
|
9
|
+
solid: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const BOARD_INK_TOOL_CURSOR_OBJECT_KEY = "board-ink-tool-cursor-object";
|
|
12
|
+
export declare const BOARD_INK_TOOL_CURSOR_OBJECT_LAYER_INDEX: number;
|
|
13
|
+
export declare class BoardInkToolCursorObject extends BaseObject {
|
|
14
|
+
private _state;
|
|
15
|
+
constructor(key?: string, state?: Partial<IBoardInkToolCursorObjectState>);
|
|
16
|
+
updateState(state?: Partial<IBoardInkToolCursorObjectState>): void;
|
|
17
|
+
isHit(_coord: Vector2): boolean;
|
|
18
|
+
render(ctx: UniverRenderingContext, _bounds: IViewportInfo): this;
|
|
19
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { IBoardPageElement, IBoardThemeData } from '@univerjs-pro/boards';
|
|
2
|
+
import type { IShapeData } from '@univerjs-pro/engine-shape';
|
|
3
|
+
import type { IViewportInfo, UniverRenderingContext, Vector2 } from '@univerjs/engine-render';
|
|
4
|
+
import type { IBoardPendingInsert } from '../services/board-ui-state.service';
|
|
5
|
+
import type { IBoardInsertPoint, IBoardInsertRect } from '../utils/board-insert.util';
|
|
6
|
+
import { ShapeTypeEnum } from '@univerjs-pro/engine-shape';
|
|
7
|
+
import { BaseObject } from '@univerjs/engine-render';
|
|
8
|
+
export interface IBoardPendingInsertObjectState {
|
|
9
|
+
pendingInsert: IBoardPendingInsert | null;
|
|
10
|
+
point: IBoardInsertPoint | null;
|
|
11
|
+
previewAlpha: number;
|
|
12
|
+
rect?: IBoardInsertRect | null;
|
|
13
|
+
themeData?: IBoardThemeData;
|
|
14
|
+
zoomRatio?: number;
|
|
15
|
+
}
|
|
16
|
+
export declare const BOARD_PENDING_INSERT_OBJECT_KEY = "board-pending-insert-object";
|
|
17
|
+
export declare const BOARD_PENDING_INSERT_OBJECT_LAYER_INDEX: 3;
|
|
18
|
+
export declare const BOARD_PENDING_INSERT_ALPHA = 0.18;
|
|
19
|
+
export declare function resolveBoardPendingInsertShapeModelData(element: IBoardPageElement, shapeData: IShapeData): {
|
|
20
|
+
shapeType: ShapeTypeEnum;
|
|
21
|
+
shapeData: IShapeData;
|
|
22
|
+
};
|
|
23
|
+
export declare class BoardPendingInsertObject extends BaseObject {
|
|
24
|
+
private _state;
|
|
25
|
+
constructor(key?: string, state?: Partial<IBoardPendingInsertObjectState>);
|
|
26
|
+
updateState(state?: Partial<IBoardPendingInsertObjectState>): void;
|
|
27
|
+
isHit(_coord: Vector2): boolean;
|
|
28
|
+
render(ctx: UniverRenderingContext, _bounds: IViewportInfo): this;
|
|
29
|
+
private _resolvePreviewAlpha;
|
|
30
|
+
private _resolveZoomRatio;
|
|
31
|
+
private _drawShapePreview;
|
|
32
|
+
private _drawSwimlanePreviewStructure;
|
|
33
|
+
private _drawTablePreview;
|
|
34
|
+
private _drawTextPreview;
|
|
35
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { IViewportInfo, UniverRenderingContext, Vector2 } from '@univerjs/engine-render';
|
|
2
|
+
import type { IBoardSelectionRect } from '../utils/board-selection-geometry.util';
|
|
3
|
+
import { BaseObject } from '@univerjs/engine-render';
|
|
4
|
+
export interface IBoardSelectionMarqueeObjectState {
|
|
5
|
+
rect: IBoardSelectionRect | null;
|
|
6
|
+
zoomRatio?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare const BOARD_SELECTION_MARQUEE_OBJECT_KEY = "board-selection-marquee-object";
|
|
9
|
+
export declare const BOARD_SELECTION_DIMENSIONS_OBJECT_KEY = "board-selection-dimensions-object";
|
|
10
|
+
export declare const BOARD_SELECTION_OVERLAY_LAYER_INDEX: 4;
|
|
11
|
+
export declare class BoardSelectionMarqueeObject extends BaseObject {
|
|
12
|
+
private _state;
|
|
13
|
+
constructor(key?: string, state?: Partial<IBoardSelectionMarqueeObjectState>);
|
|
14
|
+
updateState(state?: Partial<IBoardSelectionMarqueeObjectState>): void;
|
|
15
|
+
isHit(_coord: Vector2): boolean;
|
|
16
|
+
render(ctx: UniverRenderingContext, _bounds: IViewportInfo): this;
|
|
17
|
+
}
|
|
18
|
+
export interface IBoardSelectionDimensionsObjectState {
|
|
19
|
+
bounds: IBoardSelectionRect | null;
|
|
20
|
+
zoomRatio?: number;
|
|
21
|
+
}
|
|
22
|
+
export declare class BoardSelectionDimensionsObject extends BaseObject {
|
|
23
|
+
private _state;
|
|
24
|
+
constructor(key?: string, state?: Partial<IBoardSelectionDimensionsObjectState>);
|
|
25
|
+
updateState(state?: Partial<IBoardSelectionDimensionsObjectState>): void;
|
|
26
|
+
isHit(_coord: Vector2): boolean;
|
|
27
|
+
render(ctx: UniverRenderingContext, _bounds: IViewportInfo): this;
|
|
28
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { IBoardElementData } from '@univerjs-pro/boards';
|
|
2
|
+
import type { IShapeData, IShapeRect } from '@univerjs-pro/engine-shape';
|
|
3
|
+
import type { LocaleService } from '@univerjs/core';
|
|
4
|
+
import type { IObjectFullState, IViewportInfo, UniverRenderingContext, Vector2 } from '@univerjs/engine-render';
|
|
5
|
+
import { ShapeModel, ShapeTypeEnum } from '@univerjs-pro/engine-shape';
|
|
6
|
+
import { Shape } from '@univerjs/engine-render';
|
|
7
|
+
export type IBoardShapeElement = IBoardElementData['element'] & {
|
|
8
|
+
shapeData: IShapeData;
|
|
9
|
+
};
|
|
10
|
+
export interface IBoardShapeObjectProps {
|
|
11
|
+
left: number;
|
|
12
|
+
top: number;
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
angle?: number;
|
|
16
|
+
flipX?: boolean;
|
|
17
|
+
flipY?: boolean;
|
|
18
|
+
zIndex?: number;
|
|
19
|
+
visible?: boolean;
|
|
20
|
+
evented?: boolean;
|
|
21
|
+
shapeModel: ShapeModel;
|
|
22
|
+
element: IBoardShapeElement;
|
|
23
|
+
localeService?: LocaleService;
|
|
24
|
+
focusedLaneId?: string | null;
|
|
25
|
+
focusedTitle?: boolean;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Board canvas object for board shape elements.
|
|
29
|
+
*
|
|
30
|
+
* It keeps the board render layer independent while still using the shared
|
|
31
|
+
* engine-shape renderer for preset geometry.
|
|
32
|
+
*/
|
|
33
|
+
export declare class BoardShapeObject extends Shape<IBoardShapeObjectProps> {
|
|
34
|
+
private readonly _shapeModel;
|
|
35
|
+
private readonly _localeService?;
|
|
36
|
+
private _element;
|
|
37
|
+
private _focusedLaneId;
|
|
38
|
+
private _focusedTitle;
|
|
39
|
+
private _isEditing;
|
|
40
|
+
private readonly _documentTextRenderCache;
|
|
41
|
+
isDrawingObject: boolean;
|
|
42
|
+
constructor(key: string, config: IBoardShapeObjectProps);
|
|
43
|
+
updateElement(element: IBoardShapeElement): void;
|
|
44
|
+
getElement(): IBoardShapeElement;
|
|
45
|
+
getShapeModel(): ShapeModel;
|
|
46
|
+
measureTextBoxNaturalCrossSize(width: number, height: number): number | null;
|
|
47
|
+
setFocusedLaneId(focusedLaneId: string | null | undefined): void;
|
|
48
|
+
setFocusedTitle(focusedTitle: boolean | null | undefined): void;
|
|
49
|
+
transformByState(option: IObjectFullState): this;
|
|
50
|
+
setEditing(isEditing: boolean): void;
|
|
51
|
+
getTextRect(width: number, height: number): IShapeRect;
|
|
52
|
+
_draw(ctx: UniverRenderingContext, _bounds?: IViewportInfo, renderWidth?: number, renderHeight?: number): void;
|
|
53
|
+
private _drawShapeModel;
|
|
54
|
+
private _drawEngineParticipantShape;
|
|
55
|
+
private _drawSequenceLifeline;
|
|
56
|
+
private _drawGenericContainerTitleLabel;
|
|
57
|
+
private _resolveGenericContainerTitleLabelBounds;
|
|
58
|
+
private _drawFocusedSwimlaneLane;
|
|
59
|
+
private _drawSwimlaneLanes;
|
|
60
|
+
private _drawSwimlaneTitleBar;
|
|
61
|
+
private _drawSwimlaneTitleSeparator;
|
|
62
|
+
private _drawSwimlaneLaneHeaderBands;
|
|
63
|
+
private _drawSwimlaneLaneTitles;
|
|
64
|
+
private _drawSwimlaneLaneHeaderSeparators;
|
|
65
|
+
private _drawShapeText;
|
|
66
|
+
render(mainCtx: UniverRenderingContext, bounds: IViewportInfo): this;
|
|
67
|
+
private _resolveRenderCullingBound;
|
|
68
|
+
getInverseCoord(coord: Vector2): Vector2;
|
|
69
|
+
isHit(coord: Vector2): boolean;
|
|
70
|
+
static createShapeModel(element: IBoardShapeElement): ShapeModel;
|
|
71
|
+
static resolveShapeModelData(element: IBoardShapeElement): {
|
|
72
|
+
shapeType: ShapeTypeEnum;
|
|
73
|
+
shapeData: IShapeData;
|
|
74
|
+
};
|
|
75
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { IBoardConnectorPoint } from '@univerjs-pro/boards';
|
|
2
|
+
import type { IViewportInfo, UniverRenderingContext, Vector2 } from '@univerjs/engine-render';
|
|
3
|
+
import { BaseObject } from '@univerjs/engine-render';
|
|
4
|
+
export interface IBoardSwimlaneResizeDraftAffordance {
|
|
5
|
+
line: {
|
|
6
|
+
start: IBoardConnectorPoint;
|
|
7
|
+
end: IBoardConnectorPoint;
|
|
8
|
+
};
|
|
9
|
+
labelPoint: IBoardConnectorPoint;
|
|
10
|
+
size: number;
|
|
11
|
+
}
|
|
12
|
+
export interface IBoardSwimlaneResizeHoverAffordance {
|
|
13
|
+
line: {
|
|
14
|
+
start: IBoardConnectorPoint;
|
|
15
|
+
end: IBoardConnectorPoint;
|
|
16
|
+
};
|
|
17
|
+
orientation: 'horizontal' | 'vertical';
|
|
18
|
+
}
|
|
19
|
+
export interface IBoardSwimlaneResizeObjectState {
|
|
20
|
+
draft: IBoardSwimlaneResizeDraftAffordance | null;
|
|
21
|
+
hover: IBoardSwimlaneResizeHoverAffordance | null;
|
|
22
|
+
zoomRatio: number;
|
|
23
|
+
}
|
|
24
|
+
export declare const BOARD_SWIMLANE_RESIZE_OBJECT_KEY = "board-swimlane-resize-object";
|
|
25
|
+
export declare const BOARD_SWIMLANE_RESIZE_OBJECT_LAYER_INDEX: 6;
|
|
26
|
+
export declare class BoardSwimlaneResizeObject extends BaseObject {
|
|
27
|
+
private _state;
|
|
28
|
+
constructor(key?: string, state?: Partial<IBoardSwimlaneResizeObjectState>);
|
|
29
|
+
updateState(state?: Partial<IBoardSwimlaneResizeObjectState>): void;
|
|
30
|
+
getResizeState(): IBoardSwimlaneResizeObjectState;
|
|
31
|
+
isHit(coord: Vector2): boolean;
|
|
32
|
+
render(ctx: UniverRenderingContext, _bounds: IViewportInfo): this;
|
|
33
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { IDisposable } from '@univerjs/core';
|
|
2
|
+
import type { BaseObject, IBoundRectNoAngle } from '@univerjs/engine-render';
|
|
3
|
+
import type { IPopup } from '@univerjs/ui';
|
|
4
|
+
import { Disposable } from '@univerjs/core';
|
|
5
|
+
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
6
|
+
import { ICanvasPopupService } from '@univerjs/ui';
|
|
7
|
+
export interface IBoardCanvasPopup extends Pick<IPopup, 'componentKey' | 'direction' | 'excludeOutside' | 'hideOnInvisible' | 'offset' | 'onClickOutside'> {
|
|
8
|
+
anchorBoundResolver?: (targetObject: BaseObject) => IBoundRectNoAngle;
|
|
9
|
+
extraProps?: Record<string, unknown>;
|
|
10
|
+
mask?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare class BoardCanvasPopManagerService extends Disposable {
|
|
13
|
+
private readonly _globalPopupManagerService;
|
|
14
|
+
private readonly _renderManagerService;
|
|
15
|
+
constructor(_globalPopupManagerService: ICanvasPopupService, _renderManagerService: IRenderManagerService);
|
|
16
|
+
private _createObjectPositionObserver;
|
|
17
|
+
attachPopupToObject(unitId: string, subUnitId: string, targetObject: BaseObject, popup: IBoardCanvasPopup): IDisposable;
|
|
18
|
+
attachPopupToPoint(unitId: string, subUnitId: string, point: {
|
|
19
|
+
x: number;
|
|
20
|
+
y: number;
|
|
21
|
+
}, popup: IBoardCanvasPopup): IDisposable;
|
|
22
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { IBoardPageElement } from '@univerjs-pro/boards';
|
|
2
|
+
import type { IDisposable, IMutationInfo } from '@univerjs/core';
|
|
3
|
+
export interface IBoardClipboardResourceAdapter {
|
|
4
|
+
readonly key: string;
|
|
5
|
+
collect(params: {
|
|
6
|
+
unitId: string;
|
|
7
|
+
subUnitId: string;
|
|
8
|
+
elements: IBoardPageElement[];
|
|
9
|
+
}): unknown | null;
|
|
10
|
+
preparePaste(params: {
|
|
11
|
+
targetUnitId: string;
|
|
12
|
+
targetSubUnitId: string;
|
|
13
|
+
payload: unknown;
|
|
14
|
+
elementIdMap: ReadonlyMap<string, string>;
|
|
15
|
+
elements: IBoardPageElement[];
|
|
16
|
+
}): IBoardClipboardPreparedResourcePaste | null;
|
|
17
|
+
}
|
|
18
|
+
export interface IBoardClipboardPreparedResourcePaste {
|
|
19
|
+
elements: IBoardPageElement[];
|
|
20
|
+
redoMutations: IMutationInfo[];
|
|
21
|
+
undoMutations: IMutationInfo[];
|
|
22
|
+
}
|
|
23
|
+
export interface IBoardClipboardResourceAdapterService {
|
|
24
|
+
registerAdapter(adapter: IBoardClipboardResourceAdapter): IDisposable;
|
|
25
|
+
collect(params: {
|
|
26
|
+
unitId: string;
|
|
27
|
+
subUnitId: string;
|
|
28
|
+
elements: IBoardPageElement[];
|
|
29
|
+
}): Record<string, unknown> | undefined;
|
|
30
|
+
preparePaste(params: {
|
|
31
|
+
targetUnitId: string;
|
|
32
|
+
targetSubUnitId: string;
|
|
33
|
+
resources: Record<string, unknown> | undefined;
|
|
34
|
+
elementIdMap: ReadonlyMap<string, string>;
|
|
35
|
+
elements: IBoardPageElement[];
|
|
36
|
+
}): IBoardClipboardPreparedResourcePaste | null;
|
|
37
|
+
}
|
|
38
|
+
export declare const IBoardClipboardResourceAdapterService: import("@wendellhu/redi").IdentifierDecorator<IBoardClipboardResourceAdapterService>;
|
|
39
|
+
export declare class BoardClipboardResourceAdapterService implements IBoardClipboardResourceAdapterService {
|
|
40
|
+
private readonly _adapters;
|
|
41
|
+
registerAdapter(adapter: IBoardClipboardResourceAdapter): IDisposable;
|
|
42
|
+
collect(params: {
|
|
43
|
+
unitId: string;
|
|
44
|
+
subUnitId: string;
|
|
45
|
+
elements: IBoardPageElement[];
|
|
46
|
+
}): Record<string, unknown> | undefined;
|
|
47
|
+
preparePaste(params: {
|
|
48
|
+
targetUnitId: string;
|
|
49
|
+
targetSubUnitId: string;
|
|
50
|
+
resources: Record<string, unknown> | undefined;
|
|
51
|
+
elementIdMap: ReadonlyMap<string, string>;
|
|
52
|
+
elements: IBoardPageElement[];
|
|
53
|
+
}): IBoardClipboardPreparedResourcePaste | null;
|
|
54
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { BoardModel } from '@univerjs-pro/boards';
|
|
2
|
+
import type { IBoardClipboardPayload, IBoardElementStylePayload } from '../utils/board-clipboard.util';
|
|
3
|
+
import type { IBoardSelectionContext } from './board-element-state.service';
|
|
4
|
+
import { IBoardElementService } from '@univerjs-pro/boards';
|
|
5
|
+
import { ICommandService, IUndoRedoService } from '@univerjs/core';
|
|
6
|
+
import { IBoardClipboardResourceAdapterService } from './board-clipboard-resource-adapter.service';
|
|
7
|
+
import { BoardElementInsertService } from './board-element-insert.service';
|
|
8
|
+
export declare const BOARD_CLIPBOARD_PASTE_OFFSET = 24;
|
|
9
|
+
export interface IBoardPastePayloadOptions {
|
|
10
|
+
targetParentId?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface IResolveBoardPasteTargetParentOptions {
|
|
13
|
+
selectedIds: string[];
|
|
14
|
+
focusedId?: string | null;
|
|
15
|
+
hoverId?: string | null;
|
|
16
|
+
}
|
|
17
|
+
export interface IBoardCopySelectionAsImageOptions {
|
|
18
|
+
viewport: {
|
|
19
|
+
zoomRatio: number;
|
|
20
|
+
panOffset: {
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
zoom?: {
|
|
26
|
+
minZoomRatio?: number;
|
|
27
|
+
maxZoomRatio?: number;
|
|
28
|
+
};
|
|
29
|
+
padding?: number;
|
|
30
|
+
}
|
|
31
|
+
export declare class BoardClipboardService {
|
|
32
|
+
private readonly _boardElementService;
|
|
33
|
+
private readonly _elementInsertService;
|
|
34
|
+
private readonly _resourceAdapterService;
|
|
35
|
+
private readonly _commandService;
|
|
36
|
+
private readonly _undoRedoService;
|
|
37
|
+
private _payload;
|
|
38
|
+
private _stylePayload;
|
|
39
|
+
constructor(_boardElementService: IBoardElementService, _elementInsertService: BoardElementInsertService, _resourceAdapterService: IBoardClipboardResourceAdapterService, _commandService: ICommandService, _undoRedoService: IUndoRedoService);
|
|
40
|
+
setPayload(payload: IBoardClipboardPayload | null | undefined): void;
|
|
41
|
+
getPayload(): IBoardClipboardPayload | null;
|
|
42
|
+
setStylePayload(payload: IBoardElementStylePayload | null | undefined): void;
|
|
43
|
+
getStylePayload(): IBoardElementStylePayload | null;
|
|
44
|
+
createPayload(boardModel: BoardModel | null | undefined, context: IBoardSelectionContext | null | undefined, selectedIds: string[]): IBoardClipboardPayload | null;
|
|
45
|
+
createStylePayload(boardModel: BoardModel | null | undefined, context: IBoardSelectionContext | null | undefined, sourceId: string | null | undefined): IBoardElementStylePayload | null;
|
|
46
|
+
createStyleUpdates(boardModel: BoardModel | null | undefined, context: IBoardSelectionContext | null | undefined, selectedIds: string[], payload: IBoardElementStylePayload | null | undefined): import("@univerjs-pro/boards").IUpdateBoardElementsOperationItem[];
|
|
47
|
+
copySelectionAsImage(boardModel: BoardModel | null | undefined, context: IBoardSelectionContext | null | undefined, selectedIds: string[], sourceCanvas: HTMLCanvasElement | null | undefined, options: IBoardCopySelectionAsImageOptions): Promise<boolean>;
|
|
48
|
+
resolvePasteTargetParentId(boardModel: BoardModel | null | undefined, context: IBoardSelectionContext | null | undefined, options: IResolveBoardPasteTargetParentOptions): string | undefined;
|
|
49
|
+
private _resolveUnlockedContainerId;
|
|
50
|
+
pastePayload(boardModel: BoardModel | null | undefined, context: IBoardSelectionContext | null | undefined, payload: IBoardClipboardPayload | null | undefined, options?: IBoardPastePayloadOptions): Promise<IBoardClipboardPayload | null>;
|
|
51
|
+
private _canPastePayloadIntoContainer;
|
|
52
|
+
private _pastePayloadWithResourceMutations;
|
|
53
|
+
private _executeMutations;
|
|
54
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { IBeginBoardLineOperationParams, IBoardLineAdapter } from '@univerjs-pro/boards';
|
|
2
|
+
import { IBoardLineAdapterService } from '@univerjs-pro/boards';
|
|
3
|
+
import { Disposable } from '@univerjs/core';
|
|
4
|
+
import { IBoardUIStateService } from './board-ui-state.service';
|
|
5
|
+
export declare class BoardConnectorToolService extends Disposable implements IBoardLineAdapter {
|
|
6
|
+
private readonly _lineAdapterService;
|
|
7
|
+
private readonly _uiStateService;
|
|
8
|
+
private readonly _adapterDisposable;
|
|
9
|
+
constructor(_lineAdapterService: IBoardLineAdapterService, _uiStateService: IBoardUIStateService);
|
|
10
|
+
beginLineMode(params: IBeginBoardLineOperationParams): boolean;
|
|
11
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IBoardElementService } from '@univerjs-pro/boards';
|
|
2
|
+
import { Disposable, IUniverInstanceService } from '@univerjs/core';
|
|
3
|
+
import { BoardDomLayerService } from './board-dom-layer.service';
|
|
4
|
+
import { BoardElementEditService } from './board-element-edit.service';
|
|
5
|
+
import { IBoardElementStateService } from './board-element-state.service';
|
|
6
|
+
export declare const BOARD_CONTAINER_DEFAULT_TITLE = "Container";
|
|
7
|
+
export declare class BoardContainerRenameService extends Disposable {
|
|
8
|
+
private readonly _domLayerService;
|
|
9
|
+
private readonly _editService;
|
|
10
|
+
private readonly _elementStateService;
|
|
11
|
+
private readonly _elementService;
|
|
12
|
+
private readonly _instanceService;
|
|
13
|
+
private _popupDisposable;
|
|
14
|
+
constructor(_domLayerService: BoardDomLayerService, _editService: BoardElementEditService, _elementStateService: IBoardElementStateService, _elementService: IBoardElementService, _instanceService: IUniverInstanceService);
|
|
15
|
+
dispose(): void;
|
|
16
|
+
close(): void;
|
|
17
|
+
openFocusedContainerRenamePopup(): boolean;
|
|
18
|
+
openContainerRenamePopup(unitId: string, subUnitId: string, containerId: string): boolean;
|
|
19
|
+
private _resolveContainer;
|
|
20
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IBeginBoardContainerOperationParams, IBeginBoardSwimlaneOperationParams, IBoardContainerAdapter } from '@univerjs-pro/boards';
|
|
2
|
+
import { IBoardContainerAdapterService } from '@univerjs-pro/boards';
|
|
3
|
+
import { Disposable } from '@univerjs/core';
|
|
4
|
+
import { IBoardUIStateService } from './board-ui-state.service';
|
|
5
|
+
export declare class BoardContainerToolService extends Disposable implements IBoardContainerAdapter {
|
|
6
|
+
private readonly _containerAdapterService;
|
|
7
|
+
private readonly _uiStateService;
|
|
8
|
+
private readonly _adapterDisposable;
|
|
9
|
+
constructor(_containerAdapterService: IBoardContainerAdapterService, _uiStateService: IBoardUIStateService);
|
|
10
|
+
beginContainerMode(_params: IBeginBoardContainerOperationParams): boolean;
|
|
11
|
+
beginSwimlaneMode(params: IBeginBoardSwimlaneOperationParams): boolean;
|
|
12
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { IDisposable } from '@univerjs/core';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import { Disposable } from '@univerjs/core';
|
|
4
|
+
export interface IBoardDomLayerRect {
|
|
5
|
+
height: number;
|
|
6
|
+
left: number;
|
|
7
|
+
top: number;
|
|
8
|
+
width: number;
|
|
9
|
+
}
|
|
10
|
+
export interface IBoardDomLayerItem {
|
|
11
|
+
id: string;
|
|
12
|
+
unitId: string;
|
|
13
|
+
subUnitId: string;
|
|
14
|
+
rect: IBoardDomLayerRect;
|
|
15
|
+
content: ReactNode | (() => ReactNode);
|
|
16
|
+
elementId?: string;
|
|
17
|
+
interactive?: boolean;
|
|
18
|
+
zIndex?: number;
|
|
19
|
+
}
|
|
20
|
+
export declare class BoardDomLayerService extends Disposable {
|
|
21
|
+
private readonly _items;
|
|
22
|
+
private readonly _itemTokens;
|
|
23
|
+
private readonly _items$;
|
|
24
|
+
readonly items$: import("rxjs").Observable<readonly IBoardDomLayerItem[]>;
|
|
25
|
+
dispose(): void;
|
|
26
|
+
getItems(): readonly IBoardDomLayerItem[];
|
|
27
|
+
registerItem(item: IBoardDomLayerItem): IDisposable;
|
|
28
|
+
updateItem(id: string, patch: Partial<Omit<IBoardDomLayerItem, 'id'>>): void;
|
|
29
|
+
unregisterItem(id: string): void;
|
|
30
|
+
private _emitItems;
|
|
31
|
+
}
|