@luxalgo/vela 0.7.2 → 0.7.3

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.
@@ -20622,7 +20622,7 @@ var NativeRenderer = class {
20622
20622
  for (const l of this.extLayers) {
20623
20623
  if (!l.def.repaintOnCursor) continue;
20624
20624
  const lp = this.layerPane(l) ?? pane;
20625
- if (lp.collapsed) continue;
20625
+ if (lp.collapsed || this.layerHiddenWithCandles(l)) continue;
20626
20626
  l.instance.render(this.extLayerArgs(l, lp.scale, lp.bounds, nowMs));
20627
20627
  if (this.animZoom.on && l.instance.animating?.()) this.animator.start();
20628
20628
  }
@@ -20684,7 +20684,7 @@ var NativeRenderer = class {
20684
20684
  let folded = null;
20685
20685
  for (const l of this.extLayers) {
20686
20686
  const lp = this.layerPane(l) ?? pane;
20687
- if (lp.collapsed) {
20687
+ if (lp.collapsed || this.layerHiddenWithCandles(l)) {
20688
20688
  this.clearLayerCanvas(l.canvas);
20689
20689
  continue;
20690
20690
  }
@@ -21084,14 +21084,22 @@ var NativeRenderer = class {
21084
21084
  );
21085
21085
  }
21086
21086
  /**
21087
- * True when SDK-layer content on the price pane paints at BAR PRICES without
21088
- * contributing a series: the active chart type's own layer, or an overlay layer native
21089
- * (a series-less model whose type names a mounted layer). Hiding the candles must then
21090
- * keep the bars in the price scale with nothing else on the pane the scale would fall
21091
- * to the {0,1} placeholder and every such layer would paint off-screen and vanish.
21087
+ * True for the layer painting the ACTIVE chart type (the base entry whose id is the
21088
+ * current price style) while the price series is hidden. The chart type IS the price
21089
+ * series, so "hide chart" blanks its layer along with the bars; an indicator's layer
21090
+ * (an overlay layer native, on any pane) is independent content and keeps painting.
21091
+ */
21092
+ layerHiddenWithCandles(l) {
21093
+ return this.scene.candlesHidden && l.owner === null && l.def.id === this.scene.priceStyle;
21094
+ }
21095
+ /**
21096
+ * True when an overlay layer native (a series-less model whose type names a mounted
21097
+ * layer) sits on the price pane: it paints at BAR PRICES without contributing a series,
21098
+ * so hiding the candles must keep the bars in the price scale — with nothing else on the
21099
+ * pane the scale would fall to the {0,1} placeholder and the layer would paint off-screen
21100
+ * and vanish. The chart type's own layer does not count: it is blanked with the candles.
21092
21101
  */
21093
21102
  priceLayersAnchoredToBars(masterModels) {
21094
- if (this.extLayers.some((l) => l.owner === null && l.def.id === this.scene.priceStyle)) return true;
21095
21103
  return masterModels.some((m) => m.series.length === 0 && !!m.native && this.extLayers.some((l) => l.def.id === m.native.type));
21096
21104
  }
21097
21105
  /** Per-pane scale state for a host UI (e.g. a price-axis context menu): the pane's pixel
@@ -1,4 +1,4 @@
1
- import { parseSymbol, priceStyleIds, BUILTIN_PRICE_STYLES, tzButtonLabel, SecondClock, TIMEZONES, normalizeTimezone, tzMenuLabel, isGroupRow, defaultMemberOf, groupKeyOf, groupMembers, LEGEND_AT_TOP_ATTR, normalizeSession, Vela, TypedEventBus, MultiProviderFeed, registerBuiltinChartTypes, resolveTheme, buildToolbar, createCustomMark, createAttributionMark, DrawingToolbar, applyAttributionMarkTheme, sharedBarStore, timeframeToMs } from './chunk-PTNO3YK2.js';
1
+ import { parseSymbol, priceStyleIds, BUILTIN_PRICE_STYLES, tzButtonLabel, SecondClock, TIMEZONES, normalizeTimezone, tzMenuLabel, isGroupRow, defaultMemberOf, groupKeyOf, groupMembers, LEGEND_AT_TOP_ATTR, normalizeSession, Vela, TypedEventBus, MultiProviderFeed, registerBuiltinChartTypes, resolveTheme, buildToolbar, createCustomMark, createAttributionMark, DrawingToolbar, applyAttributionMarkTheme, sharedBarStore, timeframeToMs } from './chunk-2EO74GIE.js';
2
2
  import { chartType, resolveTopbarComposition, topbarActionOverride, TOPBAR_BUILTIN_IDS, widgetActions, SidePanel, sidePanels, DEFAULT_PANEL_ORDER, symbolRanking, resolveEngines, legendActionsProviderFor, legendCalloutsProviderFor, statePersistenceHandlers, topbarHas, rendererDefaults, widgetAttachments, getDrawingType, inputDeltas } from './chunk-BFA32GOU.js';
3
3
  import { Tooltip, KeymapManager, isEditableTarget, Drawer } from './chunk-ZADTVRUO.js';
4
4
  import { Menu, Dialog, CalloutBubble, applyPlotOverlayTokens, ensureUIHost } from './chunk-BKHSQ4YM.js';
package/dist/index.cjs CHANGED
@@ -31960,7 +31960,7 @@ var NativeRenderer = class {
31960
31960
  for (const l of this.extLayers) {
31961
31961
  if (!l.def.repaintOnCursor) continue;
31962
31962
  const lp = this.layerPane(l) ?? pane;
31963
- if (lp.collapsed) continue;
31963
+ if (lp.collapsed || this.layerHiddenWithCandles(l)) continue;
31964
31964
  l.instance.render(this.extLayerArgs(l, lp.scale, lp.bounds, nowMs));
31965
31965
  if (this.animZoom.on && l.instance.animating?.()) this.animator.start();
31966
31966
  }
@@ -32022,7 +32022,7 @@ var NativeRenderer = class {
32022
32022
  let folded = null;
32023
32023
  for (const l of this.extLayers) {
32024
32024
  const lp = this.layerPane(l) ?? pane;
32025
- if (lp.collapsed) {
32025
+ if (lp.collapsed || this.layerHiddenWithCandles(l)) {
32026
32026
  this.clearLayerCanvas(l.canvas);
32027
32027
  continue;
32028
32028
  }
@@ -32422,14 +32422,22 @@ var NativeRenderer = class {
32422
32422
  );
32423
32423
  }
32424
32424
  /**
32425
- * True when SDK-layer content on the price pane paints at BAR PRICES without
32426
- * contributing a series: the active chart type's own layer, or an overlay layer native
32427
- * (a series-less model whose type names a mounted layer). Hiding the candles must then
32428
- * keep the bars in the price scale with nothing else on the pane the scale would fall
32429
- * to the {0,1} placeholder and every such layer would paint off-screen and vanish.
32425
+ * True for the layer painting the ACTIVE chart type (the base entry whose id is the
32426
+ * current price style) while the price series is hidden. The chart type IS the price
32427
+ * series, so "hide chart" blanks its layer along with the bars; an indicator's layer
32428
+ * (an overlay layer native, on any pane) is independent content and keeps painting.
32429
+ */
32430
+ layerHiddenWithCandles(l) {
32431
+ return this.scene.candlesHidden && l.owner === null && l.def.id === this.scene.priceStyle;
32432
+ }
32433
+ /**
32434
+ * True when an overlay layer native (a series-less model whose type names a mounted
32435
+ * layer) sits on the price pane: it paints at BAR PRICES without contributing a series,
32436
+ * so hiding the candles must keep the bars in the price scale — with nothing else on the
32437
+ * pane the scale would fall to the {0,1} placeholder and the layer would paint off-screen
32438
+ * and vanish. The chart type's own layer does not count: it is blanked with the candles.
32430
32439
  */
32431
32440
  priceLayersAnchoredToBars(masterModels) {
32432
- if (this.extLayers.some((l) => l.owner === null && l.def.id === this.scene.priceStyle)) return true;
32433
32441
  return masterModels.some((m) => m.series.length === 0 && !!m.native && this.extLayers.some((l) => l.def.id === m.native.type));
32434
32442
  }
32435
32443
  /** Per-pane scale state for a host UI (e.g. a price-axis context menu): the pane's pixel
package/dist/index.d.cts CHANGED
@@ -1023,11 +1023,18 @@ declare class NativeRenderer implements IChartRenderer {
1023
1023
  * (see the call site). Any real master series takes over the scale as usual. */
1024
1024
  private layerNativesOwnPane;
1025
1025
  /**
1026
- * True when SDK-layer content on the price pane paints at BAR PRICES without
1027
- * contributing a series: the active chart type's own layer, or an overlay layer native
1028
- * (a series-less model whose type names a mounted layer). Hiding the candles must then
1029
- * keep the bars in the price scale with nothing else on the pane the scale would fall
1030
- * to the {0,1} placeholder and every such layer would paint off-screen and vanish.
1026
+ * True for the layer painting the ACTIVE chart type (the base entry whose id is the
1027
+ * current price style) while the price series is hidden. The chart type IS the price
1028
+ * series, so "hide chart" blanks its layer along with the bars; an indicator's layer
1029
+ * (an overlay layer native, on any pane) is independent content and keeps painting.
1030
+ */
1031
+ private layerHiddenWithCandles;
1032
+ /**
1033
+ * True when an overlay layer native (a series-less model whose type names a mounted
1034
+ * layer) sits on the price pane: it paints at BAR PRICES without contributing a series,
1035
+ * so hiding the candles must keep the bars in the price scale — with nothing else on the
1036
+ * pane the scale would fall to the {0,1} placeholder and the layer would paint off-screen
1037
+ * and vanish. The chart type's own layer does not count: it is blanked with the candles.
1031
1038
  */
1032
1039
  private priceLayersAnchoredToBars;
1033
1040
  /** Per-pane scale state for a host UI (e.g. a price-axis context menu): the pane's pixel
package/dist/index.d.ts CHANGED
@@ -1023,11 +1023,18 @@ declare class NativeRenderer implements IChartRenderer {
1023
1023
  * (see the call site). Any real master series takes over the scale as usual. */
1024
1024
  private layerNativesOwnPane;
1025
1025
  /**
1026
- * True when SDK-layer content on the price pane paints at BAR PRICES without
1027
- * contributing a series: the active chart type's own layer, or an overlay layer native
1028
- * (a series-less model whose type names a mounted layer). Hiding the candles must then
1029
- * keep the bars in the price scale with nothing else on the pane the scale would fall
1030
- * to the {0,1} placeholder and every such layer would paint off-screen and vanish.
1026
+ * True for the layer painting the ACTIVE chart type (the base entry whose id is the
1027
+ * current price style) while the price series is hidden. The chart type IS the price
1028
+ * series, so "hide chart" blanks its layer along with the bars; an indicator's layer
1029
+ * (an overlay layer native, on any pane) is independent content and keeps painting.
1030
+ */
1031
+ private layerHiddenWithCandles;
1032
+ /**
1033
+ * True when an overlay layer native (a series-less model whose type names a mounted
1034
+ * layer) sits on the price pane: it paints at BAR PRICES without contributing a series,
1035
+ * so hiding the candles must keep the bars in the price scale — with nothing else on the
1036
+ * pane the scale would fall to the {0,1} placeholder and the layer would paint off-screen
1037
+ * and vanish. The chart type's own layer does not count: it is blanked with the candles.
1031
1038
  */
1032
1039
  private priceLayersAnchoredToBars;
1033
1040
  /** Per-pane scale state for a host UI (e.g. a price-axis context menu): the pane's pixel
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
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-PTNO3YK2.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-2EO74GIE.js';
3
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
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';
@@ -39376,7 +39376,7 @@ ${overlayScrollbarCss(".vela-sd-pane")}
39376
39376
  for (const l of this.extLayers) {
39377
39377
  if (!l.def.repaintOnCursor) continue;
39378
39378
  const lp = this.layerPane(l) ?? pane;
39379
- if (lp.collapsed) continue;
39379
+ if (lp.collapsed || this.layerHiddenWithCandles(l)) continue;
39380
39380
  l.instance.render(this.extLayerArgs(l, lp.scale, lp.bounds, nowMs));
39381
39381
  if (this.animZoom.on && l.instance.animating?.()) this.animator.start();
39382
39382
  }
@@ -39438,7 +39438,7 @@ ${overlayScrollbarCss(".vela-sd-pane")}
39438
39438
  let folded = null;
39439
39439
  for (const l of this.extLayers) {
39440
39440
  const lp = this.layerPane(l) ?? pane;
39441
- if (lp.collapsed) {
39441
+ if (lp.collapsed || this.layerHiddenWithCandles(l)) {
39442
39442
  this.clearLayerCanvas(l.canvas);
39443
39443
  continue;
39444
39444
  }
@@ -39838,14 +39838,22 @@ ${overlayScrollbarCss(".vela-sd-pane")}
39838
39838
  );
39839
39839
  }
39840
39840
  /**
39841
- * True when SDK-layer content on the price pane paints at BAR PRICES without
39842
- * contributing a series: the active chart type's own layer, or an overlay layer native
39843
- * (a series-less model whose type names a mounted layer). Hiding the candles must then
39844
- * keep the bars in the price scale with nothing else on the pane the scale would fall
39845
- * to the {0,1} placeholder and every such layer would paint off-screen and vanish.
39841
+ * True for the layer painting the ACTIVE chart type (the base entry whose id is the
39842
+ * current price style) while the price series is hidden. The chart type IS the price
39843
+ * series, so "hide chart" blanks its layer along with the bars; an indicator's layer
39844
+ * (an overlay layer native, on any pane) is independent content and keeps painting.
39845
+ */
39846
+ layerHiddenWithCandles(l) {
39847
+ return this.scene.candlesHidden && l.owner === null && l.def.id === this.scene.priceStyle;
39848
+ }
39849
+ /**
39850
+ * True when an overlay layer native (a series-less model whose type names a mounted
39851
+ * layer) sits on the price pane: it paints at BAR PRICES without contributing a series,
39852
+ * so hiding the candles must keep the bars in the price scale — with nothing else on the
39853
+ * pane the scale would fall to the {0,1} placeholder and the layer would paint off-screen
39854
+ * and vanish. The chart type's own layer does not count: it is blanked with the candles.
39846
39855
  */
39847
39856
  priceLayersAnchoredToBars(masterModels) {
39848
- if (this.extLayers.some((l) => l.owner === null && l.def.id === this.scene.priceStyle)) return true;
39849
39857
  return masterModels.some((m) => m.series.length === 0 && !!m.native && this.extLayers.some((l) => l.def.id === m.native.type));
39850
39858
  }
39851
39859
  /** Per-pane scale state for a host UI (e.g. a price-axis context menu): the pane's pixel