@luxalgo/vela 0.6.22 → 0.7.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-Bu9E5Zh5.d.ts → DataProvider-BALR0qPq.d.ts} +1 -1
  2. package/dist/{DataProvider-Ck2qyS_9.d.cts → DataProvider-D5uMiJYz.d.cts} +1 -1
  3. package/dist/{chunk-A4G64KVF.js → chunk-5RQGCZTX.js} +299 -110
  4. package/dist/{chunk-IFJJPXSV.js → chunk-BFA32GOU.js} +44 -16
  5. package/dist/{chunk-CZRNTHD6.js → chunk-BKHSQ4YM.js} +129 -125
  6. package/dist/{chunk-A347YL2P.js → chunk-QGVSNAX7.js} +67 -9
  7. package/dist/{chunk-UHXG5J7C.js → chunk-ZADTVRUO.js} +1 -1
  8. package/dist/{contributions-BjQ7hyIx.d.ts → contributions-BbhbZd3c.d.ts} +31 -9
  9. package/dist/{contributions-Cv2Mutvn.d.cts → contributions-CcBFe-91.d.cts} +31 -9
  10. package/dist/index.cjs +379 -156
  11. package/dist/index.d.cts +44 -17
  12. package/dist/index.d.ts +44 -17
  13. package/dist/index.js +4 -4
  14. package/dist/{options-ex2_gtKp.d.ts → options-C7b_Qssu.d.cts} +42 -1
  15. package/dist/{options-ex2_gtKp.d.cts → options-C7b_Qssu.d.ts} +42 -1
  16. package/dist/{plugin-CiyhU7pi.d.ts → plugin-Cnix5ZBh.d.ts} +6 -4
  17. package/dist/{plugin-absNH7Yn.d.cts → plugin-D6MlX4--.d.cts} +6 -4
  18. package/dist/plugin.cjs +39 -15
  19. package/dist/plugin.d.cts +4 -4
  20. package/dist/plugin.d.ts +4 -4
  21. package/dist/plugin.js +2 -2
  22. package/dist/providers/binance.d.cts +2 -2
  23. package/dist/providers/binance.d.ts +2 -2
  24. package/dist/providers/coinbase.d.cts +2 -2
  25. package/dist/providers/coinbase.d.ts +2 -2
  26. package/dist/providers/hyperliquid.d.cts +2 -2
  27. package/dist/providers/hyperliquid.d.ts +2 -2
  28. package/dist/{statusline-model-BXoU4Kua.d.ts → statusline-model-D8NL7o4L.d.ts} +3 -3
  29. package/dist/{statusline-model-cRhPBLPO.d.cts → statusline-model-DUKt7_TQ.d.cts} +3 -3
  30. package/dist/ui.cjs +8 -4
  31. package/dist/ui.d.cts +10 -7
  32. package/dist/ui.d.ts +10 -7
  33. package/dist/ui.js +2 -2
  34. package/dist/vela.global.js +379 -156
  35. package/dist/vela.global.min.js +70 -70
  36. package/dist/widget.cjs +406 -127
  37. package/dist/widget.d.cts +6 -6
  38. package/dist/widget.d.ts +6 -6
  39. package/dist/widget.js +6 -6
  40. package/dist/workspace.cjs +406 -127
  41. package/dist/workspace.d.cts +39 -6
  42. package/dist/workspace.d.ts +39 -6
  43. package/dist/workspace.js +5 -5
  44. package/package.json +1 -1
  45. /package/dist/{chunk-FE6V2YAQ.js → chunk-JU4CWEBF.js} +0 -0
