Comparing version 3.0.0-beta.9 to 3.0.0-beta.10
@@ -6,30 +6,3 @@ import Graph, { Attributes } from "graphology-types"; | ||
import { Settings } from "./settings.js"; | ||
import { CameraState, CoordinateConversionOverride, Coordinates, Dimensions, EdgeDisplayData, Extent, MouseCoords, MouseInteraction, NodeDisplayData, PlainObject, TypedEventEmitter } from "./types.js"; | ||
export interface SigmaEventPayload { | ||
event: MouseCoords; | ||
preventSigmaDefault(): void; | ||
} | ||
export type SigmaStageEventPayload = SigmaEventPayload; | ||
export interface SigmaNodeEventPayload extends SigmaEventPayload { | ||
node: string; | ||
} | ||
export interface SigmaEdgeEventPayload extends SigmaEventPayload { | ||
edge: string; | ||
} | ||
export type SigmaStageEvents = { | ||
[E in MouseInteraction as `${E}Stage`]: (payload: SigmaStageEventPayload) => void; | ||
}; | ||
export type SigmaNodeEvents = { | ||
[E in MouseInteraction as `${E}Node`]: (payload: SigmaNodeEventPayload) => void; | ||
}; | ||
export type SigmaEdgeEvents = { | ||
[E in MouseInteraction as `${E}Edge`]: (payload: SigmaEdgeEventPayload) => void; | ||
}; | ||
export type SigmaAdditionalEvents = { | ||
beforeRender(): void; | ||
afterRender(): void; | ||
resize(): void; | ||
kill(): void; | ||
}; | ||
export type SigmaEvents = SigmaStageEvents & SigmaNodeEvents & SigmaEdgeEvents & SigmaAdditionalEvents; | ||
import { CameraState, CoordinateConversionOverride, Coordinates, Dimensions, EdgeDisplayData, Extent, NodeDisplayData, PlainObject, SigmaEvents, TypedEventEmitter } from "./types.js"; | ||
export default class Sigma<N extends Attributes = Attributes, E extends Attributes = Attributes, G extends Attributes = Attributes> extends TypedEventEmitter<SigmaEvents> { | ||
@@ -36,0 +9,0 @@ private settings; |
@@ -91,4 +91,31 @@ /// <reference types="node" /> | ||
} | ||
export interface SigmaEventPayload { | ||
event: MouseCoords; | ||
preventSigmaDefault(): void; | ||
} | ||
export type SigmaStageEventPayload = SigmaEventPayload; | ||
export interface SigmaNodeEventPayload extends SigmaEventPayload { | ||
node: string; | ||
} | ||
export interface SigmaEdgeEventPayload extends SigmaEventPayload { | ||
edge: string; | ||
} | ||
export type SigmaStageEvents = { | ||
[E in MouseInteraction as `${E}Stage`]: (payload: SigmaStageEventPayload) => void; | ||
}; | ||
export type SigmaNodeEvents = { | ||
[E in MouseInteraction as `${E}Node`]: (payload: SigmaNodeEventPayload) => void; | ||
}; | ||
export type SigmaEdgeEvents = { | ||
[E in MouseInteraction as `${E}Edge`]: (payload: SigmaEdgeEventPayload) => void; | ||
}; | ||
export type SigmaAdditionalEvents = { | ||
beforeRender(): void; | ||
afterRender(): void; | ||
resize(): void; | ||
kill(): void; | ||
}; | ||
export type SigmaEvents = SigmaStageEvents & SigmaNodeEvents & SigmaEdgeEvents & SigmaAdditionalEvents; | ||
export type { CameraEvents } from "./core/camera.js"; | ||
export type { MouseCaptorEvents } from "./core/captors/mouse.js"; | ||
export type { TouchCaptorEvents, FakeSigmaMouseEvent } from "./core/captors/touch.js"; |
{ | ||
"name": "sigma", | ||
"version": "3.0.0-beta.9", | ||
"version": "3.0.0-beta.10", | ||
"description": "A JavaScript library aimed at visualizing graphs of thousands of nodes and edges.", | ||
@@ -93,3 +93,3 @@ "homepage": "https://www.sigmajs.org", | ||
}, | ||
"gitHead": "69d9a377209b74dcc4a98fb7298dca9ae4264bd3" | ||
"gitHead": "de09341ad2219f28530494611a5c1bc9b65db89b" | ||
} |
@@ -38,2 +38,6 @@ 'use strict'; | ||
/** | ||
* Event types. | ||
*/ | ||
/** | ||
* Export various other types: | ||
@@ -40,0 +44,0 @@ */ |
@@ -38,2 +38,6 @@ 'use strict'; | ||
/** | ||
* Event types. | ||
*/ | ||
/** | ||
* Export various other types: | ||
@@ -40,0 +44,0 @@ */ |
@@ -34,2 +34,6 @@ import { _ as _inherits, a as _classCallCheck, b as _callSuper, c as _assertThisInitialized, d as _createClass } from '../../dist/inherits-8fbdedb5.esm.js'; | ||
/** | ||
* Event types. | ||
*/ | ||
/** | ||
* Export various other types: | ||
@@ -36,0 +40,0 @@ */ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
804963