@luxalgo/vela 0.5.0 → 0.5.1

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.
Files changed (45) hide show
  1. package/dist/{DataProvider-DKNDHpNv.d.cts → DataProvider-BBQ3Hr21.d.cts} +1 -1
  2. package/dist/{DataProvider-Dzd-Erlk.d.ts → DataProvider-DGesjOJT.d.ts} +1 -1
  3. package/dist/{chunk-OVQKKXLZ.js → chunk-5SE4PL3H.js} +402 -60
  4. package/dist/{chunk-RHIDOUFL.js → chunk-AIW3EJUE.js} +2 -2
  5. package/dist/{chunk-GYD2THPV.js → chunk-EP6NDJYK.js} +5 -0
  6. package/dist/{chunk-KCCZNKH7.js → chunk-FNOMKHEZ.js} +668 -78
  7. package/dist/{chunk-7UFX5ZIG.js → chunk-S6F6SQ2L.js} +7 -2
  8. package/dist/{chunk-KM6LHB3Y.js → chunk-ULIX6AE2.js} +6 -1
  9. package/dist/{contributions-hX3EUyjG.d.ts → contributions-6N0rbrPC.d.ts} +46 -31
  10. package/dist/{contributions-o1GRKPI_.d.cts → contributions-BlV3kb0O.d.cts} +46 -31
  11. package/dist/{history-Dzxz-MQj.d.ts → history-BTd52YMA.d.ts} +10 -5
  12. package/dist/{history-LJkz4-sS.d.cts → history-DX3Zne3a.d.cts} +10 -5
  13. package/dist/index.cjs +680 -75
  14. package/dist/index.d.cts +37 -12
  15. package/dist/index.d.ts +37 -12
  16. package/dist/index.js +4 -4
  17. package/dist/{options-Q-576hIi.d.cts → options-DbQholFV.d.cts} +14 -0
  18. package/dist/{options-Q-576hIi.d.ts → options-DbQholFV.d.ts} +14 -0
  19. package/dist/{plugin-D94muTV-.d.cts → plugin-O34MbXf-.d.cts} +157 -7
  20. package/dist/{plugin-aGUD1epn.d.ts → plugin-TN3n-9YN.d.ts} +157 -7
  21. package/dist/plugin.cjs +5 -0
  22. package/dist/plugin.d.cts +4 -4
  23. package/dist/plugin.d.ts +4 -4
  24. package/dist/plugin.js +2 -2
  25. package/dist/providers/binance.d.cts +2 -2
  26. package/dist/providers/binance.d.ts +2 -2
  27. package/dist/providers/coinbase.d.cts +2 -2
  28. package/dist/providers/coinbase.d.ts +2 -2
  29. package/dist/providers/hyperliquid.d.cts +2 -2
  30. package/dist/providers/hyperliquid.d.ts +2 -2
  31. package/dist/ui.cjs +10 -0
  32. package/dist/ui.d.cts +1 -1
  33. package/dist/ui.d.ts +1 -1
  34. package/dist/ui.js +3 -3
  35. package/dist/vela.global.js +680 -75
  36. package/dist/vela.global.min.js +59 -28
  37. package/dist/widget.cjs +1081 -134
  38. package/dist/widget.d.cts +30 -16
  39. package/dist/widget.d.ts +30 -16
  40. package/dist/widget.js +9 -9
  41. package/dist/workspace.cjs +1372 -183
  42. package/dist/workspace.d.cts +66 -8
  43. package/dist/workspace.d.ts +66 -8
  44. package/dist/workspace.js +275 -37
  45. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { svg24, NEUTRAL, BEARISH, WARNING, BULLISH, INFO, ACCENT_BRIGHT, VALID, INVALID, MARKER, ACCENT, injectStyles, iconEl } from './chunk-GYD2THPV.js';
1
+ import { svg24, NEUTRAL, BEARISH, WARNING, BULLISH, INFO, ACCENT_BRIGHT, VALID, INVALID, MARKER, ACCENT, injectStyles, iconEl } from './chunk-EP6NDJYK.js';
2
2
 
3
3
  // src/core/native-indicators/NativeIndicator.ts
4
4
  var REGISTRY = /* @__PURE__ */ new Map();
@@ -5647,6 +5647,11 @@ registerDrawingType({
5647
5647
  });
5648
5648
 
5649
5649
  // src/chart-types/registry.ts
5650
+ function settingsRowVisible(when, bag) {
5651
+ if (!when) return true;
5652
+ const conds = Array.isArray(when) ? when : [when];
5653
+ return conds.every((c) => c.anyOf ? c.anyOf.some((x) => x === bag[c.key]) : bag[c.key] === c.equals);
5654
+ }
5650
5655
  var registry = /* @__PURE__ */ new Map();
5651
5656
  function registerChartType(def) {
5652
5657
  registry.set(def.id, def);
@@ -5973,4 +5978,4 @@ var SidePanel = class {
5973
5978
  }
5974
5979
  };
5975
5980
 
