@visuallyjs/browser-ui 1.0.3 → 1.1.1

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.
Files changed (139) hide show
  1. package/js/visuallyjs.browser-ui.cjs.js +57 -57
  2. package/js/visuallyjs.browser-ui.esm.js +57 -57
  3. package/package.json +1 -1
  4. package/types/browser-ui/browser-ui.d.ts +4 -7
  5. package/types/browser-ui/browser-util.d.ts +1 -0
  6. package/types/browser-ui/browser-visuallyjs-instance.d.ts +13 -6
  7. package/types/browser-ui/components/controls/css-classes.d.ts +24 -0
  8. package/types/browser-ui/components/inspector/color-picker-tag.d.ts +6 -0
  9. package/types/browser-ui/components/palette/palette.d.ts +1 -0
  10. package/types/browser-ui/connector-editors/editor-base.d.ts +0 -1
  11. package/types/browser-ui/connector-editors/util.d.ts +0 -2
  12. package/types/browser-ui/connector-editors-bezier/css-constants.d.ts +0 -12
  13. package/types/browser-ui/constants.d.ts +4 -10
  14. package/types/browser-ui/css-constants.d.ts +57 -8
  15. package/types/browser-ui/definitions.d.ts +27 -6
  16. package/types/browser-ui/dialogs/binder.d.ts +0 -11
  17. package/types/browser-ui/edge-handler-base.d.ts +9 -16
  18. package/types/browser-ui/edge-input-handler.d.ts +3 -10
  19. package/types/browser-ui/edge-mappings/flowchart-basic.d.ts +2 -1
  20. package/types/browser-ui/element-drag-handler-2.d.ts +0 -3
  21. package/types/browser-ui/html-element-overlay.d.ts +3 -0
  22. package/types/browser-ui/icons/definitions.d.ts +20 -0
  23. package/types/browser-ui/pan-zoom-options.d.ts +10 -21
  24. package/types/browser-ui/pan-zoom.d.ts +29 -114
  25. package/types/browser-ui/paper-renderer/definitions.d.ts +2 -0
  26. package/types/browser-ui/paper-renderer/paper.d.ts +1 -0
  27. package/types/browser-ui/plugins/background/background-options.d.ts +4 -0
  28. package/types/browser-ui/plugins/background/tiled-background.d.ts +2 -0
  29. package/types/browser-ui/plugins/browser-ui-plugin.d.ts +6 -1
  30. package/types/browser-ui/positioning-and-sizing-utils.d.ts +21 -1
  31. package/types/browser-ui/shape-library/shape-library-definitions.d.ts +26 -11
  32. package/types/browser-ui/shape-library/shape-library.d.ts +14 -3
  33. package/types/browser-ui/shape-library/shapes-basic.d.ts +1 -1
  34. package/types/browser-ui/shape-library/shapes-flowchart.d.ts +1 -1
  35. package/types/browser-ui/surface-renderer/anim/definitions.d.ts +13 -4
  36. package/types/browser-ui/surface-renderer/anim/path-transport.d.ts +0 -1
  37. package/types/browser-ui/surface-renderer/definitions.d.ts +14 -3
  38. package/types/browser-ui/surface-renderer/diagrams/definitions.d.ts +12 -2
  39. package/types/browser-ui/surface-renderer/diagrams/diagram-link.d.ts +2 -0
  40. package/types/browser-ui/surface-renderer/diagrams/diagram-tools.d.ts +4 -0
  41. package/types/browser-ui/surface-renderer/diagrams/diagram.d.ts +4 -1
  42. package/types/browser-ui/surface-renderer/diagrams/index.d.ts +4 -2
  43. package/types/browser-ui/surface-renderer/diagrams/mediator.d.ts +14 -0
  44. package/types/browser-ui/surface-renderer/plugins/controls/controls-plugin.d.ts +2 -0
  45. package/types/browser-ui/surface-renderer/plugins/export-controls/export-controls-plugin.d.ts +3 -1
  46. package/types/browser-ui/surface-renderer/plugins/index.d.ts +1 -0
  47. package/types/browser-ui/surface-renderer/plugins/list-manager/index.d.ts +1 -0
  48. package/types/browser-ui/surface-renderer/plugins/list-manager/list-manager-plugin.d.ts +34 -0
  49. package/types/browser-ui/surface-renderer/plugins/palette/palette-plugin.d.ts +2 -0
  50. package/types/browser-ui/surface-renderer/plugins/pan-buttons/pan-buttons-plugin.d.ts +1 -2
  51. package/types/browser-ui/surface-renderer/plugins/resizing-tools/definitions.d.ts +9 -0
  52. package/types/browser-ui/surface-renderer/plugins/snaplines/snaplines-plugin.d.ts +12 -0
  53. package/types/browser-ui/surface-renderer/plugins/vertex-drawing/vertex-drawing-plugin.d.ts +0 -2
  54. package/types/browser-ui/surface-renderer/shape-palette-options.d.ts +5 -2
  55. package/types/browser-ui/surface-renderer/shape-palette.d.ts +1 -1
  56. package/types/browser-ui/surface-renderer/surface-render-options.d.ts +0 -30
  57. package/types/browser-ui/surface-renderer/surface.d.ts +47 -38
  58. package/types/browser-ui/svg-element-overlay.d.ts +1 -0
  59. package/types/browser-ui/svg-export/definitions.d.ts +12 -0
  60. package/types/browser-ui/svg-export/image-exporter.d.ts +2 -0
  61. package/types/browser-ui/svg-export/svg-exporter.d.ts +3 -0
  62. package/types/browser-ui/templating/custom-tag-definition.d.ts +1 -2
  63. package/types/browser-ui/util.d.ts +2 -0
  64. package/types/charts/bar-and-column/bar-plot.d.ts +2 -0
  65. package/types/charts/base-chart.d.ts +62 -6
  66. package/types/charts/chart-exporter.d.ts +3 -0
  67. package/types/charts/datasource.d.ts +11 -0
  68. package/types/charts/definitions.d.ts +10 -0
  69. package/types/charts/domain_scale_utilities.d.ts +4 -0
  70. package/types/charts/legend.d.ts +2 -0
  71. package/types/charts/pie/pie-chart.d.ts +2 -0
  72. package/types/charts/sankey/sankey.d.ts +1 -0
  73. package/types/charts/scatter/definitions.d.ts +1 -0
  74. package/types/charts/series/array-based-series.d.ts +2 -0
  75. package/types/charts/series/definitions.d.ts +1 -0
  76. package/types/charts/series/series.d.ts +2 -0
  77. package/types/charts/series-based-chart.d.ts +1 -0
  78. package/types/charts/tooltip.d.ts +7 -2
  79. package/types/charts/util.d.ts +10 -3
  80. package/types/core/autosaver.d.ts +2 -1
  81. package/types/core/csv-loader.d.ts +8 -2
  82. package/types/core/event-constants.d.ts +44 -2
  83. package/types/core/geom.d.ts +1 -0
  84. package/types/core/io.d.ts +31 -7
  85. package/types/core/layout/abstract-layout.d.ts +1 -0
  86. package/types/core/layout/grid/definitions.d.ts +10 -19
  87. package/types/core/layout/grid/grid-layout.d.ts +2 -2
  88. package/types/core/layout/hierarchy/util.d.ts +1 -7
  89. package/types/core/magnetizer.d.ts +1 -0
  90. package/types/core/model/anchor.d.ts +1 -0
  91. package/types/core/model/graph.d.ts +3 -11
  92. package/types/core/model/group-template.d.ts +15 -0
  93. package/types/core/params.d.ts +2 -2
  94. package/types/core/renderer.d.ts +3 -0
  95. package/types/core/rtree/rtree.d.ts +15 -0
  96. package/types/core/selection.d.ts +2 -6
  97. package/types/core/templates/core.d.ts +1 -1
  98. package/types/core/toolkit.d.ts +30 -10
  99. package/types/core/undo-redo/undo-redo.d.ts +0 -22
  100. package/types/core/util.d.ts +4 -1
  101. package/types/ui/common/overlay.d.ts +7 -1
  102. package/types/ui/common/paint-style.d.ts +2 -0
  103. package/types/ui/connector-orthogonal/operations.d.ts +1 -18
  104. package/types/ui/connector-orthogonal/utils.d.ts +0 -6
  105. package/types/ui/connector-straight/straight-connector.d.ts +2 -5
  106. package/types/ui/core/component/component.d.ts +1 -4
  107. package/types/ui/core/connector/connection-impl.d.ts +1 -0
  108. package/types/ui/core/connector/connections.d.ts +0 -29
  109. package/types/ui/core/connector/straight-segment.d.ts +0 -6
  110. package/types/ui/core/constants.d.ts +0 -4
  111. package/types/ui/core/core-events.d.ts +5 -3
  112. package/types/ui/core/core.d.ts +19 -21
  113. package/types/ui/core/defaults.d.ts +43 -9
  114. package/types/ui/core/definitions.d.ts +39 -20
  115. package/types/ui/core/event-constants.d.ts +1 -0
  116. package/types/ui/core/factory/continuous-anchors.d.ts +0 -6
  117. package/types/ui/core/grid-profile.d.ts +3 -1
  118. package/types/ui/core/magnetize-profile.d.ts +1 -3
  119. package/types/ui/core/overlay/custom-overlay.d.ts +28 -9
  120. package/types/ui/core/overlay/label-overlay.d.ts +3 -2
  121. package/types/ui/core/overlay/overlay.d.ts +5 -3
  122. package/types/ui/core/params.d.ts +12 -99
  123. package/types/ui/core/router/default-router.d.ts +89 -18
  124. package/types/ui/core/router/index.d.ts +0 -1
  125. package/types/ui/core/router/router-utils.d.ts +0 -24
  126. package/types/ui/core/router/router.d.ts +29 -20
  127. package/types/ui/core/type-descriptors.d.ts +2 -0
  128. package/types/ui/core/ui-model.d.ts +3 -0
  129. package/types/ui/core/view/edge-options.d.ts +5 -0
  130. package/types/ui/core/view/events.d.ts +22 -0
  131. package/types/ui/core/view/node-or-port-options.d.ts +6 -0
  132. package/types/ui/core/view/vertex-options.d.ts +2 -0
  133. package/types/ui/core/viewport.d.ts +7 -1
  134. package/types/ui/plugins/definitions.d.ts +6 -1
  135. package/types/ui/plugins/plugins.d.ts +4 -0
  136. package/types/ui/property-mappings/definitions.d.ts +6 -0
  137. package/types/ui/util/util.d.ts +3 -16
  138. package/types/version.d.ts +1 -1
  139. package/types/ui/core/router/base-router.d.ts +0 -100
