@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.
package/dist/widget.cjs CHANGED
@@ -38379,7 +38379,7 @@ var NativeRenderer = class {
38379
38379
  for (const l of this.extLayers) {
38380
38380
  if (!l.def.repaintOnCursor) continue;
38381
38381
  const lp = this.layerPane(l) ?? pane;
38382
- if (lp.collapsed) continue;
38382
+ if (lp.collapsed || this.layerHiddenWithCandles(l)) continue;
38383
38383
  l.instance.render(this.extLayerArgs(l, lp.scale, lp.bounds, nowMs));
38384
38384
  if (this.animZoom.on && l.instance.animating?.()) this.animator.start();
38385
38385
  }
@@ -38441,7 +38441,7 @@ var NativeRenderer = class {
38441
38441
  let folded = null;
38442
38442
  for (const l of this.extLayers) {
38443
38443
  const lp = this.layerPane(l) ?? pane;
38444
- if (lp.collapsed) {
38444
+ if (lp.collapsed || this.layerHiddenWithCandles(l)) {
38445
38445
  this.clearLayerCanvas(l.canvas);
38446
38446
  continue;
38447
38447
  }
@@ -38841,14 +38841,22 @@ var NativeRenderer = class {
38841
38841
  );
38842
38842
  }
38843
38843
  /**
38844
- * True when SDK-layer content on the price pane paints at BAR PRICES without
38845
- * contributing a series: the active chart type's own layer, or an overlay layer native
38846
- * (a series-less model whose type names a mounted layer). Hiding the candles must then
38847
- * keep the bars in the price scale — with nothing else on the pane the scale would fall
38848
- * to the {0,1} placeholder and every such layer would paint off-screen and vanish.
38844
+ * True for the layer painting the ACTIVE chart type (the base entry whose id is the
38845
+ * current price style) while the price series is hidden. The chart type IS the price
38846
+ * series, so "hide chart" blanks its layer along with the bars; an indicator's layer
38847
+ * (an overlay layer native, on any pane) is independent content and keeps painting.
38848
+ */
38849
+ layerHiddenWithCandles(l) {
38850
+ return this.scene.candlesHidden && l.owner === null && l.def.id === this.scene.priceStyle;
38851
+ }
38852
+ /**
38853
+ * True when an overlay layer native (a series-less model whose type names a mounted
38854
+ * layer) sits on the price pane: it paints at BAR PRICES without contributing a series,
38855
+ * so hiding the candles must keep the bars in the price scale — with nothing else on the
38856
+ * pane the scale would fall to the {0,1} placeholder and the layer would paint off-screen
38857
+ * and vanish. The chart type's own layer does not count: it is blanked with the candles.
38849
38858
  */
38850
38859
  priceLayersAnchoredToBars(masterModels) {
38851
- if (this.extLayers.some((l) => l.owner === null && l.def.id === this.scene.priceStyle)) return true;
38852
38860
  return masterModels.some((m) => m.series.length === 0 && !!m.native && this.extLayers.some((l) => l.def.id === m.native.type));
38853
38861
  }
38854
38862
  /** Per-pane scale state for a host UI (e.g. a price-axis context menu): the pane's pixel
package/dist/widget.js CHANGED
@@ -1,6 +1,6 @@
1
- import { VelaWorkspace } from './chunk-QBWLINWL.js';
2
- export { Bottombar, ChartContextMenu, DataWindow, IndicatorPicker, ObjectTree, PanelDock, RANGE_PRESETS, ShortcutsHelp, Statusline, SymbolPicker, TimeframeQuick, Topbar, Watermark, dataWindowSections, decimalsFor, decodeState, encodeState, filterSymbols, fmtChange, fmtPrice, localStorageAdapter, parseTimeframe, priceStyleLabel, resolveIndicators, sanitizeState, timeframeLabel, timeframeMs } from './chunk-QBWLINWL.js';
3
- export { TIMEZONES, normalizeTimezone, tzButtonLabel, tzMenuLabel, tzOffset } from './chunk-PTNO3YK2.js';
1
+ import { VelaWorkspace } from './chunk-DH2VF5X7.js';
2
+ export { Bottombar, ChartContextMenu, DataWindow, IndicatorPicker, ObjectTree, PanelDock, RANGE_PRESETS, ShortcutsHelp, Statusline, SymbolPicker, TimeframeQuick, Topbar, Watermark, dataWindowSections, decimalsFor, decodeState, encodeState, filterSymbols, fmtChange, fmtPrice, localStorageAdapter, parseTimeframe, priceStyleLabel, resolveIndicators, sanitizeState, timeframeLabel, timeframeMs } from './chunk-DH2VF5X7.js';
3
+ export { TIMEZONES, normalizeTimezone, tzButtonLabel, tzMenuLabel, tzOffset } from './chunk-2EO74GIE.js';
4
4
  export { DEFAULT_PANEL_MAX_WIDTH, DEFAULT_PANEL_MIN_WIDTH, DEFAULT_PANEL_ORDER, DEFAULT_PANEL_WIDTH, OVERRIDABLE_TOPBAR_IDS, SidePanel, TOPBAR_BUILTIN_IDS, TOPBAR_DEFAULT_LEFT, TOPBAR_DEFAULT_RIGHT, clampPanelWidth, pinnedTopbarActionIds, registerSidePanel, registerStatePersistence, registerSymbolRanking, registerWidgetAction, registerWidgetAttachment, resolveTopbarComposition, sidePanels, statePersistenceHandlers, symbolRanking, topbarActionOverride, topbarHas, unregisterSidePanel, unregisterStatePersistence, unregisterWidgetAction, unregisterWidgetAttachment, widgetActions, widgetAttachments } from './chunk-BFA32GOU.js';
5
5
  import './chunk-ZADTVRUO.js';
6
6
  import './chunk-BKHSQ4YM.js';
@@ -38311,7 +38311,7 @@ var NativeRenderer = class {
38311
38311
  for (const l of this.extLayers) {
38312
38312
  if (!l.def.repaintOnCursor) continue;
38313
38313
  const lp = this.layerPane(l) ?? pane;
38314
- if (lp.collapsed) continue;
38314
+ if (lp.collapsed || this.layerHiddenWithCandles(l)) continue;
38315
38315
  l.instance.render(this.extLayerArgs(l, lp.scale, lp.bounds, nowMs));
38316
38316
  if (this.animZoom.on && l.instance.animating?.()) this.animator.start();
38317
38317
  }
@@ -38373,7 +38373,7 @@ var NativeRenderer = class {
38373
38373
  let folded = null;
38374
38374
  for (const l of this.extLayers) {
38375
38375
  const lp = this.layerPane(l) ?? pane;
38376
- if (lp.collapsed) {
38376
+ if (lp.collapsed || this.layerHiddenWithCandles(l)) {
38377
38377
  this.clearLayerCanvas(l.canvas);
38378
38378
  continue;
38379
38379
  }
@@ -38773,14 +38773,22 @@ var NativeRenderer = class {
38773
38773
  );
38774
38774
  }
38775
38775
  /**
38776
- * True when SDK-layer content on the price pane paints at BAR PRICES without
38777
- * contributing a series: the active chart type's own layer, or an overlay layer native
38778
- * (a series-less model whose type names a mounted layer). Hiding the candles must then
38779
- * keep the bars in the price scale — with nothing else on the pane the scale would fall
38780
- * to the {0,1} placeholder and every such layer would paint off-screen and vanish.
38776
+ * True for the layer painting the ACTIVE chart type (the base entry whose id is the
38777
+ * current price style) while the price series is hidden. The chart type IS the price
38778
+ * series, so "hide chart" blanks its layer along with the bars; an indicator's layer
38779
+ * (an overlay layer native, on any pane) is independent content and keeps painting.
38780
+ */
38781
+ layerHiddenWithCandles(l) {
38782
+ return this.scene.candlesHidden && l.owner === null && l.def.id === this.scene.priceStyle;
38783
+ }
38784
+ /**
38785
+ * True when an overlay layer native (a series-less model whose type names a mounted
38786
+ * layer) sits on the price pane: it paints at BAR PRICES without contributing a series,
38787
+ * so hiding the candles must keep the bars in the price scale — with nothing else on the
38788
+ * pane the scale would fall to the {0,1} placeholder and the layer would paint off-screen
38789
+ * and vanish. The chart type's own layer does not count: it is blanked with the candles.
38781
38790
  */
38782
38791
  priceLayersAnchoredToBars(masterModels) {
38783
- if (this.extLayers.some((l) => l.owner === null && l.def.id === this.scene.priceStyle)) return true;
38784
38792
  return masterModels.some((m) => m.series.length === 0 && !!m.native && this.extLayers.some((l) => l.def.id === m.native.type));
38785
38793
  }
38786
38794
  /** Per-pane scale state for a host UI (e.g. a price-axis context menu): the pane's pixel
package/dist/workspace.js CHANGED
@@ -1,5 +1,5 @@
1
- export { ChartCell, GRID_PICKER_MAX, VelaWorkspace, activeAfterLayout, decodeState, encodeState, ensureLayout, evenTracks, gridStyles, layoutDefinition, layoutForGrid, layoutShape, layouts, memoryStorageAdapter, rangesWithin, registerBuiltinLayouts, registerLayout, resizeTracks, sanitizeState, syncTargets, trackOffsets, unregisterLayout } from './chunk-QBWLINWL.js';
2
- import './chunk-PTNO3YK2.js';
1
+ export { ChartCell, GRID_PICKER_MAX, VelaWorkspace, activeAfterLayout, decodeState, encodeState, ensureLayout, evenTracks, gridStyles, layoutDefinition, layoutForGrid, layoutShape, layouts, memoryStorageAdapter, rangesWithin, registerBuiltinLayouts, registerLayout, resizeTracks, sanitizeState, syncTargets, trackOffsets, unregisterLayout } from './chunk-DH2VF5X7.js';
2
+ import './chunk-2EO74GIE.js';
3
3
  import './chunk-BFA32GOU.js';
4
4
  import './chunk-ZADTVRUO.js';
5
5
  import './chunk-BKHSQ4YM.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luxalgo/vela",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "description": "Open-source charting library with a native high-performance renderer, drawing tools, pluggable chart types and pluggable scripting engines.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://luxalgo.com/vela",