5976
- export { AnchoredVwap, ArrowMark, Callout, CalloutBase, Comment, DEDEKIND_CURVATURE_OPTIONS, DEFAULT_DRAWING_COLOR, DEFAULT_PANEL_MAX_WIDTH, DEFAULT_PANEL_MIN_WIDTH, DEFAULT_PANEL_ORDER, DEFAULT_PANEL_WIDTH, DIRECTION_OPTIONS, DedekindTessellation, Drawing, FibRatios, FibSpiral, FixedRangeVolumeProfile, GANN_SQUARE_ARCS, GLYPH_OPTIONS, GannSquare, GlyphStamp, LINE_STYLE_OPTIONS, MACH_NUMBER_OPTIONS, MACH_WAVE_COUNT_OPTIONS, MachFigure, MeasureBox, Note, PatternDrawing, PositionTool, PriceLabel, PriceNote, RadialFib, RegressionChannel, STAMP_SIZE_OPTIONS, SegmentDrawing, SidePanel, Signpost, TEXT_SIZE_OPTIONS, TextLabel, chartType, chartTypes, clampPanelWidth, createDrawing, deserializeDrawing, drawingTypes, formatDuration, getDrawingType, getNativeIndicator, legendActions, legendActionsProviderFor, lineSegmentIntersection, nativeIndicatorDescriptors, nativeIndicatorTypes, registerChartType, registerDefaultEngine, registerDrawingType, registerLegendAction, registerNativeIndicator, registerRendererDefaults, registerRendererLayer, registerSidePanel, registerWidgetAction, registerWidgetAttachment, rendererDefaults, rendererLayers, resetDrawingSettings, resolveEngines, sidePanels, tickerModifierIds, unregisterChartType, unregisterDefaultEngine, unregisterLegendAction, unregisterNativeIndicator, unregisterRendererDefaults, unregisterRendererLayer, unregisterSidePanel, unregisterWidgetAction, unregisterWidgetAttachment, widgetActions, widgetAttachments };
5981
+ export { AnchoredVwap, ArrowMark, Callout, CalloutBase, Comment, DEDEKIND_CURVATURE_OPTIONS, DEFAULT_DRAWING_COLOR, DEFAULT_PANEL_MAX_WIDTH, DEFAULT_PANEL_MIN_WIDTH, DEFAULT_PANEL_ORDER, DEFAULT_PANEL_WIDTH, DIRECTION_OPTIONS, DedekindTessellation, Drawing, FibRatios, FibSpiral, FixedRangeVolumeProfile, GANN_SQUARE_ARCS, GLYPH_OPTIONS, GannSquare, GlyphStamp, LINE_STYLE_OPTIONS, MACH_NUMBER_OPTIONS, MACH_WAVE_COUNT_OPTIONS, MachFigure, MeasureBox, Note, PatternDrawing, PositionTool, PriceLabel, PriceNote, RadialFib, RegressionChannel, STAMP_SIZE_OPTIONS, SegmentDrawing, SidePanel, Signpost, TEXT_SIZE_OPTIONS, TextLabel, chartType, chartTypes, clampPanelWidth, createDrawing, deserializeDrawing, drawingTypes, formatDuration, getDrawingType, getNativeIndicator, legendActions, legendActionsProviderFor, lineSegmentIntersection, nativeIndicatorDescriptors, nativeIndicatorTypes, registerChartType, registerDefaultEngine, registerDrawingType, registerLegendAction, registerNativeIndicator, registerRendererDefaults, registerRendererLayer, registerSidePanel, registerWidgetAction, registerWidgetAttachment, rendererDefaults, rendererLayers, resetDrawingSettings, resolveEngines, settingsRowVisible, sidePanels, tickerModifierIds, unregisterChartType, unregisterDefaultEngine, unregisterLegendAction, unregisterNativeIndicator, unregisterRendererDefaults, unregisterRendererLayer, unregisterSidePanel, unregisterWidgetAction, unregisterWidgetAttachment, widgetActions, widgetAttachments };
@@ -1,4 +1,4 @@
1
- import { isDarkColor, mix, HIGHLIGHT, ACCENT_BRIGHT, ACCENT, withAlpha } from './chunk-GYD2THPV.js';
1
+ import { isDarkColor, mix, HIGHLIGHT, ACCENT_BRIGHT, ACCENT, withAlpha } from './chunk-EP6NDJYK.js';
2
2
 
3
3
  // src/core/tokens.ts
