@rioaxyz/sonrchart 0.1.0 → 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.
package/dist/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { RefObject, ReactNode, CSSProperties, ButtonHTMLAttributes } from 'react';
3
- import { Point, Nullable, DeepPartial, OverlayStyle, OverlayMode, Chart, KLineData, Styles, PeriodType, OverlayCreateFiguresCallbackParams, OverlayFigure, Coordinate } from 'klinecharts';
3
+ import { Point, Nullable, DeepPartial, OverlayStyle, OverlayMode, KLineData, Chart, Styles, PeriodType, OverlayCreateFiguresCallbackParams, OverlayFigure, Coordinate } from 'klinecharts';
4
4
 
5
5
  /** One saved overlay in a drawing template — the canonical serialized shape of
6
6
  * a user drawing, shared by ChartState.drawings and SonrChart's snapshot/
@@ -216,6 +216,17 @@ interface PatternMarker {
216
216
  label?: string;
217
217
  color?: string;
218
218
  }
219
+ /** Halt badge shown at the top of the price pane while the symbol is
220
+ * trading-halted (issue #78). `halted={true}` shows the default blue "Halt"
221
+ * pill; pass an object to customize it. */
222
+ interface HaltBadge {
223
+ /** Badge text. Default "Halt". */
224
+ label?: string;
225
+ /** Pill background color. Default "#2196f3". */
226
+ color?: string;
227
+ /** Badge text color. Default "#ffffff". */
228
+ textColor?: string;
229
+ }
219
230
  /** Session background tinting (issue #10). `true` uses the default palette;
220
231
  * pass an object to override the pre/after-hours tints (regular hours are
221
232
  * untinted). Colors should be low-alpha so candles read through. */
@@ -255,6 +266,10 @@ interface TextData extends Partial<TextStyle> {
255
266
  }
256
267
  declare function registerTextOverlay(): void;
257
268
 
