@luxalgo/vela 0.5.0 → 0.5.2

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-Dzd-Erlk.d.ts → DataProvider-DTOEXKTI.d.ts} +1 -1
  2. package/dist/{DataProvider-DKNDHpNv.d.cts → DataProvider-gnzv-dgc.d.cts} +1 -1
  3. package/dist/{chunk-KM6LHB3Y.js → chunk-ATPU5CI6.js} +6 -1
  4. package/dist/{chunk-7UFX5ZIG.js → chunk-B5TIKQJ5.js} +65 -7
  5. package/dist/{chunk-GYD2THPV.js → chunk-LJLZR44Y.js} +9 -2
  6. package/dist/{chunk-RHIDOUFL.js → chunk-P556H6EA.js} +329 -10
  7. package/dist/{chunk-KCCZNKH7.js → chunk-RRFGWZNJ.js} +1915 -367
  8. package/dist/{chunk-OVQKKXLZ.js → chunk-Y7TK4ZWK.js} +1810 -153
  9. package/dist/{contributions-o1GRKPI_.d.cts → contributions-Ci_i3IN2.d.cts} +77 -31
  10. package/dist/{contributions-hX3EUyjG.d.ts → contributions-b6AVrqqG.d.ts} +77 -31
  11. package/dist/{history-LJkz4-sS.d.cts → history-Cf1lVsap.d.cts} +22 -5
  12. package/dist/{history-Dzxz-MQj.d.ts → history-Ci3M0xLV.d.ts} +22 -5
  13. package/dist/index.cjs +2010 -397
  14. package/dist/index.d.cts +83 -25
  15. package/dist/index.d.ts +83 -25
  16. package/dist/index.js +4 -4
  17. package/dist/{options-Q-576hIi.d.cts → options-XTBpbx0s.d.cts} +61 -1
  18. package/dist/{options-Q-576hIi.d.ts → options-XTBpbx0s.d.ts} +61 -1
  19. package/dist/{plugin-aGUD1epn.d.ts → plugin-CnNd7cuF.d.ts} +305 -8
  20. package/dist/{plugin-D94muTV-.d.cts → plugin-DfH4Y-Om.d.cts} +305 -8
  21. package/dist/plugin.cjs +58 -7
  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 +342 -9
  32. package/dist/ui.d.cts +64 -2
  33. package/dist/ui.d.ts +64 -2
  34. package/dist/ui.js +3 -3
  35. package/dist/vela.global.js +2010 -397
  36. package/dist/vela.global.min.js +115 -34
  37. package/dist/widget.cjs +5987 -2242
  38. package/dist/widget.d.cts +89 -17
  39. package/dist/widget.d.ts +89 -17
  40. package/dist/widget.js +169 -18
  41. package/dist/workspace.cjs +5627 -1587
  42. package/dist/workspace.d.cts +106 -12
  43. package/dist/workspace.d.ts +106 -12
  44. package/dist/workspace.js +494 -52
  45. package/package.json +1 -1
