@html-graph/html-graph 8.16.0 → 8.17.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.
@@ -292,6 +292,7 @@ export declare interface ConnectablePortsConfig {
292
292
  readonly edgeShape?: EdgeShapeConfig;
293
293
  readonly connectionTypeResolver?: ConnectionTypeResolver;
294
294
  readonly connectionPreprocessor?: ConnectionPreprocessor;
295
+ readonly connectionAllowedVerifier?: ConnectionAllowedVerifier;
295
296
  readonly mouseDownEventVerifier?: MouseEventVerifier;
296
297
  readonly mouseUpEventVerifier?: MouseEventVerifier;
297
298
  readonly dragPortDirection?: number | undefined;
@@ -305,13 +306,26 @@ export declare interface ConnectablePortsConfig {
305
306
  };
306
307
  }
307
308
 
309
+ export declare type ConnectionAllowedVerifier = (request: ConnectionAllowedVerifierRequest) => boolean;
310
+
311
+ export declare interface ConnectionAllowedVerifierRequest {
312
+ readonly from: Identifier;
313
+ readonly to: Identifier;
314
+ }
315
+
308
316
  export declare enum ConnectionCategory {
309
317
  Line = "line",
310
318
  NodeCycle = "node-cycle",
311
319
  PortCycle = "port-cycle"
312
320
  }
313
321
 
314
- export declare type ConnectionPreprocessor = (request: AddEdgeRequest) => AddEdgeRequest | null;
322
+ export declare type ConnectionPreprocessor = (request: AddEdgeRequest) => AddEdgeRequest | ConnectionPreprocessorNullResponse;
323
+
324
+ /**
325
+ * @deprecated
326
+ * connection preprocessor should not return null
327
+ */
328
+ declare type ConnectionPreprocessorNullResponse = null;
315
329
 
316
330
  export declare type ConnectionTypeResolver = (portId: Identifier) => "direct" | "reverse" | null;
317
331
 
@@ -368,6 +382,7 @@ declare interface DotsRenderer {
368
382
 
369
383
  declare interface DraggableEdgesConfig {
370
384
  readonly connectionPreprocessor?: ConnectionPreprocessor;
385
+ readonly connectionAllowedVerifier?: ConnectionAllowedVerifier;
371
386
  readonly mouseDownEventVerifier?: MouseEventVerifier;
372
387
  readonly mouseUpEventVerifier?: MouseEventVerifier;
373
388
  readonly draggingEdgeResolver?: DraggingEdgeResolver;
@@ -707,6 +722,10 @@ export declare class InteractiveEdgeShape implements StructuredEdgeShape {
707
722
  readonly line: SVGPathElement;
708
723
  readonly sourceArrow: SVGPathElement | null;
709
724
  readonly targetArrow: SVGPathElement | null;
725
+ /**
726
+ * @deprecated
727
+ * do use shape.svg instead
728
+ */
710
729
  readonly handle: SVGGElement;
711
730
  readonly onAfterRender: EventHandler<StructuredEdgeRenderModel>;
712
731
  private readonly interactiveLine;