269
+ type VolumeTrend = "increasing" | "decreasing" | "mixed";
270
+ declare const DEFAULT_VOLUME_TREND_BARS = 3;
271
+ declare function volumeTrend(list: KLineData[], endIndex: number, bars?: number): VolumeTrend | null;
272
+
258
273
  interface SonrChartProps {
259
274
  symbol: string;
260
275
  interval?: Interval;
@@ -276,6 +291,9 @@ interface SonrChartProps {
276
291
  watermark?: boolean | Partial<WatermarkOptions>;
277
292
  /** Pattern-context markers on the price pane. (#5) */
278
293
  patterns?: PatternMarker[];
294
+ /** Trading-halt badge (#78): `true` pins a blue "Halt" pill to the top of
295
+ * the price pane against the y-axis; pass a HaltBadge to customize. */
296
+ halted?: boolean | HaltBadge;
279
297
  /** Static reference lines (entry / stop / target). */
280
298
  priceLines?: PriceLine[];
281
299
  /** Draggable order/position lines. (#19) */
@@ -466,6 +484,26 @@ interface SonrChartHandle {
466
484
  * the crosshair is active, else the latest bar (updates on each streamed
467
485
  * bar). Emits once immediately. Returns unsubscribe. (#45) */
468
486
  subscribeHeaderBar(cb: (current: KLineData | null, prev: KLineData | null) => void): () => void;
487
+ /** Subscribe to the volume trend over the bars ending at the header bar
488
+ * (hovered bar while the crosshair is active, else the latest bar):
489
+ * "increasing" | "decreasing" | "mixed", or null until enough bars are
490
+ * loaded. Omit `bars` to track the chart-level lookback (re-emits when the
491
+ * setting changes); pass a number to pin this subscription's own count.
492
+ * Emits once immediately. Returns unsubscribe. (#79) */
493
+ subscribeVolumeTrend(cb: (trend: VolumeTrend | null) => void, bars?: number): () => void;
494
+ /** Chart-level volume-trend lookback (#79): the bar count used by
495
+ * subscriptions that don't pin their own. Clamped to ≥ 1; setting it
496
+ * re-emits the trend to those subscribers. */
497
+ getVolumeTrendBars(): number;
498
+ setVolumeTrendBars(bars: number): void;
499
+ subscribeVolumeTrendBars(cb: (bars: number) => void): () => void;
500
+ /** Whether the volume-trend header row is on (#79). Chart-level state so
501
+ * any control (the indicators menu, a host button) can toggle it and a
502
+ * mounted <ChartHeader> shows/hides its row live. Default off; the
503
+ * header's `volumeTrend` prop seeds it on. */
504
+ getVolumeTrendEnabled(): boolean;
505
+ setVolumeTrendEnabled(on: boolean): void;
506
+ subscribeVolumeTrendEnabled(cb: (on: boolean) => void): () => void;
469
507
  }
470
508
  declare const SonrChart: react.ForwardRefExoticComponent<SonrChartProps & react.RefAttributes<SonrChartHandle>>;
471
509
 
@@ -578,6 +616,11 @@ interface Labels {
578
616
  zoomIn: string;
579
617
  fitContent: string;
580
618
  goToRealtime: string;
619
+ /** Volume-trend header row (#79): label + the three trend values. */
620
+ volumeTrend: string;
621
+ volumeTrendIncreasing: string;
622
+ volumeTrendDecreasing: string;
623
+ volumeTrendMixed: string;
581
624
  /** Market-status badge (#45). */
582
625
  marketPre: string;
583
626
  marketOpen: string;
@@ -606,6 +649,10 @@ interface IndicatorOption {
606
649
  label: string;
607
650
  pane?: "main" | "new";
608
651
  }
652
+ /** Menu row for the volume-trend header row (#79). Not a KLineChart study —
653
+ * toggling it flips the chart-level flag (setVolumeTrendEnabled) that a
654
+ * mounted <ChartHeader> follows. */
655
+ declare const VOLUME_TREND_OPTION = "VOLTREND";
609
656
  declare const DEFAULT_INDICATOR_OPTIONS: IndicatorOption[];
610
657
  declare function IndicatorMenu({ chartRef, options, className, labels, }: {
611
658
  chartRef: RefObject<SonrChartHandle>;
@@ -800,6 +847,10 @@ interface SonrChartShellProps {
800
847
  source?: string;
801
848
  /** Instrument venue label for the Symbol-info dialog (e.g. "Alpaca"). */
802
849
  exchange?: string;
850
+ /** Volume-trend row in the header (#79): `true` (default) shows it with the
851
+ * chart-level lookback (3 bars unless changed in the settings dialog), a
852
+ * number sets that lookback, `false` hides the row. */
853
+ volumeTrend?: boolean | number;
803
854
  onIntervalChange?: (interval: Interval) => void;
804
855
  onSymbolChange?: (symbol: string) => void;
805
856
  /** Brand mark content (host logo), shown in a chart corner. Omit for none. */
@@ -897,10 +948,17 @@ interface ChartHeaderProps {
897
948
  source?: string;
898
949
  /** Precision for O/H/L/C/change (defaults to 2). */
899
950
  pricePrecision?: number;
951
+ /** Volume-trend row (#79): `true` turns it on with the chart-level lookback
952
+ * (default 3 bars, editable in the settings dialog); a number also sets
953
+ * that lookback. The on/off state lives on the chart handle, so it's also
954
+ * toggleable from the indicators menu ("VOLTREND") — this prop seeds it on.
955
+ * Shown on a second line below the symbol/OHLC row; tracks the same bar as
956
+ * the OHLC (crosshair, falling back to the latest bar). */
957
+ volumeTrend?: boolean | number;
900
958
  labels?: Partial<Labels>;
901
959
  className?: string;
902
960
  }
903
- declare function ChartHeader({ chartRef, symbol, interval, source, pricePrecision, labels, className }: ChartHeaderProps): react.JSX.Element;
961
+ declare function ChartHeader({ chartRef, symbol, interval, source, pricePrecision, volumeTrend, labels, className }: ChartHeaderProps): react.JSX.Element;
904
962
 
905
963
  interface CandleStyleOption {
906
964
  style: CandleStyle;
@@ -1099,6 +1157,7 @@ declare const SESSION_INDICATOR = "SONR_SESSION";
1099
1157
  declare const PATTERN_INDICATOR = "SONR_PATTERNS";
1100
1158
  declare const WATERMARK_INDICATOR = "SONR_WATERMARK";
1101
1159
  declare const SERIES_INDICATOR = "SONR_SERIES";
1160
+ declare const HALT_INDICATOR = "SONR_HALT";
1102
1161
  declare const VWAP_INDICATOR = "VWAP";
1103
1162
  /** Background watermark content (the underlaid ticker + interval). */
1104
1163
  interface WatermarkData {
@@ -1106,6 +1165,16 @@ interface WatermarkData {
1106
1165
  subtitle?: string;
1107
1166
  color: string;
1108
1167
  }
1168
+ /** Resolved halt-badge config the HALT_INDICATOR paints (#78). */
1169
+ interface HaltBadgeData {
1170
+ label: string;
1171
+ color: string;
1172
+ textColor: string;
1173
+ }
1174
+ declare const DEFAULT_HALT_BADGE: HaltBadgeData;
1175
+ /** Coerce the `halted` prop (boolean | partial badge) into a full config, or
1176
+ * null when the badge is off. */
1177
+ declare function normalizeHalt(prop: boolean | HaltBadge | undefined): HaltBadgeData | null;
1109
1178
  interface SessionColors {
1110
1179
  premarket: string;
1111
1180
  afterhours: string;
@@ -1113,4 +1182,4 @@ interface SessionColors {
1113
1182
  declare const DEFAULT_SESSION_COLORS: SessionColors;
1114
1183
  declare function registerSonrIndicators(): void;
1115
1184
 
1116
- export { BRUSH_OVERLAY, type Bar, type BrandCorner, BrandMark, type BrandMarkProps, type BrushStyle, type BrushTool, CandleMenu, type CandleStyle, type CandleStyleOption, ChartHeader, type ChartHeaderProps, type ChartState, ChartToolbar, type CompareSpec, ConfirmDialog, DEFAULT_CANDLE_STYLES, DEFAULT_DRAWING_TOOLS, DEFAULT_INDICATOR_OPTIONS, DEFAULT_LABELS, DEFAULT_RANGES, DEFAULT_RESOLUTIONS, DEFAULT_SESSION_COLORS, DEFAULT_TIMEZONE, DEFAULT_TIMEZONES, type DataSource, DataWindow, type DrawingRow, type DrawingSnapshot, type DrawingSnapshotItem, DrawingTemplateStore, type DrawingTool, type DrawingToolOption, DrawingToolbar, EXTENDED_DRAWING_TOOLS, EXTENDED_OVERLAYS, FIB_EXTENSION_LEVELS, GoToDateDialog, IndicatorMenu, type IndicatorOption, type IndicatorRow, type IndicatorSpec, type Interval, type Labels, type Magnet, type MarketPhase, MarketStatus, type MarketStatusProps, NavControlBar, ObjectTree, type OrderLine, PALETTE, PATTERN_INDICATOR, type PatternMarker, type PriceLabels, type PriceLine, type PriceScale, PriceScaleMenu, type QuoteFormat, type RangeOption, type ResolutionOption, SERIES_INDICATOR, SESSION_INDICATOR, SHAPE_ELLIPSE, SHAPE_OVERLAYS, SHAPE_PRICE_RANGE, SHAPE_RECTANGLE, SHAPE_RISK_REWARD, SHAPE_TRIANGLE, SONR_TRADE_BOX, SaveLoadDialog, type SessionTint, SettingsModal, type ShortcutAction, SonrChart, type SonrChartHandle, type SonrChartProps, SonrChartShell, type SonrChartShellProps, type SymbolInfo, SymbolInfoDialog, SymbolSearch, type SymbolSearchResult, TEXT_OVERLAY, type TextData, type Theme, TimeframeBar, TimezoneMenu, type TimezoneOption, ToolbarButton, UNIT_MS, USER_DRAWING_GROUP, VWAP_INDICATOR, WATERMARK_INDICATOR, type WatermarkData, type WatermarkOptions, arrowHeadPoints, dateRangeLabel, downloadSnapshot, drawingLabel, ensureDefaultStyles, fibSequence, formatWithUnit, getCSSCustomProperty, getRegisteredTheme, getTimezoneApi, humanDuration, isChartState, isEditableTarget, marketStatus, mergeLabels, parseLocalDateTime, parseResolution, priceRangeLabel, registerExtendedDrawings, registerShapeOverlays, registerSonrIndicators, registerTextOverlay, registerTheme, registerTradeReview, resolutionLabel, resolutionMs, resolveShortcut, resolveThemeStyles, riskRewardStats, setCSSCustomProperty, themeStyles, timezoneLabel, toHeikinAshi, tradeBoxFigures };
1185
+ export { BRUSH_OVERLAY, type Bar, type BrandCorner, BrandMark, type BrandMarkProps, type BrushStyle, type BrushTool, CandleMenu, type CandleStyle, type CandleStyleOption, ChartHeader, type ChartHeaderProps, type ChartState, ChartToolbar, type CompareSpec, ConfirmDialog, DEFAULT_CANDLE_STYLES, DEFAULT_DRAWING_TOOLS, DEFAULT_HALT_BADGE, DEFAULT_INDICATOR_OPTIONS, DEFAULT_LABELS, DEFAULT_RANGES, DEFAULT_RESOLUTIONS, DEFAULT_SESSION_COLORS, DEFAULT_TIMEZONE, DEFAULT_TIMEZONES, DEFAULT_VOLUME_TREND_BARS, type DataSource, DataWindow, type DrawingRow, type DrawingSnapshot, type DrawingSnapshotItem, DrawingTemplateStore, type DrawingTool, type DrawingToolOption, DrawingToolbar, EXTENDED_DRAWING_TOOLS, EXTENDED_OVERLAYS, FIB_EXTENSION_LEVELS, GoToDateDialog, HALT_INDICATOR, type HaltBadge, type HaltBadgeData, IndicatorMenu, type IndicatorOption, type IndicatorRow, type IndicatorSpec, type Interval, type Labels, type Magnet, type MarketPhase, MarketStatus, type MarketStatusProps, NavControlBar, ObjectTree, type OrderLine, PALETTE, PATTERN_INDICATOR, type PatternMarker, type PriceLabels, type PriceLine, type PriceScale, PriceScaleMenu, type QuoteFormat, type RangeOption, type ResolutionOption, SERIES_INDICATOR, SESSION_INDICATOR, SHAPE_ELLIPSE, SHAPE_OVERLAYS, SHAPE_PRICE_RANGE, SHAPE_RECTANGLE, SHAPE_RISK_REWARD, SHAPE_TRIANGLE, SONR_TRADE_BOX, SaveLoadDialog, type SessionTint, SettingsModal, type ShortcutAction, SonrChart, type SonrChartHandle, type SonrChartProps, SonrChartShell, type SonrChartShellProps, type SymbolInfo, SymbolInfoDialog, SymbolSearch, type SymbolSearchResult, TEXT_OVERLAY, type TextData, type Theme, TimeframeBar, TimezoneMenu, type TimezoneOption, ToolbarButton, UNIT_MS, USER_DRAWING_GROUP, VOLUME_TREND_OPTION, VWAP_INDICATOR, type VolumeTrend, WATERMARK_INDICATOR, type WatermarkData, type WatermarkOptions, arrowHeadPoints, dateRangeLabel, downloadSnapshot, drawingLabel, ensureDefaultStyles, fibSequence, formatWithUnit, getCSSCustomProperty, getRegisteredTheme, getTimezoneApi, humanDuration, isChartState, isEditableTarget, marketStatus, mergeLabels, normalizeHalt, parseLocalDateTime, parseResolution, priceRangeLabel, registerExtendedDrawings, registerShapeOverlays, registerSonrIndicators, registerTextOverlay, registerTheme, registerTradeReview, resolutionLabel, resolutionMs, resolveShortcut, resolveThemeStyles, riskRewardStats, setCSSCustomProperty, themeStyles, timezoneLabel, toHeikinAshi, tradeBoxFigures, volumeTrend };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { RefObject, ReactNode, CSSProperties, ButtonHTMLAttributes } from 'react';
3
- import { Point, Nullable, DeepPartial, OverlayStyle, OverlayMode, Chart, KLineData, Styles, PeriodType, OverlayCreateFiguresCallbackParams, OverlayFigure, Coordinate } from 'klinecharts';
3
+ import { Point, Nullable, DeepPartial, OverlayStyle, OverlayMode, KLineData, Chart, Styles, PeriodType, OverlayCreateFiguresCallbackParams, OverlayFigure, Coordinate } from 'klinecharts';
4
4
 
5
5
  /** One saved overlay in a drawing template — the canonical serialized shape of
6
6
  * a user drawing, shared by ChartState.drawings and SonrChart's snapshot/
@@ -216,6 +216,17 @@ interface PatternMarker {
216
216
  label?: string;
217
217
  color?: string;
218
218
  }
219
+ /** Halt badge shown at the top of the price pane while the symbol is
220
+ * trading-halted (issue #78). `halted={true}` shows the default blue "Halt"
221
+ * pill; pass an object to customize it. */
222
+ interface HaltBadge {
223
+ /** Badge text. Default "Halt". */
224
+ label?: string;
225
+ /** Pill background color. Default "#2196f3". */
226
+ color?: string;
227
+ /** Badge text color. Default "#ffffff". */
228
+ textColor?: string;
229
+ }
219
230
  /** Session background tinting (issue #10). `true` uses the default palette;
220
231
  * pass an object to override the pre/after-hours tints (regular hours are
221
232
  * untinted). Colors should be low-alpha so candles read through. */
@@ -255,6 +266,10 @@ interface TextData extends Partial<TextStyle> {
255
266
  }
256
267
  declare function registerTextOverlay(): void;
257
268
 
269
+ type VolumeTrend = "increasing" | "decreasing" | "mixed";
270
+ declare const DEFAULT_VOLUME_TREND_BARS = 3;
271
+ declare function volumeTrend(list: KLineData[], endIndex: number, bars?: number): VolumeTrend | null;
272
+
258
273
  interface SonrChartProps {
259
274
  symbol: string;
260
275
  interval?: Interval;
@@ -276,6 +291,9 @@ interface SonrChartProps {
276
291
  watermark?: boolean | Partial<WatermarkOptions>;
277
292
  /** Pattern-context markers on the price pane. (#5) */
278
293
  patterns?: PatternMarker[];
294
+ /** Trading-halt badge (#78): `true` pins a blue "Halt" pill to the top of
295
+ * the price pane against the y-axis; pass a HaltBadge to customize. */
296
+ halted?: boolean | HaltBadge;
279
297
  /** Static reference lines (entry / stop / target). */
280
298
  priceLines?: PriceLine[];
281
299
  /** Draggable order/position lines. (#19) */
@@ -466,6 +484,26 @@ interface SonrChartHandle {
466
484
  * the crosshair is active, else the latest bar (updates on each streamed
467
485
  * bar). Emits once immediately. Returns unsubscribe. (#45) */
468
486
  subscribeHeaderBar(cb: (current: KLineData | null, prev: KLineData | null) => void): () => void;
487
+ /** Subscribe to the volume trend over the bars ending at the header bar
488
+ * (hovered bar while the crosshair is active, else the latest bar):
489
+ * "increasing" | "decreasing" | "mixed", or null until enough bars are
490
+ * loaded. Omit `bars` to track the chart-level lookback (re-emits when the
491
+ * setting changes); pass a number to pin this subscription's own count.
492
+ * Emits once immediately. Returns unsubscribe. (#79) */
493
+ subscribeVolumeTrend(cb: (trend: VolumeTrend | null) => void, bars?: number): () => void;
494
+ /** Chart-level volume-trend lookback (#79): the bar count used by
495
+ * subscriptions that don't pin their own. Clamped to ≥ 1; setting it
496
+ * re-emits the trend to those subscribers. */
497
+ getVolumeTrendBars(): number;
498
+ setVolumeTrendBars(bars: number): void;
499
+ subscribeVolumeTrendBars(cb: (bars: number) => void): () => void;
500
+ /** Whether the volume-trend header row is on (#79). Chart-level state so
501
+ * any control (the indicators menu, a host button) can toggle it and a
502
+ * mounted <ChartHeader> shows/hides its row live. Default off; the
503
+ * header's `volumeTrend` prop seeds it on. */
504
+ getVolumeTrendEnabled(): boolean;
505
+ setVolumeTrendEnabled(on: boolean): void;
506
+ subscribeVolumeTrendEnabled(cb: (on: boolean) => void): () => void;
469
507
  }
470
508
  declare const SonrChart: react.ForwardRefExoticComponent<SonrChartProps & react.RefAttributes<SonrChartHandle>>;
471
509
 
@@ -578,6 +616,11 @@ interface Labels {
578
616
  zoomIn: string;
579
617
  fitContent: string;
580
618
  goToRealtime: string;
619
+ /** Volume-trend header row (#79): label + the three trend values. */
620
+ volumeTrend: string;
621
+ volumeTrendIncreasing: string;
622
+ volumeTrendDecreasing: string;
623
+ volumeTrendMixed: string;
581
624
  /** Market-status badge (#45). */
582
625
  marketPre: string;
583
626
  marketOpen: string;
@@ -606,6 +649,10 @@ interface IndicatorOption {
606
649
  label: string;
607
650
  pane?: "main" | "new";
608
651
  }
652
+ /** Menu row for the volume-trend header row (#79). Not a KLineChart study —
653
+ * toggling it flips the chart-level flag (setVolumeTrendEnabled) that a
654
+ * mounted <ChartHeader> follows. */
655
+ declare const VOLUME_TREND_OPTION = "VOLTREND";
609
656
  declare const DEFAULT_INDICATOR_OPTIONS: IndicatorOption[];
610
657
  declare function IndicatorMenu({ chartRef, options, className, labels, }: {
611
658
  chartRef: RefObject<SonrChartHandle>;
@@ -800,6 +847,10 @@ interface SonrChartShellProps {
800
847
  source?: string;
801
848
  /** Instrument venue label for the Symbol-info dialog (e.g. "Alpaca"). */
802
849
  exchange?: string;
850
+ /** Volume-trend row in the header (#79): `true` (default) shows it with the
851
+ * chart-level lookback (3 bars unless changed in the settings dialog), a
852
+ * number sets that lookback, `false` hides the row. */
853
+ volumeTrend?: boolean | number;
803
854
  onIntervalChange?: (interval: Interval) => void;
804
855
  onSymbolChange?: (symbol: string) => void;
805
856
  /** Brand mark content (host logo), shown in a chart corner. Omit for none. */
@@ -897,10 +948,17 @@ interface ChartHeaderProps {
897
948
  source?: string;
898
949
  /** Precision for O/H/L/C/change (defaults to 2). */
899
950
  pricePrecision?: number;
951
+ /** Volume-trend row (#79): `true` turns it on with the chart-level lookback
952
+ * (default 3 bars, editable in the settings dialog); a number also sets
953
+ * that lookback. The on/off state lives on the chart handle, so it's also
954
+ * toggleable from the indicators menu ("VOLTREND") — this prop seeds it on.
955
+ * Shown on a second line below the symbol/OHLC row; tracks the same bar as
956
+ * the OHLC (crosshair, falling back to the latest bar). */
957
+ volumeTrend?: boolean | number;
900
958
  labels?: Partial<Labels>;
901
959
  className?: string;
902
960
  }
903
- declare function ChartHeader({ chartRef, symbol, interval, source, pricePrecision, labels, className }: ChartHeaderProps): react.JSX.Element;
961
+ declare function ChartHeader({ chartRef, symbol, interval, source, pricePrecision, volumeTrend, labels, className }: ChartHeaderProps): react.JSX.Element;
904
962
 
905
963
  interface CandleStyleOption {
906
964
  style: CandleStyle;
@@ -1099,6 +1157,7 @@ declare const SESSION_INDICATOR = "SONR_SESSION";
1099
1157
  declare const PATTERN_INDICATOR = "SONR_PATTERNS";
1100
1158
  declare const WATERMARK_INDICATOR = "SONR_WATERMARK";
1101
1159
  declare const SERIES_INDICATOR = "SONR_SERIES";
1160
+ declare const HALT_INDICATOR = "SONR_HALT";
1102
1161
  declare const VWAP_INDICATOR = "VWAP";
1103
1162
  /** Background watermark content (the underlaid ticker + interval). */
1104
1163
  interface WatermarkData {
@@ -1106,6 +1165,16 @@ interface WatermarkData {
1106
1165
  subtitle?: string;
1107
1166
  color: string;
1108
1167
  }
1168
+ /** Resolved halt-badge config the HALT_INDICATOR paints (#78). */
1169
+ interface HaltBadgeData {
1170
+ label: string;
1171
+ color: string;
1172
+ textColor: string;
1173
+ }
1174
+ declare const DEFAULT_HALT_BADGE: HaltBadgeData;
1175
+ /** Coerce the `halted` prop (boolean | partial badge) into a full config, or
1176
+ * null when the badge is off. */
1177
+ declare function normalizeHalt(prop: boolean | HaltBadge | undefined): HaltBadgeData | null;
1109
1178
  interface SessionColors {
1110
1179
  premarket: string;
1111
1180
  afterhours: string;
@@ -1113,4 +1182,4 @@ interface SessionColors {
1113
1182
  declare const DEFAULT_SESSION_COLORS: SessionColors;
1114
1183
  declare function registerSonrIndicators(): void;
1115
1184
 
1116
- export { BRUSH_OVERLAY, type Bar, type BrandCorner, BrandMark, type BrandMarkProps, type BrushStyle, type BrushTool, CandleMenu, type CandleStyle, type CandleStyleOption, ChartHeader, type ChartHeaderProps, type ChartState, ChartToolbar, type CompareSpec, ConfirmDialog, DEFAULT_CANDLE_STYLES, DEFAULT_DRAWING_TOOLS, DEFAULT_INDICATOR_OPTIONS, DEFAULT_LABELS, DEFAULT_RANGES, DEFAULT_RESOLUTIONS, DEFAULT_SESSION_COLORS, DEFAULT_TIMEZONE, DEFAULT_TIMEZONES, type DataSource, DataWindow, type DrawingRow, type DrawingSnapshot, type DrawingSnapshotItem, DrawingTemplateStore, type DrawingTool, type DrawingToolOption, DrawingToolbar, EXTENDED_DRAWING_TOOLS, EXTENDED_OVERLAYS, FIB_EXTENSION_LEVELS, GoToDateDialog, IndicatorMenu, type IndicatorOption, type IndicatorRow, type IndicatorSpec, type Interval, type Labels, type Magnet, type MarketPhase, MarketStatus, type MarketStatusProps, NavControlBar, ObjectTree, type OrderLine, PALETTE, PATTERN_INDICATOR, type PatternMarker, type PriceLabels, type PriceLine, type PriceScale, PriceScaleMenu, type QuoteFormat, type RangeOption, type ResolutionOption, SERIES_INDICATOR, SESSION_INDICATOR, SHAPE_ELLIPSE, SHAPE_OVERLAYS, SHAPE_PRICE_RANGE, SHAPE_RECTANGLE, SHAPE_RISK_REWARD, SHAPE_TRIANGLE, SONR_TRADE_BOX, SaveLoadDialog, type SessionTint, SettingsModal, type ShortcutAction, SonrChart, type SonrChartHandle, type SonrChartProps, SonrChartShell, type SonrChartShellProps, type SymbolInfo, SymbolInfoDialog, SymbolSearch, type SymbolSearchResult, TEXT_OVERLAY, type TextData, type Theme, TimeframeBar, TimezoneMenu, type TimezoneOption, ToolbarButton, UNIT_MS, USER_DRAWING_GROUP, VWAP_INDICATOR, WATERMARK_INDICATOR, type WatermarkData, type WatermarkOptions, arrowHeadPoints, dateRangeLabel, downloadSnapshot, drawingLabel, ensureDefaultStyles, fibSequence, formatWithUnit, getCSSCustomProperty, getRegisteredTheme, getTimezoneApi, humanDuration, isChartState, isEditableTarget, marketStatus, mergeLabels, parseLocalDateTime, parseResolution, priceRangeLabel, registerExtendedDrawings, registerShapeOverlays, registerSonrIndicators, registerTextOverlay, registerTheme, registerTradeReview, resolutionLabel, resolutionMs, resolveShortcut, resolveThemeStyles, riskRewardStats, setCSSCustomProperty, themeStyles, timezoneLabel, toHeikinAshi, tradeBoxFigures };
1185
+ export { BRUSH_OVERLAY, type Bar, type BrandCorner, BrandMark, type BrandMarkProps, type BrushStyle, type BrushTool, CandleMenu, type CandleStyle, type CandleStyleOption, ChartHeader, type ChartHeaderProps, type ChartState, ChartToolbar, type CompareSpec, ConfirmDialog, DEFAULT_CANDLE_STYLES, DEFAULT_DRAWING_TOOLS, DEFAULT_HALT_BADGE, DEFAULT_INDICATOR_OPTIONS, DEFAULT_LABELS, DEFAULT_RANGES, DEFAULT_RESOLUTIONS, DEFAULT_SESSION_COLORS, DEFAULT_TIMEZONE, DEFAULT_TIMEZONES, DEFAULT_VOLUME_TREND_BARS, type DataSource, DataWindow, type DrawingRow, type DrawingSnapshot, type DrawingSnapshotItem, DrawingTemplateStore, type DrawingTool, type DrawingToolOption, DrawingToolbar, EXTENDED_DRAWING_TOOLS, EXTENDED_OVERLAYS, FIB_EXTENSION_LEVELS, GoToDateDialog, HALT_INDICATOR, type HaltBadge, type HaltBadgeData, IndicatorMenu, type IndicatorOption, type IndicatorRow, type IndicatorSpec, type Interval, type Labels, type Magnet, type MarketPhase, MarketStatus, type MarketStatusProps, NavControlBar, ObjectTree, type OrderLine, PALETTE, PATTERN_INDICATOR, type PatternMarker, type PriceLabels, type PriceLine, type PriceScale, PriceScaleMenu, type QuoteFormat, type RangeOption, type ResolutionOption, SERIES_INDICATOR, SESSION_INDICATOR, SHAPE_ELLIPSE, SHAPE_OVERLAYS, SHAPE_PRICE_RANGE, SHAPE_RECTANGLE, SHAPE_RISK_REWARD, SHAPE_TRIANGLE, SONR_TRADE_BOX, SaveLoadDialog, type SessionTint, SettingsModal, type ShortcutAction, SonrChart, type SonrChartHandle, type SonrChartProps, SonrChartShell, type SonrChartShellProps, type SymbolInfo, SymbolInfoDialog, SymbolSearch, type SymbolSearchResult, TEXT_OVERLAY, type TextData, type Theme, TimeframeBar, TimezoneMenu, type TimezoneOption, ToolbarButton, UNIT_MS, USER_DRAWING_GROUP, VOLUME_TREND_OPTION, VWAP_INDICATOR, type VolumeTrend, WATERMARK_INDICATOR, type WatermarkData, type WatermarkOptions, arrowHeadPoints, dateRangeLabel, downloadSnapshot, drawingLabel, ensureDefaultStyles, fibSequence, formatWithUnit, getCSSCustomProperty, getRegisteredTheme, getTimezoneApi, humanDuration, isChartState, isEditableTarget, marketStatus, mergeLabels, normalizeHalt, parseLocalDateTime, parseResolution, priceRangeLabel, registerExtendedDrawings, registerShapeOverlays, registerSonrIndicators, registerTextOverlay, registerTheme, registerTradeReview, resolutionLabel, resolutionMs, resolveShortcut, resolveThemeStyles, riskRewardStats, setCSSCustomProperty, themeStyles, timezoneLabel, toHeikinAshi, tradeBoxFigures, volumeTrend };