package/dist/index.d.cts CHANGED
@@ -1,9 +1,9 @@
1
- import { D as DrawingsDocument, R as Resolved } from './contributions-o1GRKPI_.cjs';
2
- export { B as BarsChangeReason, C as ContextSelect, b as DataControl, c as DrawingsControl, E as EngineAlert, d as EngineCapabilities, e as EngineContextSnapshot, f as EngineFactory, g as EngineWarning, h as ExecutionHandlers, i as ExecutionMarket, j as ExecutionRequest, k as ExecutionSession, F as FetchSeries, l as IndicatorEventMap, I as IndicatorHandle, m as IndicatorSummary, L as LegendActionDescriptor, n as LegendIndicatorInfo, N as NativeIndicator, o as NativeIndicatorContext, p as NativeIndicatorDescriptor, q as NativeIndicatorInfo, r as NativeIndicatorOutput, P as ParsedSymbol, s as PreparedScript, t as RendererControl, u as RunIndicatorResult, v as SceneInspection, a as ScriptRun, w as ScriptRunCause, x as ScriptRunResult, S as ScriptingEngine, y as SidePanelButton, z as SidePanelDescriptor, A as SidePanelHandle, G as SidePanelHeader, H as StrategyFill, J as StrategyState, K as StrategyTrade, T as TypedEventBus, V as Vela, M as VelaDeps, O as VelaEventMap, Q as VisibleBarRange, U as WidgetActionDescriptor, X as WidgetActionTarget, Y as WidgetAttachment, W as WidgetContext, Z as getNativeIndicator, _ as legendActions, $ as nativeIndicatorDescriptors, a0 as nativeIndicatorTypes, a1 as registerDefaultEngine, a2 as registerLegendAction, a3 as registerNativeIndicator, a4 as registerSidePanel, a5 as registerWidgetAction, a6 as registerWidgetAttachment, a7 as resolveEngines, a8 as sidePanels, a9 as unregisterDefaultEngine, aa as unregisterLegendAction, ab as unregisterNativeIndicator, ac as unregisterSidePanel, ad as unregisterWidgetAction, ae as unregisterWidgetAttachment, af as widgetActions, ag as widgetAttachments } from './contributions-o1GRKPI_.cjs';
3
- import { D as Drawing, S as SerializedDrawing, U as Unsubscribe, L as LineStyle, P as PriceStyle, I as IChartRenderer, R as RendererCapabilities, d as RendererDisplayOptions, e as IndicatorRenderHandle, f as IndicatorStatus, c as VelaTheme, O as OHLCV, g as Pane, h as PaneAction, i as MoveTarget, j as IndicatorModel, k as ScenePatch, l as InputValue, m as SymbolPickerFn, n as LegendActionView, o as InputChangeEvent, T as ThemeName, C as CrosshairEvent, p as ClickEvent, a as VisibleRange, q as DataWindowReadout, r as IDrawingsRendererPort, s as Millis, t as SnapMode, u as DrawingTypeKey, v as ToolbarDefinition, M as MarketConfig } from './options-Q-576hIi.cjs';
4
- export { A as AddIndicatorOptions, B as Background, w as BoxFontFamily, x as BoxHAlign, y as BoxTextSize, z as BoxVAlign, E as CandleBarColor, F as CandleSeries, G as CandleStyle, H as DataWindowGroup, J as DataWindowOHLC, K as DataWindowRow, Q as DirtyRange, W as DrawingBox, X as DrawingExtend, Y as DrawingIntent, Z as DrawingLabel, _ as DrawingLine, $ as DrawingLinefill, a0 as DrawingMode, a1 as DrawingPoint, a2 as DrawingPolyline, a3 as DrawingStyle, a4 as DrawingTable, a5 as DrawingText, a6 as DrawingXLoc, a7 as DrawingsOption, a8 as Fill, a9 as FillGradientStop, aa as IndicatorMeta, ab as InputSchema, ac as InputType, ad as LabelStyle, ae as LabelYLoc, af as LineLikeKind, ag as LineLikeSeries, ah as LineLikeStyle, ai as MarkerPoint, aj as MarkerSeries, ak as MarketSnapshot, al as MarketSwitch, am as PaneHint, an as PaneKind, ao as PolylinePoint, ap as PriceLine, aq as Projector, ar as ProviderName, as as RendererConstructor, at as Scene, au as SchemaPatch, av as SeriesKind, aw as SeriesPoint, ax as SeriesSpec, ay as SeriesValueDelta, az as SettingsField, aA as SettingsSchema, aB as TableCell, aC as TableMerge, aD as TablePosition, aE as ToolbarGroupConfig, aF as TradeExecution, aG as ValuePatch, b as VelaOptions, V as VisibleRangePreset, aH as buildToolbar, aI as defaultToolbar } from './options-Q-576hIi.cjs';
5
- import { M as MarketDataFeed, D as DataProvider, P as ProviderInfo, a as SymbolDescriptor, S as SymbolInfo, b as ProviderCapabilities, B as BarRange } from './DataProvider-DKNDHpNv.cjs';
6
- export { A as ACCENT, a as ACCENT_BRIGHT, B as BEARISH, b as BULLISH, c as BarTransform, C as CATEGORICAL, d as CROSSHAIR, e as ChartTypeDefinition, f as ChartTypeSettingsSection, D as DrawingTypeMeta, H as HIGHLIGHT, I as INFO, g as INVALID, h as IdentifiableKind, M as MARKER, N as NEUTRAL, R as RendererLayerArgs, i as RendererLayerDefinition, j as RendererLayerInstance, S as SERIES_LINE, k as SESSION_OFF, l as SESSION_POST, m as SESSION_PRE, n as SLATE, o as SLATE_DEEP, p as SeriesDataEngine, q as SeriesDataEngineHost, r as SettingsRowDescriptor, T as TRADE_EXIT, s as TRADE_LONG, t as TRADE_SHORT, V as VALID, W as WARNING, u as categoricalColor, v as chartType, w as chartTypes, x as createDrawing, y as deserializeDrawing, z as drawingTypes, E as getDrawingType, F as registerChartType, G as registerDrawingType, J as registerRendererDefaults, K as registerRendererLayer, L as rendererDefaults, O as rendererLayers, P as stableSeriesId, Q as tickerModifierIds, U as unregisterChartType, X as unregisterRendererDefaults, Y as unregisterRendererLayer } from './plugin-D94muTV-.cjs';
1
+ import { D as DrawingsDocument, R as Resolved } from './contributions-Ci_i3IN2.cjs';
2
+ export { B as BarsChangeReason, C as ContextSelect, b as DataControl, c as DrawingsControl, E as EngineAlert, d as EngineCapabilities, e as EngineContextSnapshot, f as EngineFactory, g as EngineWarning, h as ExecutionHandlers, i as ExecutionMarket, j as ExecutionRequest, k as ExecutionSession, F as FetchSeries, l as IndicatorEventMap, I as IndicatorHandle, m as IndicatorSummary, L as LegendActionDescriptor, n as LegendIndicatorInfo, N as NativeIndicator, o as NativeIndicatorContext, p as NativeIndicatorDescriptor, q as NativeIndicatorInfo, r as NativeIndicatorOutput, P as ParsedSymbol, s as PreparedScript, t as RendererControl, u as RunIndicatorResult, v as SceneInspection, a as ScriptRun, w as ScriptRunCause, x as ScriptRunResult, S as ScriptingEngine, y as SidePanelButton, z as SidePanelDescriptor, A as SidePanelHandle, G as SidePanelHeader, H as StrategyFill, J as StrategyState, K as StrategyTrade, T as TypedEventBus, V as Vela, M as VelaDeps, O as VelaEventMap, Q as VisibleBarRange, U as WidgetActionDescriptor, X as WidgetActionTarget, Y as WidgetAttachment, W as WidgetContext, Z as getNativeIndicator, _ as legendActions, $ as nativeIndicatorDescriptors, a0 as nativeIndicatorTypes, a1 as registerDefaultEngine, a2 as registerLegendAction, a3 as registerNativeIndicator, a4 as registerSidePanel, a5 as registerWidgetAction, a6 as registerWidgetAttachment, a7 as resolveEngines, a8 as sidePanels, a9 as unregisterDefaultEngine, aa as unregisterLegendAction, ab as unregisterNativeIndicator, ac as unregisterSidePanel, ad as unregisterWidgetAction, ae as unregisterWidgetAttachment, af as widgetActions, ag as widgetAttachments } from './contributions-Ci_i3IN2.cjs';
3
+ import { D as Drawing, S as SerializedDrawing, U as Unsubscribe, L as LineStyle, P as PriceStyle, I as IChartRenderer, R as RendererCapabilities, d as RendererDisplayOptions, e as IndicatorRenderHandle, f as IndicatorStatus, c as VelaTheme, O as OHLCV, g as Pane, h as PaneAction, i as MoveTarget, j as IndicatorModel, k as ScenePatch, l as InputValue, m as SymbolPickerFn, n as LegendActionView, o as InputChangeEvent, T as ThemeName, C as CrosshairEvent, p as ClickEvent, A as AxisLongPressEvent, a as VisibleRange, q as DataWindowReadout, r as IDrawingsRendererPort, s as Millis, t as SnapMode, u as DrawingTypeKey, v as ToolbarDefinition, M as MarketConfig } from './options-XTBpbx0s.cjs';
4
+ export { w as AddIndicatorOptions, B as Background, x as BoxFontFamily, y as BoxHAlign, z as BoxTextSize, E as BoxVAlign, F as CandleBarColor, G as CandleSeries, H as CandleStyle, J as DataWindowGroup, K as DataWindowOHLC, Q as DataWindowRow, W as DirtyRange, X as DrawingBox, Y as DrawingExtend, Z as DrawingIntent, _ as DrawingLabel, $ as DrawingLine, a0 as DrawingLinefill, a1 as DrawingMode, a2 as DrawingPoint, a3 as DrawingPolyline, a4 as DrawingStyle, a5 as DrawingTable, a6 as DrawingText, a7 as DrawingXLoc, a8 as DrawingsOption, a9 as Fill, aa as FillGradientStop, ab as IndicatorMeta, ac as InputSchema, ad as InputType, ae as LabelStyle, af as LabelYLoc, ag as LineLikeKind, ah as LineLikeSeries, ai as LineLikeStyle, aj as MarkerPoint, ak as MarkerSeries, al as MarketSnapshot, am as MarketSwitch, an as PaneHint, ao as PaneKind, ap as PolylinePoint, aq as PriceLine, ar as Projector, as as ProviderName, at as RendererConstructor, au as Scene, av as SchemaPatch, aw as SeriesKind, ax as SeriesPoint, ay as SeriesSpec, az as SeriesValueDelta, aA as SettingsField, aB as SettingsSchema, aC as TableCell, aD as TableMerge, aE as TablePosition, aF as ToolbarGroupConfig, aG as TradeExecution, aH as ValuePatch, b as VelaOptions, V as VisibleRangePreset, aI as buildToolbar, aJ as defaultToolbar } from './options-XTBpbx0s.cjs';
5
+ import { M as MarketDataFeed, D as DataProvider, P as ProviderInfo, a as SymbolDescriptor, S as SymbolInfo, b as ProviderCapabilities, B as BarRange } from './DataProvider-gnzv-dgc.cjs';
6
+ export { A as ACCENT, a as ACCENT_BRIGHT, B as BEARISH, b as BULLISH, c as BarTransform, d as BasePaintingModulation, C as CATEGORICAL, e as CROSSHAIR, f as ChartTypeDefinition, g as ChartTypeSettingsInstance, h as ChartTypeSettingsSection, i as ChartTypeSettingsSubsection, D as DrawingTypeMeta, H as HIGHLIGHT, I as INFO, j as INVALID, k as IdentifiableKind, M as MARKER, N as NEUTRAL, l as NormalizedSettingsRow, R as RendererLayerArgs, m as RendererLayerDefinition, n as RendererLayerInstance, S as SERIES_LINE, o as SESSION_OFF, p as SESSION_POST, q as SESSION_PRE, r as SLATE, s as SLATE_DEEP, t as SeriesDataEngine, u as SeriesDataEngineHost, v as SettingsInlineControl, w as SettingsRowCondition, x as SettingsRowDescriptor, y as SettingsRowInlineNumber, z as SettingsRowSwatch, E as SettingsRowValueKey, F as SettingsRowWhen, G as SettingsRowWidth, J as SettingsSelectOption, K as SettingsValueRow, T as TRADE_EXIT, L as TRADE_LONG, O as TRADE_SHORT, V as VALID, W as WARNING, P as categoricalColor, Q as chartType, U as chartTypes, X as createDrawing, Y as deserializeDrawing, Z as drawingTypes, _ as getDrawingType, $ as normalizeSettingsRow, a0 as registerChartType, a1 as registerDrawingType, a2 as registerRendererDefaults, a3 as registerRendererLayer, a4 as rendererDefaults, a5 as rendererLayers, a6 as settingsRowValueKeys, a7 as stableSeriesId, a8 as tickerModifierIds, a9 as unregisterChartType, aa as unregisterRendererDefaults, ab as unregisterRendererLayer } from './plugin-DfH4Y-Om.cjs';
7
7
  export { D as DEFAULT_PANEL_MAX_WIDTH, a as DEFAULT_PANEL_MIN_WIDTH, b as DEFAULT_PANEL_WIDTH, S as SidePanelOptions, c as clampPanelWidth } from './side-panel-CT9ZwIGz.cjs';
8
8
  export { i as iconMarkup, r as registerIcon } from './icons-BZYbJXSV.cjs';
9
9
  export { a as KeyBindingDescriptor, R as ResolvedBinding } from './keymap-CGOz5F5f.cjs';
