@luxalgo/vela 0.8.4 → 0.8.5

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 (37) hide show
  1. package/dist/{DataProvider-Byo8pEv0.d.ts → DataProvider-BUdlkx9I.d.ts} +1 -1
  2. package/dist/{DataProvider-Bw58CjYy.d.cts → DataProvider-DdqMxKdl.d.cts} +1 -1
  3. package/dist/{chunk-MOJ4T26N.js → chunk-BN4DNS3O.js} +27 -7
  4. package/dist/{chunk-UNUVPQFW.js → chunk-QYIO37K7.js} +482 -94
  5. package/dist/{contributions-DOm40g5-.d.cts → contributions-D8xuYc9U.d.cts} +37 -5
  6. package/dist/{contributions-BY3zSYiZ.d.ts → contributions-P9fBBuY1.d.ts} +37 -5
  7. package/dist/index.cjs +482 -94
  8. package/dist/index.d.cts +23 -7
  9. package/dist/index.d.ts +23 -7
  10. package/dist/index.js +1 -1
  11. package/dist/{options-CSXbjMM5.d.cts → options-BI5Tp32b.d.cts} +36 -1
  12. package/dist/{options-CSXbjMM5.d.ts → options-BI5Tp32b.d.ts} +36 -1
  13. package/dist/{plugin-CiQVyETg.d.cts → plugin-B8F1nor8.d.cts} +14 -8
  14. package/dist/{plugin-BDxUhGO3.d.ts → plugin-D5Z-Q6TX.d.ts} +14 -8
  15. package/dist/plugin.d.cts +4 -4
  16. package/dist/plugin.d.ts +4 -4
  17. package/dist/providers/binance.d.cts +2 -2
  18. package/dist/providers/binance.d.ts +2 -2
  19. package/dist/providers/coinbase.d.cts +2 -2
  20. package/dist/providers/coinbase.d.ts +2 -2
  21. package/dist/providers/hyperliquid.d.cts +2 -2
  22. package/dist/providers/hyperliquid.d.ts +2 -2
  23. package/dist/{statusline-model-DUBX6Fib.d.cts → statusline-model-CTwtDIca.d.cts} +3 -3
  24. package/dist/{statusline-model-C9tYXuux.d.ts → statusline-model-D9kWC9X5.d.ts} +3 -3
  25. package/dist/ui.d.cts +1 -1
  26. package/dist/ui.d.ts +1 -1
  27. package/dist/vela.global.js +482 -94
  28. package/dist/vela.global.min.js +53 -53
  29. package/dist/widget.cjs +508 -100
  30. package/dist/widget.d.cts +6 -6
  31. package/dist/widget.d.ts +6 -6
  32. package/dist/widget.js +3 -3
  33. package/dist/workspace.cjs +508 -100
  34. package/dist/workspace.d.cts +5 -5
  35. package/dist/workspace.d.ts +5 -5
  36. package/dist/workspace.js +2 -2
  37. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { M as MarketConfig, O as OHLCV, U as Unsubscribe } from './options-CSXbjMM5.js';
1
+ import { M as MarketConfig, O as OHLCV, U as Unsubscribe } from './options-BI5Tp32b.js';
2
2
 
