vizcraft 1.13.0 → 1.14.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # vizcraft
2
2
 
3
+ ## 1.14.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`fddfcdc`](https://github.com/ChipiKaf/vizcraft/commit/fddfcdc647bb27e46dfe9ba6449f07afeee17f77) Thanks [@ChipiKaf](https://github.com/ChipiKaf)! - Add a grouped set of overlay improvements across issues 133 to 136:
8
+ - Add node-relative positioning to primitive overlays with optional offsets while preserving existing absolute-coordinate behavior.
9
+ - Let built-in `signal` overlays follow resolved edge paths instead of only using straight-line motion.
10
+ - Add resting and parked positioning options so signals can remain visible inside a node after arrival.
11
+ - Add declarative multi-hop signal chains with hop-by-hop progress, routed edge following, and automatic parking at the final node.
12
+
3
13
  ## 1.13.0
4
14
 
5
15
  ### Minor Changes
package/README.md CHANGED
@@ -651,6 +651,148 @@ Edges can also be styled **per-edge** via the builder (inline SVG attributes ove
651
651
  b.edge('a', 'b').stroke('#e74c3c', 3).fill('none').opacity(0.8);
652
652
  ```
653
653
 
654
+ ## Node-relative primitive overlays
655
+
656
+ `rect`, `circle`, `text`, and `group` overlays can anchor themselves to a node with `nodeId`. `circle` and `text` use the resolved node center directly, `rect` centers itself on that point, and `group` uses it as the group origin. `offsetX` / `offsetY` let you stack anchored overlays without maintaining a separate scene-coordinate lookup table. Omitting `nodeId` preserves the existing absolute `x` / `y` behavior.
657
+
658
+ ```ts
659
+ builder.overlay((o) =>
660
+ o
661
+ .circle(
662
+ {
663
+ nodeId: 'producer',
664
+ offsetX: 36,
665
+ offsetY: -18,
666
+ r: 6,
667
+ fill: '#f59e0b',
668
+ stroke: '#b45309',
669
+ strokeWidth: 2,
670
+ },
671
+ { key: 'producer-marker' }
672
+ )
673
+ .rect(
674
+ {
675
+ nodeId: 'broker',
676
+ w: 72,
677
+ h: 28,
678
+ rx: 14,
679
+ fill: '#dcfce7',
680
+ stroke: '#16a34a',
681
+ strokeWidth: 2,
682
+ },
683
+ { key: 'broker-slot' }
684
+ )
685
+ .text(
686
+ {
687
+ nodeId: 'store',
688
+ offsetY: 40,
689
+ text: '12 persisted',
690
+ textAnchor: 'middle',
691
+ fontWeight: 700,
692
+ },
693
+ { key: 'store-label' }
694
+ )
695
+ .group(
696
+ { nodeId: 'broker', offsetX: -40, offsetY: -8 },
697
+ (g) => {
698
+ g.circle({
699
+ x: 0,
700
+ y: -10,
701
+ r: 4,
702
+ fill: '#93c5fd',
703
+ stroke: '#1d4ed8',
704
+ strokeWidth: 2,
705
+ });
706
+ g.circle({
707
+ x: 0,
708
+ y: 0,
709
+ r: 4,
710
+ fill: '#93c5fd',
711
+ stroke: '#1d4ed8',
712
+ strokeWidth: 2,
713
+ });
714
+ g.circle({
715
+ x: 0,
716
+ y: 10,
717
+ r: 4,
718
+ fill: '#93c5fd',
719
+ stroke: '#1d4ed8',
720
+ strokeWidth: 2,
721
+ });
722
+ },
723
+ { key: 'broker-batch' }
724
+ )
725
+ );
726
+ ```
727
+
728
+ ## Routed signal overlays
729
+
730
+ The built-in `signal` overlay can follow the actual rendered edge path instead of moving center-to-center:
731
+
732
+ ```ts
733
+ const builder = viz()
734
+ .view(620, 280)
735
+ .node('broker', { at: { x: 150, y: 180 }, rect: { w: 120, h: 72, rx: 16 } })
736
+ .node('p2', { at: { x: 470, y: 80 }, rect: { w: 110, h: 60, rx: 14 } })
737
+ .edge('broker', 'p2', 'broker-p2')
738
+ .routing('curved')
739
+ .via(250, 250)
740
+ .via(380, 40)
741
+ .done()
742
+ .overlay(
743
+ 'signal',
744
+ {
745
+ from: 'broker',
746
+ to: 'p2',
747
+ edgeId: 'broker-p2',
748
+ progress: 0.6,
749
+ magnitude: 0.8,
750
+ },
751
+ 'sig'
752
+ );
753
+ ```
754
+
755
+ Use `followEdge: true` when there is only one `from -> to` edge. If the edge is missing or ambiguous, VizCraft falls back to the existing straight center-to-center interpolation.
756
+
757
+ To keep a signal visible after arrival without switching overlay kinds, set `resting: true`. Use `parkAt` to override the parked node and `parkOffsetX` / `parkOffsetY` to stack multiple arrived signals inside the same node:
758
+
759
+ ```ts
760
+ builder.overlay(
761
+ 'signal',
762
+ {
763
+ from: 'broker',
764
+ to: 'p2',
765
+ edgeId: 'broker-p2',
766
+ progress: 1,
767
+ resting: true,
768
+ parkOffsetX: 12,
769
+ parkOffsetY: -8,
770
+ },
771
+ 'sig-resting'
772
+ );
773
+ ```
774
+
775
+ ## Multi-hop signal chains
776
+
777
+ Use `chain` to move one `signal` overlay across multiple hops declaratively. `floor(progress)` selects the active hop and the fractional part drives that hop locally. Once `progress >= chain.length`, the signal parks at the final hop's `to` node automatically. Each hop can still set `followEdge` or `edgeId`.
778
+
779
+ ```ts
780
+ builder.overlay(
781
+ 'signal',
782
+ {
783
+ chain: [
784
+ { from: 'producer', to: 'dispatcher', edgeId: 'producer-dispatcher' },
785
+ { from: 'dispatcher', to: 'adapter', edgeId: 'dispatcher-adapter' },
786
+ { from: 'adapter', to: 'broker', edgeId: 'adapter-broker' },
787
+ { from: 'broker', to: 'p0', edgeId: 'broker-p0' },
788
+ ],
789
+ progress: 2.4,
790
+ magnitude: 0.9,
791
+ },
792
+ 'sig-chain'
793
+ );
794
+ ```
795
+
654
796
  ## 🤝 Contributing
655
797
 
656
798
  Contributions are welcome! This is a monorepo managed with Turbo.
@@ -1 +1 @@
1
- export { ay as AnimProperty, aE as AnimatableProps, aF as AnimationBuilder, aP as AnimationHostAdapter, aB as AnimationSpec, aw as AnimationTarget, ax as CoreAnimProperty, aD as CoreAnimatableProps, az as Ease, aH as ExtendAdapter, aI as PlaybackController, aO as PropHandlers, aM as PropReader, aN as PropWriter, aQ as RegistrableAdapter, aC as TweenOptions, aA as TweenSpec, aG as buildAnimationSpec, aK as createBuilderPlayback, aJ as createScenePlayback, aL as playAnimationSpec } from './index-1r7PC1Bo.mjs';
1
+ export { az as AnimProperty, aF as AnimatableProps, aG as AnimationBuilder, aQ as AnimationHostAdapter, aC as AnimationSpec, ax as AnimationTarget, ay as CoreAnimProperty, aE as CoreAnimatableProps, aA as Ease, aI as ExtendAdapter, aJ as PlaybackController, aP as PropHandlers, aN as PropReader, aO as PropWriter, aR as RegistrableAdapter, aD as TweenOptions, aB as TweenSpec, aH as buildAnimationSpec, aL as createBuilderPlayback, aK as createScenePlayback, aM as playAnimationSpec } from './index-CvNQ2zQt.mjs';
@@ -1 +1 @@
1
- export { ay as AnimProperty, aE as AnimatableProps, aF as AnimationBuilder, aP as AnimationHostAdapter, aB as AnimationSpec, aw as AnimationTarget, ax as CoreAnimProperty, aD as CoreAnimatableProps, az as Ease, aH as ExtendAdapter, aI as PlaybackController, aO as PropHandlers, aM as PropReader, aN as PropWriter, aQ as RegistrableAdapter, aC as TweenOptions, aA as TweenSpec, aG as buildAnimationSpec, aK as createBuilderPlayback, aJ as createScenePlayback, aL as playAnimationSpec } from './index-1r7PC1Bo.js';
1
+ export { az as AnimProperty, aF as AnimatableProps, aG as AnimationBuilder, aQ as AnimationHostAdapter, aC as AnimationSpec, ax as AnimationTarget, ay as CoreAnimProperty, aE as CoreAnimatableProps, aA as Ease, aI as ExtendAdapter, aJ as PlaybackController, aP as PropHandlers, aN as PropReader, aO as PropWriter, aR as RegistrableAdapter, aD as TweenOptions, aB as TweenSpec, aH as buildAnimationSpec, aL as createBuilderPlayback, aK as createScenePlayback, aM as playAnimationSpec } from './index-CvNQ2zQt.js';
@@ -1,4 +1,4 @@
1
- import { b as VizScene, P as PanZoomOptions, c as PanZoomController, d as Vec2, V as VizNode } from './index-1r7PC1Bo.js';
1
+ import { b as VizScene, P as PanZoomOptions, c as PanZoomController, d as Vec2, V as VizNode } from './index-CvNQ2zQt.js';
2
2
 
3
3
  declare function setupPanZoom(svg: SVGSVGElement, viewport: SVGGElement, scene: VizScene, options?: PanZoomOptions): PanZoomController;
4
4
 
@@ -1,4 +1,4 @@
1
- import { b as VizScene, P as PanZoomOptions, c as PanZoomController, d as Vec2, V as VizNode } from './index-1r7PC1Bo.mjs';
1
+ import { b as VizScene, P as PanZoomOptions, c as PanZoomController, d as Vec2, V as VizNode } from './index-CvNQ2zQt.mjs';
2
2
 
3
3
  declare function setupPanZoom(svg: SVGSVGElement, viewport: SVGGElement, scene: VizScene, options?: PanZoomOptions): PanZoomController;
4
4
 
@@ -17,12 +17,29 @@ interface AnimationSpec {
17
17
  tweens: TweenSpec[];
18
18
  }
19
19
 
20
- type SignalOverlayParams = {
20
+ type SignalOverlayHop = {
21
21
  from: string;
22
22
  to: string;
23
+ followEdge?: boolean;
24
+ edgeId?: string;
25
+ };
26
+ type SignalOverlayBaseParams = {
23
27
  progress: number;
24
28
  magnitude?: number;
29
+ resting?: boolean;
30
+ parkAt?: string;
31
+ parkOffsetX?: number;
32
+ parkOffsetY?: number;
25
33
  };
34
+ type SignalOverlayParams = (SignalOverlayBaseParams & SignalOverlayHop & {
35
+ chain?: never;
36
+ }) | (SignalOverlayBaseParams & {
37
+ chain: SignalOverlayHop[];
38
+ from?: never;
39
+ to?: never;
40
+ followEdge?: never;
41
+ edgeId?: never;
42
+ });
26
43
  type GridLabelsOverlayParams = {
27
44
  colLabels?: Record<number, string>;
28
45
  rowLabels?: Record<number, string>;
@@ -37,9 +54,24 @@ interface DataPoint {
37
54
  type DataPointsOverlayParams = {
38
55
  points: DataPoint[];
39
56
  };
40
- type RectOverlayParams = {
57
+ type NodeRelativeOverlayAnchor = {
58
+ nodeId: string;
59
+ offsetX?: number;
60
+ offsetY?: number;
61
+ };
62
+ type AbsoluteOverlayPoint = {
41
63
  x: number;
42
64
  y: number;
65
+ nodeId?: never;
66
+ offsetX?: never;
67
+ offsetY?: never;
68
+ };
69
+ type NodeRelativeOverlayPoint = NodeRelativeOverlayAnchor & {
70
+ x?: never;
71
+ y?: never;
72
+ };
73
+ type PrimitiveOverlayPoint = AbsoluteOverlayPoint | NodeRelativeOverlayPoint;
74
+ type RectOverlayParams = PrimitiveOverlayPoint & {
43
75
  w: number;
44
76
  h: number;
45
77
  rx?: number;
@@ -52,9 +84,7 @@ type RectOverlayParams = {
52
84
  /** SVG stroke-width (defaults to 3). Can be overridden by CSS via className. */
53
85
  strokeWidth?: number;
54
86
  };
55
- type CircleOverlayParams = {
56
- x: number;
57
- y: number;
87
+ type CircleOverlayParams = PrimitiveOverlayPoint & {
58
88
  r: number;
59
89
  opacity?: number;
60
90
  /** SVG fill (defaults to a visible blue). Can be overridden by CSS via className. */
@@ -64,9 +94,7 @@ type CircleOverlayParams = {
64
94
  /** SVG stroke-width (defaults to 3). Can be overridden by CSS via className. */
65
95
  strokeWidth?: number;
66
96
  };
67
- type TextOverlayParams = {
68
- x: number;
69
- y: number;
97
+ type TextOverlayParams = PrimitiveOverlayPoint & {
70
98
  text: string;
71
99
  opacity?: number;
72
100
  /** SVG fill color (defaults to #111). Can be overridden by CSS via className. */
@@ -76,11 +104,32 @@ type TextOverlayParams = {
76
104
  textAnchor?: 'start' | 'middle' | 'end';
77
105
  dominantBaseline?: string;
78
106
  };
79
- type GroupOverlayParams = {
107
+ type GroupOverlayMotionAnchor = {
108
+ from: string;
109
+ to: string;
110
+ progress?: number;
111
+ nodeId?: never;
112
+ offsetX?: never;
113
+ offsetY?: never;
114
+ };
115
+ type GroupOverlayNodeAnchor = NodeRelativeOverlayAnchor & {
116
+ from?: never;
117
+ to?: never;
118
+ progress?: never;
119
+ };
120
+ type GroupOverlaySceneAnchor = {
121
+ from?: never;
122
+ to?: never;
123
+ progress?: never;
124
+ nodeId?: never;
125
+ offsetX?: never;
126
+ offsetY?: never;
127
+ };
128
+ type GroupOverlayParams = (GroupOverlayMotionAnchor | GroupOverlayNodeAnchor | GroupOverlaySceneAnchor) & {
80
129
  /**
81
130
  * Translate (group-local origin).
82
131
  *
83
- * If `from`/`to` are provided, these act as an additional offset.
132
+ * If `from`/`to` or `nodeId` are provided, these act as an additional offset.
84
133
  */
85
134
  x?: number;
86
135
  y?: number;
@@ -1955,4 +2004,4 @@ type SyncLayoutAlgorithm<Options = any> = (graph: LayoutGraph, options?: Options
1955
2004
  */
1956
2005
  type LayoutAlgorithm<Options = any> = (graph: LayoutGraph, options?: Options) => LayoutResult | Promise<LayoutResult>;
1957
2006
 
1958
- export { type LayoutGraph as $, type AnimationDuration as A, type BadgePosition as B, type ContainerConfig as C, type VizSceneMutator as D, type EdgeRouting as E, type EdgeMarkerType as F, type NodeOptions as G, type EdgeOptions as H, type EdgePathResolver as I, OVERLAY_RUNTIME_DIRTY as J, type KnownOverlayId as K, type OverlayId as L, type OverlayParams as M, type NodeShape as N, type OverlayKindRegistry as O, type PanZoomOptions as P, type TypedVizOverlaySpec as Q, type RichTextToken as R, type SvgExportOptions as S, type TooltipSection as T, type VizOverlaySpec as U, type VizNode as V, type VizGridConfig as W, type VizPlugin as X, type VizBuildEvent as Y, type VizMountEvent as Z, type VizEventMap as _, type VizEdge as a, type LayoutResult as a0, type SyncLayoutAlgorithm as a1, type LayoutAlgorithm as a2, type VizBuilder as a3, type RichLabelBuilder as a4, type CompartmentBuilder as a5, type NodeBuilder as a6, type EdgeBuilder as a7, RichLabelBuilderImpl as a8, viz as a9, type TweenSpec as aA, type AnimationSpec as aB, type TweenOptions as aC, type CoreAnimatableProps as aD, type AnimatableProps as aE, AnimationBuilder as aF, buildAnimationSpec as aG, type ExtendAdapter as aH, type PlaybackController as aI, createScenePlayback as aJ, createBuilderPlayback as aK, playAnimationSpec as aL, type PropReader as aM, type PropWriter as aN, type PropHandlers as aO, type AnimationHostAdapter as aP, type RegistrableAdapter as aQ, type SignalOverlayParams as aa, type GridLabelsOverlayParams as ab, type DataPoint as ac, type DataPointsOverlayParams as ad, type RectOverlayParams as ae, type CircleOverlayParams as af, type TextOverlayParams as ag, type GroupOverlayParams as ah, type CoreOverlayRenderContext as ai, type CoreOverlayRenderer as aj, CoreOverlayRegistry as ak, coreSignalOverlay as al, coreGridLabelsOverlay as am, coreDataPointOverlay as an, coreRectOverlay as ao, coreCircleOverlay as ap, coreTextOverlay as aq, coreGroupOverlay as ar, defaultCoreOverlayRegistry as as, type OverlayAddOptions as at, OverlayBuilder as au, buildOverlaySpecs as av, type AnimationTarget as aw, type CoreAnimProperty as ax, type AnimProperty as ay, type Ease as az, type VizScene as b, type PanZoomController as c, type Vec2 as d, type VizAnimSpec as e, type EdgeLabel as f, type NodePort as g, type TooltipContent as h, type VizNodeBadge as i, type NodeMediaPosition as j, type VizNodeImage as k, type VizNodeIcon as l, type VizNodeSvgContent as m, type RichText as n, type NodeLabel as o, type AnimationConfig as p, type VizRuntimeNodeProps as q, type VizRuntimeEdgeProps as r, type VizNodeCompartment as s, type CollapseAnchor as t, type CollapseIndicatorOptions as u, type CompartmentClickContext as v, type CompartmentEntry as w, type EntryStyle as x, type EntryOptions as y, type SceneChanges as z };
2007
+ export { type LayoutGraph as $, type AnimationDuration as A, type BadgePosition as B, type ContainerConfig as C, type VizSceneMutator as D, type EdgeRouting as E, type EdgeMarkerType as F, type NodeOptions as G, type EdgeOptions as H, type EdgePathResolver as I, OVERLAY_RUNTIME_DIRTY as J, type KnownOverlayId as K, type OverlayId as L, type OverlayParams as M, type NodeShape as N, type OverlayKindRegistry as O, type PanZoomOptions as P, type TypedVizOverlaySpec as Q, type RichTextToken as R, type SvgExportOptions as S, type TooltipSection as T, type VizOverlaySpec as U, type VizNode as V, type VizGridConfig as W, type VizPlugin as X, type VizBuildEvent as Y, type VizMountEvent as Z, type VizEventMap as _, type VizEdge as a, type LayoutResult as a0, type SyncLayoutAlgorithm as a1, type LayoutAlgorithm as a2, type VizBuilder as a3, type RichLabelBuilder as a4, type CompartmentBuilder as a5, type NodeBuilder as a6, type EdgeBuilder as a7, RichLabelBuilderImpl as a8, viz as a9, type Ease as aA, type TweenSpec as aB, type AnimationSpec as aC, type TweenOptions as aD, type CoreAnimatableProps as aE, type AnimatableProps as aF, AnimationBuilder as aG, buildAnimationSpec as aH, type ExtendAdapter as aI, type PlaybackController as aJ, createScenePlayback as aK, createBuilderPlayback as aL, playAnimationSpec as aM, type PropReader as aN, type PropWriter as aO, type PropHandlers as aP, type AnimationHostAdapter as aQ, type RegistrableAdapter as aR, type SignalOverlayHop as aa, type SignalOverlayParams as ab, type GridLabelsOverlayParams as ac, type DataPoint as ad, type DataPointsOverlayParams as ae, type RectOverlayParams as af, type CircleOverlayParams as ag, type TextOverlayParams as ah, type GroupOverlayParams as ai, type CoreOverlayRenderContext as aj, type CoreOverlayRenderer as ak, CoreOverlayRegistry as al, coreSignalOverlay as am, coreGridLabelsOverlay as an, coreDataPointOverlay as ao, coreRectOverlay as ap, coreCircleOverlay as aq, coreTextOverlay as ar, coreGroupOverlay as as, defaultCoreOverlayRegistry as at, type OverlayAddOptions as au, OverlayBuilder as av, buildOverlaySpecs as aw, type AnimationTarget as ax, type CoreAnimProperty as ay, type AnimProperty as az, type VizScene as b, type PanZoomController as c, type Vec2 as d, type VizAnimSpec as e, type EdgeLabel as f, type NodePort as g, type TooltipContent as h, type VizNodeBadge as i, type NodeMediaPosition as j, type VizNodeImage as k, type VizNodeIcon as l, type VizNodeSvgContent as m, type RichText as n, type NodeLabel as o, type AnimationConfig as p, type VizRuntimeNodeProps as q, type VizRuntimeEdgeProps as r, type VizNodeCompartment as s, type CollapseAnchor as t, type CollapseIndicatorOptions as u, type CompartmentClickContext as v, type CompartmentEntry as w, type EntryStyle as x, type EntryOptions as y, type SceneChanges as z };
@@ -17,12 +17,29 @@ interface AnimationSpec {
17
17
  tweens: TweenSpec[];
18
18
  }
19
19
 
20
- type SignalOverlayParams = {
20
+ type SignalOverlayHop = {
21
21
  from: string;
22
22
  to: string;
23
+ followEdge?: boolean;
24
+ edgeId?: string;
25
+ };
26
+ type SignalOverlayBaseParams = {
23
27
  progress: number;
24
28
  magnitude?: number;
29
+ resting?: boolean;
30
+ parkAt?: string;
31
+ parkOffsetX?: number;
32
+ parkOffsetY?: number;
25
33
  };
34
+ type SignalOverlayParams = (SignalOverlayBaseParams & SignalOverlayHop & {
35
+ chain?: never;
36
+ }) | (SignalOverlayBaseParams & {
37
+ chain: SignalOverlayHop[];
38
+ from?: never;
39
+ to?: never;
40
+ followEdge?: never;
41
+ edgeId?: never;
42
+ });
26
43
  type GridLabelsOverlayParams = {
27
44
  colLabels?: Record<number, string>;
28
45
  rowLabels?: Record<number, string>;
@@ -37,9 +54,24 @@ interface DataPoint {
37
54
  type DataPointsOverlayParams = {
38
55
  points: DataPoint[];
39
56
  };
40
- type RectOverlayParams = {
57
+ type NodeRelativeOverlayAnchor = {
58
+ nodeId: string;
59
+ offsetX?: number;
60
+ offsetY?: number;
61
+ };
62
+ type AbsoluteOverlayPoint = {
41
63
  x: number;
42
64
  y: number;
65
+ nodeId?: never;
66
+ offsetX?: never;
67
+ offsetY?: never;
68
+ };
69
+ type NodeRelativeOverlayPoint = NodeRelativeOverlayAnchor & {
70
+ x?: never;
71
+ y?: never;
72
+ };
73
+ type PrimitiveOverlayPoint = AbsoluteOverlayPoint | NodeRelativeOverlayPoint;
74
+ type RectOverlayParams = PrimitiveOverlayPoint & {
43
75
  w: number;
44
76
  h: number;
45
77
  rx?: number;
@@ -52,9 +84,7 @@ type RectOverlayParams = {
52
84
  /** SVG stroke-width (defaults to 3). Can be overridden by CSS via className. */
53
85
  strokeWidth?: number;
54
86
  };
55
- type CircleOverlayParams = {
56
- x: number;
57
- y: number;
87
+ type CircleOverlayParams = PrimitiveOverlayPoint & {
58
88
  r: number;
59
89
  opacity?: number;
60
90
  /** SVG fill (defaults to a visible blue). Can be overridden by CSS via className. */
@@ -64,9 +94,7 @@ type CircleOverlayParams = {
64
94
  /** SVG stroke-width (defaults to 3). Can be overridden by CSS via className. */
65
95
  strokeWidth?: number;
66
96
  };
67
- type TextOverlayParams = {
68
- x: number;
69
- y: number;
97
+ type TextOverlayParams = PrimitiveOverlayPoint & {
70
98
  text: string;
71
99
  opacity?: number;
72
100
  /** SVG fill color (defaults to #111). Can be overridden by CSS via className. */
@@ -76,11 +104,32 @@ type TextOverlayParams = {
76
104
  textAnchor?: 'start' | 'middle' | 'end';
77
105
  dominantBaseline?: string;
78
106
  };
79
- type GroupOverlayParams = {
107
+ type GroupOverlayMotionAnchor = {
108
+ from: string;
109
+ to: string;
110
+ progress?: number;
111
+ nodeId?: never;
112
+ offsetX?: never;
113
+ offsetY?: never;
114
+ };
115
+ type GroupOverlayNodeAnchor = NodeRelativeOverlayAnchor & {
116
+ from?: never;
117
+ to?: never;
118
+ progress?: never;
119
+ };
120
+ type GroupOverlaySceneAnchor = {
121
+ from?: never;
122
+ to?: never;
123
+ progress?: never;
124
+ nodeId?: never;
125
+ offsetX?: never;
126
+ offsetY?: never;
127
+ };
128
+ type GroupOverlayParams = (GroupOverlayMotionAnchor | GroupOverlayNodeAnchor | GroupOverlaySceneAnchor) & {
80
129
  /**
81
130
  * Translate (group-local origin).
82
131
  *
83
- * If `from`/`to` are provided, these act as an additional offset.
132
+ * If `from`/`to` or `nodeId` are provided, these act as an additional offset.
84
133
  */
85
134
  x?: number;
86
135
  y?: number;
@@ -1955,4 +2004,4 @@ type SyncLayoutAlgorithm<Options = any> = (graph: LayoutGraph, options?: Options
1955
2004
  */
1956
2005
  type LayoutAlgorithm<Options = any> = (graph: LayoutGraph, options?: Options) => LayoutResult | Promise<LayoutResult>;
1957
2006
 
1958
- export { type LayoutGraph as $, type AnimationDuration as A, type BadgePosition as B, type ContainerConfig as C, type VizSceneMutator as D, type EdgeRouting as E, type EdgeMarkerType as F, type NodeOptions as G, type EdgeOptions as H, type EdgePathResolver as I, OVERLAY_RUNTIME_DIRTY as J, type KnownOverlayId as K, type OverlayId as L, type OverlayParams as M, type NodeShape as N, type OverlayKindRegistry as O, type PanZoomOptions as P, type TypedVizOverlaySpec as Q, type RichTextToken as R, type SvgExportOptions as S, type TooltipSection as T, type VizOverlaySpec as U, type VizNode as V, type VizGridConfig as W, type VizPlugin as X, type VizBuildEvent as Y, type VizMountEvent as Z, type VizEventMap as _, type VizEdge as a, type LayoutResult as a0, type SyncLayoutAlgorithm as a1, type LayoutAlgorithm as a2, type VizBuilder as a3, type RichLabelBuilder as a4, type CompartmentBuilder as a5, type NodeBuilder as a6, type EdgeBuilder as a7, RichLabelBuilderImpl as a8, viz as a9, type TweenSpec as aA, type AnimationSpec as aB, type TweenOptions as aC, type CoreAnimatableProps as aD, type AnimatableProps as aE, AnimationBuilder as aF, buildAnimationSpec as aG, type ExtendAdapter as aH, type PlaybackController as aI, createScenePlayback as aJ, createBuilderPlayback as aK, playAnimationSpec as aL, type PropReader as aM, type PropWriter as aN, type PropHandlers as aO, type AnimationHostAdapter as aP, type RegistrableAdapter as aQ, type SignalOverlayParams as aa, type GridLabelsOverlayParams as ab, type DataPoint as ac, type DataPointsOverlayParams as ad, type RectOverlayParams as ae, type CircleOverlayParams as af, type TextOverlayParams as ag, type GroupOverlayParams as ah, type CoreOverlayRenderContext as ai, type CoreOverlayRenderer as aj, CoreOverlayRegistry as ak, coreSignalOverlay as al, coreGridLabelsOverlay as am, coreDataPointOverlay as an, coreRectOverlay as ao, coreCircleOverlay as ap, coreTextOverlay as aq, coreGroupOverlay as ar, defaultCoreOverlayRegistry as as, type OverlayAddOptions as at, OverlayBuilder as au, buildOverlaySpecs as av, type AnimationTarget as aw, type CoreAnimProperty as ax, type AnimProperty as ay, type Ease as az, type VizScene as b, type PanZoomController as c, type Vec2 as d, type VizAnimSpec as e, type EdgeLabel as f, type NodePort as g, type TooltipContent as h, type VizNodeBadge as i, type NodeMediaPosition as j, type VizNodeImage as k, type VizNodeIcon as l, type VizNodeSvgContent as m, type RichText as n, type NodeLabel as o, type AnimationConfig as p, type VizRuntimeNodeProps as q, type VizRuntimeEdgeProps as r, type VizNodeCompartment as s, type CollapseAnchor as t, type CollapseIndicatorOptions as u, type CompartmentClickContext as v, type CompartmentEntry as w, type EntryStyle as x, type EntryOptions as y, type SceneChanges as z };
2007
+ export { type LayoutGraph as $, type AnimationDuration as A, type BadgePosition as B, type ContainerConfig as C, type VizSceneMutator as D, type EdgeRouting as E, type EdgeMarkerType as F, type NodeOptions as G, type EdgeOptions as H, type EdgePathResolver as I, OVERLAY_RUNTIME_DIRTY as J, type KnownOverlayId as K, type OverlayId as L, type OverlayParams as M, type NodeShape as N, type OverlayKindRegistry as O, type PanZoomOptions as P, type TypedVizOverlaySpec as Q, type RichTextToken as R, type SvgExportOptions as S, type TooltipSection as T, type VizOverlaySpec as U, type VizNode as V, type VizGridConfig as W, type VizPlugin as X, type VizBuildEvent as Y, type VizMountEvent as Z, type VizEventMap as _, type VizEdge as a, type LayoutResult as a0, type SyncLayoutAlgorithm as a1, type LayoutAlgorithm as a2, type VizBuilder as a3, type RichLabelBuilder as a4, type CompartmentBuilder as a5, type NodeBuilder as a6, type EdgeBuilder as a7, RichLabelBuilderImpl as a8, viz as a9, type Ease as aA, type TweenSpec as aB, type AnimationSpec as aC, type TweenOptions as aD, type CoreAnimatableProps as aE, type AnimatableProps as aF, AnimationBuilder as aG, buildAnimationSpec as aH, type ExtendAdapter as aI, type PlaybackController as aJ, createScenePlayback as aK, createBuilderPlayback as aL, playAnimationSpec as aM, type PropReader as aN, type PropWriter as aO, type PropHandlers as aP, type AnimationHostAdapter as aQ, type RegistrableAdapter as aR, type SignalOverlayHop as aa, type SignalOverlayParams as ab, type GridLabelsOverlayParams as ac, type DataPoint as ad, type DataPointsOverlayParams as ae, type RectOverlayParams as af, type CircleOverlayParams as ag, type TextOverlayParams as ah, type GroupOverlayParams as ai, type CoreOverlayRenderContext as aj, type CoreOverlayRenderer as ak, CoreOverlayRegistry as al, coreSignalOverlay as am, coreGridLabelsOverlay as an, coreDataPointOverlay as ao, coreRectOverlay as ap, coreCircleOverlay as aq, coreTextOverlay as ar, coreGroupOverlay as as, defaultCoreOverlayRegistry as at, type OverlayAddOptions as au, OverlayBuilder as av, buildOverlaySpecs as aw, type AnimationTarget as ax, type CoreAnimProperty as ay, type AnimProperty as az, type VizScene as b, type PanZoomController as c, type Vec2 as d, type VizAnimSpec as e, type EdgeLabel as f, type NodePort as g, type TooltipContent as h, type VizNodeBadge as i, type NodeMediaPosition as j, type VizNodeImage as k, type VizNodeIcon as l, type VizNodeSvgContent as m, type RichText as n, type NodeLabel as o, type AnimationConfig as p, type VizRuntimeNodeProps as q, type VizRuntimeEdgeProps as r, type VizNodeCompartment as s, type CollapseAnchor as t, type CollapseIndicatorOptions as u, type CompartmentClickContext as v, type CompartmentEntry as w, type EntryStyle as x, type EntryOptions as y, type SceneChanges as z };
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
- import { e as VizAnimSpec, V as VizNode, a as VizEdge, d as Vec2, E as EdgeRouting, f as EdgeLabel, b as VizScene, N as NodeShape, g as NodePort } from './index-1r7PC1Bo.mjs';
2
- export { ay as AnimProperty, aE as AnimatableProps, aF as AnimationBuilder, p as AnimationConfig, A as AnimationDuration, aP as AnimationHostAdapter, aB as AnimationSpec, aw as AnimationTarget, B as BadgePosition, af as CircleOverlayParams, t as CollapseAnchor, u as CollapseIndicatorOptions, a5 as CompartmentBuilder, v as CompartmentClickContext, w as CompartmentEntry, C as ContainerConfig, ax as CoreAnimProperty, aD as CoreAnimatableProps, ak as CoreOverlayRegistry, ai as CoreOverlayRenderContext, aj as CoreOverlayRenderer, ac as DataPoint, ad as DataPointsOverlayParams, az as Ease, a7 as EdgeBuilder, F as EdgeMarkerType, H as EdgeOptions, I as EdgePathResolver, y as EntryOptions, x as EntryStyle, aH as ExtendAdapter, ab as GridLabelsOverlayParams, ah as GroupOverlayParams, K as KnownOverlayId, a2 as LayoutAlgorithm, $ as LayoutGraph, a0 as LayoutResult, a6 as NodeBuilder, o as NodeLabel, j as NodeMediaPosition, G as NodeOptions, J as OVERLAY_RUNTIME_DIRTY, at as OverlayAddOptions, au as OverlayBuilder, L as OverlayId, O as OverlayKindRegistry, M as OverlayParams, c as PanZoomController, P as PanZoomOptions, aI as PlaybackController, aO as PropHandlers, aM as PropReader, aN as PropWriter, ae as RectOverlayParams, aQ as RegistrableAdapter, a4 as RichLabelBuilder, a8 as RichLabelBuilderImpl, n as RichText, R as RichTextToken, z as SceneChanges, aa as SignalOverlayParams, S as SvgExportOptions, a1 as SyncLayoutAlgorithm, ag as TextOverlayParams, h as TooltipContent, T as TooltipSection, aC as TweenOptions, aA as TweenSpec, Q as TypedVizOverlaySpec, Y as VizBuildEvent, a3 as VizBuilder, _ as VizEventMap, W as VizGridConfig, Z as VizMountEvent, i as VizNodeBadge, s as VizNodeCompartment, l as VizNodeIcon, k as VizNodeImage, m as VizNodeSvgContent, U as VizOverlaySpec, X as VizPlugin, r as VizRuntimeEdgeProps, q as VizRuntimeNodeProps, D as VizSceneMutator, aG as buildAnimationSpec, av as buildOverlaySpecs, ap as coreCircleOverlay, an as coreDataPointOverlay, am as coreGridLabelsOverlay, ar as coreGroupOverlay, ao as coreRectOverlay, al as coreSignalOverlay, aq as coreTextOverlay, aK as createBuilderPlayback, aJ as createScenePlayback, as as defaultCoreOverlayRegistry, aL as playAnimationSpec, a9 as viz } from './index-1r7PC1Bo.mjs';
3
- export { H as HitResult, a as HitTestOptions, d as distanceSquare, e as edgeDistance, g as getEffectiveNodeBounds, h as hitTest, b as hitTestRect, n as nearestPort, p as pointInRect, s as setupPanZoom } from './hitTest-5P0CubUk.mjs';
1
+ import { e as VizAnimSpec, V as VizNode, a as VizEdge, d as Vec2, E as EdgeRouting, f as EdgeLabel, b as VizScene, N as NodeShape, g as NodePort } from './index-CvNQ2zQt.mjs';
2
+ export { az as AnimProperty, aF as AnimatableProps, aG as AnimationBuilder, p as AnimationConfig, A as AnimationDuration, aQ as AnimationHostAdapter, aC as AnimationSpec, ax as AnimationTarget, B as BadgePosition, ag as CircleOverlayParams, t as CollapseAnchor, u as CollapseIndicatorOptions, a5 as CompartmentBuilder, v as CompartmentClickContext, w as CompartmentEntry, C as ContainerConfig, ay as CoreAnimProperty, aE as CoreAnimatableProps, al as CoreOverlayRegistry, aj as CoreOverlayRenderContext, ak as CoreOverlayRenderer, ad as DataPoint, ae as DataPointsOverlayParams, aA as Ease, a7 as EdgeBuilder, F as EdgeMarkerType, H as EdgeOptions, I as EdgePathResolver, y as EntryOptions, x as EntryStyle, aI as ExtendAdapter, ac as GridLabelsOverlayParams, ai as GroupOverlayParams, K as KnownOverlayId, a2 as LayoutAlgorithm, $ as LayoutGraph, a0 as LayoutResult, a6 as NodeBuilder, o as NodeLabel, j as NodeMediaPosition, G as NodeOptions, J as OVERLAY_RUNTIME_DIRTY, au as OverlayAddOptions, av as OverlayBuilder, L as OverlayId, O as OverlayKindRegistry, M as OverlayParams, c as PanZoomController, P as PanZoomOptions, aJ as PlaybackController, aP as PropHandlers, aN as PropReader, aO as PropWriter, af as RectOverlayParams, aR as RegistrableAdapter, a4 as RichLabelBuilder, a8 as RichLabelBuilderImpl, n as RichText, R as RichTextToken, z as SceneChanges, aa as SignalOverlayHop, ab as SignalOverlayParams, S as SvgExportOptions, a1 as SyncLayoutAlgorithm, ah as TextOverlayParams, h as TooltipContent, T as TooltipSection, aD as TweenOptions, aB as TweenSpec, Q as TypedVizOverlaySpec, Y as VizBuildEvent, a3 as VizBuilder, _ as VizEventMap, W as VizGridConfig, Z as VizMountEvent, i as VizNodeBadge, s as VizNodeCompartment, l as VizNodeIcon, k as VizNodeImage, m as VizNodeSvgContent, U as VizOverlaySpec, X as VizPlugin, r as VizRuntimeEdgeProps, q as VizRuntimeNodeProps, D as VizSceneMutator, aH as buildAnimationSpec, aw as buildOverlaySpecs, aq as coreCircleOverlay, ao as coreDataPointOverlay, an as coreGridLabelsOverlay, as as coreGroupOverlay, ap as coreRectOverlay, am as coreSignalOverlay, ar as coreTextOverlay, aL as createBuilderPlayback, aK as createScenePlayback, at as defaultCoreOverlayRegistry, aM as playAnimationSpec, a9 as viz } from './index-CvNQ2zQt.mjs';
3
+ export { H as HitResult, a as HitTestOptions, d as distanceSquare, e as edgeDistance, g as getEffectiveNodeBounds, h as hitTest, b as hitTestRect, n as nearestPort, p as pointInRect, s as setupPanZoom } from './hitTest-DRlIew9n.mjs';
4
4
  export { SerializedScene, deserializeScene, serializeScene } from './serialization.mjs';
5
5
  export { CircularLayoutOptions, GridLayoutOptions, circularLayout, gridLayout } from './layout.mjs';
6
6
  export { EquidistantPort, PerimeterStrategy, findPortNearest, getEquidistantPorts, registerPerimeterStrategy, toNodePorts } from './ports.mjs';
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { e as VizAnimSpec, V as VizNode, a as VizEdge, d as Vec2, E as EdgeRouting, f as EdgeLabel, b as VizScene, N as NodeShape, g as NodePort } from './index-1r7PC1Bo.js';
2
- export { ay as AnimProperty, aE as AnimatableProps, aF as AnimationBuilder, p as AnimationConfig, A as AnimationDuration, aP as AnimationHostAdapter, aB as AnimationSpec, aw as AnimationTarget, B as BadgePosition, af as CircleOverlayParams, t as CollapseAnchor, u as CollapseIndicatorOptions, a5 as CompartmentBuilder, v as CompartmentClickContext, w as CompartmentEntry, C as ContainerConfig, ax as CoreAnimProperty, aD as CoreAnimatableProps, ak as CoreOverlayRegistry, ai as CoreOverlayRenderContext, aj as CoreOverlayRenderer, ac as DataPoint, ad as DataPointsOverlayParams, az as Ease, a7 as EdgeBuilder, F as EdgeMarkerType, H as EdgeOptions, I as EdgePathResolver, y as EntryOptions, x as EntryStyle, aH as ExtendAdapter, ab as GridLabelsOverlayParams, ah as GroupOverlayParams, K as KnownOverlayId, a2 as LayoutAlgorithm, $ as LayoutGraph, a0 as LayoutResult, a6 as NodeBuilder, o as NodeLabel, j as NodeMediaPosition, G as NodeOptions, J as OVERLAY_RUNTIME_DIRTY, at as OverlayAddOptions, au as OverlayBuilder, L as OverlayId, O as OverlayKindRegistry, M as OverlayParams, c as PanZoomController, P as PanZoomOptions, aI as PlaybackController, aO as PropHandlers, aM as PropReader, aN as PropWriter, ae as RectOverlayParams, aQ as RegistrableAdapter, a4 as RichLabelBuilder, a8 as RichLabelBuilderImpl, n as RichText, R as RichTextToken, z as SceneChanges, aa as SignalOverlayParams, S as SvgExportOptions, a1 as SyncLayoutAlgorithm, ag as TextOverlayParams, h as TooltipContent, T as TooltipSection, aC as TweenOptions, aA as TweenSpec, Q as TypedVizOverlaySpec, Y as VizBuildEvent, a3 as VizBuilder, _ as VizEventMap, W as VizGridConfig, Z as VizMountEvent, i as VizNodeBadge, s as VizNodeCompartment, l as VizNodeIcon, k as VizNodeImage, m as VizNodeSvgContent, U as VizOverlaySpec, X as VizPlugin, r as VizRuntimeEdgeProps, q as VizRuntimeNodeProps, D as VizSceneMutator, aG as buildAnimationSpec, av as buildOverlaySpecs, ap as coreCircleOverlay, an as coreDataPointOverlay, am as coreGridLabelsOverlay, ar as coreGroupOverlay, ao as coreRectOverlay, al as coreSignalOverlay, aq as coreTextOverlay, aK as createBuilderPlayback, aJ as createScenePlayback, as as defaultCoreOverlayRegistry, aL as playAnimationSpec, a9 as viz } from './index-1r7PC1Bo.js';
3
- export { H as HitResult, a as HitTestOptions, d as distanceSquare, e as edgeDistance, g as getEffectiveNodeBounds, h as hitTest, b as hitTestRect, n as nearestPort, p as pointInRect, s as setupPanZoom } from './hitTest-HuWdoVSN.js';
1
+ import { e as VizAnimSpec, V as VizNode, a as VizEdge, d as Vec2, E as EdgeRouting, f as EdgeLabel, b as VizScene, N as NodeShape, g as NodePort } from './index-CvNQ2zQt.js';
2
+ export { az as AnimProperty, aF as AnimatableProps, aG as AnimationBuilder, p as AnimationConfig, A as AnimationDuration, aQ as AnimationHostAdapter, aC as AnimationSpec, ax as AnimationTarget, B as BadgePosition, ag as CircleOverlayParams, t as CollapseAnchor, u as CollapseIndicatorOptions, a5 as CompartmentBuilder, v as CompartmentClickContext, w as CompartmentEntry, C as ContainerConfig, ay as CoreAnimProperty, aE as CoreAnimatableProps, al as CoreOverlayRegistry, aj as CoreOverlayRenderContext, ak as CoreOverlayRenderer, ad as DataPoint, ae as DataPointsOverlayParams, aA as Ease, a7 as EdgeBuilder, F as EdgeMarkerType, H as EdgeOptions, I as EdgePathResolver, y as EntryOptions, x as EntryStyle, aI as ExtendAdapter, ac as GridLabelsOverlayParams, ai as GroupOverlayParams, K as KnownOverlayId, a2 as LayoutAlgorithm, $ as LayoutGraph, a0 as LayoutResult, a6 as NodeBuilder, o as NodeLabel, j as NodeMediaPosition, G as NodeOptions, J as OVERLAY_RUNTIME_DIRTY, au as OverlayAddOptions, av as OverlayBuilder, L as OverlayId, O as OverlayKindRegistry, M as OverlayParams, c as PanZoomController, P as PanZoomOptions, aJ as PlaybackController, aP as PropHandlers, aN as PropReader, aO as PropWriter, af as RectOverlayParams, aR as RegistrableAdapter, a4 as RichLabelBuilder, a8 as RichLabelBuilderImpl, n as RichText, R as RichTextToken, z as SceneChanges, aa as SignalOverlayHop, ab as SignalOverlayParams, S as SvgExportOptions, a1 as SyncLayoutAlgorithm, ah as TextOverlayParams, h as TooltipContent, T as TooltipSection, aD as TweenOptions, aB as TweenSpec, Q as TypedVizOverlaySpec, Y as VizBuildEvent, a3 as VizBuilder, _ as VizEventMap, W as VizGridConfig, Z as VizMountEvent, i as VizNodeBadge, s as VizNodeCompartment, l as VizNodeIcon, k as VizNodeImage, m as VizNodeSvgContent, U as VizOverlaySpec, X as VizPlugin, r as VizRuntimeEdgeProps, q as VizRuntimeNodeProps, D as VizSceneMutator, aH as buildAnimationSpec, aw as buildOverlaySpecs, aq as coreCircleOverlay, ao as coreDataPointOverlay, an as coreGridLabelsOverlay, as as coreGroupOverlay, ap as coreRectOverlay, am as coreSignalOverlay, ar as coreTextOverlay, aL as createBuilderPlayback, aK as createScenePlayback, at as defaultCoreOverlayRegistry, aM as playAnimationSpec, a9 as viz } from './index-CvNQ2zQt.js';
3
+ export { H as HitResult, a as HitTestOptions, d as distanceSquare, e as edgeDistance, g as getEffectiveNodeBounds, h as hitTest, b as hitTestRect, n as nearestPort, p as pointInRect, s as setupPanZoom } from './hitTest-B_G0nzwf.js';
4
4
  export { SerializedScene, deserializeScene, serializeScene } from './serialization.js';
5
5
  export { CircularLayoutOptions, GridLayoutOptions, circularLayout, gridLayout } from './layout.js';
6
6
  export { EquidistantPort, PerimeterStrategy, findPortNearest, getEquidistantPorts, registerPerimeterStrategy, toNodePorts } from './ports.js';