@blueprint-chart/lib 0.1.35 → 0.3.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.
@@ -1,3 +1,12 @@
1
+ /**
2
+ * @deprecated As of the Scene Transition Orchestrator, mark rendering has fully
3
+ * migrated to `packages/lib/src/transitions/` (SceneTransition + featureJoin +
4
+ * tweenFrameGeometry): the legacy `reinsertWithOffset` mark-translate wrapper is
5
+ * gone. What remains here is the cross-type fade path and the transition-duration
6
+ * flag: every renderer and the axis subsystem still call `setRenderTransition` /
7
+ * `getDefaultTransitionMs`, and cross-type transitions use `snapshotForFadeOut` /
8
+ * `commitFadeOut` / `fadeIn`. This file can be deleted once those move too.
9
+ */
1
10
  /**
2
11
  * Returns 0 when the user prefers reduced motion, otherwise returns the input duration.
3
12
  */
@@ -13,15 +22,6 @@ export declare function setRenderTransition(enabled: boolean): void;
13
22
  * Returns 0 when not in a scene transition (i.e. setRenderTransition(false) was last called).
14
23
  */
15
24
  export declare function getDefaultTransitionMs(): number;
16
- /**
17
- * Reinsert prior elements into a parent, wrapping them in a compensating
18
- * `<g translate(dx,dy)>` that transitions to identity over the default
19
- * duration. This corrects for chartArea origin shifts (e.g. when legend
20
- * toggles change margins) so that prior elements don't visually jump.
21
- *
22
- * When dx/dy are both 0, elements are appended directly without a wrapper.
23
- */
24
- export declare function reinsertWithOffset(parent: Element, elements: Element[], dx: number, dy: number): void;
25
25
  /**
26
26
  * Fade an element in using the Web Animations API.
27
27
  * Respects `prefers-reduced-motion` via `getTransitionDuration`.
@@ -0,0 +1,16 @@
1
+ import { D3Blueprint } from 'd3-blueprint';
2
+ import * as d3 from 'd3';
3
+ /**
4
+ * Minimal D3Blueprint host whose only job is to carry the legacy plugins
5
+ * (tooltip, crosshair, annotations) that consume the `.use()` / `.draw()` API.
6
+ *
7
+ * Marks are rendered through the SceneTransition orchestrator's featureJoin, not
8
+ * this class — so `initialize` defines no layers. Renderers that have migrated
9
+ * their marks but still host plugins use `createPluginHost` instead of declaring
10
+ * a per-file empty subclass.
11
+ */
12
+ declare class PluginHost extends D3Blueprint<unknown> {
13
+ initialize(): void;
14
+ }
15
+ export declare function createPluginHost(selection: d3.Selection<SVGGElement, unknown, null, undefined>): PluginHost;
16
+ export {};
@@ -2,6 +2,17 @@ import { Margin } from './types';
2
2
  export interface CachedChart {
3
3
  chartType: string;
4
4
  margin?: Margin;
5
+ /**
6
+ * The plot rect (origin + size) this render used for its marks/clip, so the
7
+ * next same-type transition can ease the frame geometry from the exact prior
8
+ * rect instead of reconstructing it from margins. Shape matches `PlotRect`.
9
+ */
10
+ plotRect?: {
11
+ left: number;
12
+ top: number;
13
+ width: number;
14
+ height: number;
15
+ };
5
16
  }
6
17
  export declare function getCachedChart(container: HTMLElement): CachedChart | undefined;
7
18
  export declare function setCachedChart(container: HTMLElement, entry: CachedChart): void;
@@ -11,55 +11,75 @@ export interface PropertyNode {
11
11
  * real data category; only the unquoted `series = ...` row names columns.
12
12
  */
13
13
  quotedKey?: boolean;
14
+ /** `//` comment lines authored immediately above this node, text only (no `//`). */
15
+ leadingComments?: string[];
14
16
  }
15
17
  export interface DataNode {
16
18
  type: DslNodeType.Data;
17
19
  entries: PropertyNode[];
20
+ /** `//` comment lines authored immediately above this node, text only (no `//`). */
21
+ leadingComments?: string[];
18
22
  }
19
23
  export interface ColorizeNode {
20
24
  type: DslNodeType.Colorize;
21
25
  target: string;
22
26
  properties: PropertyNode[];
23
27
  fromHighlight?: boolean;
28
+ /** `//` comment lines authored immediately above this node, text only (no `//`). */
29
+ leadingComments?: string[];
24
30
  }
25
31
  export interface HighlightNode {
26
32
  type: DslNodeType.Highlight;
27
33
  target: string;
28
34
  properties: PropertyNode[];
35
+ /** `//` comment lines authored immediately above this node, text only (no `//`). */
36
+ leadingComments?: string[];
29
37
  }
30
38
  export interface AreaFillNode {
31
39
  type: DslNodeType.AreaFill;
32
40
  from: string;
33
41
  to: string;
34
42
  properties: PropertyNode[];
43
+ /** `//` comment lines authored immediately above this node, text only (no `//`). */
44
+ leadingComments?: string[];
35
45
  }
36
46
  export interface PointAnnotationNode {
37
47
  type: DslNodeType.Annotation;
38
48
  kind: AnnotationKind.Point;
39
49
  target: string;
40
50
  properties: PropertyNode[];
51
+ /** `//` comment lines authored immediately above this node, text only (no `//`). */
52
+ leadingComments?: string[];
41
53
  }
42
54
  export interface RangeAnnotationNode {
43
55
  type: DslNodeType.Annotation;
44
56
  kind: AnnotationKind.Range;
45
57
  properties: PropertyNode[];
58
+ /** `//` comment lines authored immediately above this node, text only (no `//`). */
59
+ leadingComments?: string[];
46
60
  }
47
61
  export interface FreeAnnotationNode {
48
62
  type: DslNodeType.Annotation;
49
63
  kind: AnnotationKind.Free;
50
64
  properties: PropertyNode[];
65
+ /** `//` comment lines authored immediately above this node, text only (no `//`). */
66
+ leadingComments?: string[];
51
67
  }
52
68
  export type AnnotationNode = PointAnnotationNode | RangeAnnotationNode | FreeAnnotationNode;
53
69
  export interface SeriesNode {
54
70
  type: DslNodeType.Series;
55
71
  name: string;
56
72
  properties: PropertyNode[];
73
+ /** `//` comment lines authored immediately above this node, text only (no `//`). */
74
+ leadingComments?: string[];
57
75
  }
58
76
  export interface AnnotationVisibilityNode {
59
77
  type: DslNodeType.AnnotationVisibility;
60
78
  action: AnnotationAction;
61
79
  kind: AnnotationKind;
62
80
  id: string;
81
+ /** `//` comment lines authored immediately above this node, text only (no `//`). */
82
+ leadingComments?: string[];
63
83
  }
64
84
  export interface SceneNode {
65
85
  type: DslNodeType.Scene;
@@ -73,11 +93,15 @@ export interface SceneNode {
73
93
  annotationVisibility: AnnotationVisibilityNode[];
74
94
  series: SeriesNode[];
75
95
  transforms: TransformNode[];
96
+ /** `//` comment lines authored immediately above this node, text only (no `//`). */
97
+ leadingComments?: string[];
76
98
  }
77
99
  export interface TransformNode {
78
100
  type: DslNodeType.Transform;
79
101
  transformType: string;
80
102
  properties: PropertyNode[];
103
+ /** `//` comment lines authored immediately above this node, text only (no `//`). */
104
+ leadingComments?: string[];
81
105
  }
82
106
  export interface ChartNode {
83
107
  type: DslNodeType.Chart;