3
3
  /**
4
4
  * Symbol metadata an engine may need (e.g. Pine `syminfo.*`). Free-form beyond
@@ -1,4 +1,4 @@
1
- import { M as MarketConfig, O as OHLCV, U as Unsubscribe } from './options-CSXbjMM5.cjs';
1
+ import { M as MarketConfig, O as OHLCV, U as Unsubscribe } from './options-BI5Tp32b.cjs';
2
2
 
3
3
  /**
4
4
  * Symbol metadata an engine may need (e.g. Pine `syminfo.*`). Free-form beyond
@@ -1,4 +1,4 @@
1
- import { parseSymbol, priceStyleIds, BUILTIN_PRICE_STYLES, SecondClock, isGroupRow, defaultMemberOf, groupKeyOf, groupMembers, LEGEND_AT_TOP_ATTR, normalizeSession, Vela, TypedEventBus, timeframeToMs, MultiProviderFeed, registerBuiltinChartTypes, resolveTheme, buildToolbar, createCustomMark, createAttributionMark, DrawingToolbar, applyAttributionMarkTheme, sharedBarStore, CANDLE_OVERRIDE_KEYS } from './chunk-UNUVPQFW.js';
1
+ import { parseSymbol, priceStyleIds, BUILTIN_PRICE_STYLES, SecondClock, isGroupRow, defaultMemberOf, groupKeyOf, groupMembers, LEGEND_AT_TOP_ATTR, normalizeSession, Vela, TypedEventBus, timeframeToMs, MultiProviderFeed, registerBuiltinChartTypes, resolveTheme, buildToolbar, createCustomMark, createAttributionMark, DrawingToolbar, applyAttributionMarkTheme, sharedBarStore, CANDLE_OVERRIDE_KEYS } from './chunk-QYIO37K7.js';
2
2
  import { chartType, resolveTopbarComposition, topbarActionOverride, TOPBAR_BUILTIN_IDS, widgetActions, tzButtonLabel, resolveTimezone, timezoneMenuRows, SidePanel, sidePanels, DEFAULT_PANEL_ORDER, symbolRanking, paneScaleAt, composeMenu, priceAxisItems, scaleChoiceOf, timeAxisItems, bodyItems, scaleWrites, invertWrite, settingsSectionOf, resolveEngines, legendActionsProviderFor, legendCalloutsProviderFor, normalizeTimezone, isExchangeTimezone, statePersistenceHandlers, topbarHas, rendererDefaults, mobilePlacement, widgetAttachments, getDrawingType, inputDeltas } from './chunk-ALTGHKIM.js';
3
3
  import { Tooltip, KeymapManager, isEditableTarget, Drawer } from './chunk-AUOB7A5Y.js';
4
4
  import { Menu, Dialog, CalloutBubble, applyPlotOverlayTokens, ensureUIHost } from './chunk-WY5H4S4I.js';
@@ -1435,9 +1435,14 @@ function paneItems(snap, pane, units) {
1435
1435
  return [...unitItems, ...rows2];
1436
1436
  }
1437
1437
  const zOf = new Map(snap.zOrder.map((e) => [e.id, e.z]));
1438
- const rows = pane.indicators.map((i) => ({ item: { kind: "row", row: indicatorRow(i) }, z: zOf.get(i.id) ?? 0 }));
1439
- if (pane.kind === "price") rows.push({ item: { kind: "row", row: priceRow() }, z: snap.candleZ });
1440
- rows.sort((a, b) => b.z - a.z);
1438
+ const rank = new Map(snap.zOrder.map((e, i) => [e.id, i]));
1439
+ const rows = pane.indicators.map((i) => ({
1440
+ item: { kind: "row", row: indicatorRow(i) },
1441
+ z: zOf.get(i.id) ?? 0,
1442
+ rank: rank.get(i.id) ?? -1
1443
+ }));
1444
+ if (pane.kind === "price") rows.push({ item: { kind: "row", row: priceRow() }, z: snap.candleZ, rank: -Infinity });
1445
+ rows.sort((a, b) => b.z - a.z || b.rank - a.rank);
1441
1446
  if (!snap.interleave) return [...unitItems, ...rows.map((r) => r.item)];
1442
1447
  const entries = [...rows, ...units.map((unit) => ({ item: { kind: "unit", unit }, z: unitZ(unit) }))];
1443
1448
  entries.sort((a, b) => a.z === b.z ? Number(a.item.kind === "unit") - Number(b.item.kind === "unit") : b.z - a.z);
@@ -1734,6 +1739,7 @@ var ObjectTree = class extends SidePanel {
1734
1739
  for (const ev of REFRESH_EVENTS) {
1735
1740
  this.unsubs.push(chart.on(ev, () => this.refresh()));
1736
1741
  }
1742
+ this.unsubs.push(chart.renderer.onConfigChanged(() => this.refresh()));
1737
1743
  this.unsubs.push(
1738
1744
  chart.on("drawing:selected", ({ ids }) => {
1739
1745
  this.selectedDrawings = new Set(ids);
@@ -3973,6 +3979,20 @@ function sanitizeDrawingTools(raw) {
3973
3979
  if (typeof r.stay === "boolean") out.stay = r.stay;
3974
3980
  return Object.keys(out).length > 0 ? out : null;
3975
3981
  }
3982
+ function successorNative(entry) {
3983
+ const type = typeof entry === "string" ? entry : entry.type;
3984
+ if (type !== "linear-regression") return entry;
3985
+ const hidden = typeof entry === "object" && entry.hidden === true;
3986
+ const { mode, lineColor, ...rest } = typeof entry === "object" ? entry.inputs ?? {} : {};
3987
+ const slope = mode === "Slope";
3988
+ const inputs = slope ? { ...rest, ...lineColor !== void 0 ? { lineColor } : {} } : (
3989
+ // Saved deltas omit the curve's 100-bar default, which the LSMA's default is not.
3990
+ { length: 100, ...rest, ...lineColor !== void 0 ? { neutralColor: lineColor } : {} }
3991
+ );
3992
+ const next = slope ? "linear-regression-slope" : "lsma";
3993
+ const hasInputs = Object.keys(inputs).length > 0;
3994
+ return hasInputs || hidden ? { type: next, ...hasInputs ? { inputs } : {}, ...hidden ? { hidden } : {} } : next;
3995
+ }
3976
3996
  function sanitizeCell(raw) {
3977
3997
  if (raw == null || typeof raw !== "object") return null;
3978
3998
  const c = raw;
@@ -4012,7 +4032,7 @@ function sanitizeCell(raw) {
4012
4032
  return [inputs || hidden ? { type: e.type, ...inputs ? { inputs } : {}, ...hidden ? { hidden } : {} } : e.type];
4013
4033
  }
4014
4034
  return [];
4015
- }) : [];
4035
+ }).map(successorNative) : [];
4016
4036
  out.indicators = { manifest, natives };
4017
4037
  }
4018
4038
  const ext = sanitizeExt(c.ext);
@@ -4887,7 +4907,7 @@ var Watermark = class {
4887
4907
  // src/widget/context-menu.ts
4888
4908
  var PRICE_AXIS_W = 60;
4889
4909
  var TIME_AXIS_H = 26;
4890
- var OFF_PLOT = { price: null, time: null, paneKind: null };
4910
+ var OFF_PLOT = { price: null, time: null, paneKind: null, paneId: null };
4891
4911
  var ChartContextMenu = class {
4892
4912
  constructor(host, cbs) {
4893
4913
  this.cbs = cbs;
@@ -4930,7 +4950,7 @@ var ChartContextMenu = class {
4930
4950
  this.chart = chart;
4931
4951
  this.crosshair = OFF_PLOT;
4932
4952
  this.offCrosshair = chart.renderer.onCrosshairMove((e) => {
4933
- this.crosshair = { price: e.price, time: e.time, paneKind: e.paneKind ?? null };
4953
+ this.crosshair = { price: e.price, time: e.time, paneKind: e.paneKind ?? null, paneId: e.paneId ?? null };
4934
4954
  });
4935
4955
  }
4936
4956
  destroy() {