@@ -346,8 +346,12 @@ declare class NativeRenderer implements IChartRenderer {
346
346
  private symbolPicker;
347
347
  /** Indicator titles (the legend rows) shown — held here so a remount re-applies it. */
348
348
  private indicatorTitlesOn;
349
+ /** Plot values beside the legend titles shown — held here so a remount re-applies it. */
350
+ private indicatorValuesOn;
349
351
  /** Host-contributed legend actions — held here so a rebuild of the legend re-wires them. */
350
352
  private legendActionsProvider;
353
+ /** Host override of the legend's fold toggle — held here so a remount re-applies it. */
354
+ private legendOverviewAction;
351
355
  private keyboard;
352
356
  private keyboardEnabled;
353
357
  /** Drawings layer self-serves Ctrl+Z/Y (see the `historyChords` feature). */
@@ -412,6 +416,7 @@ declare class NativeRenderer implements IChartRenderer {
412
416
  private scrollTargetRO;
413
417
  private scrollBtnBottomPx;
414
418
  private scrollBtnRightPx;
419
+ private layoutMode;
415
420
  private readonly viewportCbs;
416
421
  private readonly crosshairCbs;
417
422
  private readonly chartTypeSettingsCbs;
@@ -422,6 +427,7 @@ declare class NativeRenderer implements IChartRenderer {
422
427
  private factoryConfig;
423
428
  private hostSettingsSections;
424
429
  private readonly clickCbs;
430
+ private readonly axisLongPressCbs;
425
431
  private readonly inputChangeCbs;
426
432
  private readonly removeIndicatorCbs;
427
433
  private readonly toggleVisibleCbs;
@@ -500,7 +506,10 @@ declare class NativeRenderer implements IChartRenderer {
500
506
  * so moving onto the button doesn't count as leaving). */
501
507
  private readonly onScrollProximityMove;
502
508
  private readonly onScrollProximityLeave;
503
- /** Show the button only when the latest bar is scrolled off the right edge AND the cursor is nearby. */
509
+ /** Show the button only when the latest bar is scrolled off the right edge. On desktop the
510
+ * cursor must also be nearby (hover reveal); on mobile — no hovering cursor — the button
511
+ * appears whenever the latest bars are off-screen and hides again once the view is back
512
+ * at the right edge. */
504
513
  private updateScrollToRealtimeButton;
505
514
  /** Glide the view back to the most recent bars, keeping the current zoom (barSpacing). */
506
515
  private scrollToRealtime;
@@ -508,17 +517,20 @@ declare class NativeRenderer implements IChartRenderer {
508
517
  * instant when pan animation is off. Shared by scroll-to-latest and panBy. */
509
518
  private glideRightOffset;
510
519
  /**
511
- * Export the current chart as a PNG data URL by compositing the geometry (L0)
512
- * + chrome (L1) + user-drawings (L1.5) canvases onto an offscreen canvas. The
513
- * background is filled first (the canvas2d data layer is transparent — its bg
514
- * lives on the wrapper), and a fresh synchronous paint runs first so the WebGL2
515
- * backend's (non-preserved) drawing buffer is populated before it's read back
516
- * this tick the same paint also repaints the drawings layers, so they're
517
- * current (interleaved drawings are already inside the data composite). They're
518
- * drawn bottom-up in DOM stacking order so the front user drawings (trend lines,
519
- * boxes, etc.) sit above the Pine drawings on the chrome layer, matching what's
520
- * on screen. The crosshair (L2) and DOM overlays (tables, legend) are
521
- * intentionally excluded.
520
+ * Export the current chart as a PNG data URL by compositing EVERY plot canvas onto
521
+ * an offscreen canvas, in the same stacking order the DOM shows: plugin layers
522
+ * below the data, geometry (L0), volume columns (L0.25), the visible-range volume
523
+ * profile (L0.6), plugin layers above the data, chrome (L1), and user drawings
524
+ * (L1.5). The background is filled first (the canvas2d data layer is transparent —
525
+ * its bg lives on the wrapper), and a fresh synchronous paint runs first so the
526
+ * WebGL2 backend's (non-preserved) drawing buffer is populated before it's read
527
+ * back this tick the same paint also repaints the drawings layers, so they're
528
+ * current. DOM chrome joins as a best-effort text/chip raster (see
529
+ * `rasterizeOverlay`): the per-pane indicator legends, plus any host overlay that
530
+ * opts in with a `data-vela-screenshot` attribute on the mount container's
531
+ * subtree (the widget marks its status line, and its symbol watermark with
532
+ * `"under"` — drawn beneath the canvases, where it sits on screen). Only the
533
+ * crosshair (L2) is intentionally excluded.
522
534
  */
523
535
  screenshot(): string | null;
524
536
  /**
@@ -543,6 +555,10 @@ declare class NativeRenderer implements IChartRenderer {
543
555
  * but pinned to the stable surface background, text, and border, so custom plot cosmetics
544
556
  * never recolor the toolbar, gutters, or drawing UI chrome. */
545
557
  private chromeTheme;
558
+ /** The colors the axis-scale gutters (price + time) paint with: the LIVE chart background
559
+ * (`layout.background`) and its contrast-corrected text, so the scales read as part of the
560
+ * plot. Only the toolbar/dialog chrome stays on the stable app-theme surface. */
561
+ private axisSurface;
546
562
  mount(container: HTMLElement, theme: VelaTheme): void;
547
563
  /**
548
564
  * Create + mount the L0 geometry backend and return its canvas. Picks WebGL2
@@ -612,6 +628,8 @@ declare class NativeRenderer implements IChartRenderer {
612
628
  setIndicatorInputs(handle: IndicatorRenderHandle, values: Record<string, InputValue>): void;
613
629
  setSymbolPicker(picker: SymbolPickerFn | null): void;
614
630
  setLegendActions(provider: ((indicatorId: string) => LegendActionView[]) | null): void;
631
+ setLegendOverviewAction(action: (() => void) | null): void;
632
+ openIndicatorSettings(indicatorId: string): void;
615
633
  /**
616
634
  * Hide/show a mounted indicator. Hiding drops its model from the scene (so every paint path —
617
635
  * series, fills, drawings, tables, glow, data window — skips it) while keeping its z key and its
@@ -630,12 +648,18 @@ declare class NativeRenderer implements IChartRenderer {
630
648
  */
631
649
  private setPriceStyle;
632
650
  onRemoveIndicator(cb: (id: string) => void): Unsubscribe;
651
+ /** Port surface: the host shell's chrome size class. Mobile switches the renderer
652
+ * chrome to its touch-first presentation — fullscreen dialogs, no docked drawing
653
+ * toolbar (the shell provides its own picker), the scroll-to-latest button shown
654
+ * whenever the latest bars are off-screen (touch has no cursor proximity). */
655
+ setLayoutMode(mode: 'mobile' | 'desktop'): void;
633
656
  setSettingsSections(sections: HostSettingsSection[]): void;
634
657
  onChartTypeSettingsChange(cb: (typeId: string, values: Record<string, unknown>) => void): Unsubscribe;
635
658
  onConfigChanged(cb: () => void): Unsubscribe;
636
659
  onThemeSelect(cb: (theme: ThemeName) => void): Unsubscribe;
637
660
  onCrosshairMove(cb: (e: CrosshairEvent) => void): Unsubscribe;
638
661
  onClick(cb: (e: ClickEvent) => void): Unsubscribe;
662
+ onAxisLongPress(cb: (e: AxisLongPressEvent) => void): Unsubscribe;
639
663
  onViewportChange(cb: (range: VisibleRange) => void): Unsubscribe;
640
664
  getVisibleRange(): VisibleRange | null;
641
665
  setVisibleRange(range: VisibleRange): void;
@@ -673,6 +697,9 @@ declare class NativeRenderer implements IChartRenderer {
673
697
  private paneAtY;
674
698
  /** The pane node whose vertical bounds contain `y` (linear scan; panes don't overlap). */
675
699
  private paneNodeAtY;
700
+ /** The pane whose bounds sit closest to `y` — the forgiving fallback for points that
701
+ * fall BETWEEN bounds (separator gaps, the strip under the last pane). */
702
+ private nearestPaneToY;
676
703
  /** The scale window a gesture targets: a pane's master scale, or a merged indicator's
677
704
  * own scale column (resolved from the grabbed x). Both share the four scale fields. */
678
705
  private resolveScaleHolder;
@@ -740,7 +767,21 @@ declare class NativeRenderer implements IChartRenderer {
740
767
  private dataWindowOHLC;
741
768
  /** One group per indicator (name = indicator title), each with a row per drawable plot. */
742
769
  private dataWindowGroups;
770
+ /** One indicator's readout at bar `idx`: a row per drawable plot, formatted on its pane's scale. */
771
+ private dataWindowRowsFor;
772
+ /** The volume indicator's readout: the bar's volume, tinted with the layer's own direction
773
+ * colors. Hiding volume keeps its model in the scene (only the layer is suppressed — see
774
+ * `setIndicatorVisible`), so the hidden flag is checked here rather than by model absence. */
775
+ private volumeReadoutRows;
776
+ /** Refresh the plot values beside every legend title — the same readout the data window
777
+ * shows (crosshair bar, else the latest bar), pushed per paint. A hidden indicator has
778
+ * no scene model, so its row is absent from the map and its readout clears. */
779
+ private updateLegendValues;
743
780
  private renderFrame;
781
+ /** Repaint the SDK layers that opted into cursor tracking (their own canvas only). */
782
+ private repaintCursorLayers;
783
+ /** One frame's args for an SDK renderer layer (shared by the data + cursor paint paths). */
784
+ private extLayerArgs;
744
785
  /** Paint the below-data (L-1) + geometry (L0) + chrome (L1) layers from the current scene/coords. */
745
786
  private paintData;
746
787
  /** Build the data→pixel projector user drawings resolve their anchors through. */
@@ -838,10 +879,12 @@ declare class NativeRenderer implements IChartRenderer {
838
879
  private collapsedMasterMap;
839
880
  /** Reserve `px` of left gutter for the docked drawings toolbar (0 releases it) + re-lay-out the plot. */
840
881
  private setToolbarGutter;
841
- /** Publish the gutter on the mount container as `--vela-toolbar-gutter`, so host
842
- * overlays sharing that container (a status line, a custom legend) can anchor to
843
- * the plot's left edge without reaching into the renderer's DOM. */
844
- private publishToolbarGutter;
882
+ /** Publish the gutters on the mount container as `--vela-toolbar-gutter` (left,
883
+ * drawings toolbar) and `--vela-scale-gutter` (right, the full price-scale width
884
+ * incl. merged own-scale columns), so host overlays sharing that container (a
885
+ * status line, a watermark, a custom legend) can anchor to the plot's edges
886
+ * without reaching into the renderer's DOM. */
887
+ private publishGutters;
845
888
  /** The built-in mark, or the host's own when one is set. */
846
889
  private buildAttributionEl;
847
890
  /** Swap the mark in place — the content kind changed (built-in ↔ host-supplied). */
@@ -871,6 +914,11 @@ interface DrawingToolbarOptions {
871
914
  /** Collapse/expand notification — a docked host resizes its gutter reservation to
872
915
  * {@link TOOLBAR_COLLAPSED_WIDTH} / the full width (a static bar reflows on its own). */
873
916
  onCollapse?: (collapsed: boolean) => void;
917
+ /** When given, a drawings-sync toggle renders below the stay button: enabled, every
918
+ * NEWLY CREATED drawing is copied onto the other linked charts and the set stays
919
+ * linked — edits and removals follow (a multi-chart host's concern — a
920
+ * single-chart bar omits the callback and never shows it). */
921
+ onDrawingsSync?: (on: boolean) => void;
874
922
  }
875
923
  /**
876
924
  * The vertical drawing toolbar (renderer chrome), docked as a flush bar in the left gutter. Each
@@ -879,8 +927,10 @@ interface DrawingToolbarOptions {
879
927
  * cursor button returns to select/idle; measure/eraser modes sit at the bottom, and the magnet is a
880
928
  * cell whose chevron opens an Off/Weak/Strong menu (its icon toggles the last-used strength on/off).
881
929
  * Below the magnet, a stay-in-drawing-mode toggle keeps tools armed after each placement.
882
- * Hover and active tints are CSS-driven (`:hover` + `[data-active]`) so they never lag. Tooltips
883
- * appear after a 2s hover. Pure vanilla DOM on the host (a `pointer-events:auto` island).
930
+ * Hover and active tints are CSS-driven (`:hover` + `[data-active]`) so they never lag. Every
931
+ * icon carries a themed tooltip (the chrome default 700ms dwell); a group cell's tip names the
932
+ * tool its icon arms (the last-used one). Pure vanilla DOM on the host (a `pointer-events:auto`
933
+ * island).
884
934
  */
885
935
  declare class DrawingToolbar {
886
936
  private readonly host;
@@ -917,6 +967,8 @@ declare class DrawingToolbar {
917
967
  private eraserActive;
918
968
  private stayBtn;
919
969
  private stayActive;
970
+ private syncBtn;
971
+ private syncActive;
920
972
  private collapseBtn;
921
973
  private collapsed;
922
974
  private visible;
@@ -928,6 +980,7 @@ declare class DrawingToolbar {
928
980
  private readonly width;
929
981
  private readonly dock;
930
982
  private readonly onCollapse;
983
+ private readonly onDrawingsSync;
931
984
  constructor(host: HTMLElement, theme: VelaTheme, onArm: (type: DrawingTypeKey | null) => void, onMagnet?: (mode: SnapMode) => void, onMeasure?: () => void, onEraser?: () => void, onToggleFavorite?: (type: DrawingTypeKey, on: boolean) => void, onStayMode?: (on: boolean) => void, options?: DrawingToolbarOptions);
932
985
  /** Live divider/border ink — the option override, else the current theme's border
933
986
  * (so a theme swap re-inks the bar without a rebuild option). */
@@ -986,6 +1039,11 @@ declare class DrawingToolbar {
986
1039
  /** Reflect stay-in-drawing-mode externally without notifying back. */
987
1040
  setStayMode(on: boolean): void;
988
1041
  private paintStay;
1042
+ /** Toggle drawings sync on/off and notify the host. */
1043
+ private toggleDrawingsSync;
1044
+ /** Reflect drawings sync externally (e.g. set through the API) without notifying back. */
1045
+ setDrawingsSyncMode(on: boolean): void;
1046
+ private paintDrawingsSync;
989
1047
  /** Create the positioned flyout panel anchored to a cell, register it as open, and start the
990
1048
  * outside-dismiss. Callers fill it with items. */
991
1049
  private beginFlyout;
@@ -1186,4 +1244,4 @@ declare const DARK_THEME: VelaTheme;
1186
1244
  declare const LIGHT_THEME: VelaTheme;
1187
1245
  declare function resolveTheme(theme?: ThemeName | VelaTheme): VelaTheme;
1188
1246
 
1189
- export { BarRange, BarStore, CachingDataFeed, type ChartConfig, type ChartStyle, ClickEvent, CrosshairEvent, DARK_THEME, DataProvider, DataWindowReadout, Drawing, DrawingStore, DrawingToolbar, type DrawingToolbarOptions, DrawingTypeKey, DrawingsDocument, IChartRenderer, IDrawingsRendererPort, IndicatorModel, IndicatorRenderHandle, InputChangeEvent, InputValue, LIGHT_THEME, LineStyle, MarketConfig, MarketDataFeed, Millis, MultiProviderFeed, NativeRenderer, OHLCV, Pane, PriceStyle, ProviderCapabilities, ProviderInfo, RendererCapabilities, RendererDisplayOptions, Resolved, ScenePatch, SerializedDrawing, SnapMode, SymbolDescriptor, SymbolInfo, ThemeName, ToolbarDefinition, VelaTheme, VisibleRange, resolveTheme, sharedBarStore, timeframeToMs };
1247
+ export { AxisLongPressEvent, BarRange, BarStore, CachingDataFeed, type ChartConfig, type ChartStyle, ClickEvent, CrosshairEvent, DARK_THEME, DataProvider, DataWindowReadout, Drawing, DrawingStore, DrawingToolbar, type DrawingToolbarOptions, DrawingTypeKey, DrawingsDocument, IChartRenderer, IDrawingsRendererPort, IndicatorModel, IndicatorRenderHandle, InputChangeEvent, InputValue, LIGHT_THEME, LineStyle, MarketConfig, MarketDataFeed, Millis, MultiProviderFeed, NativeRenderer, OHLCV, Pane, PriceStyle, ProviderCapabilities, ProviderInfo, RendererCapabilities, RendererDisplayOptions, Resolved, ScenePatch, SerializedDrawing, SnapMode, SymbolDescriptor, SymbolInfo, ThemeName, ToolbarDefinition, VelaTheme, VisibleRange, resolveTheme, sharedBarStore, timeframeToMs };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { D as DrawingsDocument, R as Resolved } from './contributions-hX3EUyjG.js';
2
- export { B as BarsChangeReason, C as ContextSelect, b as DataControl, c as DrawingsControl, E as EngineAlert, d as EngineCapabilities, e as EngineContextSnapshot, f as EngineFactory, g as EngineWarning, h as ExecutionHandlers, i as ExecutionMarket, j as ExecutionRequest, k as ExecutionSession, F as FetchSeries, l as IndicatorEventMap, I as IndicatorHandle, m as IndicatorSummary, L as LegendActionDescriptor, n as LegendIndicatorInfo, N as NativeIndicator, o as NativeIndicatorContext, p as NativeIndicatorDescriptor, q as NativeIndicatorInfo, r as NativeIndicatorOutput, P as ParsedSymbol, s as PreparedScript, t as RendererControl, u as RunIndicatorResult, v as SceneInspection, a as ScriptRun, w as ScriptRunCause, x as ScriptRunResult, S as ScriptingEngine, y as SidePanelButton, z as SidePanelDescriptor, A as SidePanelHandle, G as SidePanelHeader, H as StrategyFill, J as StrategyState, K as StrategyTrade, T as TypedEventBus, V as Vela, M as VelaDeps, O as VelaEventMap, Q as VisibleBarRange, U as WidgetActionDescriptor, X as WidgetActionTarget, Y as WidgetAttachment, W as WidgetContext, Z as getNativeIndicator, _ as legendActions, $ as nativeIndicatorDescriptors, a0 as nativeIndicatorTypes, a1 as registerDefaultEngine, a2 as registerLegendAction, a3 as registerNativeIndicator, a4 as registerSidePanel, a5 as registerWidgetAction, a6 as registerWidgetAttachment, a7 as resolveEngines, a8 as sidePanels, a9 as unregisterDefaultEngine, aa as unregisterLegendAction, ab as unregisterNativeIndicator, ac as unregisterSidePanel, ad as unregisterWidgetAction, ae as unregisterWidgetAttachment, af as widgetActions, ag as widgetAttachments } from './contributions-hX3EUyjG.js';
3
- import { D as Drawing, S as SerializedDrawing, U as Unsubscribe, L as LineStyle, P as PriceStyle, I as IChartRenderer, R as RendererCapabilities, d as RendererDisplayOptions, e as IndicatorRenderHandle, f as IndicatorStatus, c as VelaTheme, O as OHLCV, g as Pane, h as PaneAction, i as MoveTarget, j as IndicatorModel, k as ScenePatch, l as InputValue, m as SymbolPickerFn, n as LegendActionView, o as InputChangeEvent, T as ThemeName, C as CrosshairEvent, p as ClickEvent, a as VisibleRange, q as DataWindowReadout, r as IDrawingsRendererPort, s as Millis, t as SnapMode, u as DrawingTypeKey, v as ToolbarDefinition, M as MarketConfig } from './options-Q-576hIi.js';
4
- export { A as AddIndicatorOptions, B as Background, w as BoxFontFamily, x as BoxHAlign, y as BoxTextSize, z as BoxVAlign, E as CandleBarColor, F as CandleSeries, G as CandleStyle, H as DataWindowGroup, J as DataWindowOHLC, K as DataWindowRow, Q as DirtyRange, W as DrawingBox, X as DrawingExtend, Y as DrawingIntent, Z as DrawingLabel, _ as DrawingLine, $ as DrawingLinefill, a0 as DrawingMode, a1 as DrawingPoint, a2 as DrawingPolyline, a3 as DrawingStyle, a4 as DrawingTable, a5 as DrawingText, a6 as DrawingXLoc, a7 as DrawingsOption, a8 as Fill, a9 as FillGradientStop, aa as IndicatorMeta, ab as InputSchema, ac as InputType, ad as LabelStyle, ae as LabelYLoc, af as LineLikeKind, ag as LineLikeSeries, ah as LineLikeStyle, ai as MarkerPoint, aj as MarkerSeries, ak as MarketSnapshot, al as MarketSwitch, am as PaneHint, an as PaneKind, ao as PolylinePoint, ap as PriceLine, aq as Projector, ar as ProviderName, as as RendererConstructor, at as Scene, au as SchemaPatch, av as SeriesKind, aw as SeriesPoint, ax as SeriesSpec, ay as SeriesValueDelta, az as SettingsField, aA as SettingsSchema, aB as TableCell, aC as TableMerge, aD as TablePosition, aE as ToolbarGroupConfig, aF as TradeExecution, aG as ValuePatch, b as VelaOptions, V as VisibleRangePreset, aH as buildToolbar, aI as defaultToolbar } from './options-Q-576hIi.js';
5
- import { M as MarketDataFeed, D as DataProvider, P as ProviderInfo, a as SymbolDescriptor, S as SymbolInfo, b as ProviderCapabilities, B as BarRange } from './DataProvider-Dzd-Erlk.js';
6
- export { A as ACCENT, a as ACCENT_BRIGHT, B as BEARISH, b as BULLISH, c as BarTransform, C as CATEGORICAL, d as CROSSHAIR, e as ChartTypeDefinition, f as ChartTypeSettingsSection, D as DrawingTypeMeta, H as HIGHLIGHT, I as INFO, g as INVALID, h as IdentifiableKind, M as MARKER, N as NEUTRAL, R as RendererLayerArgs, i as RendererLayerDefinition, j as RendererLayerInstance, S as SERIES_LINE, k as SESSION_OFF, l as SESSION_POST, m as SESSION_PRE, n as SLATE, o as SLATE_DEEP, p as SeriesDataEngine, q as SeriesDataEngineHost, r as SettingsRowDescriptor, T as TRADE_EXIT, s as TRADE_LONG, t as TRADE_SHORT, V as VALID, W as WARNING, u as categoricalColor, v as chartType, w as chartTypes, x as createDrawing, y as deserializeDrawing, z as drawingTypes, E as getDrawingType, F as registerChartType, G as registerDrawingType, J as registerRendererDefaults, K as registerRendererLayer, L as rendererDefaults, O as rendererLayers, P as stableSeriesId, Q as tickerModifierIds, U as unregisterChartType, X as unregisterRendererDefaults, Y as unregisterRendererLayer } from './plugin-aGUD1epn.js';
1
+ import { D as DrawingsDocument, R as Resolved } from './contributions-b6AVrqqG.js';
2
+ export { B as BarsChangeReason, C as ContextSelect, b as DataControl, c as DrawingsControl, E as EngineAlert, d as EngineCapabilities, e as EngineContextSnapshot, f as EngineFactory, g as EngineWarning, h as ExecutionHandlers, i as ExecutionMarket, j as ExecutionRequest, k as ExecutionSession, F as FetchSeries, l as IndicatorEventMap, I as IndicatorHandle, m as IndicatorSummary, L as LegendActionDescriptor, n as LegendIndicatorInfo, N as NativeIndicator, o as NativeIndicatorContext, p as NativeIndicatorDescriptor, q as NativeIndicatorInfo, r as NativeIndicatorOutput, P as ParsedSymbol, s as PreparedScript, t as RendererControl, u as RunIndicatorResult, v as SceneInspection, a as ScriptRun, w as ScriptRunCause, x as ScriptRunResult, S as ScriptingEngine, y as SidePanelButton, z as SidePanelDescriptor, A as SidePanelHandle, G as SidePanelHeader, H as StrategyFill, J as StrategyState, K as StrategyTrade, T as TypedEventBus, V as Vela, M as VelaDeps, O as VelaEventMap, Q as VisibleBarRange, U as WidgetActionDescriptor, X as WidgetActionTarget, Y as WidgetAttachment, W as WidgetContext, Z as getNativeIndicator, _ as legendActions, $ as nativeIndicatorDescriptors, a0 as nativeIndicatorTypes, a1 as registerDefaultEngine, a2 as registerLegendAction, a3 as registerNativeIndicator, a4 as registerSidePanel, a5 as registerWidgetAction, a6 as registerWidgetAttachment, a7 as resolveEngines, a8 as sidePanels, a9 as unregisterDefaultEngine, aa as unregisterLegendAction, ab as unregisterNativeIndicator, ac as unregisterSidePanel, ad as unregisterWidgetAction, ae as unregisterWidgetAttachment, af as widgetActions, ag as widgetAttachments } from './contributions-b6AVrqqG.js';
3
+ import { D as Drawing, S as SerializedDrawing, U as Unsubscribe, L as LineStyle, P as PriceStyle, I as IChartRenderer, R as RendererCapabilities, d as RendererDisplayOptions, e as IndicatorRenderHandle, f as IndicatorStatus, c as VelaTheme, O as OHLCV, g as Pane, h as PaneAction, i as MoveTarget, j as IndicatorModel, k as ScenePatch, l as InputValue, m as SymbolPickerFn, n as LegendActionView, o as InputChangeEvent, T as ThemeName, C as CrosshairEvent, p as ClickEvent, A as AxisLongPressEvent, a as VisibleRange, q as DataWindowReadout, r as IDrawingsRendererPort, s as Millis, t as SnapMode, u as DrawingTypeKey, v as ToolbarDefinition, M as MarketConfig } from './options-XTBpbx0s.js';
4
+ export { w as AddIndicatorOptions, B as Background, x as BoxFontFamily, y as BoxHAlign, z as BoxTextSize, E as BoxVAlign, F as CandleBarColor, G as CandleSeries, H as CandleStyle, J as DataWindowGroup, K as DataWindowOHLC, Q as DataWindowRow, W as DirtyRange, X as DrawingBox, Y as DrawingExtend, Z as DrawingIntent, _ as DrawingLabel, $ as DrawingLine, a0 as DrawingLinefill, a1 as DrawingMode, a2 as DrawingPoint, a3 as DrawingPolyline, a4 as DrawingStyle, a5 as DrawingTable, a6 as DrawingText, a7 as DrawingXLoc, a8 as DrawingsOption, a9 as Fill, aa as FillGradientStop, ab as IndicatorMeta, ac as InputSchema, ad as InputType, ae as LabelStyle, af as LabelYLoc, ag as LineLikeKind, ah as LineLikeSeries, ai as LineLikeStyle, aj as MarkerPoint, ak as MarkerSeries, al as MarketSnapshot, am as MarketSwitch, an as PaneHint, ao as PaneKind, ap as PolylinePoint, aq as PriceLine, ar as Projector, as as ProviderName, at as RendererConstructor, au as Scene, av as SchemaPatch, aw as SeriesKind, ax as SeriesPoint, ay as SeriesSpec, az as SeriesValueDelta, aA as SettingsField, aB as SettingsSchema, aC as TableCell, aD as TableMerge, aE as TablePosition, aF as ToolbarGroupConfig, aG as TradeExecution, aH as ValuePatch, b as VelaOptions, V as VisibleRangePreset, aI as buildToolbar, aJ as defaultToolbar } from './options-XTBpbx0s.js';
5
+ import { M as MarketDataFeed, D as DataProvider, P as ProviderInfo, a as SymbolDescriptor, S as SymbolInfo, b as ProviderCapabilities, B as BarRange } from './DataProvider-DTOEXKTI.js';
6
+ export { A as ACCENT, a as ACCENT_BRIGHT, B as BEARISH, b as BULLISH, c as BarTransform, d as BasePaintingModulation, C as CATEGORICAL, e as CROSSHAIR, f as ChartTypeDefinition, g as ChartTypeSettingsInstance, h as ChartTypeSettingsSection, i as ChartTypeSettingsSubsection, D as DrawingTypeMeta, H as HIGHLIGHT, I as INFO, j as INVALID, k as IdentifiableKind, M as MARKER, N as NEUTRAL, l as NormalizedSettingsRow, R as RendererLayerArgs, m as RendererLayerDefinition, n as RendererLayerInstance, S as SERIES_LINE, o as SESSION_OFF, p as SESSION_POST, q as SESSION_PRE, r as SLATE, s as SLATE_DEEP, t as SeriesDataEngine, u as SeriesDataEngineHost, v as SettingsInlineControl, w as SettingsRowCondition, x as SettingsRowDescriptor, y as SettingsRowInlineNumber, z as SettingsRowSwatch, E as SettingsRowValueKey, F as SettingsRowWhen, G as SettingsRowWidth, J as SettingsSelectOption, K as SettingsValueRow, T as TRADE_EXIT, L as TRADE_LONG, O as TRADE_SHORT, V as VALID, W as WARNING, P as categoricalColor, Q as chartType, U as chartTypes, X as createDrawing, Y as deserializeDrawing, Z as drawingTypes, _ as getDrawingType, $ as normalizeSettingsRow, a0 as registerChartType, a1 as registerDrawingType, a2 as registerRendererDefaults, a3 as registerRendererLayer, a4 as rendererDefaults, a5 as rendererLayers, a6 as settingsRowValueKeys, a7 as stableSeriesId, a8 as tickerModifierIds, a9 as unregisterChartType, aa as unregisterRendererDefaults, ab as unregisterRendererLayer } from './plugin-CnNd7cuF.js';
7
7
  export { D as DEFAULT_PANEL_MAX_WIDTH, a as DEFAULT_PANEL_MIN_WIDTH, b as DEFAULT_PANEL_WIDTH, S as SidePanelOptions, c as clampPanelWidth } from './side-panel-CT9ZwIGz.js';
8
8
  export { i as iconMarkup, r as registerIcon } from './icons-BZYbJXSV.js';
9
9
  export { a as KeyBindingDescriptor, R as ResolvedBinding } from './keymap-CGOz5F5f.js';
@@ -346,8 +346,12 @@ declare class NativeRenderer implements IChartRenderer {
346
346
  private symbolPicker;
347
347
  /** Indicator titles (the legend rows) shown — held here so a remount re-applies it. */
348
348
  private indicatorTitlesOn;
349
+ /** Plot values beside the legend titles shown — held here so a remount re-applies it. */
350
+ private indicatorValuesOn;
349
351
  /** Host-contributed legend actions — held here so a rebuild of the legend re-wires them. */
350
352
  private legendActionsProvider;
353
+ /** Host override of the legend's fold toggle — held here so a remount re-applies it. */
354
+ private legendOverviewAction;
351
355
  private keyboard;
352
356
  private keyboardEnabled;
353
357
  /** Drawings layer self-serves Ctrl+Z/Y (see the `historyChords` feature). */
@@ -412,6 +416,7 @@ declare class NativeRenderer implements IChartRenderer {
412
416
  private scrollTargetRO;
413
417
  private scrollBtnBottomPx;
414
418
  private scrollBtnRightPx;
419
+ private layoutMode;
415
420
  private readonly viewportCbs;
416
421
  private readonly crosshairCbs;
417
422
  private readonly chartTypeSettingsCbs;
@@ -422,6 +427,7 @@ declare class NativeRenderer implements IChartRenderer {
422
427
  private factoryConfig;
423
428
  private hostSettingsSections;
424
429
  private readonly clickCbs;
430
+ private readonly axisLongPressCbs;
425
431
  private readonly inputChangeCbs;
426
432
  private readonly removeIndicatorCbs;
427
433
  private readonly toggleVisibleCbs;
@@ -500,7 +506,10 @@ declare class NativeRenderer implements IChartRenderer {
500
506
  * so moving onto the button doesn't count as leaving). */
501
507
  private readonly onScrollProximityMove;
502
508
  private readonly onScrollProximityLeave;
503
- /** Show the button only when the latest bar is scrolled off the right edge AND the cursor is nearby. */
509
+ /** Show the button only when the latest bar is scrolled off the right edge. On desktop the
510
+ * cursor must also be nearby (hover reveal); on mobile — no hovering cursor — the button
511
+ * appears whenever the latest bars are off-screen and hides again once the view is back
512
+ * at the right edge. */
504
513
  private updateScrollToRealtimeButton;
505
514
  /** Glide the view back to the most recent bars, keeping the current zoom (barSpacing). */
506
515
  private scrollToRealtime;
@@ -508,17 +517,20 @@ declare class NativeRenderer implements IChartRenderer {
508
517
  * instant when pan animation is off. Shared by scroll-to-latest and panBy. */
509
518
  private glideRightOffset;
510
519
  /**
511
- * Export the current chart as a PNG data URL by compositing the geometry (L0)
512
- * + chrome (L1) + user-drawings (L1.5) canvases onto an offscreen canvas. The
513
- * background is filled first (the canvas2d data layer is transparent — its bg
514
- * lives on the wrapper), and a fresh synchronous paint runs first so the WebGL2
515
- * backend's (non-preserved) drawing buffer is populated before it's read back
516
- * this tick the same paint also repaints the drawings layers, so they're
517
- * current (interleaved drawings are already inside the data composite). They're
518
- * drawn bottom-up in DOM stacking order so the front user drawings (trend lines,
519
- * boxes, etc.) sit above the Pine drawings on the chrome layer, matching what's
520
- * on screen. The crosshair (L2) and DOM overlays (tables, legend) are
521
- * intentionally excluded.
520
+ * Export the current chart as a PNG data URL by compositing EVERY plot canvas onto
521
+ * an offscreen canvas, in the same stacking order the DOM shows: plugin layers
522
+ * below the data, geometry (L0), volume columns (L0.25), the visible-range volume
523
+ * profile (L0.6), plugin layers above the data, chrome (L1), and user drawings
524
+ * (L1.5). The background is filled first (the canvas2d data layer is transparent —
525
+ * its bg lives on the wrapper), and a fresh synchronous paint runs first so the
526
+ * WebGL2 backend's (non-preserved) drawing buffer is populated before it's read
527
+ * back this tick the same paint also repaints the drawings layers, so they're
528
+ * current. DOM chrome joins as a best-effort text/chip raster (see
529
+ * `rasterizeOverlay`): the per-pane indicator legends, plus any host overlay that
530
+ * opts in with a `data-vela-screenshot` attribute on the mount container's
531
+ * subtree (the widget marks its status line, and its symbol watermark with
532
+ * `"under"` — drawn beneath the canvases, where it sits on screen). Only the
533
+ * crosshair (L2) is intentionally excluded.
522
534
  */
523
535
  screenshot(): string | null;
524
536
  /**
@@ -543,6 +555,10 @@ declare class NativeRenderer implements IChartRenderer {
543
555
  * but pinned to the stable surface background, text, and border, so custom plot cosmetics
544
556
  * never recolor the toolbar, gutters, or drawing UI chrome. */
545
557
  private chromeTheme;
558
+ /** The colors the axis-scale gutters (price + time) paint with: the LIVE chart background
559
+ * (`layout.background`) and its contrast-corrected text, so the scales read as part of the
560
+ * plot. Only the toolbar/dialog chrome stays on the stable app-theme surface. */
561
+ private axisSurface;
546
562
  mount(container: HTMLElement, theme: VelaTheme): void;
547
563
  /**
548
564
  * Create + mount the L0 geometry backend and return its canvas. Picks WebGL2
@@ -612,6 +628,8 @@ declare class NativeRenderer implements IChartRenderer {
612
628
  setIndicatorInputs(handle: IndicatorRenderHandle, values: Record<string, InputValue>): void;
613
629
  setSymbolPicker(picker: SymbolPickerFn | null): void;
614
630
  setLegendActions(provider: ((indicatorId: string) => LegendActionView[]) | null): void;
631
+ setLegendOverviewAction(action: (() => void) | null): void;
632
+ openIndicatorSettings(indicatorId: string): void;
615
633
  /**
616
634
  * Hide/show a mounted indicator. Hiding drops its model from the scene (so every paint path —
617
635
  * series, fills, drawings, tables, glow, data window — skips it) while keeping its z key and its
@@ -630,12 +648,18 @@ declare class NativeRenderer implements IChartRenderer {
630
648
  */
631
649
  private setPriceStyle;
632
650
  onRemoveIndicator(cb: (id: string) => void): Unsubscribe;
651
+ /** Port surface: the host shell's chrome size class. Mobile switches the renderer
652
+ * chrome to its touch-first presentation — fullscreen dialogs, no docked drawing
653
+ * toolbar (the shell provides its own picker), the scroll-to-latest button shown
654
+ * whenever the latest bars are off-screen (touch has no cursor proximity). */
655
+ setLayoutMode(mode: 'mobile' | 'desktop'): void;
633
656
  setSettingsSections(sections: HostSettingsSection[]): void;
634
657
  onChartTypeSettingsChange(cb: (typeId: string, values: Record<string, unknown>) => void): Unsubscribe;
635
658
  onConfigChanged(cb: () => void): Unsubscribe;
636
659
  onThemeSelect(cb: (theme: ThemeName) => void): Unsubscribe;
637
660
  onCrosshairMove(cb: (e: CrosshairEvent) => void): Unsubscribe;
638
661
  onClick(cb: (e: ClickEvent) => void): Unsubscribe;
662
+ onAxisLongPress(cb: (e: AxisLongPressEvent) => void): Unsubscribe;
639
663
  onViewportChange(cb: (range: VisibleRange) => void): Unsubscribe;
640
664
  getVisibleRange(): VisibleRange | null;
641
665
  setVisibleRange(range: VisibleRange): void;
@@ -673,6 +697,9 @@ declare class NativeRenderer implements IChartRenderer {
673
697
  private paneAtY;
674
698
  /** The pane node whose vertical bounds contain `y` (linear scan; panes don't overlap). */
675
699
  private paneNodeAtY;
700
+ /** The pane whose bounds sit closest to `y` — the forgiving fallback for points that
701
+ * fall BETWEEN bounds (separator gaps, the strip under the last pane). */
702
+ private nearestPaneToY;
676
703
  /** The scale window a gesture targets: a pane's master scale, or a merged indicator's
677
704
  * own scale column (resolved from the grabbed x). Both share the four scale fields. */
678
705
  private resolveScaleHolder;
@@ -740,7 +767,21 @@ declare class NativeRenderer implements IChartRenderer {
740
767
  private dataWindowOHLC;
741
768
  /** One group per indicator (name = indicator title), each with a row per drawable plot. */
742
769
  private dataWindowGroups;
770
+ /** One indicator's readout at bar `idx`: a row per drawable plot, formatted on its pane's scale. */
771
+ private dataWindowRowsFor;
772
+ /** The volume indicator's readout: the bar's volume, tinted with the layer's own direction
773
+ * colors. Hiding volume keeps its model in the scene (only the layer is suppressed — see
774
+ * `setIndicatorVisible`), so the hidden flag is checked here rather than by model absence. */
775
+ private volumeReadoutRows;
776
+ /** Refresh the plot values beside every legend title — the same readout the data window
777
+ * shows (crosshair bar, else the latest bar), pushed per paint. A hidden indicator has
778
+ * no scene model, so its row is absent from the map and its readout clears. */
779
+ private updateLegendValues;
743
780
  private renderFrame;
781
+ /** Repaint the SDK layers that opted into cursor tracking (their own canvas only). */
782
+ private repaintCursorLayers;
783
+ /** One frame's args for an SDK renderer layer (shared by the data + cursor paint paths). */
784
+ private extLayerArgs;
744
785
  /** Paint the below-data (L-1) + geometry (L0) + chrome (L1) layers from the current scene/coords. */
745
786
  private paintData;
746
787
  /** Build the data→pixel projector user drawings resolve their anchors through. */
@@ -838,10 +879,12 @@ declare class NativeRenderer implements IChartRenderer {
838
879
  private collapsedMasterMap;
839
880
  /** Reserve `px` of left gutter for the docked drawings toolbar (0 releases it) + re-lay-out the plot. */
840
881
  private setToolbarGutter;
841
- /** Publish the gutter on the mount container as `--vela-toolbar-gutter`, so host
842
- * overlays sharing that container (a status line, a custom legend) can anchor to
843
- * the plot's left edge without reaching into the renderer's DOM. */
844
- private publishToolbarGutter;
882
+ /** Publish the gutters on the mount container as `--vela-toolbar-gutter` (left,
883
+ * drawings toolbar) and `--vela-scale-gutter` (right, the full price-scale width
884
+ * incl. merged own-scale columns), so host overlays sharing that container (a
885
+ * status line, a watermark, a custom legend) can anchor to the plot's edges
886
+ * without reaching into the renderer's DOM. */
887
+ private publishGutters;
845
888
  /** The built-in mark, or the host's own when one is set. */
846
889
  private buildAttributionEl;
847
890
  /** Swap the mark in place — the content kind changed (built-in ↔ host-supplied). */
@@ -871,6 +914,11 @@ interface DrawingToolbarOptions {
871
914
  /** Collapse/expand notification — a docked host resizes its gutter reservation to
872
915
  * {@link TOOLBAR_COLLAPSED_WIDTH} / the full width (a static bar reflows on its own). */
873
916
  onCollapse?: (collapsed: boolean) => void;
917
+ /** When given, a drawings-sync toggle renders below the stay button: enabled, every
918
+ * NEWLY CREATED drawing is copied onto the other linked charts and the set stays
919
+ * linked — edits and removals follow (a multi-chart host's concern — a
920
+ * single-chart bar omits the callback and never shows it). */
921
+ onDrawingsSync?: (on: boolean) => void;
874
922
  }
875
923
  /**
876
924
  * The vertical drawing toolbar (renderer chrome), docked as a flush bar in the left gutter. Each
@@ -879,8 +927,10 @@ interface DrawingToolbarOptions {
879
927
  * cursor button returns to select/idle; measure/eraser modes sit at the bottom, and the magnet is a
880
928
  * cell whose chevron opens an Off/Weak/Strong menu (its icon toggles the last-used strength on/off).
881
929
  * Below the magnet, a stay-in-drawing-mode toggle keeps tools armed after each placement.
882
- * Hover and active tints are CSS-driven (`:hover` + `[data-active]`) so they never lag. Tooltips
883
- * appear after a 2s hover. Pure vanilla DOM on the host (a `pointer-events:auto` island).
930
+ * Hover and active tints are CSS-driven (`:hover` + `[data-active]`) so they never lag. Every
931
+ * icon carries a themed tooltip (the chrome default 700ms dwell); a group cell's tip names the
932
+ * tool its icon arms (the last-used one). Pure vanilla DOM on the host (a `pointer-events:auto`
933
+ * island).
884
934
  */
885
935
  declare class DrawingToolbar {
886
936
  private readonly host;
@@ -917,6 +967,8 @@ declare class DrawingToolbar {
917
967
  private eraserActive;
918
968
  private stayBtn;
919
969
  private stayActive;
970
+ private syncBtn;
971
+ private syncActive;
920
972
  private collapseBtn;
921
973
  private collapsed;
922
974
  private visible;
@@ -928,6 +980,7 @@ declare class DrawingToolbar {
928
980
  private readonly width;
929
981
  private readonly dock;
930
982
  private readonly onCollapse;
983
+ private readonly onDrawingsSync;
931
984
  constructor(host: HTMLElement, theme: VelaTheme, onArm: (type: DrawingTypeKey | null) => void, onMagnet?: (mode: SnapMode) => void, onMeasure?: () => void, onEraser?: () => void, onToggleFavorite?: (type: DrawingTypeKey, on: boolean) => void, onStayMode?: (on: boolean) => void, options?: DrawingToolbarOptions);
932
985
  /** Live divider/border ink — the option override, else the current theme's border
933
986
  * (so a theme swap re-inks the bar without a rebuild option). */
@@ -986,6 +1039,11 @@ declare class DrawingToolbar {
986
1039
  /** Reflect stay-in-drawing-mode externally without notifying back. */
987
1040
  setStayMode(on: boolean): void;
988
1041
  private paintStay;
1042
+ /** Toggle drawings sync on/off and notify the host. */
1043
+ private toggleDrawingsSync;
1044
+ /** Reflect drawings sync externally (e.g. set through the API) without notifying back. */
1045
+ setDrawingsSyncMode(on: boolean): void;
1046
+ private paintDrawingsSync;
989
1047
  /** Create the positioned flyout panel anchored to a cell, register it as open, and start the
990
1048
  * outside-dismiss. Callers fill it with items. */
991
1049
  private beginFlyout;
@@ -1186,4 +1244,4 @@ declare const DARK_THEME: VelaTheme;
1186
1244
  declare const LIGHT_THEME: VelaTheme;
1187
1245
  declare function resolveTheme(theme?: ThemeName | VelaTheme): VelaTheme;
1188
1246
 
1189
- export { BarRange, BarStore, CachingDataFeed, type ChartConfig, type ChartStyle, ClickEvent, CrosshairEvent, DARK_THEME, DataProvider, DataWindowReadout, Drawing, DrawingStore, DrawingToolbar, type DrawingToolbarOptions, DrawingTypeKey, DrawingsDocument, IChartRenderer, IDrawingsRendererPort, IndicatorModel, IndicatorRenderHandle, InputChangeEvent, InputValue, LIGHT_THEME, LineStyle, MarketConfig, MarketDataFeed, Millis, MultiProviderFeed, NativeRenderer, OHLCV, Pane, PriceStyle, ProviderCapabilities, ProviderInfo, RendererCapabilities, RendererDisplayOptions, Resolved, ScenePatch, SerializedDrawing, SnapMode, SymbolDescriptor, SymbolInfo, ThemeName, ToolbarDefinition, VelaTheme, VisibleRange, resolveTheme, sharedBarStore, timeframeToMs };
1247
+ export { AxisLongPressEvent, BarRange, BarStore, CachingDataFeed, type ChartConfig, type ChartStyle, ClickEvent, CrosshairEvent, DARK_THEME, DataProvider, DataWindowReadout, Drawing, DrawingStore, DrawingToolbar, type DrawingToolbarOptions, DrawingTypeKey, DrawingsDocument, IChartRenderer, IDrawingsRendererPort, IndicatorModel, IndicatorRenderHandle, InputChangeEvent, InputValue, LIGHT_THEME, LineStyle, MarketConfig, MarketDataFeed, Millis, MultiProviderFeed, NativeRenderer, OHLCV, Pane, PriceStyle, ProviderCapabilities, ProviderInfo, RendererCapabilities, RendererDisplayOptions, Resolved, ScenePatch, SerializedDrawing, SnapMode, SymbolDescriptor, SymbolInfo, ThemeName, ToolbarDefinition, VelaTheme, VisibleRange, resolveTheme, sharedBarStore, timeframeToMs };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export { stableSeriesId } from './chunk-Q3XQHLIH.js';
2
- export { BarStore, CachingDataFeed, DARK_THEME, DataControl, DrawingStore, DrawingToolbar, DrawingsControl, LIGHT_THEME, MultiProviderFeed, NativeRenderer, RendererControl, TypedEventBus, Vela, buildToolbar, defaultToolbar, resolveTheme, sharedBarStore, timeframeToMs } from './chunk-KCCZNKH7.js';
3
- export { DEFAULT_PANEL_MAX_WIDTH, DEFAULT_PANEL_MIN_WIDTH, DEFAULT_PANEL_WIDTH, Drawing, chartType, chartTypes, clampPanelWidth, createDrawing, deserializeDrawing, drawingTypes, getDrawingType, getNativeIndicator, legendActions, nativeIndicatorDescriptors, nativeIndicatorTypes, registerChartType, registerDefaultEngine, registerDrawingType, registerLegendAction, registerNativeIndicator, registerRendererDefaults, registerRendererLayer, registerSidePanel, registerWidgetAction, registerWidgetAttachment, rendererDefaults, rendererLayers, resolveEngines, sidePanels, tickerModifierIds, unregisterChartType, unregisterDefaultEngine, unregisterLegendAction, unregisterNativeIndicator, unregisterRendererDefaults, unregisterRendererLayer, unregisterSidePanel, unregisterWidgetAction, unregisterWidgetAttachment, widgetActions, widgetAttachments } from './chunk-7UFX5ZIG.js';
4
- import './chunk-KM6LHB3Y.js';
5
- export { ACCENT, ACCENT_BRIGHT, BEARISH, BULLISH, CATEGORICAL, CROSSHAIR, HIGHLIGHT, INFO, INVALID, MARKER, NEUTRAL, SERIES_LINE, SESSION_OFF, SESSION_POST, SESSION_PRE, SLATE, SLATE_DEEP, TRADE_EXIT, TRADE_LONG, TRADE_SHORT, VALID, WARNING, categoricalColor, iconMarkup, registerIcon } from './chunk-GYD2THPV.js';
2
+ export { BarStore, CachingDataFeed, DARK_THEME, DataControl, DrawingStore, DrawingToolbar, DrawingsControl, LIGHT_THEME, MultiProviderFeed, NativeRenderer, RendererControl, TypedEventBus, Vela, buildToolbar, defaultToolbar, resolveTheme, sharedBarStore, timeframeToMs } from './chunk-RRFGWZNJ.js';
3
+ export { DEFAULT_PANEL_MAX_WIDTH, DEFAULT_PANEL_MIN_WIDTH, DEFAULT_PANEL_WIDTH, Drawing, chartType, chartTypes, clampPanelWidth, createDrawing, deserializeDrawing, drawingTypes, getDrawingType, getNativeIndicator, legendActions, nativeIndicatorDescriptors, nativeIndicatorTypes, normalizeSettingsRow, registerChartType, registerDefaultEngine, registerDrawingType, registerLegendAction, registerNativeIndicator, registerRendererDefaults, registerRendererLayer, registerSidePanel, registerWidgetAction, registerWidgetAttachment, rendererDefaults, rendererLayers, resolveEngines, settingsRowValueKeys, sidePanels, tickerModifierIds, unregisterChartType, unregisterDefaultEngine, unregisterLegendAction, unregisterNativeIndicator, unregisterRendererDefaults, unregisterRendererLayer, unregisterSidePanel, unregisterWidgetAction, unregisterWidgetAttachment, widgetActions, widgetAttachments } from './chunk-B5TIKQJ5.js';
4
+ import './chunk-ATPU5CI6.js';
5
+ export { ACCENT, ACCENT_BRIGHT, BEARISH, BULLISH, CATEGORICAL, CROSSHAIR, HIGHLIGHT, INFO, INVALID, MARKER, NEUTRAL, SERIES_LINE, SESSION_OFF, SESSION_POST, SESSION_PRE, SLATE, SLATE_DEEP, TRADE_EXIT, TRADE_LONG, TRADE_SHORT, VALID, WARNING, categoricalColor, iconMarkup, registerIcon } from './chunk-LJLZR44Y.js';