4
4
  var STATIC_TOKENS = {
@@ -53,6 +53,11 @@ function themeTokens(t) {
53
53
  "--vela-hover-strong": wash(0.16),
54
54
  "--vela-focus": withAlpha(t.textColor, 0.5),
55
55
  "--vela-focus-soft": withAlpha(t.textColor, 0.12),
56
+ // Separator hover — the SAME wash the chart's pane separators paint on hover
57
+ // (soft full-thickness band + solid 2px center line), so DOM-drawn dividers
58
+ // (the workspace grid) and canvas-drawn ones read as one family.
59
+ "--vela-separator-hover-band": withAlpha(t.textColor, 0.1),
60
+ "--vela-separator-hover-line": withAlpha(t.textColor, 0.55),
56
61
  "--vela-scroll": withAlpha(t.textColor, 0.3),
57
62
  "--vela-accent": ACCENT,
58
63
  "--vela-accent-bright": ACCENT_BRIGHT,
@@ -1,5 +1,5 @@
1
- import { s as Millis, ab as InputSchema, aa as IndicatorMeta, P as PriceStyle, O as OHLCV, l as InputValue, j as IndicatorModel, i as MoveTarget, ax as SeriesSpec, a8 as Fill, B as Background, ap as PriceLine, _ as DrawingLine, W as DrawingBox, Z as DrawingLabel, a2 as DrawingPolyline, $ as DrawingLinefill, a4 as DrawingTable, f as IndicatorStatus, a as VisibleRange, c as VelaTheme, u as DrawingTypeKey, t as SnapMode, a0 as DrawingMode, I as IChartRenderer, R as RendererCapabilities, n as LegendActionView, U as Unsubscribe, C as CrosshairEvent, q as DataWindowReadout, m as SymbolPickerFn, aJ as PaneInfo, S as SerializedDrawing, a7 as DrawingsOption, D as Drawing, b as VelaOptions, A as AddIndicatorOptions, al as MarketSwitch, ak as MarketSnapshot, V as VisibleRangePreset, T as ThemeName } from './options-Q-576hIi.js';
2
- import { S as SymbolInfo, B as BarRange, M as MarketDataFeed, D as DataProvider, P as ProviderInfo, a as SymbolDescriptor, b as ProviderCapabilities } from './DataProvider-Dzd-Erlk.js';
1
+ import { s as Millis, ab as InputSchema, aa as IndicatorMeta, P as PriceStyle, O as OHLCV, l as InputValue, j as IndicatorModel, i as MoveTarget, ax as SeriesSpec, a8 as Fill, B as Background, ap as PriceLine, _ as DrawingLine, W as DrawingBox, Z as DrawingLabel, a2 as DrawingPolyline, $ as DrawingLinefill, a4 as DrawingTable, f as IndicatorStatus, a as VisibleRange, c as VelaTheme, S as SerializedDrawing, u as DrawingTypeKey, t as SnapMode, a0 as DrawingMode, I as IChartRenderer, R as RendererCapabilities, n as LegendActionView, U as Unsubscribe, C as CrosshairEvent, q as DataWindowReadout, m as SymbolPickerFn, aJ as PaneInfo, a7 as DrawingsOption, D as Drawing, b as VelaOptions, A as AddIndicatorOptions, al as MarketSwitch, ak as MarketSnapshot, V as VisibleRangePreset, T as ThemeName } from './options-DbQholFV.js';
2
+ import { S as SymbolInfo, B as BarRange, M as MarketDataFeed, D as DataProvider, P as ProviderInfo, a as SymbolDescriptor, b as ProviderCapabilities } from './DataProvider-DGesjOJT.js';
3
3
 
4
4
  /**
5
5
  * A strategy's broker state at ONE bar — the flat summary a host reads while a script
@@ -571,7 +571,7 @@ interface VelaEventMap extends Record<string, unknown> {
571
571
  * previous identity so hosts can re-key per-symbol state (e.g. swap user-drawing
572
572
  * documents between symbols).
573
573
  */
574
- 'market:changed': {
574
+ "market:changed": {
575
575
  symbol: string;
576
576
  timeframe: string;
577
577
  prev: {
@@ -587,7 +587,7 @@ interface VelaEventMap extends Record<string, unknown> {
587
587
  * their own visuals here. Exactly one `load:end` follows. A depth-only reload
588
588
  * (`bars`) keeps the chart painted and fires neither.
589
589
  */
590
- 'load:start': {
590
+ "load:start": {
591
591
  symbol: string;
592
592
  timeframe: string;
593
593
  firstLoad: boolean;
@@ -598,39 +598,39 @@ interface VelaEventMap extends Record<string, unknown> {
598
598
  * fetch, an empty market, or a parked symbol nothing serves). Counterpart of
599
599
  * `load:start`; plugins restore or rebuild their visuals here.
600
600
  */
601
- 'load:end': {
601
+ "load:end": {
602
602
  symbol: string;
603
603
  timeframe: string;
604
604
  bars: number;
605
605
  };
606
- 'indicator:added': {
606
+ "indicator:added": {
607
607
  id: string;
608
608
  };
609
- 'indicator:removed': {
609
+ "indicator:removed": {
610
610
  id: string;
611
611
  };
612
- 'indicator:error': {
612
+ "indicator:error": {
613
613
  id: string;
614
614
  error: Error;
615
615
  };
616
616
  /** No registered provider can serve the chart symbol — the load is PARKED, not failed:
617
617
  * it resumes by itself if a capable provider registers later. */
618
- 'data:unresolved': {
618
+ "data:unresolved": {
619
619
  symbol: string;
620
620
  providers: string[];
621
621
  };
622
622
  /** An indicator was moved/merged to another pane (`chart.panes` / legend / object tree). */
623
- 'indicator:moved': {
623
+ "indicator:moved": {
624
624
  id: string;
625
625
  paneId: string;
626
626
  };
627
627
  /** An indicator was shown/hidden (legend eye, `handle.setVisible`, or object tree). */
628
- 'indicator:visibility': {
628
+ "indicator:visibility": {
629
629
  id: string;
630
630
  visible: boolean;
631
631
  };
632
632
  /** A pane's layout changed: order, collapse/maximize, creation or removal. */
633
- 'pane:changed': undefined;
633
+ "pane:changed": undefined;
634
634
  /**
635
635
  * The app theme changed — `chart.setTheme(...)` or the in-chart settings dialog's
636
636
  * Canvas → Theme row. Payload is the RESOLVED theme; host chrome around the chart
@@ -638,53 +638,60 @@ interface VelaEventMap extends Record<string, unknown> {
638
638
  * cosmetic edits (`layout.background` through the config), which deliberately
639
639
  * leave the app theme alone.
640
640
  */
641
- 'theme:changed': VelaTheme;
641
+ "theme:changed": VelaTheme;
642
642
  /** A study pane was reordered one slot (`dir`) — carries enough to invert for undo/redo. */
643
- 'pane:moved': {
643
+ "pane:moved": {
644
644
  paneId: string;
645
- dir: 'up' | 'down';
645
+ dir: "up" | "down";
646
646
  };
647
647
  /** A user drawing was created (interactively or via `chart.drawings.add`). */
648
- 'drawing:created': {
648
+ "drawing:created": {
649
649
  id: string;
650
650
  };
651
+ /** An interactive placement is in progress — the ghost's current shape after each
652
+ * anchor click / cursor move, `null` when placement ends (finalized or
653
+ * cancelled). Transient: nothing is in the store yet. Multi-chart hosts mirror
654
+ * it on linked charts via `drawings.setExternalGhost`. */
655
+ "drawing:draft": {
656
+ doc: SerializedDrawing | null;
657
+ };
651
658
  /** A user drawing's anchors/style/text changed. */
652
- 'drawing:edited': {
659
+ "drawing:edited": {
653
660
  id: string;
654
661
  };
655
662
  /** Selection changed (`id` is null when nothing is selected). */
656
- 'drawing:selected': {
663
+ "drawing:selected": {
657
664
  id: string | null;
658
665
  };
659
666
  /** The favorite-tool set changed (star toggles or a bulk restore). */
660
- 'drawing:favorites': {
667
+ "drawing:favorites": {
661
668
  favorites: string[];
662
669
  };
663
670
  /** The armed drawing tool changed — toolbar click, one-shot tool finishing (back to
664
671
  * the pointer, `null`), or a programmatic `drawings.setTool`. */
665
- 'drawing:tool': {
672
+ "drawing:tool": {
666
673
  type: DrawingTypeKey | null;
667
674
  };
668
675
  /** The magnet snap mode changed (in-chart toolbar or `drawings.setSnapMode`). */
669
- 'drawing:snap': {
676
+ "drawing:snap": {
670
677
  mode: SnapMode;
671
678
  };
672
679
  /** Stay-in-drawing-mode changed (in-chart toolbar or `drawings.setStayMode`) — when
673
680
  * on, finishing a drawing leaves the tool armed. */
674
- 'drawing:stay': {
681
+ "drawing:stay": {
675
682
  on: boolean;
676
683
  };
677
684
  /** The renderer-local mode changed: measure ruler, eraser, or none — including the
678
685
  * mutual-exclusion exits (arming a tool leaves measure/eraser). */
679
- 'drawing:mode': {
686
+ "drawing:mode": {
680
687
  mode: DrawingMode;
681
688
  };
682
689
  /** A user drawing was removed. */
683
- 'drawing:removed': {
690
+ "drawing:removed": {
684
691
  id: string;
685
692
  };
686
693
  /** The user requested a drawing's settings popup. */
687
- 'drawing:settings': {
694
+ "drawing:settings": {
688
695
  id: string;
689
696
  };
690
697
  /**
@@ -695,11 +702,11 @@ interface VelaEventMap extends Record<string, unknown> {
695
702
  * indicator while streaming, and only emitted for engines that expose an execution
696
703
  * context. Native (core-computed) indicators never fire it — they run no script.
697
704
  */
698
- 'script:run': ScriptRun;
705
+ "script:run": ScriptRun;
699
706
  /** An indicator's execution context advanced (run finished, or throttled during
700
707
  * streaming) — re-pull `handle.context()` if you consume it. Prefer `script:run`,
701
708
  * which delivers the data rather than a signal to go fetch it. */
702
- 'context:changed': {
709
+ "context:changed": {
703
710
  id: string;
704
711
  };
705
712
  /** A live tick: the forming bar was updated or a new bar appended. */
@@ -709,12 +716,12 @@ interface VelaEventMap extends Record<string, unknown> {
709
716
  * debounced; the engine re-run debounce is separate). Payload = `{from, to}` in
710
717
  * epoch-ms. The seam viewport-sync links between charts build on.
711
718
  */
712
- 'viewport:changed': {
719
+ "viewport:changed": {
713
720
  from: number;
714
721
  to: number;
715
722
  };
716
723
  /** A deep-history backfill chunk landed (`loaded` of `target` bars are on the chart). */
717
- 'history:progress': {
724
+ "history:progress": {
718
725
  loaded: number;
719
726
  target: number;
720
727
  };
@@ -724,8 +731,8 @@ interface VelaEventMap extends Record<string, unknown> {
724
731
  * the data was non-monotonic — the chart keeps what loaded. Fires exactly once, including
725
732
  * for small/offline charts (immediately after their single load).
726
733
  */
727
- 'history:complete': {
728
- reason: 'depth' | 'genesis' | 'aborted';
734
+ "history:complete": {
735
+ reason: "depth" | "genesis" | "aborted";
729
736
  oldestTime: number;
730
737
  barsLoaded: number;
731
738
  };
@@ -1005,6 +1012,9 @@ declare class DrawingController {
1005
1012
  setFavorites(types: readonly DrawingTypeKey[]): void;
1006
1013
  private pushFavorites;
1007
1014
  setToolbar(option: DrawingsOption): void;
1015
+ /** Display (or clear) another chart's in-progress placement as a ghost — silently
1016
+ * inert on a renderer without the optional `setExternalGhost` seam. */
1017
+ setExternalGhost(doc: SerializedDrawing | null): void;
1008
1018
  /** Push per-tool shortcut hints (pre-formatted display strings) to the toolbar flyouts. */
1009
1019
  setToolShortcuts(map: Readonly<Partial<Record<DrawingTypeKey, string>>>): void;
1010
1020
  add(type: DrawingTypeKey, init?: AddInit): Drawing | null;
@@ -1108,6 +1118,11 @@ declare class DrawingsControl {
1108
1118
  * display strings (e.g. `'Alt+T'`, `'⌥T'`) — the host owns the keymap and the
1109
1119
  * platform formatting, so hints always match the host's actual bindings. */
1110
1120
  setToolShortcuts(map: Readonly<Partial<Record<DrawingTypeKey, string>>>): this;
1121
+ /** Display another chart's in-progress placement as a GHOST at reduced opacity
1122
+ * (`null` clears it) — how a multi-chart host mirrors `drawing:draft` onto linked
1123
+ * charts. Never a real drawing: no store entry, no selection, no persistence.
1124
+ * Silently inert on a renderer without the optional seam. */
1125
+ setExternalGhost(doc: SerializedDrawing | null): this;
1111
1126
  /** Create a drawing programmatically (no clicking). Returns it, or null if unsupported. */
1112
1127
  add(type: DrawingTypeKey, init?: AddInit): Drawing | null;
1113
1128
  remove(id: string): this;
@@ -1,5 +1,5 @@
1
- import { s as Millis, ab as InputSchema, aa as IndicatorMeta, P as PriceStyle, O as OHLCV, l as InputValue, j as IndicatorModel, i as MoveTarget, ax as SeriesSpec, a8 as Fill, B as Background, ap as PriceLine, _ as DrawingLine, W as DrawingBox, Z as DrawingLabel, a2 as DrawingPolyline, $ as DrawingLinefill, a4 as DrawingTable, f as IndicatorStatus, a as VisibleRange, c as VelaTheme, u as DrawingTypeKey, t as SnapMode, a0 as DrawingMode, I as IChartRenderer, R as RendererCapabilities, n as LegendActionView, U as Unsubscribe, C as CrosshairEvent, q as DataWindowReadout, m as SymbolPickerFn, aJ as PaneInfo, S as SerializedDrawing, a7 as DrawingsOption, D as Drawing, b as VelaOptions, A as AddIndicatorOptions, al as MarketSwitch, ak as MarketSnapshot, V as VisibleRangePreset, T as ThemeName } from './options-Q-576hIi.cjs';
2
- import { S as SymbolInfo, B as BarRange, M as MarketDataFeed, D as DataProvider, P as ProviderInfo, a as SymbolDescriptor, b as ProviderCapabilities } from './DataProvider-DKNDHpNv.cjs';
1
+ import { s as Millis, ab as InputSchema, aa as IndicatorMeta, P as PriceStyle, O as OHLCV, l as InputValue, j as IndicatorModel, i as MoveTarget, ax as SeriesSpec, a8 as Fill, B as Background, ap as PriceLine, _ as DrawingLine, W as DrawingBox, Z as DrawingLabel, a2 as DrawingPolyline, $ as DrawingLinefill, a4 as DrawingTable, f as IndicatorStatus, a as VisibleRange, c as VelaTheme, S as SerializedDrawing, u as DrawingTypeKey, t as SnapMode, a0 as DrawingMode, I as IChartRenderer, R as RendererCapabilities, n as LegendActionView, U as Unsubscribe, C as CrosshairEvent, q as DataWindowReadout, m as SymbolPickerFn, aJ as PaneInfo, a7 as DrawingsOption, D as Drawing, b as VelaOptions, A as AddIndicatorOptions, al as MarketSwitch, ak as MarketSnapshot, V as VisibleRangePreset, T as ThemeName } from './options-DbQholFV.cjs';
2
+ import { S as SymbolInfo, B as BarRange, M as MarketDataFeed, D as DataProvider, P as ProviderInfo, a as SymbolDescriptor, b as ProviderCapabilities } from './DataProvider-BBQ3Hr21.cjs';
3
3
 
4
4
  /**
5
5
  * A strategy's broker state at ONE bar — the flat summary a host reads while a script
@@ -571,7 +571,7 @@ interface VelaEventMap extends Record<string, unknown> {
571
571
  * previous identity so hosts can re-key per-symbol state (e.g. swap user-drawing
572
572
  * documents between symbols).
573
573
  */
574
- 'market:changed': {
574
+ "market:changed": {
575
575
  symbol: string;
576
576
  timeframe: string;
577
577
  prev: {
@@ -587,7 +587,7 @@ interface VelaEventMap extends Record<string, unknown> {
587
587
  * their own visuals here. Exactly one `load:end` follows. A depth-only reload
588
588
  * (`bars`) keeps the chart painted and fires neither.
589
589
  */
590
- 'load:start': {
590
+ "load:start": {
591
591
  symbol: string;
592
592
  timeframe: string;
593
593
  firstLoad: boolean;
@@ -598,39 +598,39 @@ interface VelaEventMap extends Record<string, unknown> {
598
598
  * fetch, an empty market, or a parked symbol nothing serves). Counterpart of
599
599
  * `load:start`; plugins restore or rebuild their visuals here.
600
600
  */
601
- 'load:end': {
601
+ "load:end": {
602
602
  symbol: string;
603
603
  timeframe: string;
604
604
  bars: number;
605
605
  };
606
- 'indicator:added': {
606
+ "indicator:added": {
607
607
  id: string;
608
608
  };
609
- 'indicator:removed': {
609
+ "indicator:removed": {
610
610
  id: string;
611
611
  };
612
- 'indicator:error': {
612
+ "indicator:error": {
613
613
  id: string;
614
614
  error: Error;
615
615
  };
616
616
  /** No registered provider can serve the chart symbol — the load is PARKED, not failed:
617
617
  * it resumes by itself if a capable provider registers later. */
618
- 'data:unresolved': {
618
+ "data:unresolved": {
619
619
  symbol: string;
620
620
  providers: string[];
621
621
  };
622
622
  /** An indicator was moved/merged to another pane (`chart.panes` / legend / object tree). */
623
- 'indicator:moved': {
623
+ "indicator:moved": {
624
624
  id: string;
625
625
  paneId: string;
626
626
  };
627
627
  /** An indicator was shown/hidden (legend eye, `handle.setVisible`, or object tree). */
628
- 'indicator:visibility': {
628
+ "indicator:visibility": {
629
629
  id: string;
630
630
  visible: boolean;
631
631
  };
632
632
  /** A pane's layout changed: order, collapse/maximize, creation or removal. */
633
- 'pane:changed': undefined;
633
+ "pane:changed": undefined;
634
634
  /**
635
635
  * The app theme changed — `chart.setTheme(...)` or the in-chart settings dialog's
636
636
  * Canvas → Theme row. Payload is the RESOLVED theme; host chrome around the chart
@@ -638,53 +638,60 @@ interface VelaEventMap extends Record<string, unknown> {
638
638
  * cosmetic edits (`layout.background` through the config), which deliberately
639
639
  * leave the app theme alone.
640
640
  */
641
- 'theme:changed': VelaTheme;
641
+ "theme:changed": VelaTheme;
642
642
  /** A study pane was reordered one slot (`dir`) — carries enough to invert for undo/redo. */
643
- 'pane:moved': {
643
+ "pane:moved": {
644
644
  paneId: string;
645
- dir: 'up' | 'down';
645
+ dir: "up" | "down";
646
646
  };
647
647
  /** A user drawing was created (interactively or via `chart.drawings.add`). */
648
- 'drawing:created': {
648
+ "drawing:created": {
649
649
  id: string;
650
650
  };
651
+ /** An interactive placement is in progress — the ghost's current shape after each
652
+ * anchor click / cursor move, `null` when placement ends (finalized or
653
+ * cancelled). Transient: nothing is in the store yet. Multi-chart hosts mirror
654
+ * it on linked charts via `drawings.setExternalGhost`. */
655
+ "drawing:draft": {
656
+ doc: SerializedDrawing | null;
657
+ };
651
658
  /** A user drawing's anchors/style/text changed. */
652
- 'drawing:edited': {
659
+ "drawing:edited": {
653
660
  id: string;
654
661
  };
655
662
  /** Selection changed (`id` is null when nothing is selected). */
656
- 'drawing:selected': {
663
+ "drawing:selected": {
657
664
  id: string | null;
658
665
  };
659
666
  /** The favorite-tool set changed (star toggles or a bulk restore). */
660
- 'drawing:favorites': {
667
+ "drawing:favorites": {
661
668
  favorites: string[];
662
669
  };
663
670
  /** The armed drawing tool changed — toolbar click, one-shot tool finishing (back to
664
671
  * the pointer, `null`), or a programmatic `drawings.setTool`. */
665
- 'drawing:tool': {
672
+ "drawing:tool": {
666
673
  type: DrawingTypeKey | null;
667
674
  };
668
675
  /** The magnet snap mode changed (in-chart toolbar or `drawings.setSnapMode`). */
669
- 'drawing:snap': {
676
+ "drawing:snap": {
670
677
  mode: SnapMode;
671
678
  };
672
679
  /** Stay-in-drawing-mode changed (in-chart toolbar or `drawings.setStayMode`) — when
673
680
  * on, finishing a drawing leaves the tool armed. */
674
- 'drawing:stay': {
681
+ "drawing:stay": {
675
682
  on: boolean;
676
683
  };
677
684
  /** The renderer-local mode changed: measure ruler, eraser, or none — including the
678
685
  * mutual-exclusion exits (arming a tool leaves measure/eraser). */
679
- 'drawing:mode': {
686
+ "drawing:mode": {
680
687
  mode: DrawingMode;
681
688
  };
682
689
  /** A user drawing was removed. */
683
- 'drawing:removed': {
690
+ "drawing:removed": {
684
691
  id: string;
685
692
  };
686
693
  /** The user requested a drawing's settings popup. */
687
- 'drawing:settings': {
694
+ "drawing:settings": {
688
695
  id: string;
689
696
  };
690
697
  /**
@@ -695,11 +702,11 @@ interface VelaEventMap extends Record<string, unknown> {
695
702
  * indicator while streaming, and only emitted for engines that expose an execution
696
703
  * context. Native (core-computed) indicators never fire it — they run no script.
697
704
  */
698
- 'script:run': ScriptRun;
705
+ "script:run": ScriptRun;
699
706
  /** An indicator's execution context advanced (run finished, or throttled during
700
707
  * streaming) — re-pull `handle.context()` if you consume it. Prefer `script:run`,
701
708
  * which delivers the data rather than a signal to go fetch it. */
702
- 'context:changed': {
709
+ "context:changed": {
703
710
  id: string;
704
711
  };
705
712
  /** A live tick: the forming bar was updated or a new bar appended. */
@@ -709,12 +716,12 @@ interface VelaEventMap extends Record<string, unknown> {
709
716
  * debounced; the engine re-run debounce is separate). Payload = `{from, to}` in
710
717
  * epoch-ms. The seam viewport-sync links between charts build on.
711
718
  */
712
- 'viewport:changed': {
719
+ "viewport:changed": {
713
720
  from: number;
714
721
  to: number;
715
722
  };
716
723
  /** A deep-history backfill chunk landed (`loaded` of `target` bars are on the chart). */
717
- 'history:progress': {
724
+ "history:progress": {
718
725
  loaded: number;
719
726
  target: number;
720
727
  };
@@ -724,8 +731,8 @@ interface VelaEventMap extends Record<string, unknown> {
724
731
  * the data was non-monotonic — the chart keeps what loaded. Fires exactly once, including
725
732
  * for small/offline charts (immediately after their single load).
726
733
  */
727
- 'history:complete': {
728
- reason: 'depth' | 'genesis' | 'aborted';
734
+ "history:complete": {
735
+ reason: "depth" | "genesis" | "aborted";
729
736
  oldestTime: number;
730
737
  barsLoaded: number;
731
738
  };
@@ -1005,6 +1012,9 @@ declare class DrawingController {
1005
1012
  setFavorites(types: readonly DrawingTypeKey[]): void;
1006
1013
  private pushFavorites;
1007
1014
  setToolbar(option: DrawingsOption): void;
1015
+ /** Display (or clear) another chart's in-progress placement as a ghost — silently
1016
+ * inert on a renderer without the optional `setExternalGhost` seam. */
1017
+ setExternalGhost(doc: SerializedDrawing | null): void;
1008
1018
  /** Push per-tool shortcut hints (pre-formatted display strings) to the toolbar flyouts. */
1009
1019
  setToolShortcuts(map: Readonly<Partial<Record<DrawingTypeKey, string>>>): void;
1010
1020
  add(type: DrawingTypeKey, init?: AddInit): Drawing | null;
@@ -1108,6 +1118,11 @@ declare class DrawingsControl {
1108
1118
  * display strings (e.g. `'Alt+T'`, `'⌥T'`) — the host owns the keymap and the
1109
1119
  * platform formatting, so hints always match the host's actual bindings. */
1110
1120
  setToolShortcuts(map: Readonly<Partial<Record<DrawingTypeKey, string>>>): this;
1121
+ /** Display another chart's in-progress placement as a GHOST at reduced opacity
1122
+ * (`null` clears it) — how a multi-chart host mirrors `drawing:draft` onto linked
1123
+ * charts. Never a real drawing: no store entry, no selection, no persistence.
1124
+ * Silently inert on a renderer without the optional seam. */
1125
+ setExternalGhost(doc: SerializedDrawing | null): this;
1111
1126
  /** Create a drawing programmatically (no clicking). Returns it, or null if unsupported. */
1112
1127
  add(type: DrawingTypeKey, init?: AddInit): Drawing | null;
1113
1128
  remove(id: string): this;
@@ -1,6 +1,6 @@
1
- import { V as VisibleRangePreset } from './options-Q-576hIi.js';
2
- import { D as DataProvider } from './DataProvider-Dzd-Erlk.js';
3
- import { S as ScriptingEngine, V as Vela } from './contributions-hX3EUyjG.js';
1
+ import { V as VisibleRangePreset } from './options-DbQholFV.js';
2
+ import { D as DataProvider } from './DataProvider-DGesjOJT.js';
3
+ import { S as ScriptingEngine, V as Vela } from './contributions-6N0rbrPC.js';
4
4
 
5
5
  interface RangePreset {
6
6
  /** Button label. */
@@ -85,8 +85,12 @@ declare function resolveIndicators(config: string | IndicatorManifest | Indicato
85
85
 
86
86
  /** The linkable dimensions. `crosshair` mirrors the pointer time onto same-group
87
87
  * cells as GHOST crosshairs (renderers without the optional `setExternalCrosshair`
88
- * seam simply never display one). */
89
- type SyncKind = 'viewport' | 'symbol' | 'timeframe' | 'crosshair';
88
+ * seam simply never display one). `drawings` copies each NEWLY CREATED drawing onto
89
+ * same-group cells and keeps the set linked: edits and removals of any member
90
+ * follow. Link membership is session-scoped and survives a toggle-off (re-enabling
91
+ * resumes edit/delete for drawings paired earlier; drawings created while off stay
92
+ * independent). After a reload, every drawing is unpaired again. */
93
+ type SyncKind = 'viewport' | 'symbol' | 'timeframe' | 'crosshair' | 'drawings';
90
94
  /**
91
95
  * One link's configuration: `false`/absent = off; `true` = ALL cells linked (one
92
96
  * implicit group); a record maps cell id → group name, and only cells sharing a group
@@ -98,6 +102,7 @@ interface SyncOptions {
98
102
  symbol?: SyncSetting;
99
103
  timeframe?: SyncSetting;
100
104
  crosshair?: SyncSetting;
105
+ drawings?: SyncSetting;
101
106
  }
102
107
  /** Splitter track weights along each grid axis. */
103
108
  interface TrackSizes {
@@ -1,6 +1,6 @@
1
- import { V as VisibleRangePreset } from './options-Q-576hIi.cjs';
2
- import { D as DataProvider } from './DataProvider-DKNDHpNv.cjs';
3
- import { S as ScriptingEngine, V as Vela } from './contributions-o1GRKPI_.cjs';
1
+ import { V as VisibleRangePreset } from './options-DbQholFV.cjs';
2
+ import { D as DataProvider } from './DataProvider-BBQ3Hr21.cjs';
3
+ import { S as ScriptingEngine, V as Vela } from './contributions-BlV3kb0O.cjs';
4
4
 
5
5
  interface RangePreset {
6
6
  /** Button label. */
@@ -85,8 +85,12 @@ declare function resolveIndicators(config: string | IndicatorManifest | Indicato
85
85
 
86
86
  /** The linkable dimensions. `crosshair` mirrors the pointer time onto same-group
87
87
  * cells as GHOST crosshairs (renderers without the optional `setExternalCrosshair`
88
- * seam simply never display one). */
89
- type SyncKind = 'viewport' | 'symbol' | 'timeframe' | 'crosshair';
88
+ * seam simply never display one). `drawings` copies each NEWLY CREATED drawing onto
89
+ * same-group cells and keeps the set linked: edits and removals of any member
90
+ * follow. Link membership is session-scoped and survives a toggle-off (re-enabling
91
+ * resumes edit/delete for drawings paired earlier; drawings created while off stay
92
+ * independent). After a reload, every drawing is unpaired again. */
93
+ type SyncKind = 'viewport' | 'symbol' | 'timeframe' | 'crosshair' | 'drawings';
90
94
  /**
91
95
  * One link's configuration: `false`/absent = off; `true` = ALL cells linked (one
92
96
  * implicit group); a record maps cell id → group name, and only cells sharing a group
@@ -98,6 +102,7 @@ interface SyncOptions {
98
102
  symbol?: SyncSetting;
99
103
  timeframe?: SyncSetting;
100
104
  crosshair?: SyncSetting;
105
+ drawings?: SyncSetting;
101
106
  }
102
107
  /** Splitter track weights along each grid axis. */
103
108
  interface TrackSizes {