@xyflow/system
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -18,2 +18,3 @@ import { CoordinateExtent, HandleType } from './types'; | ||
error011: (edgeType: string) => string; | ||
error012: (id: string) => string; | ||
}; | ||
@@ -20,0 +21,0 @@ export declare const internalsSymbol: unique symbol; |
@@ -18,3 +18,3 @@ import type { D3DragEvent, Selection as D3Selection, SubjectPosition, ZoomBehavior } from 'd3'; | ||
export type FitBounds = (bounds: Rect, options?: FitBoundsOptions) => void; | ||
export interface Connection { | ||
export type Connection = { | ||
source: string | null; | ||
@@ -24,3 +24,3 @@ target: string | null; | ||
targetHandle: string | null; | ||
} | ||
}; | ||
export type ConnectionStatus = 'valid' | 'invalid'; | ||
@@ -27,0 +27,0 @@ export declare enum ConnectionMode { |
@@ -29,2 +29,3 @@ import type { Dimensions, XYPosition, CoordinateExtent, Box, Rect, NodeBase, NodeOrigin, SnapGrid, Transform } from '../types'; | ||
export declare const getTransformForBounds: (bounds: Rect, width: number, height: number, minZoom: number, maxZoom: number, padding?: number) => Transform; | ||
export declare const isMacOs: () => boolean; | ||
//# sourceMappingURL=general.d.ts.map |
import type { D3ZoomEvent } from 'd3-zoom'; | ||
import { PanOnScrollMode, type D3SelectionInstance, type D3ZoomHandler, type D3ZoomInstance, type OnPanZoom, type Viewport, type OnDraggingChange, type OnTransformChange } from '../types'; | ||
export type ZoomPanValues = { | ||
isZoomingOrPanning: boolean; | ||
usedRightMouseButton: boolean; | ||
prevViewport: Viewport; | ||
mouseButton: number; | ||
timerId: ReturnType<typeof setTimeout> | undefined; | ||
}; | ||
import { PanOnScrollMode, type D3SelectionInstance, type D3ZoomHandler, type D3ZoomInstance, type OnPanZoom, type OnDraggingChange, type OnTransformChange } from '../types'; | ||
import { ZoomPanValues } from './XYPanZoom'; | ||
export type PanOnScrollParams = { | ||
zoomPanValues: ZoomPanValues; | ||
noWheelClassName: string; | ||
@@ -17,2 +12,5 @@ d3Selection: D3SelectionInstance; | ||
zoomOnPinch: boolean; | ||
onPanZoomStart?: OnPanZoom; | ||
onPanZoom?: OnPanZoom; | ||
onPanZoomEnd?: OnPanZoom; | ||
}; | ||
@@ -44,3 +42,3 @@ export type ZoomOnScrollParams = { | ||
}; | ||
export declare function createPanOnScrollHandler({ noWheelClassName, d3Selection, d3Zoom, panOnScrollMode, panOnScrollSpeed, zoomOnPinch, }: PanOnScrollParams): (event: any) => false | undefined; | ||
export declare function createPanOnScrollHandler({ zoomPanValues, noWheelClassName, d3Selection, d3Zoom, panOnScrollMode, panOnScrollSpeed, zoomOnPinch, onPanZoomStart, onPanZoom, onPanZoomEnd, }: PanOnScrollParams): (event: any) => false | undefined; | ||
export declare function createZoomOnScrollHandler({ noWheelClassName, preventScrolling, d3ZoomHandler }: ZoomOnScrollParams): (this: Element, event: any, d: unknown) => null | undefined; | ||
@@ -47,0 +45,0 @@ export declare function createPanZoomStartHandler({ zoomPanValues, onDraggingChange, onPanZoomStart }: PanZoomStartParams): (event: D3ZoomEvent<HTMLDivElement, any>) => void; |
@@ -9,2 +9,3 @@ import { type ZoomTransform } from 'd3-zoom'; | ||
export declare const getD3Transition: (selection: D3SelectionInstance, duration?: number) => D3SelectionInstance | import("d3").Transition<Element, unknown, null, undefined>; | ||
export declare const wheelDelta: (event: any) => number; | ||
//# sourceMappingURL=utils.d.ts.map |
@@ -8,4 +8,6 @@ import { type Viewport, PanZoomParams, PanZoomInstance } from '../types'; | ||
timerId: ReturnType<typeof setTimeout> | undefined; | ||
panScrollTimeout: ReturnType<typeof setTimeout> | undefined; | ||
isPanScrolling: boolean; | ||
}; | ||
export declare function XYPanZoom({ domNode, minZoom, maxZoom, translateExtent, viewport, onPanZoom, onPanZoomStart, onPanZoomEnd, onTransformChange, onDraggingChange, }: PanZoomParams): PanZoomInstance; | ||
//# sourceMappingURL=XYPanZoom.d.ts.map |
@@ -18,2 +18,3 @@ import { CoordinateExtent, HandleType } from './types'; | ||
error011: (edgeType: string) => string; | ||
error012: (id: string) => string; | ||
}; | ||
@@ -20,0 +21,0 @@ export declare const internalsSymbol: unique symbol; |
@@ -18,3 +18,3 @@ import type { D3DragEvent, Selection as D3Selection, SubjectPosition, ZoomBehavior } from 'd3'; | ||
export type FitBounds = (bounds: Rect, options?: FitBoundsOptions) => void; | ||
export interface Connection { | ||
export type Connection = { | ||
source: string | null; | ||
@@ -24,3 +24,3 @@ target: string | null; | ||
targetHandle: string | null; | ||
} | ||
}; | ||
export type ConnectionStatus = 'valid' | 'invalid'; | ||
@@ -27,0 +27,0 @@ export declare enum ConnectionMode { |
@@ -29,2 +29,3 @@ import type { Dimensions, XYPosition, CoordinateExtent, Box, Rect, NodeBase, NodeOrigin, SnapGrid, Transform } from '../types'; | ||
export declare const getTransformForBounds: (bounds: Rect, width: number, height: number, minZoom: number, maxZoom: number, padding?: number) => Transform; | ||
export declare const isMacOs: () => boolean; | ||
//# sourceMappingURL=general.d.ts.map |
import type { D3ZoomEvent } from 'd3-zoom'; | ||
import { PanOnScrollMode, type D3SelectionInstance, type D3ZoomHandler, type D3ZoomInstance, type OnPanZoom, type Viewport, type OnDraggingChange, type OnTransformChange } from '../types'; | ||
export type ZoomPanValues = { | ||
isZoomingOrPanning: boolean; | ||
usedRightMouseButton: boolean; | ||
prevViewport: Viewport; | ||
mouseButton: number; | ||
timerId: ReturnType<typeof setTimeout> | undefined; | ||
}; | ||
import { PanOnScrollMode, type D3SelectionInstance, type D3ZoomHandler, type D3ZoomInstance, type OnPanZoom, type OnDraggingChange, type OnTransformChange } from '../types'; | ||
import { ZoomPanValues } from './XYPanZoom'; | ||
export type PanOnScrollParams = { | ||
zoomPanValues: ZoomPanValues; | ||
noWheelClassName: string; | ||
@@ -17,2 +12,5 @@ d3Selection: D3SelectionInstance; | ||
zoomOnPinch: boolean; | ||
onPanZoomStart?: OnPanZoom; | ||
onPanZoom?: OnPanZoom; | ||
onPanZoomEnd?: OnPanZoom; | ||
}; | ||
@@ -44,3 +42,3 @@ export type ZoomOnScrollParams = { | ||
}; | ||
export declare function createPanOnScrollHandler({ noWheelClassName, d3Selection, d3Zoom, panOnScrollMode, panOnScrollSpeed, zoomOnPinch, }: PanOnScrollParams): (event: any) => false | undefined; | ||
export declare function createPanOnScrollHandler({ zoomPanValues, noWheelClassName, d3Selection, d3Zoom, panOnScrollMode, panOnScrollSpeed, zoomOnPinch, onPanZoomStart, onPanZoom, onPanZoomEnd, }: PanOnScrollParams): (event: any) => false | undefined; | ||
export declare function createZoomOnScrollHandler({ noWheelClassName, preventScrolling, d3ZoomHandler }: ZoomOnScrollParams): (this: Element, event: any, d: unknown) => null | undefined; | ||
@@ -47,0 +45,0 @@ export declare function createPanZoomStartHandler({ zoomPanValues, onDraggingChange, onPanZoomStart }: PanZoomStartParams): (event: D3ZoomEvent<HTMLDivElement, any>) => void; |
@@ -9,2 +9,3 @@ import { type ZoomTransform } from 'd3-zoom'; | ||
export declare const getD3Transition: (selection: D3SelectionInstance, duration?: number) => D3SelectionInstance | import("d3").Transition<Element, unknown, null, undefined>; | ||
export declare const wheelDelta: (event: any) => number; | ||
//# sourceMappingURL=utils.d.ts.map |
@@ -8,4 +8,6 @@ import { type Viewport, PanZoomParams, PanZoomInstance } from '../types'; | ||
timerId: ReturnType<typeof setTimeout> | undefined; | ||
panScrollTimeout: ReturnType<typeof setTimeout> | undefined; | ||
isPanScrolling: boolean; | ||
}; | ||
export declare function XYPanZoom({ domNode, minZoom, maxZoom, translateExtent, viewport, onPanZoom, onPanZoomStart, onPanZoomEnd, onTransformChange, onDraggingChange, }: PanZoomParams): PanZoomInstance; | ||
//# sourceMappingURL=XYPanZoom.d.ts.map |
{ | ||
"name": "@xyflow/system", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "xyflow core system that powers React Flow and Svelte Flow.", | ||
@@ -19,4 +19,11 @@ "keywords": [ | ||
"main": "dist/umd/index.js", | ||
"module": "dist/esm/index.js", | ||
"module": "dist/esm/index.mjs", | ||
"types": "dist/esm/index.d.ts", | ||
"exports": { | ||
".": { | ||
"types": "./dist/esm/index.d.ts", | ||
"import": "./dist/esm/index.mjs", | ||
"require": "./dist/umd/index.js" | ||
} | ||
}, | ||
"sideEffects": false, | ||
@@ -43,6 +50,6 @@ "license": "MIT", | ||
"@types/node": "^18.7.16", | ||
"@xyflow/eslint-config": "0.0.0", | ||
"typescript": "5.1.3", | ||
"@xyflow/rollup-config": "0.0.0", | ||
"@xyflow/tsconfig": "0.0.0", | ||
"typescript": "5.1.3" | ||
"@xyflow/eslint-config": "0.0.0" | ||
}, | ||
@@ -49,0 +56,0 @@ "rollup": { |
@@ -11,1 +11,38 @@ # @xyflow/system | ||
## What is this package about? | ||
The @xyflow/system package was created to have a place for vanilla utils for React Flow and Svelte Flow. The package exports helpers for edge creation, pan and zoom, dragging of nodes, general utils and lots of types. All the helpers are specifically built for React Flow and Svelte Flow so it's probably not too interesting to use them with other libraries. | ||
### XYPanZoom | ||
Adds zoom and pan for the pane. | ||
### XYDrag | ||
Adds drag for nodes and selection. | ||
### XYHandle | ||
Adds connection line drawing. | ||
### XYMinimap | ||
Adds interactive mini map (zoom and pan). | ||
### Edge utils | ||
Util function for SVG edge path creating. | ||
### Store utils | ||
Helpers for store functions. | ||
### Dom utils | ||
### Marker utils | ||
### Graph utils | ||
### General utils | ||
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
299855
3727
48
137