package/dist/index.d.cts CHANGED
@@ -1,9 +1,9 @@
1
- import { D as DrawingsDocument, R as Resolved } from './contributions-Cv2Mutvn.cjs';
2
- export { B as BarsChangeReason, C as CellStateContext, b as ContextSelect, c as DataControl, d as DrawingsControl, e as EngineAlert, f as EngineCapabilities, g as EngineContextSnapshot, h as EngineFactory, i as EngineWarning, j as ExecutionHandlers, k as ExecutionMarket, l as ExecutionRequest, m as ExecutionSession, E as ExternalIndicatorEntry, F as FetchSeries, n as IndicatorEventMap, I as IndicatorHandle, o as IndicatorSummary, L as LegendActionDescriptor, p as LegendCalloutContent, q as LegendCalloutDescriptor, r as LegendCalloutItem, s as LegendCalloutSpec, t as LegendIndicatorInfo, M as MarksControl, N as NativeIndicator, u as NativeIndicatorContext, v as NativeIndicatorDescriptor, w as NativeIndicatorInfo, x as NativeIndicatorOutput, O as OVERRIDABLE_TOPBAR_IDS, P as ParsedSymbol, y as PreparedScript, z as RendererControl, A as RunIndicatorResult, G as SceneInspection, a as ScriptRun, H as ScriptRunCause, J as ScriptRunResult, S as ScriptingEngine, K as SidePanelButton, Q as SidePanelDescriptor, T as SidePanelHandle, U as SidePanelHeader, X as StatePersistenceHandler, Y as StrategyFill, Z as StrategyState, _ as StrategyTrade, $ as SymbolRankingHook, a0 as TypedEventBus, V as Vela, a1 as VelaDeps, a2 as VelaEventMap, a3 as VisibleBarRange, a4 as WidgetActionDescriptor, a5 as WidgetActionTarget, a6 as WidgetAttachment, W as WidgetContext, a7 as getNativeIndicator, a8 as legendActions, a9 as legendCallouts, aa as nativeIndicatorDescriptors, ab as nativeIndicatorTypes, ac as registerDefaultEngine, ad as registerLegendAction, ae as registerLegendCallout, af as registerNativeIndicator, ag as registerSidePanel, ah as registerStatePersistence, ai as registerSymbolRanking, aj as registerWidgetAction, ak as registerWidgetAttachment, al as resolveEngines, am as sidePanels, an as statePersistenceHandlers, ao as symbolRanking, ap as topbarActionOverride, aq as unregisterDefaultEngine, ar as unregisterLegendAction, as as unregisterLegendCallout, at as unregisterNativeIndicator, au as unregisterSidePanel, av as unregisterStatePersistence, aw as unregisterWidgetAction, ax as unregisterWidgetAttachment, ay as widgetActions, az as widgetAttachments } from './contributions-Cv2Mutvn.cjs';
3
- import { D as Drawing, S as SerializedDrawing, U as Unsubscribe, L as LineStyle, P as PriceStyle, e as IChartRenderer, R as RendererCapabilities, f as RendererDisplayOptions, g as IndicatorRenderHandle, h as IndicatorStatus, c as VelaTheme, W as WallClock, O as OHLCV, i as Pane, j as PaneAction, k as MoveTarget, l as IndicatorModel, m as ScenePatch, I as InputValue, n as SymbolPickerFn, o as LegendActionView, p as LegendCalloutView, q as InputChangeEvent, T as ThemeName, C as CrosshairEvent, r as ClickEvent, A as AxisLongPressEvent, s as TimelineMark, t as MarkGroup, u as MarkClickEvent, a as VisibleRange, v as DataWindowReadout, w as IDrawingsRendererPort, x as Millis, y as SnapMode, z as DrawingTypeKey, B as ToolbarDefinition, M as MarketConfig } from './options-ex2_gtKp.cjs';
4
- export { E as AddIndicatorOptions, F as AnimationConfig, G as Background, H as BoxFontFamily, J as BoxHAlign, K as BoxTextSize, Q as BoxVAlign, X as CandleBarColor, Y as CandleSeries, Z as CandleStyle, _ as DataWindowGroup, $ as DataWindowOHLC, a0 as DataWindowRow, a1 as DirtyRange, a2 as DrawingBox, a3 as DrawingExtend, a4 as DrawingIntent, a5 as DrawingLabel, a6 as DrawingLine, a7 as DrawingLinefill, a8 as DrawingMode, a9 as DrawingPoint, aa as DrawingPolyline, ab as DrawingSeriesBar, ac as DrawingSeriesGateway, ad as DrawingSeriesState, ae as DrawingStyle, af as DrawingTable, ag as DrawingText, ah as DrawingXLoc, ai as DrawingsOption, aj as Fill, ak as FillGradientStop, al as IndicatorMeta, am as InputCondition, an as InputSchema, ao as InputType, ap as InputWhen, aq as IntroAnimation, ar as IntroConfig, as as IntroStyle, at as LabelStyle, au as LabelYLoc, av as LineLikeKind, aw as LineLikeSeries, ax as LineLikeStyle, ay as MarkContent, az as MarkContentSource, aA as MarkGlyph, aB as MarkPanelItem, aC as MarkShape, aD as MarkerPoint, aE as MarkerSeries, aF as MarketSnapshot, aG as MarketSwitch, aH as PaneAxis, aI as PaneAxisBand, aJ as PaneHint, aK as PaneKind, aL as PolylinePoint, aM as PriceLine, aN as Projector, aO as ProviderName, aP as RendererConstructor, aQ as Scene, aR as SchemaPatch, aS as SecondClock, aT as SeriesKind, aU as SeriesPoint, aV as SeriesSpec, aW as SeriesValueDelta, aX as SettingsField, aY as SettingsSchema, aZ as SettingsVisibilityPolicy, a_ as TableCell, a$ as TableMerge, b0 as TablePosition, b1 as ToolbarGroupConfig, b2 as TradeExecution, b3 as ValuePatch, b as VelaOptions, V as VisibleRangePreset, b4 as buildToolbar, b5 as defaultToolbar, b6 as inputDeltas, b7 as inputVisible } from './options-ex2_gtKp.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-Ck2qyS_9.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 CHIP_PLATE, f as CROSSHAIR, g as ChartTypeDefinition, h as ChartTypeSettingsInstance, i as ChartTypeSettingsSection, j as ChartTypeSettingsSubsection, D as DrawingTypeMeta, H as HIGHLIGHT, I as INFO, k as INVALID, l as IdentifiableKind, M as MARKER, N as NEUTRAL, m as NormalizedSettingsRow, R as RendererLayerArgs, n as RendererLayerDefinition, o as RendererLayerInstance, S as SERIES_LINE, p as SESSION_OFF, q as SESSION_POST, r as SESSION_PRE, s as SLATE, t as SLATE_DEEP, u as SeriesDataEngine, v as SeriesDataEngineHost, w as SettingsInlineControl, x as SettingsRowCondition, y as SettingsRowDescriptor, z as SettingsRowInlineNumber, E as SettingsRowSwatch, F as SettingsRowValueKey, G as SettingsRowWhen, J as SettingsRowWidth, K as SettingsSelectOption, L as SettingsValueRow, T as TRADE_EXIT, O as TRADE_LONG, P as TRADE_SHORT, V as VALID, W as WARNING, Q as categoricalColor, U as chartType, X as chartTypes, Y as createDrawing, Z as deserializeDrawing, _ as drawingTypes, $ as getDrawingType, a0 as normalizeSettingsRow, a1 as registerChartType, a2 as registerDrawingType, a3 as registerRendererDefaults, a4 as registerRendererLayer, a5 as rendererDefaults, a6 as rendererLayers, a7 as settingsRowValueKeys, a8 as stableSeriesId, a9 as tickerModifierIds, aa as unregisterChartType, ab as unregisterRendererDefaults, ac as unregisterRendererLayer } from './plugin-absNH7Yn.cjs';
1
+ import { D as DrawingsDocument, R as Resolved } from './contributions-CcBFe-91.cjs';
2
+ export { B as BarsChangeReason, C as CellStateContext, b as ContextSelect, c as DataControl, d as DrawingsControl, e as EngineAlert, f as EngineCapabilities, g as EngineContextSnapshot, h as EngineFactory, i as EngineWarning, j as ExecutionHandlers, k as ExecutionMarket, l as ExecutionRequest, m as ExecutionSession, E as ExternalIndicatorEntry, F as FetchSeries, n as IndicatorEventMap, I as IndicatorHandle, o as IndicatorSummary, L as LegendActionDescriptor, p as LegendCalloutContent, q as LegendCalloutDescriptor, r as LegendCalloutItem, s as LegendCalloutSpec, t as LegendIndicatorInfo, M as MarksControl, N as NativeIndicator, u as NativeIndicatorContext, v as NativeIndicatorDescriptor, w as NativeIndicatorInfo, x as NativeIndicatorOutput, O as OVERRIDABLE_TOPBAR_IDS, P as ParsedSymbol, y as PreparedScript, z as RendererControl, A as RunIndicatorResult, G as SceneInspection, a as ScriptRun, H as ScriptRunCause, J as ScriptRunResult, S as ScriptingEngine, K as SidePanelButton, Q as SidePanelDescriptor, T as SidePanelHandle, U as SidePanelHeader, X as StatePersistenceHandler, Y as StrategyFill, Z as StrategyState, _ as StrategyTrade, $ as SymbolRankingHook, a0 as TypedEventBus, V as Vela, a1 as VelaDeps, a2 as VelaEventMap, a3 as VisibleBarRange, a4 as WidgetActionDescriptor, a5 as WidgetActionTarget, a6 as WidgetAttachment, W as WidgetContext, a7 as getNativeIndicator, a8 as legendActions, a9 as legendCallouts, aa as nativeIndicatorDescriptors, ab as nativeIndicatorTypes, ac as registerDefaultEngine, ad as registerLegendAction, ae as registerLegendCallout, af as registerNativeIndicator, ag as registerSidePanel, ah as registerStatePersistence, ai as registerSymbolRanking, aj as registerWidgetAction, ak as registerWidgetAttachment, al as resolveEngines, am as sidePanels, an as statePersistenceHandlers, ao as symbolRanking, ap as topbarActionOverride, aq as unregisterDefaultEngine, ar as unregisterLegendAction, as as unregisterLegendCallout, at as unregisterNativeIndicator, au as unregisterSidePanel, av as unregisterStatePersistence, aw as unregisterWidgetAction, ax as unregisterWidgetAttachment, ay as widgetActions, az as widgetAttachments } from './contributions-CcBFe-91.cjs';
3
+ import { D as Drawing, S as SerializedDrawing, U as Unsubscribe, L as LineStyle, P as PriceStyle, e as IChartRenderer, R as RendererCapabilities, f as RendererDisplayOptions, g as IndicatorRenderHandle, h as IndicatorStatus, c as VelaTheme, W as WallClock, O as OHLCV, i as Pane, j as PaneAction, k as MoveTarget, l as IndicatorModel, m as ScenePatch, I as InputValue, n as SymbolPickerFn, o as LegendActionView, p as LegendCalloutView, q as InputChangeEvent, T as ThemeName, C as CrosshairEvent, r as ClickEvent, A as AxisLongPressEvent, s as TimelineMark, t as MarkGroup, u as MarkClickEvent, a as VisibleRange, v as DataWindowReadout, w as IDrawingsRendererPort, x as Millis, y as SnapMode, z as DrawingTypeKey, B as ToolbarDefinition, M as MarketConfig } from './options-C7b_Qssu.cjs';
4
+ export { E as AddIndicatorOptions, F as AnimationConfig, G as Background, H as BoxFontFamily, J as BoxHAlign, K as BoxTextSize, Q as BoxVAlign, X as CandleBarColor, Y as CandleSeries, Z as CandleStyle, _ as DataWindowGroup, $ as DataWindowOHLC, a0 as DataWindowRow, a1 as DirtyRange, a2 as DrawingBox, a3 as DrawingExtend, a4 as DrawingIntent, a5 as DrawingLabel, a6 as DrawingLine, a7 as DrawingLinefill, a8 as DrawingMode, a9 as DrawingPoint, aa as DrawingPolyline, ab as DrawingSeriesBar, ac as DrawingSeriesGateway, ad as DrawingSeriesState, ae as DrawingStyle, af as DrawingTable, ag as DrawingText, ah as DrawingXLoc, ai as DrawingsOption, aj as Fill, ak as FillGradientStop, al as IndicatorMeta, am as InputCondition, an as InputSchema, ao as InputType, ap as InputWhen, aq as IntroAnimation, ar as IntroConfig, as as IntroStyle, at as LabelStyle, au as LabelYLoc, av as LineLikeKind, aw as LineLikeSeries, ax as LineLikeStyle, ay as MarkContent, az as MarkContentSource, aA as MarkGlyph, aB as MarkPanelItem, aC as MarkShape, aD as MarkerPoint, aE as MarkerSeries, aF as MarketSnapshot, aG as MarketSwitch, aH as PaneAxis, aI as PaneAxisBand, aJ as PaneHint, aK as PaneKind, aL as PolylinePoint, aM as PriceLine, aN as Projector, aO as ProviderName, aP as RendererConstructor, aQ as Scene, aR as SchemaPatch, aS as SecondClock, aT as SeriesDisplay, aU as SeriesKind, aV as SeriesPoint, aW as SeriesSpec, aX as SeriesSurface, aY as SeriesValueDelta, aZ as SettingsField, a_ as SettingsSchema, a$ as SettingsVisibilityPolicy, b0 as TableCell, b1 as TableMerge, b2 as TablePosition, b3 as ToolbarGroupConfig, b4 as TradeExecution, b5 as ValuePatch, b as VelaOptions, V as VisibleRangePreset, b6 as buildToolbar, b7 as defaultToolbar, b8 as inputDeltas, b9 as inputVisible, ba as seriesInScale, bb as seriesShownOn } from './options-C7b_Qssu.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-D5uMiJYz.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 CHIP_PLATE, f as CROSSHAIR, g as ChartTypeDefinition, h as ChartTypeSettingsInstance, i as ChartTypeSettingsSection, j as ChartTypeSettingsSubsection, D as DrawingTypeMeta, H as HIGHLIGHT, I as INFO, k as INVALID, l as IdentifiableKind, M as MARKER, N as NEUTRAL, m as NormalizedSettingsRow, R as RendererLayerArgs, n as RendererLayerDefinition, o as RendererLayerInstance, S as SERIES_LINE, p as SESSION_OFF, q as SESSION_POST, r as SESSION_PRE, s as SLATE, t as SLATE_DEEP, u as SeriesDataEngine, v as SeriesDataEngineHost, w as SettingsInlineControl, x as SettingsRowCondition, y as SettingsRowDescriptor, z as SettingsRowInlineNumber, E as SettingsRowSwatch, F as SettingsRowValueKey, G as SettingsRowWhen, J as SettingsRowWidth, K as SettingsSelectOption, L as SettingsValueRow, T as TRADE_EXIT, O as TRADE_LONG, P as TRADE_SHORT, V as VALID, W as WARNING, Q as categoricalColor, U as chartType, X as chartTypes, Y as createDrawing, Z as deserializeDrawing, _ as drawingTypes, $ as getDrawingType, a0 as normalizeSettingsRow, a1 as registerChartType, a2 as registerDrawingType, a3 as registerRendererDefaults, a4 as registerRendererLayer, a5 as rendererDefaults, a6 as rendererLayers, a7 as settingsRowValueKeys, a8 as stableSeriesId, a9 as tickerModifierIds, aa as unregisterChartType, ab as unregisterRendererDefaults, ac as unregisterRendererLayer } from './plugin-D6MlX4--.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-HF0IAzwf.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';
@@ -379,6 +379,13 @@ declare class NativeRenderer implements IChartRenderer {
379
379
  private readonly backdropRenderer;
380
380
  private readonly volumeRenderer;
381
381
  /** SDK renderer layers instantiated at mount ({@link registerRendererLayer}). */
382
+ /**
383
+ * The mounted SDK layers. One BASE entry per registered definition (channel = the layer
384
+ * id, no owner of its own), plus one DEDICATED entry per mounted native indicator whose
385
+ * model names its own channel (`native.channel` — an instance of a multi-instance type):
386
+ * same definition, its own canvas, reading that instance's channel and following that
387
+ * instance's pane and z key. `channel` is unique across the array.
388
+ */
382
389
  private extLayers;
383
390
  /** Last applied layer-canvas order (ids below + above the data canvas) — re-slotted only on change. */
384
391
  private layerOrderSig;
@@ -888,24 +895,29 @@ declare class NativeRenderer implements IChartRenderer {
888
895
  private dataWindowPricePane;
889
896
  private dataWindowFmt;
890
897
  private dataWindowOHLC;
891
- /** One group per indicator (name = indicator title), each with a row per drawable plot. */
898
+ /** One group per indicator (name = indicator title), each with a row per plot shown in the data window. */
892
899
  private dataWindowGroups;
893
- /** One indicator's readout at bar `idx`: a row per drawable plot, formatted on its pane's scale. */
894
- private dataWindowRowsFor;
900
+ /** One indicator's readout at bar `idx` for one value surface (the legend or the data window):
901
+ * a row per plot shown on that surface, formatted on its pane's scale. A plot's `display`
902
+ * decides per surface — a data-window-only plot has a row here and none in the legend. */
903
+ private readoutRowsFor;
895
904
  /** The volume indicator's readout: the bar's volume, tinted with the layer's own direction
896
905
  * colors. Hiding volume keeps its model in the scene (only the layer is suppressed — see
897
906
  * `setIndicatorVisible`), so the hidden flag is checked here rather than by model absence. */
898
907
  private volumeReadoutRows;
899
- /** Refresh the plot values beside every legend title — the same readout the data window
900
- * shows (crosshair bar, else the latest bar), pushed per paint. A hidden indicator has
901
- * no scene model, so its row is absent from the map and its readout clears. */
908
+ /** Refresh the plot values beside every legend title — the same bar the data window reads
909
+ * (crosshair bar, else the latest bar), pushed per paint, filtered to the plots whose
910
+ * `display` includes the legend. A hidden indicator has no scene model, so its row is
911
+ * absent from the map and its readout clears. */
902
912
  private updateLegendValues;
903
913
  private renderFrame;
904
914
  /** Repaint the SDK layers that opted into cursor tracking (their own canvas only). */
905
915
  private repaintCursorLayers;
906
916
  /** Blank one SDK layer canvas (a collapsed host pane suppresses the layer's painting). */
907
917
  private clearLayerCanvas;
908
- /** One frame's args for an SDK renderer layer (shared by the data + cursor paint paths). */
918
+ /** One frame's args for an SDK renderer layer (shared by the data + cursor paint paths).
919
+ * Data + pending come from the entry's channel (per instance for a dedicated entry);
920
+ * the settings bag is the TYPE's — a chart type's dialog values, one bag per type. */
909
921
  private extLayerArgs;
910
922
  /** Paint the below-data (L-1) + geometry (L0) + chrome (L1) layers from the current scene/coords. */
911
923
  private paintData;
@@ -968,10 +980,25 @@ declare class NativeRenderer implements IChartRenderer {
968
980
  private paneMasterTitle;
969
981
  /** The pane a bespoke-layer native indicator (volume/vpvr) currently lives in (null = not mounted). */
970
982
  private nativeLayerPane;
971
- /** The mounted native indicator that OWNS an SDK layer the one whose type equals the
972
- * layer id (the id doubles as the data channel, so the pairing is the SDK's own
973
- * contract). Null for chart-type channels and while the owner is hidden (a hidden
974
- * indicator leaves the scene; its cleared data channel paints nothing anyway). */
983
+ /** One transparent, pointer-transparent SDK layer canvas covering the plot. */
984
+ private createLayerCanvas;
985
+ /**
986
+ * Mount the DEDICATED layer of a native indicator that names its own channel (an
987
+ * instance of a multi-instance type painting through a registered layer): a fresh
988
+ * instance of the layer's definition on its own canvas, reading that channel. Idempotent
989
+ * — a show after hide re-mounts the model, and the layer (kept across the hide, like the
990
+ * z key) is simply reused. Skipped while the renderer itself is unmounted (`mount()`
991
+ * catches up from the scene).
992
+ */
993
+ private ensureInstanceLayer;
994
+ /** Tear down the dedicated layer of a removed indicator (a hide keeps it). */
995
+ private dropInstanceLayer;
996
+ /** The mounted native indicator that OWNS an SDK layer entry. A dedicated entry is
997
+ * owned by the instance it was mounted for; the base entry by the mounted indicator
998
+ * whose type equals the layer id and that has no channel of its own (the id doubles
999
+ * as the data channel, so the pairing is the SDK's own contract). Null for chart-type
1000
+ * channels and while the owner is hidden (a hidden indicator leaves the scene; its
1001
+ * cleared data channel paints nothing anyway). */
975
1002
  private layerOwner;
976
1003
  /** The pane an SDK layer paints on: its owner's pane, else the price pane. */
977
1004
  private layerPane;
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { D as DrawingsDocument, R as Resolved } from './contributions-BjQ7hyIx.js';
2
- export { B as BarsChangeReason, C as CellStateContext, b as ContextSelect, c as DataControl, d as DrawingsControl, e as EngineAlert, f as EngineCapabilities, g as EngineContextSnapshot, h as EngineFactory, i as EngineWarning, j as ExecutionHandlers, k as ExecutionMarket, l as ExecutionRequest, m as ExecutionSession, E as ExternalIndicatorEntry, F as FetchSeries, n as IndicatorEventMap, I as IndicatorHandle, o as IndicatorSummary, L as LegendActionDescriptor, p as LegendCalloutContent, q as LegendCalloutDescriptor, r as LegendCalloutItem, s as LegendCalloutSpec, t as LegendIndicatorInfo, M as MarksControl, N as NativeIndicator, u as NativeIndicatorContext, v as NativeIndicatorDescriptor, w as NativeIndicatorInfo, x as NativeIndicatorOutput, O as OVERRIDABLE_TOPBAR_IDS, P as ParsedSymbol, y as PreparedScript, z as RendererControl, A as RunIndicatorResult, G as SceneInspection, a as ScriptRun, H as ScriptRunCause, J as ScriptRunResult, S as ScriptingEngine, K as SidePanelButton, Q as SidePanelDescriptor, T as SidePanelHandle, U as SidePanelHeader, X as StatePersistenceHandler, Y as StrategyFill, Z as StrategyState, _ as StrategyTrade, $ as SymbolRankingHook, a0 as TypedEventBus, V as Vela, a1 as VelaDeps, a2 as VelaEventMap, a3 as VisibleBarRange, a4 as WidgetActionDescriptor, a5 as WidgetActionTarget, a6 as WidgetAttachment, W as WidgetContext, a7 as getNativeIndicator, a8 as legendActions, a9 as legendCallouts, aa as nativeIndicatorDescriptors, ab as nativeIndicatorTypes, ac as registerDefaultEngine, ad as registerLegendAction, ae as registerLegendCallout, af as registerNativeIndicator, ag as registerSidePanel, ah as registerStatePersistence, ai as registerSymbolRanking, aj as registerWidgetAction, ak as registerWidgetAttachment, al as resolveEngines, am as sidePanels, an as statePersistenceHandlers, ao as symbolRanking, ap as topbarActionOverride, aq as unregisterDefaultEngine, ar as unregisterLegendAction, as as unregisterLegendCallout, at as unregisterNativeIndicator, au as unregisterSidePanel, av as unregisterStatePersistence, aw as unregisterWidgetAction, ax as unregisterWidgetAttachment, ay as widgetActions, az as widgetAttachments } from './contributions-BjQ7hyIx.js';
3
- import { D as Drawing, S as SerializedDrawing, U as Unsubscribe, L as LineStyle, P as PriceStyle, e as IChartRenderer, R as RendererCapabilities, f as RendererDisplayOptions, g as IndicatorRenderHandle, h as IndicatorStatus, c as VelaTheme, W as WallClock, O as OHLCV, i as Pane, j as PaneAction, k as MoveTarget, l as IndicatorModel, m as ScenePatch, I as InputValue, n as SymbolPickerFn, o as LegendActionView, p as LegendCalloutView, q as InputChangeEvent, T as ThemeName, C as CrosshairEvent, r as ClickEvent, A as AxisLongPressEvent, s as TimelineMark, t as MarkGroup, u as MarkClickEvent, a as VisibleRange, v as DataWindowReadout, w as IDrawingsRendererPort, x as Millis, y as SnapMode, z as DrawingTypeKey, B as ToolbarDefinition, M as MarketConfig } from './options-ex2_gtKp.js';
4
- export { E as AddIndicatorOptions, F as AnimationConfig, G as Background, H as BoxFontFamily, J as BoxHAlign, K as BoxTextSize, Q as BoxVAlign, X as CandleBarColor, Y as CandleSeries, Z as CandleStyle, _ as DataWindowGroup, $ as DataWindowOHLC, a0 as DataWindowRow, a1 as DirtyRange, a2 as DrawingBox, a3 as DrawingExtend, a4 as DrawingIntent, a5 as DrawingLabel, a6 as DrawingLine, a7 as DrawingLinefill, a8 as DrawingMode, a9 as DrawingPoint, aa as DrawingPolyline, ab as DrawingSeriesBar, ac as DrawingSeriesGateway, ad as DrawingSeriesState, ae as DrawingStyle, af as DrawingTable, ag as DrawingText, ah as DrawingXLoc, ai as DrawingsOption, aj as Fill, ak as FillGradientStop, al as IndicatorMeta, am as InputCondition, an as InputSchema, ao as InputType, ap as InputWhen, aq as IntroAnimation, ar as IntroConfig, as as IntroStyle, at as LabelStyle, au as LabelYLoc, av as LineLikeKind, aw as LineLikeSeries, ax as LineLikeStyle, ay as MarkContent, az as MarkContentSource, aA as MarkGlyph, aB as MarkPanelItem, aC as MarkShape, aD as MarkerPoint, aE as MarkerSeries, aF as MarketSnapshot, aG as MarketSwitch, aH as PaneAxis, aI as PaneAxisBand, aJ as PaneHint, aK as PaneKind, aL as PolylinePoint, aM as PriceLine, aN as Projector, aO as ProviderName, aP as RendererConstructor, aQ as Scene, aR as SchemaPatch, aS as SecondClock, aT as SeriesKind, aU as SeriesPoint, aV as SeriesSpec, aW as SeriesValueDelta, aX as SettingsField, aY as SettingsSchema, aZ as SettingsVisibilityPolicy, a_ as TableCell, a$ as TableMerge, b0 as TablePosition, b1 as ToolbarGroupConfig, b2 as TradeExecution, b3 as ValuePatch, b as VelaOptions, V as VisibleRangePreset, b4 as buildToolbar, b5 as defaultToolbar, b6 as inputDeltas, b7 as inputVisible } from './options-ex2_gtKp.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-Bu9E5Zh5.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 CHIP_PLATE, f as CROSSHAIR, g as ChartTypeDefinition, h as ChartTypeSettingsInstance, i as ChartTypeSettingsSection, j as ChartTypeSettingsSubsection, D as DrawingTypeMeta, H as HIGHLIGHT, I as INFO, k as INVALID, l as IdentifiableKind, M as MARKER, N as NEUTRAL, m as NormalizedSettingsRow, R as RendererLayerArgs, n as RendererLayerDefinition, o as RendererLayerInstance, S as SERIES_LINE, p as SESSION_OFF, q as SESSION_POST, r as SESSION_PRE, s as SLATE, t as SLATE_DEEP, u as SeriesDataEngine, v as SeriesDataEngineHost, w as SettingsInlineControl, x as SettingsRowCondition, y as SettingsRowDescriptor, z as SettingsRowInlineNumber, E as SettingsRowSwatch, F as SettingsRowValueKey, G as SettingsRowWhen, J as SettingsRowWidth, K as SettingsSelectOption, L as SettingsValueRow, T as TRADE_EXIT, O as TRADE_LONG, P as TRADE_SHORT, V as VALID, W as WARNING, Q as categoricalColor, U as chartType, X as chartTypes, Y as createDrawing, Z as deserializeDrawing, _ as drawingTypes, $ as getDrawingType, a0 as normalizeSettingsRow, a1 as registerChartType, a2 as registerDrawingType, a3 as registerRendererDefaults, a4 as registerRendererLayer, a5 as rendererDefaults, a6 as rendererLayers, a7 as settingsRowValueKeys, a8 as stableSeriesId, a9 as tickerModifierIds, aa as unregisterChartType, ab as unregisterRendererDefaults, ac as unregisterRendererLayer } from './plugin-CiyhU7pi.js';
1
+ import { D as DrawingsDocument, R as Resolved } from './contributions-BbhbZd3c.js';
2
+ export { B as BarsChangeReason, C as CellStateContext, b as ContextSelect, c as DataControl, d as DrawingsControl, e as EngineAlert, f as EngineCapabilities, g as EngineContextSnapshot, h as EngineFactory, i as EngineWarning, j as ExecutionHandlers, k as ExecutionMarket, l as ExecutionRequest, m as ExecutionSession, E as ExternalIndicatorEntry, F as FetchSeries, n as IndicatorEventMap, I as IndicatorHandle, o as IndicatorSummary, L as LegendActionDescriptor, p as LegendCalloutContent, q as LegendCalloutDescriptor, r as LegendCalloutItem, s as LegendCalloutSpec, t as LegendIndicatorInfo, M as MarksControl, N as NativeIndicator, u as NativeIndicatorContext, v as NativeIndicatorDescriptor, w as NativeIndicatorInfo, x as NativeIndicatorOutput, O as OVERRIDABLE_TOPBAR_IDS, P as ParsedSymbol, y as PreparedScript, z as RendererControl, A as RunIndicatorResult, G as SceneInspection, a as ScriptRun, H as ScriptRunCause, J as ScriptRunResult, S as ScriptingEngine, K as SidePanelButton, Q as SidePanelDescriptor, T as SidePanelHandle, U as SidePanelHeader, X as StatePersistenceHandler, Y as StrategyFill, Z as StrategyState, _ as StrategyTrade, $ as SymbolRankingHook, a0 as TypedEventBus, V as Vela, a1 as VelaDeps, a2 as VelaEventMap, a3 as VisibleBarRange, a4 as WidgetActionDescriptor, a5 as WidgetActionTarget, a6 as WidgetAttachment, W as WidgetContext, a7 as getNativeIndicator, a8 as legendActions, a9 as legendCallouts, aa as nativeIndicatorDescriptors, ab as nativeIndicatorTypes, ac as registerDefaultEngine, ad as registerLegendAction, ae as registerLegendCallout, af as registerNativeIndicator, ag as registerSidePanel, ah as registerStatePersistence, ai as registerSymbolRanking, aj as registerWidgetAction, ak as registerWidgetAttachment, al as resolveEngines, am as sidePanels, an as statePersistenceHandlers, ao as symbolRanking, ap as topbarActionOverride, aq as unregisterDefaultEngine, ar as unregisterLegendAction, as as unregisterLegendCallout, at as unregisterNativeIndicator, au as unregisterSidePanel, av as unregisterStatePersistence, aw as unregisterWidgetAction, ax as unregisterWidgetAttachment, ay as widgetActions, az as widgetAttachments } from './contributions-BbhbZd3c.js';
3
+ import { D as Drawing, S as SerializedDrawing, U as Unsubscribe, L as LineStyle, P as PriceStyle, e as IChartRenderer, R as RendererCapabilities, f as RendererDisplayOptions, g as IndicatorRenderHandle, h as IndicatorStatus, c as VelaTheme, W as WallClock, O as OHLCV, i as Pane, j as PaneAction, k as MoveTarget, l as IndicatorModel, m as ScenePatch, I as InputValue, n as SymbolPickerFn, o as LegendActionView, p as LegendCalloutView, q as InputChangeEvent, T as ThemeName, C as CrosshairEvent, r as ClickEvent, A as AxisLongPressEvent, s as TimelineMark, t as MarkGroup, u as MarkClickEvent, a as VisibleRange, v as DataWindowReadout, w as IDrawingsRendererPort, x as Millis, y as SnapMode, z as DrawingTypeKey, B as ToolbarDefinition, M as MarketConfig } from './options-C7b_Qssu.js';
4
+ export { E as AddIndicatorOptions, F as AnimationConfig, G as Background, H as BoxFontFamily, J as BoxHAlign, K as BoxTextSize, Q as BoxVAlign, X as CandleBarColor, Y as CandleSeries, Z as CandleStyle, _ as DataWindowGroup, $ as DataWindowOHLC, a0 as DataWindowRow, a1 as DirtyRange, a2 as DrawingBox, a3 as DrawingExtend, a4 as DrawingIntent, a5 as DrawingLabel, a6 as DrawingLine, a7 as DrawingLinefill, a8 as DrawingMode, a9 as DrawingPoint, aa as DrawingPolyline, ab as DrawingSeriesBar, ac as DrawingSeriesGateway, ad as DrawingSeriesState, ae as DrawingStyle, af as DrawingTable, ag as DrawingText, ah as DrawingXLoc, ai as DrawingsOption, aj as Fill, ak as FillGradientStop, al as IndicatorMeta, am as InputCondition, an as InputSchema, ao as InputType, ap as InputWhen, aq as IntroAnimation, ar as IntroConfig, as as IntroStyle, at as LabelStyle, au as LabelYLoc, av as LineLikeKind, aw as LineLikeSeries, ax as LineLikeStyle, ay as MarkContent, az as MarkContentSource, aA as MarkGlyph, aB as MarkPanelItem, aC as MarkShape, aD as MarkerPoint, aE as MarkerSeries, aF as MarketSnapshot, aG as MarketSwitch, aH as PaneAxis, aI as PaneAxisBand, aJ as PaneHint, aK as PaneKind, aL as PolylinePoint, aM as PriceLine, aN as Projector, aO as ProviderName, aP as RendererConstructor, aQ as Scene, aR as SchemaPatch, aS as SecondClock, aT as SeriesDisplay, aU as SeriesKind, aV as SeriesPoint, aW as SeriesSpec, aX as SeriesSurface, aY as SeriesValueDelta, aZ as SettingsField, a_ as SettingsSchema, a$ as SettingsVisibilityPolicy, b0 as TableCell, b1 as TableMerge, b2 as TablePosition, b3 as ToolbarGroupConfig, b4 as TradeExecution, b5 as ValuePatch, b as VelaOptions, V as VisibleRangePreset, b6 as buildToolbar, b7 as defaultToolbar, b8 as inputDeltas, b9 as inputVisible, ba as seriesInScale, bb as seriesShownOn } from './options-C7b_Qssu.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-BALR0qPq.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 CHIP_PLATE, f as CROSSHAIR, g as ChartTypeDefinition, h as ChartTypeSettingsInstance, i as ChartTypeSettingsSection, j as ChartTypeSettingsSubsection, D as DrawingTypeMeta, H as HIGHLIGHT, I as INFO, k as INVALID, l as IdentifiableKind, M as MARKER, N as NEUTRAL, m as NormalizedSettingsRow, R as RendererLayerArgs, n as RendererLayerDefinition, o as RendererLayerInstance, S as SERIES_LINE, p as SESSION_OFF, q as SESSION_POST, r as SESSION_PRE, s as SLATE, t as SLATE_DEEP, u as SeriesDataEngine, v as SeriesDataEngineHost, w as SettingsInlineControl, x as SettingsRowCondition, y as SettingsRowDescriptor, z as SettingsRowInlineNumber, E as SettingsRowSwatch, F as SettingsRowValueKey, G as SettingsRowWhen, J as SettingsRowWidth, K as SettingsSelectOption, L as SettingsValueRow, T as TRADE_EXIT, O as TRADE_LONG, P as TRADE_SHORT, V as VALID, W as WARNING, Q as categoricalColor, U as chartType, X as chartTypes, Y as createDrawing, Z as deserializeDrawing, _ as drawingTypes, $ as getDrawingType, a0 as normalizeSettingsRow, a1 as registerChartType, a2 as registerDrawingType, a3 as registerRendererDefaults, a4 as registerRendererLayer, a5 as rendererDefaults, a6 as rendererLayers, a7 as settingsRowValueKeys, a8 as stableSeriesId, a9 as tickerModifierIds, aa as unregisterChartType, ab as unregisterRendererDefaults, ac as unregisterRendererLayer } from './plugin-Cnix5ZBh.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-HF0IAzwf.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';
@@ -379,6 +379,13 @@ declare class NativeRenderer implements IChartRenderer {
379
379
  private readonly backdropRenderer;
380
380
  private readonly volumeRenderer;
381
381
  /** SDK renderer layers instantiated at mount ({@link registerRendererLayer}). */
382
+ /**
383
+ * The mounted SDK layers. One BASE entry per registered definition (channel = the layer
384
+ * id, no owner of its own), plus one DEDICATED entry per mounted native indicator whose
385
+ * model names its own channel (`native.channel` — an instance of a multi-instance type):
386
+ * same definition, its own canvas, reading that instance's channel and following that
387
+ * instance's pane and z key. `channel` is unique across the array.
388
+ */
382
389
  private extLayers;
383
390
  /** Last applied layer-canvas order (ids below + above the data canvas) — re-slotted only on change. */
384
391
  private layerOrderSig;
@@ -888,24 +895,29 @@ declare class NativeRenderer implements IChartRenderer {
888
895
  private dataWindowPricePane;
889
896
  private dataWindowFmt;
890
897
  private dataWindowOHLC;
891
- /** One group per indicator (name = indicator title), each with a row per drawable plot. */
898
+ /** One group per indicator (name = indicator title), each with a row per plot shown in the data window. */
892
899
  private dataWindowGroups;
893
- /** One indicator's readout at bar `idx`: a row per drawable plot, formatted on its pane's scale. */
894
- private dataWindowRowsFor;
900
+ /** One indicator's readout at bar `idx` for one value surface (the legend or the data window):
901
+ * a row per plot shown on that surface, formatted on its pane's scale. A plot's `display`
902
+ * decides per surface — a data-window-only plot has a row here and none in the legend. */
903
+ private readoutRowsFor;
895
904
  /** The volume indicator's readout: the bar's volume, tinted with the layer's own direction
896
905
  * colors. Hiding volume keeps its model in the scene (only the layer is suppressed — see
897
906
  * `setIndicatorVisible`), so the hidden flag is checked here rather than by model absence. */
898
907
  private volumeReadoutRows;
899
- /** Refresh the plot values beside every legend title — the same readout the data window
900
- * shows (crosshair bar, else the latest bar), pushed per paint. A hidden indicator has
901
- * no scene model, so its row is absent from the map and its readout clears. */
908
+ /** Refresh the plot values beside every legend title — the same bar the data window reads
909
+ * (crosshair bar, else the latest bar), pushed per paint, filtered to the plots whose
910
+ * `display` includes the legend. A hidden indicator has no scene model, so its row is
911
+ * absent from the map and its readout clears. */
902
912
  private updateLegendValues;
903
913
  private renderFrame;
904
914
  /** Repaint the SDK layers that opted into cursor tracking (their own canvas only). */
905
915
  private repaintCursorLayers;
906
916
  /** Blank one SDK layer canvas (a collapsed host pane suppresses the layer's painting). */
907
917
  private clearLayerCanvas;
908
- /** One frame's args for an SDK renderer layer (shared by the data + cursor paint paths). */
918
+ /** One frame's args for an SDK renderer layer (shared by the data + cursor paint paths).
919
+ * Data + pending come from the entry's channel (per instance for a dedicated entry);
920
+ * the settings bag is the TYPE's — a chart type's dialog values, one bag per type. */
909
921
  private extLayerArgs;
910
922
  /** Paint the below-data (L-1) + geometry (L0) + chrome (L1) layers from the current scene/coords. */
911
923
  private paintData;
@@ -968,10 +980,25 @@ declare class NativeRenderer implements IChartRenderer {
968
980
  private paneMasterTitle;
969
981
  /** The pane a bespoke-layer native indicator (volume/vpvr) currently lives in (null = not mounted). */
970
982
  private nativeLayerPane;
971
- /** The mounted native indicator that OWNS an SDK layer the one whose type equals the
972
- * layer id (the id doubles as the data channel, so the pairing is the SDK's own
973
- * contract). Null for chart-type channels and while the owner is hidden (a hidden
974
- * indicator leaves the scene; its cleared data channel paints nothing anyway). */
983
+ /** One transparent, pointer-transparent SDK layer canvas covering the plot. */
984
+ private createLayerCanvas;
985
+ /**
986
+ * Mount the DEDICATED layer of a native indicator that names its own channel (an
987
+ * instance of a multi-instance type painting through a registered layer): a fresh
988
+ * instance of the layer's definition on its own canvas, reading that channel. Idempotent
989
+ * — a show after hide re-mounts the model, and the layer (kept across the hide, like the
990
+ * z key) is simply reused. Skipped while the renderer itself is unmounted (`mount()`
991
+ * catches up from the scene).
992
+ */
993
+ private ensureInstanceLayer;
994
+ /** Tear down the dedicated layer of a removed indicator (a hide keeps it). */
995
+ private dropInstanceLayer;
996
+ /** The mounted native indicator that OWNS an SDK layer entry. A dedicated entry is
997
+ * owned by the instance it was mounted for; the base entry by the mounted indicator
998
+ * whose type equals the layer id and that has no channel of its own (the id doubles
999
+ * as the data channel, so the pairing is the SDK's own contract). Null for chart-type
1000
+ * channels and while the owner is hidden (a hidden indicator leaves the scene; its
1001
+ * cleared data channel paints nothing anyway). */
975
1002
  private layerOwner;
976
1003
  /** The pane an SDK layer paints on: its owner's pane, else the price pane. */
977
1004
  private layerPane;
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import './chunk-FE6V2YAQ.js';
2
- export { BarStore, CachingDataFeed, DARK_THEME, DataControl, DrawingStore, DrawingToolbar, DrawingsControl, LIGHT_THEME, MarksControl, MultiProviderFeed, NativeRenderer, RendererControl, SecondClock, TypedEventBus, Vela, buildToolbar, defaultToolbar, resolveTheme, sharedBarStore, timeframeToMs } from './chunk-A4G64KVF.js';
3
- export { DEFAULT_PANEL_MAX_WIDTH, DEFAULT_PANEL_MIN_WIDTH, DEFAULT_PANEL_WIDTH, Drawing, OVERRIDABLE_TOPBAR_IDS, chartType, chartTypes, clampPanelWidth, createDrawing, deserializeDrawing, drawingTypes, getDrawingType, getNativeIndicator, inputDeltas, inputVisible, legendActions, legendCallouts, nativeIndicatorDescriptors, nativeIndicatorTypes, normalizeSettingsRow, registerChartType, registerDefaultEngine, registerDrawingType, registerLegendAction, registerLegendCallout, registerNativeIndicator, registerRendererDefaults, registerRendererLayer, registerSidePanel, registerStatePersistence, registerSymbolRanking, registerWidgetAction, registerWidgetAttachment, rendererDefaults, rendererLayers, resolveEngines, settingsRowValueKeys, sidePanels, stableSeriesId, statePersistenceHandlers, symbolRanking, tickerModifierIds, topbarActionOverride, unregisterChartType, unregisterDefaultEngine, unregisterLegendAction, unregisterLegendCallout, unregisterNativeIndicator, unregisterRendererDefaults, unregisterRendererLayer, unregisterSidePanel, unregisterStatePersistence, unregisterWidgetAction, unregisterWidgetAttachment, widgetActions, widgetAttachments } from './chunk-IFJJPXSV.js';
4
- import './chunk-CZRNTHD6.js';
1
+ import './chunk-JU4CWEBF.js';
2
+ export { BarStore, CachingDataFeed, DARK_THEME, DataControl, DrawingStore, DrawingToolbar, DrawingsControl, LIGHT_THEME, MarksControl, MultiProviderFeed, NativeRenderer, RendererControl, SecondClock, TypedEventBus, Vela, buildToolbar, defaultToolbar, resolveTheme, sharedBarStore, timeframeToMs } from './chunk-5RQGCZTX.js';
3
+ export { DEFAULT_PANEL_MAX_WIDTH, DEFAULT_PANEL_MIN_WIDTH, DEFAULT_PANEL_WIDTH, Drawing, OVERRIDABLE_TOPBAR_IDS, chartType, chartTypes, clampPanelWidth, createDrawing, deserializeDrawing, drawingTypes, getDrawingType, getNativeIndicator, inputDeltas, inputVisible, legendActions, legendCallouts, nativeIndicatorDescriptors, nativeIndicatorTypes, normalizeSettingsRow, registerChartType, registerDefaultEngine, registerDrawingType, registerLegendAction, registerLegendCallout, registerNativeIndicator, registerRendererDefaults, registerRendererLayer, registerSidePanel, registerStatePersistence, registerSymbolRanking, registerWidgetAction, registerWidgetAttachment, rendererDefaults, rendererLayers, resolveEngines, seriesInScale, seriesShownOn, settingsRowValueKeys, sidePanels, stableSeriesId, statePersistenceHandlers, symbolRanking, tickerModifierIds, topbarActionOverride, unregisterChartType, unregisterDefaultEngine, unregisterLegendAction, unregisterLegendCallout, unregisterNativeIndicator, unregisterRendererDefaults, unregisterRendererLayer, unregisterSidePanel, unregisterStatePersistence, unregisterWidgetAction, unregisterWidgetAttachment, widgetActions, widgetAttachments } from './chunk-BFA32GOU.js';
4
+ import './chunk-BKHSQ4YM.js';
5
5
  export { ACCENT, ACCENT_BRIGHT, BEARISH, BULLISH, CATEGORICAL, CHIP_PLATE, 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-CAFCLMPF.js';
@@ -64,6 +64,25 @@ interface MarkerPoint {
64
64
  text?: string;
65
65
  size?: 'tiny' | 'small' | 'normal' | 'large' | 'huge';
66
66
  }
67
+ /** A chart surface a series can show on (see {@link SeriesDisplay}). */
68
+ type SeriesSurface = 'pane' | 'priceScale' | 'legend' | 'dataWindow';
69
+ /**
70
+ * Where a series shows, surface by surface. Every flag defaults to shown; `false` takes
71
+ * the series off that one surface while it keeps anchoring fills:
72
+ * - `pane` — painted in its pane;
73
+ * - `priceScale` — present on the price scale: its values keep the pane's autoscale in
74
+ * view, and back any axis value label a renderer draws for it;
75
+ * - `legend` — its value beside the indicator's legend title;
76
+ * - `dataWindow` — its row in the data window.
77
+ * A series off both the pane and the price scale has no on-chart extent, so it never
78
+ * stretches the scale (see {@link seriesInScale}).
79
+ */
80
+ interface SeriesDisplay {
81
+ pane?: boolean;
82
+ priceScale?: boolean;
83
+ legend?: boolean;
84
+ dataWindow?: boolean;
85
+ }
67
86
  interface SeriesBase {
68
87
  /** Content-addressed, stable across re-runs of identical source (see identity.ts). */
69
88
  id: string;
@@ -72,7 +91,13 @@ interface SeriesBase {
72
91
  paneId: string;
73
92
  /** Declared draw-order intent; the renderer owns final z-ordering. */
74
93
  zOrder?: number;
94
+ /**
95
+ * `false` hides the series from every surface — a fill anchor that shows nowhere.
96
+ * The shorthand form: when {@link display} is set it decides instead, surface by surface.
97
+ */
75
98
  visible?: boolean;
99
+ /** Per-surface visibility; absent ⇒ every surface {@link visible} allows. */
100
+ display?: SeriesDisplay;
76
101
  /** `force_overlay` → render on the price pane regardless of the indicator's pane. */
77
102
  overlay?: boolean;
78
103
  }
@@ -93,6 +118,14 @@ interface MarkerSeries extends SeriesBase {
93
118
  markers: MarkerPoint[];
94
119
  }
95
120
  type SeriesSpec = LineLikeSeries | CandleSeries | MarkerSeries;
121
+ /** Whether a series shows on `surface`: its `display` flag when it carries one, else its `visible` shorthand. */
122
+ declare function seriesShownOn(spec: Pick<SeriesSpec, 'visible' | 'display'>, surface: SeriesSurface): boolean;
123
+ /**
124
+ * Whether a series takes part in its pane's autoscale: it is painted there, or its value
125
+ * sits on the price scale. A series that only reports a value (legend, data window) has
126
+ * nothing on the chart to keep in view and must not stretch the scale.
127
+ */
128
+ declare function seriesInScale(spec: Pick<SeriesSpec, 'visible' | 'display'>): boolean;
96
129
 
97
130
  /**
98
131
  * Renderer-neutral models for Pine drawing objects (`line.new`, `box.new`, …).
@@ -494,6 +527,14 @@ interface IndicatorModel {
494
527
  */
495
528
  native?: {
496
529
  type: string;
530
+ /**
531
+ * The renderer-layer data channel this instance's bespoke payload (`pushData`) lands
532
+ * on, when it differs from the type: set for an instance of a `multiInstance` type,
533
+ * so a renderer mounts a DEDICATED layer instance (own canvas, own pane, own stacking)
534
+ * reading this channel instead of the shared per-type layer. Absent ⇒ the type is the
535
+ * channel (single-instance natives, the built-in volume/VPVR).
536
+ */
537
+ channel?: string;
497
538
  };
498
539
  /** `false` ⇒ no legend row and no pane listing for this indicator (host-owned chrome); absent ⇒ a row. */
499
540
  legend?: boolean;
@@ -2048,4 +2089,4 @@ interface AddIndicatorOptions {
2048
2089
  title?: string;
2049
2090
  }
2050
2091
 
2051
- export { type DataWindowOHLC as $, type AxisLongPressEvent as A, type ToolbarDefinition as B, type CrosshairEvent as C, Drawing as D, type AddIndicatorOptions as E, type AnimationConfig as F, type Background as G, type BoxFontFamily as H, type InputValue as I, type BoxHAlign as J, type BoxTextSize as K, type LineStyle as L, type MarketConfig as M, type NativeBackend as N, type OHLCV as O, type PriceStyle as P, type BoxVAlign as Q, type RendererCapabilities as R, type SerializedDrawing as S, type ThemeName as T, type Unsubscribe as U, type VisibleRangePreset as V, type WallClock as W, type CandleBarColor as X, type CandleSeries as Y, type CandleStyle as Z, type DataWindowGroup as _, type VisibleRange as a, type TableMerge as a$, type DataWindowRow as a0, type DirtyRange as a1, type DrawingBox as a2, type DrawingExtend as a3, type DrawingIntent as a4, type DrawingLabel as a5, type DrawingLine as a6, type DrawingLinefill as a7, type DrawingMode as a8, type DrawingPoint as a9, type MarkGlyph as aA, type MarkPanelItem as aB, type MarkShape as aC, type MarkerPoint as aD, type MarkerSeries as aE, type MarketSnapshot as aF, type MarketSwitch as aG, type PaneAxis as aH, type PaneAxisBand as aI, type PaneHint as aJ, type PaneKind as aK, type PolylinePoint as aL, type PriceLine as aM, type Projector as aN, type ProviderName as aO, type RendererConstructor as aP, type Scene as aQ, type SchemaPatch as aR, SecondClock as aS, type SeriesKind as aT, type SeriesPoint as aU, type SeriesSpec as aV, type SeriesValueDelta as aW, type SettingsField as aX, type SettingsSchema as aY, type SettingsVisibilityPolicy as aZ, type TableCell as a_, type DrawingPolyline as aa, type DrawingSeriesBar as ab, type DrawingSeriesGateway as ac, type DrawingSeriesState as ad, type DrawingStyle as ae, type DrawingTable as af, type DrawingText as ag, type DrawingXLoc as ah, type DrawingsOption as ai, type Fill as aj, type FillGradientStop as ak, type IndicatorMeta as al, type InputCondition as am, type InputSchema as an, type InputType as ao, type InputWhen as ap, type IntroAnimation as aq, type IntroConfig as ar, type IntroStyle as as, type LabelStyle as at, type LabelYLoc as au, type LineLikeKind as av, type LineLikeSeries as aw, type LineLikeStyle as ax, type MarkContent as ay, type MarkContentSource as az, type VelaOptions as b, type TablePosition as b0, type ToolbarGroupConfig as b1, type TradeExecution as b2, type ValuePatch as b3, buildToolbar as b4, defaultToolbar as b5, inputDeltas as b6, inputVisible as b7, type PaneInfo as b8, type VelaTheme as c, type MarketSession as d, type IChartRenderer as e, type RendererDisplayOptions as f, type IndicatorRenderHandle as g, type IndicatorStatus as h, type Pane as i, type PaneAction as j, type MoveTarget as k, type IndicatorModel as l, type ScenePatch as m, type SymbolPickerFn as n, type LegendActionView as o, type LegendCalloutView as p, type InputChangeEvent as q, type ClickEvent as r, type TimelineMark as s, type MarkGroup as t, type MarkClickEvent as u, type DataWindowReadout as v, type IDrawingsRendererPort as w, type Millis as x, type SnapMode as y, type DrawingTypeKey as z };
2092
+ export { type DataWindowOHLC as $, type AxisLongPressEvent as A, type ToolbarDefinition as B, type CrosshairEvent as C, Drawing as D, type AddIndicatorOptions as E, type AnimationConfig as F, type Background as G, type BoxFontFamily as H, type InputValue as I, type BoxHAlign as J, type BoxTextSize as K, type LineStyle as L, type MarketConfig as M, type NativeBackend as N, type OHLCV as O, type PriceStyle as P, type BoxVAlign as Q, type RendererCapabilities as R, type SerializedDrawing as S, type ThemeName as T, type Unsubscribe as U, type VisibleRangePreset as V, type WallClock as W, type CandleBarColor as X, type CandleSeries as Y, type CandleStyle as Z, type DataWindowGroup as _, type VisibleRange as a, type SettingsVisibilityPolicy as a$, type DataWindowRow as a0, type DirtyRange as a1, type DrawingBox as a2, type DrawingExtend as a3, type DrawingIntent as a4, type DrawingLabel as a5, type DrawingLine as a6, type DrawingLinefill as a7, type DrawingMode as a8, type DrawingPoint as a9, type MarkGlyph as aA, type MarkPanelItem as aB, type MarkShape as aC, type MarkerPoint as aD, type MarkerSeries as aE, type MarketSnapshot as aF, type MarketSwitch as aG, type PaneAxis as aH, type PaneAxisBand as aI, type PaneHint as aJ, type PaneKind as aK, type PolylinePoint as aL, type PriceLine as aM, type Projector as aN, type ProviderName as aO, type RendererConstructor as aP, type Scene as aQ, type SchemaPatch as aR, SecondClock as aS, type SeriesDisplay as aT, type SeriesKind as aU, type SeriesPoint as aV, type SeriesSpec as aW, type SeriesSurface as aX, type SeriesValueDelta as aY, type SettingsField as aZ, type SettingsSchema as a_, type DrawingPolyline as aa, type DrawingSeriesBar as ab, type DrawingSeriesGateway as ac, type DrawingSeriesState as ad, type DrawingStyle as ae, type DrawingTable as af, type DrawingText as ag, type DrawingXLoc as ah, type DrawingsOption as ai, type Fill as aj, type FillGradientStop as ak, type IndicatorMeta as al, type InputCondition as am, type InputSchema as an, type InputType as ao, type InputWhen as ap, type IntroAnimation as aq, type IntroConfig as ar, type IntroStyle as as, type LabelStyle as at, type LabelYLoc as au, type LineLikeKind as av, type LineLikeSeries as aw, type LineLikeStyle as ax, type MarkContent as ay, type MarkContentSource as az, type VelaOptions as b, type TableCell as b0, type TableMerge as b1, type TablePosition as b2, type ToolbarGroupConfig as b3, type TradeExecution as b4, type ValuePatch as b5, buildToolbar as b6, defaultToolbar as b7, inputDeltas as b8, inputVisible as b9, seriesInScale as ba, seriesShownOn as bb, type PaneInfo as bc, type VelaTheme as c, type MarketSession as d, type IChartRenderer as e, type RendererDisplayOptions as f, type IndicatorRenderHandle as g, type IndicatorStatus as h, type Pane as i, type PaneAction as j, type MoveTarget as k, type IndicatorModel as l, type ScenePatch as m, type SymbolPickerFn as n, type LegendActionView as o, type LegendCalloutView as p, type InputChangeEvent as q, type ClickEvent as r, type TimelineMark as s, type MarkGroup as t, type MarkClickEvent as u, type DataWindowReadout as v, type IDrawingsRendererPort as w, type Millis as x, type SnapMode as y, type DrawingTypeKey as z };
@@ -64,6 +64,25 @@ interface MarkerPoint {
64
64
  text?: string;
65
65
  size?: 'tiny' | 'small' | 'normal' | 'large' | 'huge';
66
66
  }
67
+ /** A chart surface a series can show on (see {@link SeriesDisplay}). */
68
+ type SeriesSurface = 'pane' | 'priceScale' | 'legend' | 'dataWindow';
69
+ /**
70
+ * Where a series shows, surface by surface. Every flag defaults to shown; `false` takes
71
+ * the series off that one surface while it keeps anchoring fills:
72
+ * - `pane` — painted in its pane;
73
+ * - `priceScale` — present on the price scale: its values keep the pane's autoscale in
74
+ * view, and back any axis value label a renderer draws for it;
75
+ * - `legend` — its value beside the indicator's legend title;
76
+ * - `dataWindow` — its row in the data window.
77
+ * A series off both the pane and the price scale has no on-chart extent, so it never
78
+ * stretches the scale (see {@link seriesInScale}).
79
+ */
80
+ interface SeriesDisplay {
81
+ pane?: boolean;
82
+ priceScale?: boolean;
83
+ legend?: boolean;
84
+ dataWindow?: boolean;
85
+ }
67
86
  interface SeriesBase {
68
87
  /** Content-addressed, stable across re-runs of identical source (see identity.ts). */
69
88
  id: string;
@@ -72,7 +91,13 @@ interface SeriesBase {
72
91
  paneId: string;
73
92
  /** Declared draw-order intent; the renderer owns final z-ordering. */
74
93
  zOrder?: number;
94
+ /**
95
+ * `false` hides the series from every surface — a fill anchor that shows nowhere.
96
+ * The shorthand form: when {@link display} is set it decides instead, surface by surface.
97
+ */
75
98
  visible?: boolean;
99
+ /** Per-surface visibility; absent ⇒ every surface {@link visible} allows. */
100
+ display?: SeriesDisplay;
76
101
  /** `force_overlay` → render on the price pane regardless of the indicator's pane. */
77
102
  overlay?: boolean;
78
103
  }
@@ -93,6 +118,14 @@ interface MarkerSeries extends SeriesBase {
93
118
  markers: MarkerPoint[];
94
119
  }
95
120
  type SeriesSpec = LineLikeSeries | CandleSeries | MarkerSeries;
121
+ /** Whether a series shows on `surface`: its `display` flag when it carries one, else its `visible` shorthand. */
122
+ declare function seriesShownOn(spec: Pick<SeriesSpec, 'visible' | 'display'>, surface: SeriesSurface): boolean;
123
+ /**
124
+ * Whether a series takes part in its pane's autoscale: it is painted there, or its value
125
+ * sits on the price scale. A series that only reports a value (legend, data window) has
126
+ * nothing on the chart to keep in view and must not stretch the scale.
127
+ */
128
+ declare function seriesInScale(spec: Pick<SeriesSpec, 'visible' | 'display'>): boolean;
96
129
 
97
130
  /**
98
131
  * Renderer-neutral models for Pine drawing objects (`line.new`, `box.new`, …).
@@ -494,6 +527,14 @@ interface IndicatorModel {
494
527
  */
495
528
  native?: {
496
529
  type: string;
530
+ /**
531
+ * The renderer-layer data channel this instance's bespoke payload (`pushData`) lands
532
+ * on, when it differs from the type: set for an instance of a `multiInstance` type,
533
+ * so a renderer mounts a DEDICATED layer instance (own canvas, own pane, own stacking)
534
+ * reading this channel instead of the shared per-type layer. Absent ⇒ the type is the
535
+ * channel (single-instance natives, the built-in volume/VPVR).
536
+ */
537
+ channel?: string;
497
538
  };
498
539
  /** `false` ⇒ no legend row and no pane listing for this indicator (host-owned chrome); absent ⇒ a row. */
499
540
  legend?: boolean;
@@ -2048,4 +2089,4 @@ interface AddIndicatorOptions {
2048
2089
  title?: string;
2049
2090
  }
2050
2091
 
2051
- export { type DataWindowOHLC as $, type AxisLongPressEvent as A, type ToolbarDefinition as B, type CrosshairEvent as C, Drawing as D, type AddIndicatorOptions as E, type AnimationConfig as F, type Background as G, type BoxFontFamily as H, type InputValue as I, type BoxHAlign as J, type BoxTextSize as K, type LineStyle as L, type MarketConfig as M, type NativeBackend as N, type OHLCV as O, type PriceStyle as P, type BoxVAlign as Q, type RendererCapabilities as R, type SerializedDrawing as S, type ThemeName as T, type Unsubscribe as U, type VisibleRangePreset as V, type WallClock as W, type CandleBarColor as X, type CandleSeries as Y, type CandleStyle as Z, type DataWindowGroup as _, type VisibleRange as a, type TableMerge as a$, type DataWindowRow as a0, type DirtyRange as a1, type DrawingBox as a2, type DrawingExtend as a3, type DrawingIntent as a4, type DrawingLabel as a5, type DrawingLine as a6, type DrawingLinefill as a7, type DrawingMode as a8, type DrawingPoint as a9, type MarkGlyph as aA, type MarkPanelItem as aB, type MarkShape as aC, type MarkerPoint as aD, type MarkerSeries as aE, type MarketSnapshot as aF, type MarketSwitch as aG, type PaneAxis as aH, type PaneAxisBand as aI, type PaneHint as aJ, type PaneKind as aK, type PolylinePoint as aL, type PriceLine as aM, type Projector as aN, type ProviderName as aO, type RendererConstructor as aP, type Scene as aQ, type SchemaPatch as aR, SecondClock as aS, type SeriesKind as aT, type SeriesPoint as aU, type SeriesSpec as aV, type SeriesValueDelta as aW, type SettingsField as aX, type SettingsSchema as aY, type SettingsVisibilityPolicy as aZ, type TableCell as a_, type DrawingPolyline as aa, type DrawingSeriesBar as ab, type DrawingSeriesGateway as ac, type DrawingSeriesState as ad, type DrawingStyle as ae, type DrawingTable as af, type DrawingText as ag, type DrawingXLoc as ah, type DrawingsOption as ai, type Fill as aj, type FillGradientStop as ak, type IndicatorMeta as al, type InputCondition as am, type InputSchema as an, type InputType as ao, type InputWhen as ap, type IntroAnimation as aq, type IntroConfig as ar, type IntroStyle as as, type LabelStyle as at, type LabelYLoc as au, type LineLikeKind as av, type LineLikeSeries as aw, type LineLikeStyle as ax, type MarkContent as ay, type MarkContentSource as az, type VelaOptions as b, type TablePosition as b0, type ToolbarGroupConfig as b1, type TradeExecution as b2, type ValuePatch as b3, buildToolbar as b4, defaultToolbar as b5, inputDeltas as b6, inputVisible as b7, type PaneInfo as b8, type VelaTheme as c, type MarketSession as d, type IChartRenderer as e, type RendererDisplayOptions as f, type IndicatorRenderHandle as g, type IndicatorStatus as h, type Pane as i, type PaneAction as j, type MoveTarget as k, type IndicatorModel as l, type ScenePatch as m, type SymbolPickerFn as n, type LegendActionView as o, type LegendCalloutView as p, type InputChangeEvent as q, type ClickEvent as r, type TimelineMark as s, type MarkGroup as t, type MarkClickEvent as u, type DataWindowReadout as v, type IDrawingsRendererPort as w, type Millis as x, type SnapMode as y, type DrawingTypeKey as z };
2092
+ export { type DataWindowOHLC as $, type AxisLongPressEvent as A, type ToolbarDefinition as B, type CrosshairEvent as C, Drawing as D, type AddIndicatorOptions as E, type AnimationConfig as F, type Background as G, type BoxFontFamily as H, type InputValue as I, type BoxHAlign as J, type BoxTextSize as K, type LineStyle as L, type MarketConfig as M, type NativeBackend as N, type OHLCV as O, type PriceStyle as P, type BoxVAlign as Q, type RendererCapabilities as R, type SerializedDrawing as S, type ThemeName as T, type Unsubscribe as U, type VisibleRangePreset as V, type WallClock as W, type CandleBarColor as X, type CandleSeries as Y, type CandleStyle as Z, type DataWindowGroup as _, type VisibleRange as a, type SettingsVisibilityPolicy as a$, type DataWindowRow as a0, type DirtyRange as a1, type DrawingBox as a2, type DrawingExtend as a3, type DrawingIntent as a4, type DrawingLabel as a5, type DrawingLine as a6, type DrawingLinefill as a7, type DrawingMode as a8, type DrawingPoint as a9, type MarkGlyph as aA, type MarkPanelItem as aB, type MarkShape as aC, type MarkerPoint as aD, type MarkerSeries as aE, type MarketSnapshot as aF, type MarketSwitch as aG, type PaneAxis as aH, type PaneAxisBand as aI, type PaneHint as aJ, type PaneKind as aK, type PolylinePoint as aL, type PriceLine as aM, type Projector as aN, type ProviderName as aO, type RendererConstructor as aP, type Scene as aQ, type SchemaPatch as aR, SecondClock as aS, type SeriesDisplay as aT, type SeriesKind as aU, type SeriesPoint as aV, type SeriesSpec as aW, type SeriesSurface as aX, type SeriesValueDelta as aY, type SettingsField as aZ, type SettingsSchema as a_, type DrawingPolyline as aa, type DrawingSeriesBar as ab, type DrawingSeriesGateway as ac, type DrawingSeriesState as ad, type DrawingStyle as ae, type DrawingTable as af, type DrawingText as ag, type DrawingXLoc as ah, type DrawingsOption as ai, type Fill as aj, type FillGradientStop as ak, type IndicatorMeta as al, type InputCondition as am, type InputSchema as an, type InputType as ao, type InputWhen as ap, type IntroAnimation as aq, type IntroConfig as ar, type IntroStyle as as, type LabelStyle as at, type LabelYLoc as au, type LineLikeKind as av, type LineLikeSeries as aw, type LineLikeStyle as ax, type MarkContent as ay, type MarkContentSource as az, type VelaOptions as b, type TableCell as b0, type TableMerge as b1, type TablePosition as b2, type ToolbarGroupConfig as b3, type TradeExecution as b4, type ValuePatch as b5, buildToolbar as b6, defaultToolbar as b7, inputDeltas as b8, inputVisible as b9, seriesInScale as ba, seriesShownOn as bb, type PaneInfo as bc, type VelaTheme as c, type MarketSession as d, type IChartRenderer as e, type RendererDisplayOptions as f, type IndicatorRenderHandle as g, type IndicatorStatus as h, type Pane as i, type PaneAction as j, type MoveTarget as k, type IndicatorModel as l, type ScenePatch as m, type SymbolPickerFn as n, type LegendActionView as o, type LegendCalloutView as p, type InputChangeEvent as q, type ClickEvent as r, type TimelineMark as s, type MarkGroup as t, type MarkClickEvent as u, type DataWindowReadout as v, type IDrawingsRendererPort as w, type Millis as x, type SnapMode as y, type DrawingTypeKey as z };
@@ -1,9 +1,9 @@
1
- import { z as DrawingTypeKey, ae as DrawingStyle, S as SerializedDrawing, D as Drawing, aT as SeriesKind, O as OHLCV, c as VelaTheme } from './options-ex2_gtKp.js';
2
- import { c as DataControl } from './contributions-BjQ7hyIx.js';
1
+ import { z as DrawingTypeKey, ae as DrawingStyle, S as SerializedDrawing, D as Drawing, aU as SeriesKind, O as OHLCV, c as VelaTheme } from './options-C7b_Qssu.js';
2
+ import { c as DataControl } from './contributions-BbhbZd3c.js';
3
3
  import './side-panel-HF0IAzwf.js';
4
4
  import './icons-BZYbJXSV.js';
5
5
  import './keymap-CGOz5F5f.js';
6
- import './DataProvider-Bu9E5Zh5.js';
6
+ import './DataProvider-BALR0qPq.js';
7
7
 
8
8
  /** What a drawing type contributes to the toolbar + factory (renderer-neutral). */
9
9
  interface DrawingTypeMeta {
@@ -657,7 +657,9 @@ interface RendererLayerDefinition {
657
657
  /** Repaint this layer when the pointer moves (hover hit-testing UIs). Off by default:
658
658
  * pointer moves normally repaint only the crosshair overlay, not the layers. */
659
659
  repaintOnCursor?: boolean;
660
- /** Instance factory — called once per mounted renderer. */
660
+ /** Instance factory — called once per mounted renderer, plus once per mounted instance
661
+ * of a `multiInstance` native indicator whose type equals this id (each instance paints
662
+ * through its own layer instance and canvas, fed by its own channel). */
661
663
  create(): RendererLayerInstance;
662
664
  }
663
665
  /** Register (or replace) a renderer layer. Renderers mounted AFTER registration pick it up. */
@@ -1,9 +1,9 @@
1
- import { z as DrawingTypeKey, ae as DrawingStyle, S as SerializedDrawing, D as Drawing, aT as SeriesKind, O as OHLCV, c as VelaTheme } from './options-ex2_gtKp.cjs';
2
- import { c as DataControl } from './contributions-Cv2Mutvn.cjs';
1
+ import { z as DrawingTypeKey, ae as DrawingStyle, S as SerializedDrawing, D as Drawing, aU as SeriesKind, O as OHLCV, c as VelaTheme } from './options-C7b_Qssu.cjs';
2
+ import { c as DataControl } from './contributions-CcBFe-91.cjs';
3
3
  import './side-panel-HF0IAzwf.cjs';
4
4
  import './icons-BZYbJXSV.cjs';
5
5
  import './keymap-CGOz5F5f.cjs';
6
- import './DataProvider-Ck2qyS_9.cjs';
6
+ import './DataProvider-D5uMiJYz.cjs';
7
7
 
8
8
  /** What a drawing type contributes to the toolbar + factory (renderer-neutral). */
9
9
  interface DrawingTypeMeta {
@@ -657,7 +657,9 @@ interface RendererLayerDefinition {
657
657
  /** Repaint this layer when the pointer moves (hover hit-testing UIs). Off by default:
658
658
  * pointer moves normally repaint only the crosshair overlay, not the layers. */
659
659
  repaintOnCursor?: boolean;
660
- /** Instance factory — called once per mounted renderer. */
660
+ /** Instance factory — called once per mounted renderer, plus once per mounted instance
661
+ * of a `multiInstance` native indicator whose type equals this id (each instance paints
662
+ * through its own layer instance and canvas, fed by its own channel). */
661
663
  create(): RendererLayerInstance;
662
664
  }
663
665
  /** Register (or replace) a renderer layer. Renderers mounted AFTER registration pick it up. */
package/dist/plugin.cjs CHANGED
@@ -2233,16 +2233,18 @@ var Pitchfork = class extends SegmentDrawing {
2233
2233
  geometry(proj) {
2234
2234
  const a = this.anchors[0];
2235
2235
  const b = this.anchors[1];
2236
- const c = this.anchors[2];
2237
- if (!a || !b || !c) return null;
2236
+ if (!a || !b) return null;
2238
2237
  const px = (p) => {
2239
2238
  const y = proj.yOf(p.price, this.paneId);
2240
2239
  return y == null ? null : [proj.xOf(p.time), y];
2241
2240
  };
2242
2241
  const P0 = px(a);
2243
2242
  const P1 = px(b);
2243
+ if (!P0 || !P1) return null;
2244
+ const c = this.anchors[2];
2245
+ if (!c) return { segments: [[P0[0], P0[1], P1[0], P1[1]]], fill: null };
2244
2246
  const P2 = px(c);
2245
- if (!P0 || !P1 || !P2) return null;
2247
+ if (!P2) return null;
2246
2248
  const mx = (P1[0] + P2[0]) / 2;
2247
2249
  const my = (P1[1] + P2[1]) / 2;
2248
2250
  const dx = mx - P0[0];
@@ -2289,16 +2291,19 @@ var PitchforkVariant = class extends SegmentDrawing {
2289
2291
  geometry(proj) {
2290
2292
  const a = this.anchors[0];
2291
2293
  const b = this.anchors[1];
2292
- const c = this.anchors[2];
2293
- if (!a || !b || !c) return null;
2294
+ if (!a || !b) return null;
2294
2295
  const px = (p) => {
2295
2296
  const y = proj.yOf(p.price, this.paneId);
2296
2297
  return y == null ? null : [proj.xOf(p.time), y];
2297
2298
  };
2298
- const S2 = px(this.medianStart(a, b, c));
2299
+ const P0 = px(a);
2299
2300
  const P1 = px(b);
2301
+ if (!P0 || !P1) return null;
2302
+ const c = this.anchors[2];
2303
+ if (!c) return { segments: [[P0[0], P0[1], P1[0], P1[1]]], fill: null };
2304
+ const S2 = px(this.medianStart(a, b, c));
2300
2305
  const P2 = px(c);
2301
- if (!S2 || !P1 || !P2) return null;
2306
+ if (!S2 || !P2) return null;
2302
2307
  const mx = (P1[0] + P2[0]) / 2;
2303
2308
  const my = (P1[1] + P2[1]) / 2;
2304
2309
  const dx = mx - S2[0];
@@ -2313,8 +2318,12 @@ var PitchforkVariant = class extends SegmentDrawing {
2313
2318
  // upper tine
2314
2319
  extendRay(P2[0], P2[1], P2[0] + dx, P2[1] + dy, "right", w, h),
2315
2320
  // lower tine
2316
- [P1[0], P1[1], P2[0], P2[1]]
2321
+ [P1[0], P1[1], P2[0], P2[1]],
2317
2322
  // base line
2323
+ // The median leaves from the shifted origin, not the pivot — without this construction
2324
+ // line the pivot handle would float unattached to the shape it defines.
2325
+ [P0[0], P0[1], P1[0], P1[1]]
2326
+ // pivot → first tine anchor
2318
2327
  ],
2319
2328
  fill: null
2320
2329
  };
@@ -2371,17 +2380,19 @@ var InsidePitchfork = class extends SegmentDrawing {
2371
2380
  geometry(proj) {
2372
2381
  const a = this.anchors[0];
2373
2382
  const b = this.anchors[1];
2374
- const c = this.anchors[2];
2375
- if (!a || !b || !c) return null;
2383
+ if (!a || !b) return null;
2376
2384
  const px = (p) => {
2377
2385
  const y = proj.yOf(p.price, this.paneId);
2378
2386
  return y == null ? null : [proj.xOf(p.time), y];
2379
2387
  };
2380
- const B = px({ time: (a.time + b.time) / 2, price: (a.price + b.price) / 2 });
2381
2388
  const P0 = px(a);
2382
2389
  const P1 = px(b);
2390
+ if (!P0 || !P1) return null;
2391
+ const c = this.anchors[2];
2392
+ if (!c) return { segments: [[P0[0], P0[1], P1[0], P1[1]]], fill: null };
2393
+ const B = px({ time: (a.time + b.time) / 2, price: (a.price + b.price) / 2 });
2383
2394
  const P2 = px(c);
2384
- if (!B || !P0 || !P1 || !P2) return null;
2395
+ if (!B || !P2) return null;
2385
2396
  const mx = (P1[0] + P2[0]) / 2;
2386
2397
  const my = (P1[1] + P2[1]) / 2;
2387
2398
  const dx = P2[0] - B[0];
@@ -2552,16 +2563,18 @@ var Triangle = class extends SegmentDrawing {
2552
2563
  geometry(proj) {
2553
2564
  const a = this.anchors[0];
2554
2565
  const b = this.anchors[1];
2555
- const c = this.anchors[2];
2556
- if (!a || !b || !c) return null;
2566
+ if (!a || !b) return null;
2557
2567
  const px = (p) => {
2558
2568
  const y = proj.yOf(p.price, this.paneId);
2559
2569
  return y == null ? null : [proj.xOf(p.time), y];
2560
2570
  };
2561
2571
  const A = px(a);
2562
2572
  const B = px(b);
2573
+ if (!A || !B) return null;
2574
+ const c = this.anchors[2];
2575
+ if (!c) return { segments: [[A[0], A[1], B[0], B[1]]], fill: null };
2563
2576
  const C = px(c);
2564
- if (!A || !B || !C) return null;
2577
+ if (!C) return null;
2565
2578
  return {
2566
2579
  segments: [
2567
2580
  [A[0], A[1], B[0], B[1]],
@@ -6135,6 +6148,15 @@ function inputDeltas(schema, values) {
6135
6148
  return Object.keys(out).length > 0 ? out : void 0;
6136
6149
  }
6137
6150
 
6151
+ // src/core/model/series.ts
6152
+ function seriesShownOn(spec, surface) {
6153
+ if (spec.display) return spec.display[surface] !== false;
6154
+ return spec.visible !== false;
6155
+ }
6156
+ function seriesInScale(spec) {
6157
+ return seriesShownOn(spec, "pane") || seriesShownOn(spec, "priceScale");
6158
+ }
6159
+
6138
6160
  // src/core/model/identity.ts
6139
6161
  function stableSeriesId(parts) {
6140
6162
  const normTitle = parts.title.trim().toLowerCase().replace(/\s+/g, "-");
@@ -6198,6 +6220,8 @@ exports.registerWidgetAttachment = registerWidgetAttachment;
6198
6220
  exports.rendererDefaults = rendererDefaults;
6199
6221
  exports.rendererLayers = rendererLayers;
6200
6222
  exports.resolveEngines = resolveEngines;
6223
+ exports.seriesInScale = seriesInScale;
6224
+ exports.seriesShownOn = seriesShownOn;
6201
6225
  exports.settingsRowValueKeys = settingsRowValueKeys;
6202
6226
  exports.sidePanels = sidePanels;
6203
6227
  exports.stableSeriesId = stableSeriesId;