@blueprint-chart/lib 0.4.0 → 1.1.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.
@@ -72,7 +72,10 @@ export interface AnnotationLineConfig {
72
72
  circleColor?: string;
73
73
  }
74
74
  interface AnnotationBase {
75
- id?: string;
75
+ /** Internal transition-matching key, assigned during scene resolution. Never author-supplied. */
76
+ key?: string;
77
+ /** How many scenes this annotation lives for: a positive integer count, or 'always'. Defaults to 1. */
78
+ repeat?: number | 'always';
76
79
  text?: string;
77
80
  textColor?: string;
78
81
  textOutline?: boolean;
@@ -24,7 +24,6 @@ export declare function extractSceneOverrides(scene: SceneNode, chartType: strin
24
24
  highlights: SceneNode['highlights'];
25
25
  areaFills: SceneNode['areaFills'];
26
26
  annotations: SceneNode['annotations'];
27
- annotationVisibility: SceneNode['annotationVisibility'];
28
27
  series: SceneNode['series'];
29
28
  transforms: SceneNode['transforms'];
30
29
  };
@@ -1,4 +1,4 @@
1
- import { DslNodeType, AnnotationKind, AnnotationAction } from '../enums';
1
+ import { DslNodeType, AnnotationKind } from '../enums';
2
2
  export interface PropertyNode {
3
3
  type: DslNodeType.Property;
4
4
  key: string;
@@ -73,14 +73,6 @@ export interface SeriesNode {
73
73
  /** `//` comment lines authored immediately above this node, text only (no `//`). */
74
74
  leadingComments?: string[];
75
75
  }
76
- export interface AnnotationVisibilityNode {
77
- type: DslNodeType.AnnotationVisibility;
78
- action: AnnotationAction;
79
- kind: AnnotationKind;
80
- id: string;
81
- /** `//` comment lines authored immediately above this node, text only (no `//`). */
82
- leadingComments?: string[];
83
- }
84
76
  export interface SceneNode {
85
77
  type: DslNodeType.Scene;
86
78
  name: string | null;
@@ -90,7 +82,6 @@ export interface SceneNode {
90
82
  highlights: HighlightNode[];
91
83
  areaFills: AreaFillNode[];
92
84
  annotations: AnnotationNode[];
93
- annotationVisibility: AnnotationVisibilityNode[];
94
85
  series: SeriesNode[];
95
86
  transforms: TransformNode[];
96
87
  /** `//` comment lines authored immediately above this node, text only (no `//`). */
@@ -112,7 +103,6 @@ export interface ChartNode {
112
103
  highlights: HighlightNode[];
113
104
  areaFills: AreaFillNode[];
114
105
  annotations: AnnotationNode[];
115
- annotationVisibility: AnnotationVisibilityNode[];
116
106
  series: SeriesNode[];
117
107
  scenes: SceneNode[];
118
108
  transforms: TransformNode[];
package/dist/enums.d.ts CHANGED
@@ -82,10 +82,6 @@ export declare enum AnnotationKind {
82
82
  * (e.g. `point` -> `annotation`, not the enum's raw value).
83
83
  */
84
84
  export declare const ANNOTATION_KIND_KEYWORD: Record<AnnotationKind, string>;
85
- export declare enum AnnotationAction {
86
- Hide = "hide",
87
- Show = "show"
88
- }
89
85
  export declare enum RangeAnchor {
90
86
  Start = "start",
91
87
  Center = "center",
@@ -192,7 +188,6 @@ export declare enum DslNodeType {
192
188
  AreaFill = "area-fill",
193
189
  Annotation = "annotation",
194
190
  Series = "series",
195
- AnnotationVisibility = "annotation-visibility",
196
191
  Scene = "scene",
197
192
  Transform = "transform",
198
193
  Chart = "chart"
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { ChartType, AxisDirection, ScaleType, GridStyle, LabelPosition, LabelRotation, TickPosition, FrameSizing, CompassDirection, AnnotationLineStyle, StrokeStyle, AnnotationKind, AnnotationAction, RangeAnchor, Orientation, SymbolShape, SymbolShowOn, SymbolStyle, SortDirection, SortMode, LegendPosition, Anchor, ValueLabelPosition, CrosshairDirection, CrosshairStyle, StackMode, LineStyle, ChartOptionType, DirectLabelMode, Interpolation, DslNodeType, } from './enums';
1
+ export { ChartType, AxisDirection, ScaleType, GridStyle, LabelPosition, LabelRotation, TickPosition, FrameSizing, CompassDirection, AnnotationLineStyle, StrokeStyle, AnnotationKind, RangeAnchor, Orientation, SymbolShape, SymbolShowOn, SymbolStyle, SortDirection, SortMode, LegendPosition, Anchor, ValueLabelPosition, CrosshairDirection, CrosshairStyle, StackMode, LineStyle, ChartOptionType, DirectLabelMode, Interpolation, DslNodeType, } from './enums';
2
2
  export { ANNOTATION_KIND_KEYWORD } from './enums';
3
3
  export type { ChartData, ChartOptions, ChartRenderer, ChartOptionDef, ChartTypeOptions, ChartTypeOptionKey, ColorizeConfig, HighlightConfig, AxisOptions, FrameOptions, AreaFillConfig, AnnotationConfig, PointAnnotationConfig, RangeAnnotationConfig, FreeAnnotationConfig, AnnotationLineConfig, LineSymbolConfig, SeriesOverride, Margin, } from './charts/types';
4
4
  export { createFrame } from './charts/frame/frame';
@@ -27,7 +27,7 @@ export type { CvdType, CvdIssue } from './charts/colorblind';
27
27
  export { parse } from './dsl/parser';
28
28
  export { serialize, compactSerialize, compactSerializeDeep } from './dsl/serializer';
29
29
  export { propertyMap, extractChartTypeOptions, dataEntriesToString, extractSceneOverrides, convertColorizes, convertHighlights, convertAreaFills, convertAnnotations, convertSeriesOverrides } from './dsl/converter';
30
- export type { AnnotationNode, AnnotationVisibilityNode, PointAnnotationNode, RangeAnnotationNode, FreeAnnotationNode, AreaFillNode, ChartNode, DataNode, ColorizeNode, HighlightNode, PropertyNode, SceneNode, SeriesNode, TransformNode } from './dsl/types';
30
+ export type { AnnotationNode, PointAnnotationNode, RangeAnnotationNode, FreeAnnotationNode, AreaFillNode, ChartNode, DataNode, ColorizeNode, HighlightNode, PropertyNode, SceneNode, SeriesNode, TransformNode } from './dsl/types';
31
31
  export { validateChart } from './dsl/validate';
32
32
  export type { ValidationIssue, ValidationResult } from './dsl/validate';
33
33
  export { samples } from './samples';