@visuallyjs/browser-ui 1.2.9 → 1.2.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visuallyjs/browser-ui",
3
- "version": "1.2.9",
3
+ "version": "1.2.11",
4
4
  "license": "Commercial",
5
5
  "main": "js/visuallyjs.browser-ui.cjs.js",
6
6
  "module": "js/visuallyjs.browser-ui.esm.js",
@@ -60,7 +60,7 @@ export declare function getClass(el: BrowserElement): string;
60
60
  * @param el
61
61
  * @param clazz
62
62
  */
63
- export declare function addClass(el: BrowserElement | NodeListOf<BrowserElement>, clazz: string): void;
63
+ export declare function addClass(el: BrowserElement | NodeListOf<BrowserElement>, clazz: string | Array<string>): void;
64
64
  /**
65
65
  * @internal
66
66
  * @param el
@@ -150,6 +150,20 @@ export interface DiagramOptions {
150
150
  * Defaults to false. If true, edges will attempt to avoid vertices wherever possible.
151
151
  */
152
152
  avoidVertices?: boolean;
153
+ /**
154
+ * Size of each cell in the grid that the AStar routine uses to calculate paths that avoid vertices. This defaults to 10 pixels.If you do change it, keep in mind that a) a smaller grid size increases the runtime of the routine, and b) a large grid size will render the UI unusable.
155
+ */
156
+ astarGridCellSize?: number;
157
+ /**
158
+ * Number of cells to pad each vertex with that act as its border: edges will be routed around the border wherever possible. Defaults to 2
159
+ *
160
+ */
161
+ astarVertexBorder?: number;
162
+ /**
163
+ * Number of cells to pad each vertex with that act as its buffer: edges will be routed around the buffer wherever possible. Defaults to 2 - but note this value is added the vertex border, whose default is 2, so the computed default is 4 grid cells.
164
+ *
165
+ */
166
+ astarVertexBuffer?: number;
153
167
  /**
154
168
  * Defaults to true - edges are editable when the user taps on them.
155
169
  */
@@ -4,6 +4,7 @@ import { RectangleXY } from "../util";
4
4
  */
5
5
  export declare const HilbertCurves: {
6
6
  sortRect: <T extends RectangleXY>(listOfRectangles: Array<T>) => Array<T>;
7
- toHilbertCoordinates: (maxCoordinate: number, x: number, y: number) => number;
7
+ /** Convert integer coordinates on a 2^order square to an unsigned Hilbert key (orders 1–16). */
8
+ toHilbertCoordinates: (order: number, x: number, y: number) => number;
8
9
  hilbertInterleaveBits: (odd: number, even: number) => number;
9
10
  };
@@ -87,7 +87,8 @@ export declare class RTree<DataPayload extends ObjectData = ObjectData> {
87
87
  */
88
88
  searchById(id: string): RTreeRegion;
89
89
  /**
90
- * Update the position of the given record. Internally this just removes the record and re-inserts it.
90
+ * Update the position of the given record without condensing nonempty branches.
91
+ * Only the updated record is reinserted; its old ancestor bounds are refitted once.
91
92
  * @param id
92
93
  * @param x
93
94
  * @param y
@@ -8,6 +8,12 @@ export declare function _growToFit(rectToGrow: RTreeRegion, otherRect: RTreeRegi
8
8
  * @private
9
9
  */
10
10
  export declare function _updateRTreeRegionBounds(rect: RTreeRegion): void;
11
+ /**
12
+ * Refit only this region to its immediate children. Empty regions use the same
13
+ * bounds as `_emptyRTreeRegion`; callers prune empty branches before refitting parents.
14
+ * @internal
15
+ */
16
+ export declare function _refitRTreeRegionBounds(rect: RTreeRegion): void;
11
17
  export declare function _areaIfGrownBy(rectToGrow: RTreeRegion, otherRect: RTreeRegion): number;
12
18
  export declare function splitIntoSiblings(r: RTreeRegion): [RTreeRegion, RTreeRegion];
13
19
  /**
package/types/index.d.ts CHANGED
@@ -14,3 +14,4 @@ export * from './core';
14
14
  export * from './test-support';
15
15
  export { HeadlessRecado, Recado, processExpression, evaluateExpression } from './core/templates';
16
16
  export * from './charts';
17
+ export * from "./perf";
@@ -0,0 +1,16 @@
1
+ export declare class VisuallyJsPerformance {
2
+ static p: VisuallyJsPerformance;
3
+ metrics: Map<string, number>;
4
+ track: Map<string, number>;
5
+ counts: Map<string, number>;
6
+ level: number;
7
+ _disabled: boolean;
8
+ static get(): VisuallyJsPerformance;
9
+ private padTopic;
10
+ disable(): void;
11
+ enable(): void;
12
+ begin(topic: string): void;
13
+ end(topic: string): void;
14
+ reset(): void;
15
+ log(): void;
16
+ }
@@ -1 +1 @@
1
- export declare const VERSION = "1.2.9";
1
+ export declare const VERSION = "1.2.11";