@html-graph/html-graph 8.18.1 → 8.19.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.
@@ -2695,7 +2695,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
2695
2695
  // TODO: make private
2696
2696
  /**
2697
2697
  * @deprecated
2698
- * do use shape.svg instead
2698
+ * use shape.svg instead
2699
2699
  */
2700
2700
  __publicField(this, "handle", createEdgeGroup());
2701
2701
  __publicField(this, "onAfterRender");
@@ -3594,7 +3594,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
3594
3594
  to: params.isDirect ? targetPortId : params.staticPortId
3595
3595
  };
3596
3596
  };
3597
- class ClosestConnectablePortDraggingPortDirectionResolver {
3597
+ class NearestConnectablePortDraggingPortDirectionResolver {
3598
3598
  constructor(graph, connectionAllowedVerifier) {
3599
3599
  this.graph = graph;
3600
3600
  this.connectionAllowedVerifier = connectionAllowedVerifier;
@@ -5054,7 +5054,13 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5054
5054
  };
5055
5055
  const resolveDraggingPortDirectionResolver = (config, graph, connectionAllowedVerifier) => {
5056
5056
  if (config === "closest-connectable-port") {
5057
- return new ClosestConnectablePortDraggingPortDirectionResolver(
5057
+ return new NearestConnectablePortDraggingPortDirectionResolver(
5058
+ graph,
5059
+ connectionAllowedVerifier
5060
+ );
5061
+ }
5062
+ if (config === "nearest-connectable-port") {
5063
+ return new NearestConnectablePortDraggingPortDirectionResolver(
5058
5064
  graph,
5059
5065
  connectionAllowedVerifier
5060
5066
  );
@@ -6425,6 +6431,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
6425
6431
  nodeMass: (config == null ? void 0 : config.nodeMass) ?? forceDirectedDefaults.nodeMass,
6426
6432
  edgeEquilibriumLength: (config == null ? void 0 : config.edgeEquilibriumLength) ?? forceDirectedDefaults.edgeEquilibriumLength,
6427
6433
  edgeStiffness: (config == null ? void 0 : config.edgeStiffness) ?? forceDirectedDefaults.edgeStiffness,
6434
+ // TODO: rename no `minVelocity`
6428
6435
  convergenceVelocity: (config == null ? void 0 : config.convergenceVelocity) ?? forceDirectedDefaults.convergenceVelocity,
6429
6436
  maxForce: (config == null ? void 0 : config.maxForce) ?? forceDirectedDefaults.maxForce,
6430
6437
  nodeForceCoefficient: (config == null ? void 0 : config.nodeForceCoefficient) ?? forceDirectedDefaults.nodeForceCoefficient,
@@ -6454,6 +6461,12 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
6454
6461
  trigger: applyOn
6455
6462
  };
6456
6463
  }
6464
+ if (applyOn === "topologyChangeMicrotask") {
6465
+ return {
6466
+ type: "topologyChangeSchedule",
6467
+ schedule: microtaskScheduleFn
6468
+ };
6469
+ }
6457
6470
  if ((applyOn == null ? void 0 : applyOn.type) === "topologyChangeMacrotask") {
6458
6471
  return {
6459
6472
  type: "topologyChangeSchedule",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@html-graph/html-graph",
3
3
  "author": "Dmitry Marov <d.marov94@gmail.com>",
4
4
  "private": false,
5
- "version": "8.18.1",
5
+ "version": "8.19.0",
6
6
  "type": "module",
7
7
  "main": "dist/html-graph.js",
8
8
  "types": "dist/html-graph.d.ts",