@pyreon/flow 0.11.5 → 0.11.7

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/src/types.ts CHANGED
@@ -1,5 +1,5 @@
1
- import type { VNodeChild } from "@pyreon/core"
2
- import type { Computed, Signal } from "@pyreon/reactivity"
1
+ import type { VNodeChild } from '@pyreon/core'
2
+ import type { Computed, Signal } from '@pyreon/reactivity'
3
3
 
4
4
  // ─── Position & Geometry ─────────────────────────────────────────────────────
5
5
 
@@ -25,13 +25,13 @@ export interface Viewport {
25
25
 
26
26
  // ─── Handle ──────────────────────────────────────────────────────────────────
27
27
 
28
- export type HandleType = "source" | "target"
28
+ export type HandleType = 'source' | 'target'
29
29
 
30
30
  export enum Position {
31
- Top = "top",
32
- Right = "right",
33
- Bottom = "bottom",
34
- Left = "left",
31
+ Top = 'top',
32
+ Right = 'right',
33
+ Bottom = 'bottom',
34
+ Left = 'left',
35
35
  }
36
36
 
37
37
  export interface HandleConfig {
@@ -71,7 +71,7 @@ export interface FlowNode<TData = Record<string, unknown>> {
71
71
 
72
72
  // ─── Edge ────────────────────────────────────────────────────────────────────
73
73
 
74
- export type EdgeType = "bezier" | "smoothstep" | "straight" | "step"
74
+ export type EdgeType = 'bezier' | 'smoothstep' | 'straight' | 'step'
75
75
 
76
76
  export interface FlowEdge {
77
77
  id?: string
@@ -104,10 +104,10 @@ export type ConnectionRule = Record<string, { outputs: string[] }>
104
104
  // ─── Node Change Events ──────────────────────────────────────────────────────
105
105
 
106
106
  export type NodeChange =
107
- | { type: "position"; id: string; position: XYPosition }
108
- | { type: "dimensions"; id: string; dimensions: Dimensions }
109
- | { type: "select"; id: string; selected: boolean }
110
- | { type: "remove"; id: string }
107
+ | { type: 'position'; id: string; position: XYPosition }
108
+ | { type: 'dimensions'; id: string; dimensions: Dimensions }
109
+ | { type: 'select'; id: string; selected: boolean }
110
+ | { type: 'remove'; id: string }
111
111
 
112
112
  // ─── Edge path result ────────────────────────────────────────────────────────
113
113
 
@@ -390,23 +390,23 @@ export interface FlowInstance {
390
390
  // ─── Layout ──────────────────────────────────────────────────────────────────
391
391
 
392
392
  export type LayoutAlgorithm =
393
- | "layered"
394
- | "force"
395
- | "stress"
396
- | "tree"
397
- | "radial"
398
- | "box"
399
- | "rectpacking"
393
+ | 'layered'
394
+ | 'force'
395
+ | 'stress'
396
+ | 'tree'
397
+ | 'radial'
398
+ | 'box'
399
+ | 'rectpacking'
400
400
 
401
401
  export interface LayoutOptions {
402
402
  /** Layout direction — default: 'DOWN' */
403
- direction?: "UP" | "DOWN" | "LEFT" | "RIGHT"
403
+ direction?: 'UP' | 'DOWN' | 'LEFT' | 'RIGHT'
404
404
  /** Spacing between nodes — default: 50 */
405
405
  nodeSpacing?: number
406
406
  /** Spacing between layers — default: 80 */
407
407
  layerSpacing?: number
408
408
  /** Edge routing — default: 'orthogonal' */
409
- edgeRouting?: "orthogonal" | "splines" | "polyline"
409
+ edgeRouting?: 'orthogonal' | 'splines' | 'polyline'
410
410
  /** Whether to animate the layout transition — default: true */
411
411
  animate?: boolean
412
412
  /** Animation duration in ms — default: 300 */
@@ -423,7 +423,7 @@ export interface FlowProps {
423
423
  }
424
424
 
425
425
  export interface BackgroundProps {
426
- variant?: "dots" | "lines" | "cross"
426
+ variant?: 'dots' | 'lines' | 'cross'
427
427
  gap?: number
428
428
  size?: number
429
429
  color?: string
@@ -443,11 +443,11 @@ export interface ControlsProps {
443
443
  showZoomOut?: boolean
444
444
  showFitView?: boolean
445
445
  showLock?: boolean
446
- position?: "top-left" | "top-right" | "bottom-left" | "bottom-right"
446
+ position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'
447
447
  }
448
448
 
449
449
  export interface PanelProps {
450
- position?: "top-left" | "top-right" | "bottom-left" | "bottom-right"
450
+ position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'
451
451
  style?: string
452
452
  class?: string
453
453
  children?: VNodeChild