@ngroznykh/papirus 0.6.4 → 0.7.0
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 +13 -2
- package/README.ru.md +13 -2
- package/dist/core/ClipboardManager.d.ts +25 -0
- package/dist/core/ClipboardManager.d.ts.map +1 -0
- package/dist/core/ConnectionManager.d.ts +8 -3
- package/dist/core/ConnectionManager.d.ts.map +1 -1
- package/dist/core/DiagramRenderer.d.ts +20 -29
- package/dist/core/DiagramRenderer.d.ts.map +1 -1
- package/dist/core/DiagramSurface.d.ts +63 -0
- package/dist/core/DiagramSurface.d.ts.map +1 -0
- package/dist/core/DragManager.d.ts +2 -2
- package/dist/core/DragManager.d.ts.map +1 -1
- package/dist/core/EdgeEndpointUpdater.d.ts +25 -0
- package/dist/core/EdgeEndpointUpdater.d.ts.map +1 -0
- package/dist/core/HistoryManager.d.ts +0 -1
- package/dist/core/HistoryManager.d.ts.map +1 -1
- package/dist/core/InteractionManager.d.ts +4 -10
- package/dist/core/InteractionManager.d.ts.map +1 -1
- package/dist/core/NavigationManager.d.ts +2 -2
- package/dist/core/NavigationManager.d.ts.map +1 -1
- package/dist/core/PropertyChangeBatcher.d.ts +21 -0
- package/dist/core/PropertyChangeBatcher.d.ts.map +1 -0
- package/dist/core/ResizeManager.d.ts +2 -2
- package/dist/core/ResizeManager.d.ts.map +1 -1
- package/dist/core/ScrollbarController.d.ts +50 -0
- package/dist/core/ScrollbarController.d.ts.map +1 -0
- package/dist/core/SearchManager.d.ts.map +1 -1
- package/dist/core/SelectionManager.d.ts +2 -2
- package/dist/core/SelectionManager.d.ts.map +1 -1
- package/dist/core/overlays/MiniMap.d.ts +4 -7
- package/dist/core/overlays/MiniMap.d.ts.map +1 -1
- package/dist/elements/Edge.d.ts +20 -20
- package/dist/elements/Edge.d.ts.map +1 -1
- package/dist/elements/Element.d.ts +1 -0
- package/dist/elements/Element.d.ts.map +1 -1
- package/dist/elements/Node.d.ts.map +1 -1
- package/dist/elements/NodeImage.d.ts.map +1 -1
- package/dist/elements/Port.d.ts +1 -0
- package/dist/elements/Port.d.ts.map +1 -1
- package/dist/elements/TextLabel.d.ts +0 -1
- package/dist/elements/TextLabel.d.ts.map +1 -1
- package/dist/elements/composite/CComponent.d.ts +3 -2
- package/dist/elements/composite/CComponent.d.ts.map +1 -1
- package/dist/elements/composite/CContainer.d.ts +2 -3
- package/dist/elements/composite/CContainer.d.ts.map +1 -1
- package/dist/elements/composite/CDivider.d.ts +3 -8
- package/dist/elements/composite/CDivider.d.ts.map +1 -1
- package/dist/elements/composite/CIcon.d.ts +4 -10
- package/dist/elements/composite/CIcon.d.ts.map +1 -1
- package/dist/elements/composite/CShape.d.ts +4 -5
- package/dist/elements/composite/CShape.d.ts.map +1 -1
- package/dist/elements/composite/CText.d.ts +3 -8
- package/dist/elements/composite/CText.d.ts.map +1 -1
- package/dist/elements/composite/CompositeComponentBase.d.ts +25 -0
- package/dist/elements/composite/CompositeComponentBase.d.ts.map +1 -0
- package/dist/elements/edge/EdgeLabelRenderer.d.ts +17 -0
- package/dist/elements/edge/EdgeLabelRenderer.d.ts.map +1 -0
- package/dist/elements/edge/EdgeMarkerRenderer.d.ts +11 -0
- package/dist/elements/edge/EdgeMarkerRenderer.d.ts.map +1 -0
- package/dist/index.d.ts +15 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/papirus.js +1875 -1776
- package/dist/papirus.js.map +1 -1
- package/dist/types.d.ts +15 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/AutoRouting.d.ts.map +1 -1
- package/dist/utils/Serializer.d.ts.map +1 -1
- package/dist/utils/SvgExporter.d.ts +0 -8
- package/dist/utils/SvgExporter.d.ts.map +1 -1
- package/dist/utils/direction.d.ts +4 -0
- package/dist/utils/direction.d.ts.map +1 -1
- package/dist/utils/edgePath.d.ts +21 -0
- package/dist/utils/edgePath.d.ts.map +1 -0
- package/dist/utils/iconLayout.d.ts +34 -0
- package/dist/utils/iconLayout.d.ts.map +1 -0
- package/dist/utils/keymap.d.ts +11 -0
- package/dist/utils/keymap.d.ts.map +1 -0
- package/dist/utils/svgAssetLoader.d.ts +23 -0
- package/dist/utils/svgAssetLoader.d.ts.map +1 -0
- package/dist/utils/textMeasurer.d.ts +13 -0
- package/dist/utils/textMeasurer.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Bounds, Size } from '../../types';
|
|
2
|
-
import {
|
|
2
|
+
import { CComponentStyle, SerializedCComponent } from './CComponent';
|
|
3
|
+
import { CompositeComponentBase } from './CompositeComponentBase';
|
|
3
4
|
export interface CTextOptions {
|
|
4
5
|
id?: string;
|
|
5
6
|
text: string;
|
|
@@ -24,7 +25,7 @@ export interface CTextOptions {
|
|
|
24
25
|
* Lightweight text component for CompositeNode.
|
|
25
26
|
* Renders directly via canvas ctx without delegating to TextLabel.
|
|
26
27
|
*/
|
|
27
|
-
export declare class CText
|
|
28
|
+
export declare class CText extends CompositeComponentBase {
|
|
28
29
|
readonly type: "text";
|
|
29
30
|
readonly id?: string;
|
|
30
31
|
style: CComponentStyle;
|
|
@@ -41,7 +42,6 @@ export declare class CText implements CComponent {
|
|
|
41
42
|
private _role?;
|
|
42
43
|
private _bindToProperty?;
|
|
43
44
|
private _rotation;
|
|
44
|
-
private _onChange?;
|
|
45
45
|
private _cachedLines;
|
|
46
46
|
constructor(options: CTextOptions);
|
|
47
47
|
get text(): string;
|
|
@@ -67,7 +67,6 @@ export declare class CText implements CComponent {
|
|
|
67
67
|
get bindToProperty(): string | undefined;
|
|
68
68
|
get rotation(): number;
|
|
69
69
|
set rotation(value: number);
|
|
70
|
-
setOnChange(cb: (() => void) | undefined): void;
|
|
71
70
|
private getFont;
|
|
72
71
|
private getLineHeightPx;
|
|
73
72
|
/**
|
|
@@ -76,10 +75,6 @@ export declare class CText implements CComponent {
|
|
|
76
75
|
wrapText(ctx: CanvasRenderingContext2D, maxWidth: number): string[];
|
|
77
76
|
measure(ctx: CanvasRenderingContext2D): Size;
|
|
78
77
|
render(ctx: CanvasRenderingContext2D, bounds: Bounds): void;
|
|
79
|
-
hitTest(point: {
|
|
80
|
-
x: number;
|
|
81
|
-
y: number;
|
|
82
|
-
}, bounds: Bounds): CComponent | null;
|
|
83
78
|
serialize(): SerializedCComponent;
|
|
84
79
|
toSVG(bounds: Bounds): string;
|
|
85
80
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CText.d.ts","sourceRoot":"","sources":["../../../src/elements/composite/CText.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"CText.d.ts","sourceRoot":"","sources":["../../../src/elements/composite/CText.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE5C,OAAO,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAC1E,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,MAAM,WAAW,YAAY;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,aAAa,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAC5C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0GAA0G;IAC1G,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uHAAuH;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AAM,CAElB;IACD,IAAI,KAAK,CAAC,KAAK,EAAE,MAAM,EAKtB;IAED,IAAI,KAAK,IAAI,MAAM,GAAG,QAAQ,GAAG,OAAO,CAEvC;IACD,IAAI,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,EAK3C;IAED,IAAI,aAAa,IAAI,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAE/C;IACD,IAAI,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,EAKnD;IAED,IAAI,QAAQ,IAAI,MAAM,GAAG,SAAS,CAEjC;IACD,IAAI,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAKrC;IAED,IAAI,UAAU,IAAI,MAAM,CAEvB;IAED,IAAI,IAAI,IAAI,MAAM,GAAG,SAAS,CAE7B;IAED,IAAI,cAAc,IAAI,MAAM,GAAG,SAAS,CAEvC;IAED,IAAI,QAAQ,IAAI,MAAM,CAErB;IACD,IAAI,QAAQ,CAAC,KAAK,EAAE,MAAM,EAKzB;IAED,OAAO,CAAC,OAAO;IAIf,OAAO,CAAC,eAAe;IAIvB;;OAEG;IACH,QAAQ,CAAC,GAAG,EAAE,wBAAwB,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE;IAQnE,OAAO,CAAC,GAAG,EAAE,wBAAwB,GAAG,IAAI;IAwB5C,MAAM,CAAC,GAAG,EAAE,wBAAwB,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IA+E3D,SAAS,IAAI,oBAAoB;IAsBjC,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;CA6D9B"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Bounds } from '../../types';
|
|
2
|
+
import { CComponent, CComponentStyle } from './CComponent';
|
|
3
|
+
/**
|
|
4
|
+
* Shared change notification and default bounds hit testing for composite components.
|
|
5
|
+
*/
|
|
6
|
+
export declare abstract class CompositeComponentBase implements CComponent {
|
|
7
|
+
abstract readonly type: CComponent['type'];
|
|
8
|
+
abstract readonly id?: string;
|
|
9
|
+
abstract style: CComponentStyle;
|
|
10
|
+
protected _onChange?: () => void;
|
|
11
|
+
setOnChange(cb: (() => void) | undefined): void;
|
|
12
|
+
hitTest(point: {
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
}, bounds: Bounds): CComponent | null;
|
|
16
|
+
protected markChanged(): void;
|
|
17
|
+
abstract measure(ctx: CanvasRenderingContext2D): {
|
|
18
|
+
width: number;
|
|
19
|
+
height: number;
|
|
20
|
+
};
|
|
21
|
+
abstract render(ctx: CanvasRenderingContext2D, bounds: Bounds): void;
|
|
22
|
+
abstract serialize(): ReturnType<CComponent['serialize']>;
|
|
23
|
+
abstract toSVG(bounds: Bounds): string;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=CompositeComponentBase.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CompositeComponentBase.d.ts","sourceRoot":"","sources":["../../../src/elements/composite/CompositeComponentBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEhE;;GAEG;AACH,8BAAsB,sBAAuB,YAAW,UAAU;IAChE,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IAC3C,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC;IAEhC,SAAS,CAAC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IAEjC,WAAW,CAAC,EAAE,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,GAAG,IAAI;IAI/C,OAAO,CAAC,KAAK,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI;IAW3E,SAAS,CAAC,WAAW,IAAI,IAAI;IAI7B,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,wBAAwB,GAAG;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE;IAClF,QAAQ,CAAC,MAAM,CAAC,GAAG,EAAE,wBAAwB,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IACpE,QAAQ,CAAC,SAAS,IAAI,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;IACzD,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;CACvC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { EdgeLabelBackground, EdgePathType, Point } from '../../types';
|
|
2
|
+
import { TextLabel } from '../TextLabel';
|
|
3
|
+
export interface EdgeLabelLayoutOptions {
|
|
4
|
+
path: readonly Point[];
|
|
5
|
+
type: EdgePathType;
|
|
6
|
+
position: number;
|
|
7
|
+
offset: number;
|
|
8
|
+
followPath: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface EdgeLabelRenderOptions extends EdgeLabelLayoutOptions {
|
|
11
|
+
label?: TextLabel;
|
|
12
|
+
background?: EdgeLabelBackground;
|
|
13
|
+
}
|
|
14
|
+
export declare function renderEdgeLabel(ctx: CanvasRenderingContext2D, options: EdgeLabelRenderOptions): void;
|
|
15
|
+
export declare function getEdgeLabelPosition(options: EdgeLabelLayoutOptions): Point | null;
|
|
16
|
+
export declare function getEdgeLabelRotation(options: EdgeLabelLayoutOptions): number;
|
|
17
|
+
//# sourceMappingURL=EdgeLabelRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EdgeLabelRenderer.d.ts","sourceRoot":"","sources":["../../../src/elements/edge/EdgeLabelRenderer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGxE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,SAAS,KAAK,EAAE,CAAC;IACvB,IAAI,EAAE,YAAY,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,sBAAuB,SAAQ,sBAAsB;IACpE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,UAAU,CAAC,EAAE,mBAAmB,CAAC;CAClC;AAED,wBAAgB,eAAe,CAC7B,GAAG,EAAE,wBAAwB,EAC7B,OAAO,EAAE,sBAAsB,GAC9B,IAAI,CA4CN;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,sBAAsB,GAAG,KAAK,GAAG,IAAI,CAWlF;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,sBAAsB,GAAG,MAAM,CAa5E"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ArrowMarkerConfig, ArrowType, EdgePathType, Point } from '../../types';
|
|
2
|
+
export interface EdgeMarkerRenderOptions {
|
|
3
|
+
path: readonly Point[];
|
|
4
|
+
type: EdgePathType;
|
|
5
|
+
arrowType: ArrowType;
|
|
6
|
+
startMarker?: ArrowMarkerConfig;
|
|
7
|
+
endMarker?: ArrowMarkerConfig;
|
|
8
|
+
}
|
|
9
|
+
export declare function getCanvasMarkerLength(config: ArrowMarkerConfig): number;
|
|
10
|
+
export declare function renderEdgeMarkers(ctx: CanvasRenderingContext2D, options: EdgeMarkerRenderOptions): void;
|
|
11
|
+
//# sourceMappingURL=EdgeMarkerRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EdgeMarkerRenderer.d.ts","sourceRoot":"","sources":["../../../src/elements/edge/EdgeMarkerRenderer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAQjF,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,SAAS,KAAK,EAAE,CAAC;IACvB,IAAI,EAAE,YAAY,CAAC;IACnB,SAAS,EAAE,SAAS,CAAC;IACrB,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,SAAS,CAAC,EAAE,iBAAiB,CAAC;CAC/B;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAevE;AAED,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,wBAAwB,EAC7B,OAAO,EAAE,uBAAuB,GAC/B,IAAI,CA4BN"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { DiagramRenderer } from './core/DiagramRenderer';
|
|
2
2
|
export type { DiagramEvents, DiagramPlugin } from './core/DiagramRenderer';
|
|
3
|
+
export type { DiagramSurface, OverlayDragSession } from './core/DiagramSurface';
|
|
3
4
|
export { SelectionManager } from './core/SelectionManager';
|
|
4
5
|
export type { SelectionEvents } from './core/SelectionManager';
|
|
5
6
|
export { DragManager } from './core/DragManager';
|
|
@@ -12,6 +13,10 @@ export { ConnectionManager } from './core/ConnectionManager';
|
|
|
12
13
|
export type { ConnectionEvents, ConnectionManagerOptions, ConnectionValidator, ConnectionPreviewPathType, } from './core/ConnectionManager';
|
|
13
14
|
export { InteractionManager } from './core/InteractionManager';
|
|
14
15
|
export type { InteractionManagerOptions, InteractionKeymap } from './core/InteractionManager';
|
|
16
|
+
export { ClipboardManager } from './core/ClipboardManager';
|
|
17
|
+
export type { ClipboardManagerOptions } from './core/ClipboardManager';
|
|
18
|
+
export { PropertyChangeBatcher } from './core/PropertyChangeBatcher';
|
|
19
|
+
export type { PropertyChangeBatcherOptions, PropertyChangeKind, PropertySnapshot, } from './core/PropertyChangeBatcher';
|
|
15
20
|
export { ContextMenuManager } from './core/ContextMenuManager';
|
|
16
21
|
export type { ContextMenuItem, ContextMenuIcon, ContextMenuTarget, ContextMenuProvider, ContextMenuConfig, ContextMenuOptions, ContextMenuEvents, } from './core/ContextMenuManager';
|
|
17
22
|
export { SearchManager } from './core/SearchManager';
|
|
@@ -19,19 +24,21 @@ export type { SearchManagerOptions, SearchFindOptions, SearchFilterOptions, Sear
|
|
|
19
24
|
export { AnimationManager } from './core/AnimationManager';
|
|
20
25
|
export type { AnimationState } from './core/AnimationManager';
|
|
21
26
|
export { HistoryManager } from './core/HistoryManager';
|
|
22
|
-
export { MoveNodesCommand, AddNodeCommand, RemoveNodeCommand, CompositeCommand, ChangeEditablePolylineControlPointsCommand, } from './core/history/commands';
|
|
27
|
+
export { MoveNodesCommand, AddNodeCommand, RemoveNodeCommand, CompositeCommand, ChangeEditablePolylineControlPointsCommand, ChangeNodePropertiesCommand, ChangeEdgePropertiesCommand, ChangeGroupPropertiesCommand, } from './core/history/commands';
|
|
23
28
|
export type { HistoryEvents, HistoryManagerOptions } from './core/HistoryManager';
|
|
24
29
|
export { Element, generateId, resetIdCounter } from './elements/Element';
|
|
25
30
|
export { Node } from './elements/Node';
|
|
26
|
-
export type { NodeOptions, NodeBadgeOption, ResizeHandle, AnchorPointsConfig } from './elements/Node';
|
|
31
|
+
export type { NodeOptions, NodeBadgeOption, ResizeHandle, AnchorPointsConfig, } from './elements/Node';
|
|
27
32
|
export { Port, resetPortIdCounter } from './elements/Port';
|
|
28
33
|
export type { PortOptions } from './elements/Port';
|
|
29
34
|
export { TextLabel } from './elements/TextLabel';
|
|
30
35
|
export type { TextLabelOptions } from './elements/TextLabel';
|
|
31
36
|
export { NodeImage, isCornerPlacement } from './elements/NodeImage';
|
|
32
|
-
export type { NodeImageOptions, NodeImageFit, NodeImagePlacement, NodeImageCornerPlacement, NodeImageEdgePlacement } from './elements/NodeImage';
|
|
37
|
+
export type { NodeImageOptions, NodeImageFit, NodeImagePlacement, NodeImageCornerPlacement, NodeImageEdgePlacement, } from './elements/NodeImage';
|
|
33
38
|
export { Edge } from './elements/Edge';
|
|
34
|
-
export type { EdgeOptions
|
|
39
|
+
export type { EdgeOptions } from './elements/Edge';
|
|
40
|
+
export { StraightPathStrategy, PolylinePathStrategy, BezierPathStrategy, } from './elements/paths';
|
|
41
|
+
export type { PathStrategy, PathStrategyOptions, PathObstacle } from './elements/paths';
|
|
35
42
|
export { Group } from './elements/Group';
|
|
36
43
|
export type { GroupOptions } from './elements/Group';
|
|
37
44
|
export { RectangleNode } from './elements/nodes/RectangleNode';
|
|
@@ -67,8 +74,10 @@ export { GuidesOverlay } from './core/overlays/GuidesOverlay';
|
|
|
67
74
|
export type { GuidesOverlayOptions } from './core/overlays/GuidesOverlay';
|
|
68
75
|
export { MiniMap } from './core/overlays/MiniMap';
|
|
69
76
|
export type { MiniMapOptions } from './core/overlays/MiniMap';
|
|
70
|
-
export
|
|
77
|
+
export { distance, distanceToSegment, pointInRect, rectsIntersect, rectIntersection, rectUnion, segmentRectIntersections, pointInEllipse, angle, rotatePoint, lerp, clamp, snapToGrid, snapPointToGrid, expandBounds, boundsCenter, calculateBezierControlPoints, bezierPoint, mergeBounds, clonePoints, drawRoundedRectPath, } from './utils/geometry';
|
|
78
|
+
export type { SegmentRectIntersection } from './utils/geometry';
|
|
71
79
|
export { applyNodeStyle, renderFillAndStroke, applyEdgeStyle } from './utils/canvas';
|
|
72
|
-
export type { PathStrategyOptions } from './elements/paths/PathStrategy';
|
|
73
80
|
export type { Point, Size, Bounds, ContentInsetSides, ElementState, PortPosition, PortType, EdgeEndpoint, EdgePathType, ArrowType, ArrowMarkerType, ArrowMarkerConfig, ElementStyle, NodeStyle, EdgeStyle, TextStyle, DiagramOptions, ScrollbarOptions, AnimationOptions, ViewportState, DiagramData, SerializedNode, SerializedPort, SerializedEdge, SerializedGroup, Command, SerializedCompositeNode, } from './types';
|
|
81
|
+
export { isEdgeEdgeEndpoint, isNodeEdgeEndpoint } from './types';
|
|
82
|
+
export { getPathPointAt, getClosestPointOnPath, directionFromAngle } from './utils/edgePath';
|
|
74
83
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC3E,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhF,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE/D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAEzE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,YAAY,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,YAAY,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAE3F,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,YAAY,EACV,gBAAgB,EAChB,wBAAwB,EACxB,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,0BAA0B,CAAC;AAElC,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