@@ -2,6 +2,8 @@ import { EdgeMapping } from "../core";
2
2
  /**
3
3
  * A mapping of some property/properties to a set of appearance values. Currently only used by edges.
4
4
  * @typeParam D Identifies the type that each mapping has. For instance, for {@link EdgePropertyMappings}, this type is {@link EdgeDefinition}.
5
+ * @group UI
6
+ * @category Definitions
5
7
  */
6
8
  export interface PropertyMapping<D> {
7
9
  /**
@@ -15,10 +17,14 @@ export interface PropertyMapping<D> {
15
17
  }
16
18
  /**
17
19
  * A set of property mappings for edges.
20
+ * @group UI
21
+ * @category Definitions
18
22
  */
19
23
  export type EdgePropertyMappings = Array<PropertyMapping<EdgeMapping>>;
20
24
  /**
21
25
  * A set of {@link PropertyMapping}s - currently only edges are supported, but future versions will support nodes, groups and ports
26
+ * @group UI
27
+ * @category Definitions
22
28
  */
23
29
  export interface PropertyMappings {
24
30
  /**
@@ -6,7 +6,6 @@
6
6
  * @internal
7
7
  */
8
8
  import { PointXY, Size } from "../../core";
9
- export declare function filterList(list: Array<any> | string, value: any, missingIsFalse?: boolean): boolean;
10
9
  /**
11
10
  * Equivalent of Object.assign, which IE11 does not support.
12
11
  * @param o1
@@ -23,13 +22,6 @@ export interface RotatedPointXY extends PointXY {
23
22
  cr: number;
24
23
  sr: number;
25
24
  }
26
- /**
27
- * Internal method used to rotate an anchor orientation.
28
- * @param orientation
29
- * @param rotation
30
- * @internal
31
- */
32
- export declare function rotateAnchorOrientation(orientation: [number, number], rotation: any): [number, number];
33
25
  /**
34
26
  * Iterates through the given `obj` and applies the given function. if `obj` is not ArrayLike then the function is
35
27
  * executed directly on `obj`.
@@ -46,24 +38,19 @@ export declare function each(obj: any, fn: Function): void;
46
38
  * @internal
47
39
  */
48
40
  export declare function wrap(wrappedFunction: Function, newFunction: Function, returnOnThisValue?: any): () => any;
49
- /**
50
- * A copy of a concept from a later version of Typescript than jsPlumb can currently use.
51
- * @internal
52
- */
53
41
  /**
54
42
  * Defines a function that can be used to sort an array.
55
43
  * @internal
56
44
  */
57
45
  export type SortFunction<T> = (a: T, b: T) => number;
58
46
  /**
59
- * Definition of a function that can be used to constrain the movement of an element that is being dragged. The function is
60
- * given the "desiredLoc", which is the location the element would be moved to if not constrained, and it is expected to return
61
- * either some other value, meaning place the element at that position, or null, meaning for the given desired location there
62
- * is no preferred position and the element should not be moved.
47
+ * Definition of a function that can be used to constrain the movement of an element that is being dragged. The function is given the "desiredLoc", which is the location the element would be moved to if not constrained, and it is expected to return either some other value, meaning place the element at that position, or null, meaning for the given desired location there is no preferred position and the element should not be moved.
63
48
  *
64
49
  * @param desiredLoc - Position the element will be placed at if unconstrained
65
50
  * @param dragEl - the element that is being dragged
66
51
  * @param size - The size of the element being dragged
67
52
  * @param e - The event associated with this tick of the drag lifecycle.
53
+ * @group UI
54
+ * @category Definitions
68
55
  */
69
56
  export type ConstrainFunction<EL, E> = (desiredLoc: PointXY, dragEl: EL, constrainRect: Size, size: Size, currentPos: PointXY, e: E) => PointXY;
@@ -1 +1 @@
1
- export declare const VERSION = "1.0.3";
1
+ export declare const VERSION = "1.1.1";
@@ -1,100 +0,0 @@
1
- import { AnchorPlacement, Geometry, Edge } from "../../../core";
2
- import { ConnectionDetachedParams } from "../callbacks";
3
- import { RedrawResult, Router } from "./router";
4
- import { Connection } from "../connector/connection-impl";
5
- import { UICore } from "../core";
6
- import { ViewportElement } from "../viewport";
7
- import { AnchorSpec, Connector, AnchorComputeParams, LightweightAnchor, LightweightContinuousAnchor } from "../../common";
8
- import { AStarGrid } from "../../../core";
9
- import { ConnectorComputeParams } from "../connector/abstract-connector";
10
- import { AnchorLists } from "./router-utils";
11
- /**
12
- * Base router options. Placeholder interface for subclasses.
13
- * @internal
14
- */
15
- export interface BaseRouterOptions {
16
- gridCellSize?: number;
17
- avoidVertices?: boolean;
18
- vertexBuffer?: number;
19
- vertexBorder?: number;
20
- }
21
- /**
22
- * @internal
23
- */
24
- export declare abstract class BaseRouter<EL> implements Router<EL, LightweightAnchor> {
25
- instance: UICore<any, any>;
26
- anchorLists: Map<string, AnchorLists>;
27
- protected _avoidVertices: boolean;
28
- protected _gridCellSize: number;
29
- protected _vertexBuffer: number;
30
- protected _vertexBorder: number;
31
- protected _grid: AStarGrid;
32
- protected constructor(instance: UICore<any, any>, options?: BaseRouterOptions);
33
- /**
34
- * Notification that a connection was removed.
35
- * @param params
36
- */
37
- $connectionRemoved(params: ConnectionDetachedParams<any>): void;
38
- elementRemoved(el: ViewportElement<EL>): void;
39
- private _removeConnection;
40
- $connectionDetachedFromElement(connection: Connection<EL>, el: ViewportElement<any>): void;
41
- /**
42
- * Sets the current anchor index in an anchor that has more than one location
43
- * @internal
44
- * @param anchor
45
- * @param idx
46
- * @param connection
47
- */
48
- $setCurrentLocation(anchor: LightweightAnchor, idx: number, connection?: Connection<any>): void;
49
- /**
50
- * Computes the position for an anchor that is neither floating nor continuous, or is currently fixed. This case
51
- * covers what was previously both DynamicAnchor and Anchor, since those concepts have now been folded into
52
- * a single concept - any given anchor has one or more locations.
53
- * @param anchor
54
- * @param params
55
- */
56
- private _defaultAnchorCompute;
57
- private _placeContinuousAnchors;
58
- private _updateContinuousAnchorList;
59
- /**
60
- * Remove the given anchor from the continuous anchor lists. This method is invoked when a connection is detached.
61
- * @param elementId
62
- * @param anchor
63
- * @private
64
- * @internal
65
- */
66
- $_removeAnchorFromAnchorLists(elementId: string, anchor: LightweightContinuousAnchor): void;
67
- computeAnchorLocation(anchor: LightweightAnchor, params: AnchorComputeParams): AnchorPlacement;
68
- computePath(connection: Connection<any>, timestamp: string): void;
69
- abstract _doComputePath(connection: Connection<EL>, connector: Connector, params: ConnectorComputeParams, timestamp: string): Geometry;
70
- abstract _doUpdatePath(connection: Connection<EL>, connector: Connector, params: ConnectorComputeParams, timestamp: string, sourceMoved: boolean, targetMoved: boolean): Geometry;
71
- prepareAnchor(params: AnchorSpec | Array<AnchorSpec>): LightweightAnchor;
72
- private _orientationCache;
73
- private _orientationCacheTimestamp;
74
- /**
75
- * @internal
76
- * @param c
77
- * @private
78
- */
79
- protected _computeObstaclePadding(c: Connector): number;
80
- private _calculateOrientation;
81
- /**
82
- * Redraws every connection. Does not update element positions.
83
- * @internal
84
- */
85
- $redrawEveryConnection(): RedrawResult;
86
- $redrawConnection(edge: Edge, timestamp?: string): RedrawResult;
87
- /**
88
- * Redraws connections for the given element. Does not update element positions.
89
- * @internal
90
- */
91
- $redraw(viewportElement: ViewportElement<EL>, timestamp?: string): RedrawResult;
92
- /**
93
- * Redraws a list of connections. Does not update element positions.
94
- * @internal
95
- */
96
- private _redrawConnections;
97
- reset(): void;
98
- setConnectionAnchors(conn: Connection<any>, anchors: [LightweightAnchor, LightweightAnchor]): void;
99
- private _anchorSelector;
100
- }