@luxalgo/vela 0.6.16 → 0.6.17

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 (46) hide show
  1. package/README.md +4 -0
  2. package/dist/{DataProvider-XLdJB86x.d.ts → DataProvider-B-Jz59Rf.d.ts} +1 -1
  3. package/dist/{DataProvider-xH2VBcFT.d.cts → DataProvider-OfR3fXg9.d.cts} +1 -1
  4. package/dist/{chunk-6DPAYEGO.js → chunk-CAFCLMPF.js} +1 -0
  5. package/dist/{chunk-I77F2SVE.js → chunk-IFJJPXSV.js} +1 -1
  6. package/dist/{chunk-SEOO6YG7.js → chunk-OSZDSH7F.js} +5 -8
  7. package/dist/{chunk-MGU3USTP.js → chunk-T5Z5YUCF.js} +1 -1
  8. package/dist/{chunk-Q3TFJNJW.js → chunk-XCBJU674.js} +2 -2
  9. package/dist/{chunk-GIJYO4LO.js → chunk-YCD72KGK.js} +103 -40
  10. package/dist/{contributions-BEkxwA5F.d.cts → contributions-C3b0Sx5P.d.cts} +2 -2
  11. package/dist/{contributions-CoAX7_SF.d.ts → contributions-Swzz10fG.d.ts} +2 -2
  12. package/dist/index.cjs +99 -36
  13. package/dist/index.d.cts +15 -6
  14. package/dist/index.d.ts +15 -6
  15. package/dist/index.js +4 -4
  16. package/dist/{options-bdSAtp7y.d.ts → options-CX1lSYWA.d.cts} +12 -2
  17. package/dist/{options-bdSAtp7y.d.cts → options-CX1lSYWA.d.ts} +12 -2
  18. package/dist/{plugin-Dxyq35Zf.d.cts → plugin-BjnEE1zA.d.cts} +3 -3
  19. package/dist/{plugin-CNUgbRNq.d.ts → plugin-mvddudqd.d.ts} +3 -3
  20. package/dist/plugin.cjs +1 -0
  21. package/dist/plugin.d.cts +4 -4
  22. package/dist/plugin.d.ts +4 -4
  23. package/dist/plugin.js +2 -2
  24. package/dist/providers/binance.d.cts +2 -2
  25. package/dist/providers/binance.d.ts +2 -2
  26. package/dist/providers/coinbase.d.cts +2 -2
  27. package/dist/providers/coinbase.d.ts +2 -2
  28. package/dist/providers/hyperliquid.d.cts +2 -2
  29. package/dist/providers/hyperliquid.d.ts +2 -2
  30. package/dist/{statusline-model-CbPza-Wc.d.cts → statusline-model-D91cU2fF.d.cts} +3 -3
  31. package/dist/{statusline-model-D7cWkw8A.d.ts → statusline-model-IURCya0H.d.ts} +3 -3
  32. package/dist/ui.cjs +1 -0
  33. package/dist/ui.d.cts +1 -1
  34. package/dist/ui.d.ts +1 -1
  35. package/dist/ui.js +3 -3
  36. package/dist/vela.global.js +99 -36
  37. package/dist/vela.global.min.js +46 -49
  38. package/dist/widget.cjs +100 -39
  39. package/dist/widget.d.cts +6 -6
  40. package/dist/widget.d.ts +6 -6
  41. package/dist/widget.js +7 -7
  42. package/dist/workspace.cjs +100 -39
  43. package/dist/workspace.d.cts +5 -5
  44. package/dist/workspace.d.ts +5 -5
  45. package/dist/workspace.js +6 -6
  46. package/package.json +1 -1
@@ -1234,6 +1234,7 @@ registerIcon("star-filled", S('<path d="M8 2.2l1.75 3.55 3.9.55-2.8 2.75.65 3.9L
1234
1234
  registerIcon("grip", S('<circle cx="6" cy="3.5" r="1"/><circle cx="10" cy="3.5" r="1"/><circle cx="6" cy="8" r="1"/><circle cx="10" cy="8" r="1"/><circle cx="6" cy="12.5" r="1"/><circle cx="10" cy="12.5" r="1"/>', 'fill="currentColor" stroke="none"'));
1235
1235
  registerIcon("kebab", S('<circle cx="8" cy="3.2" r="1.2"/><circle cx="8" cy="8" r="1.2"/><circle cx="8" cy="12.8" r="1.2"/>', 'fill="currentColor" stroke="none"'));
1236
1236
  registerIcon("burger", S('<path d="M2.5 4.5h11M2.5 8h11M2.5 11.5h11"/>'));
1237
+ registerIcon("info", S('<path d="M8 7.4v4.4"/><circle cx="8" cy="4.6" r="0.9" fill="currentColor" stroke="none"/>'));
1237
1238
  registerIcon("reset", S('<path d="M2 8a6 6 0 1 0 6-6 6.5 6.5 0 0 0-4.5 1.83L2 5.33"/><path d="M2 2v3.33h3.33"/>'));
1238
1239
  registerIcon("pane-collapse", S('<path d="M2.6 9.4h4v4M13.4 6.6h-4v-4"/><path d="m9.4 6.6 4.2-4.2M2.4 13.6l4.2-4.2"/>'));
1239
1240
  registerIcon("pane-expand", S('<path d="M9.8 2.4h3.8v3.8M6.2 13.6H2.4V9.8"/><path d="m13.6 2.4-4.4 4.4M2.4 13.6l4.4-4.4"/>'));
@@ -5191,7 +5192,8 @@ function mergeConfig(base, patch) {
5191
5192
  labelsVisible: isBool(ps.labelsVisible) ? ps.labelsVisible : base.priceScale.labelsVisible,
5192
5193
  currentPriceLine: isBool(ps.currentPriceLine) ? ps.currentPriceLine : base.priceScale.currentPriceLine,
5193
5194
  priceLabel: isBool(ps.priceLabel) ? ps.priceLabel : base.priceScale.priceLabel,
5194
- countdown: isBool(ps.countdown) ? ps.countdown : base.priceScale.countdown
5195
+ countdown: isBool(ps.countdown) ? ps.countdown : base.priceScale.countdown,
5196
+ animateLastPrice: isBool(ps.animateLastPrice) ? ps.animateLastPrice : base.priceScale.animateLastPrice
5195
5197
  },
5196
5198
  panes: {
5197
5199
  separatorColor: isColor(panes.separatorColor) ? panes.separatorColor : base.panes.separatorColor
@@ -17126,6 +17128,23 @@ function attachChromeTooltip(anchor, opts) {
17126
17128
  clear();
17127
17129
  };
17128
17130
  }
17131
+ function chromeHint(text, opts) {
17132
+ const px = opts.size ?? 16;
17133
+ const el = document.createElement("span");
17134
+ el.className = "vela-hint";
17135
+ el.setAttribute("role", "img");
17136
+ el.setAttribute("aria-label", text);
17137
+ el.innerHTML = iconAt("info", px);
17138
+ el.style.cssText = `flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:${px}px;height:${px}px;border-radius:50%;cursor:help;user-select:none;background:var(--vela-hover);color:var(--vela-fg-muted);transition:background var(--vela-dur-fast) ease,color var(--vela-dur-fast) ease;`;
17139
+ const hover = (on) => {
17140
+ el.style.background = on ? "var(--vela-active)" : "var(--vela-hover)";
17141
+ el.style.color = on ? "var(--vela-fg-bright)" : "var(--vela-fg-muted)";
17142
+ };
17143
+ el.addEventListener("pointerenter", () => hover(true));
17144
+ el.addEventListener("pointerleave", () => hover(false));
17145
+ const dispose = attachChromeTooltip(el, { host: opts.host, theme: opts.theme, text: () => text, wrap: true, delayMs: 250 });
17146
+ return { el, dispose };
17147
+ }
17129
17148
 
17130
17149
  // src/renderers/native/drawings/DrawingToolbar.ts
17131
17150
  var TOOLBAR_WIDTH = 44;
@@ -18131,6 +18150,24 @@ function localStorageAdapter(storageKey) {
18131
18150
  };
18132
18151
  }
18133
18152
 
18153
+ // src/core/options.ts
18154
+ var normalizeSession = (v) => v === "regular" || v === "extended" ? v : void 0;
18155
+ var LIVE_BAR_EASE_DEFAULT_MS = 90;
18156
+ var LIVE_BAR_EASE_MAX_MS = 1e3;
18157
+ function resolveLiveBarEaseMs(value) {
18158
+ if (value === true) return LIVE_BAR_EASE_DEFAULT_MS;
18159
+ if (typeof value !== "number" || !Number.isFinite(value) || value <= 0) return 0;
18160
+ return Math.min(value, LIVE_BAR_EASE_MAX_MS);
18161
+ }
18162
+ function resolveAnimations(animations) {
18163
+ if (typeof animations === "boolean") return { animZoom: animations, animPan: animations, animLiveBar: 0 };
18164
+ return {
18165
+ animZoom: animations?.zoom ?? true,
18166
+ animPan: animations?.pan ?? true,
18167
+ animLiveBar: resolveLiveBarEaseMs(animations?.liveBar)
18168
+ };
18169
+ }
18170
+
18134
18171
  // src/core/model/series.ts
18135
18172
  function isLineLikeSeries(spec) {
18136
18173
  return spec.kind !== "candle" && spec.kind !== "bar" && spec.kind !== "markers";
@@ -21096,14 +21133,11 @@ var IndicatorInputsDialog = class {
21096
21133
  buildTextField(id, current, emit) {
21097
21134
  return buildFieldControl({ kind: "text", id, value: current, onChange: emit }).el;
21098
21135
  }
21099
- /** A hoverable ⓘ affordance carrying an input's `tooltip` (themed chrome tip; wraps). */
21136
+ /** The shared ⓘ hint carrying an input's `tooltip` (see {@link chromeHint}). */
21100
21137
  infoButton(tooltip2) {
21101
- const b = document.createElement("span");
21102
- b.textContent = "i";
21103
- this.dialogTips.push(attachChromeTooltip(b, { host: this.host.container, theme: () => this.host.theme(), text: () => tooltip2, wrap: true, delayMs: 250 }));
21104
- b.className = "vela-ind-hint";
21105
- b.style.cssText = "flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:50%;font-weight:600;font-size:11px;font-family:inherit;line-height:1;cursor:help;user-select:none;";
21106
- return b;
21138
+ const { el, dispose } = chromeHint(tooltip2, { host: this.host.container, theme: () => this.host.theme(), size: 18 });
21139
+ this.dialogTips.push(dispose);
21140
+ return el;
21107
21141
  }
21108
21142
  /** A dropdown over plain string options (value === label) — a thin case of {@link selectPairs}. */
21109
21143
  select(id, options, current, emit) {
@@ -21540,8 +21574,6 @@ function ensureDialogStyles() {
21540
21574
  ${overlayScrollbarCss(".vela-dialog.vela-ind-dialog *", 9)}
21541
21575
  .vela-ind-tab{font-weight:600;font-size:13px;line-height:20px;transition:color var(--vela-dur-fast) ease,border-color var(--vela-dur-fast) ease;}
21542
21576
  .vela-ind-tab:not(.vela-ind-tab-active):hover{color:var(--vela-fg-bright);}
21543
- .vela-ind-hint{background:var(--vela-hover);color:var(--vela-fg-muted);transition:background var(--vela-dur-fast) ease,color var(--vela-dur-fast) ease;}
21544
- .vela-ind-hint:hover{background:var(--vela-active);color:var(--vela-fg-bright);}
21545
21577
  .vela-ind-ctl,.vela-ind-close{background-color:transparent;color:inherit;transition:color var(--vela-dur-fast) ease,background-color var(--vela-dur-fast) ease;}
21546
21578
  .vela-ind-ctl svg,.vela-ind-close svg{width:${LEGEND_ICON_PX}px;height:${LEGEND_ICON_PX}px;display:block;flex:none;stroke-width:1;}
21547
21579
  .vela-ind-ctl:hover{background-color:var(--vela-hover-strong);}
@@ -27587,6 +27619,8 @@ var BUILTIN_SETTINGS_IDS = [
27587
27619
  "symbol.style.baseline.fill-bottom",
27588
27620
  "symbol.style.baseline.base-level",
27589
27621
  "symbol.style.baseline.width",
27622
+ "symbol.animation",
27623
+ "symbol.animation.price-changes",
27590
27624
  "symbol.timezone",
27591
27625
  "scales",
27592
27626
  "scales.price-scale",
@@ -27729,8 +27763,7 @@ ${overlayScrollbarCss(".vela-sd-pane")}
27729
27763
  .vela-sd-mobile .vela-select-trigger,.vela-sd-mobile .vela-num input,.vela-sd-mobile .vela-width-field{height:34px;}
27730
27764
  .vela-sd-mobile .vela-sd-close{width:40px;height:40px;}
27731
27765
  .vela-sd-mobile .vela-sd-btn{height:38px;}
27732
- .vela-sd-mobile .vela-sd-row span,.vela-sd-mobile .vela-sd-bool span,.vela-sd-mobile .vela-field-label{white-space:normal !important;}
27733
- `;
27766
+ .vela-sd-mobile .vela-sd-row span,.vela-sd-mobile .vela-sd-bool span,.vela-sd-mobile .vela-field-label{white-space:normal !important;}`;
27734
27767
  if (!existing) document.head.appendChild(st);
27735
27768
  }
27736
27769
  var SettingsDialog = class {
@@ -27751,6 +27784,8 @@ var SettingsDialog = class {
27751
27784
  this.themeControl = null;
27752
27785
  /** The built tabs, by title — how `showSection` reaches a pane while the dialog is open. */
27753
27786
  this.tabs = [];
27787
+ this.hintTips = [];
27788
+ // ⓘ tooltip disposers of the open build (see hint)
27754
27789
  /** Active instance-strip tab per chart type — remembered across dialog rebuilds. */
27755
27790
  this.typeActiveInstance = /* @__PURE__ */ new Map();
27756
27791
  /** Active TOC group per structured pane (`<typeId>/<pane>` → group label). */
@@ -27939,6 +27974,13 @@ var SettingsDialog = class {
27939
27974
  body.append(g);
27940
27975
  }
27941
27976
  showActive(config.series.style);
27977
+ body.append(sid(this.sectionTitle("Animation"), "symbol.animation"));
27978
+ body.append(sid(this.boolRow(
27979
+ "Animate price changes",
27980
+ config.priceScale.animateLastPrice,
27981
+ (v) => this.emit({ priceScale: { animateLastPrice: v } }),
27982
+ this.hint("Glide the live bar to each new price instead of snapping.")
27983
+ ), "symbol.animation.price-changes"));
27942
27984
  body.append(sid(this.sectionTitle("Time zone"), "symbol.timezone"));
27943
27985
  body.append(sid(this.selectRowLabeled("Time zone", normalizeTimezone(config.timeScale.timezone), timezoneOptions(config.timeScale.timezone), (v) => this.emit({ timeScale: { timezone: v } })), "symbol.timezone"));
27944
27986
  const renderHostSections = (placement) => {
@@ -28146,6 +28188,8 @@ var SettingsDialog = class {
28146
28188
  this.ui = null;
28147
28189
  this.root = null;
28148
28190
  this.tabs = [];
28191
+ for (const dispose of this.hintTips) dispose();
28192
+ this.hintTips = [];
28149
28193
  ui?.destroy();
28150
28194
  }
28151
28195
  destroy() {
@@ -28559,23 +28603,31 @@ var SettingsDialog = class {
28559
28603
  }).el
28560
28604
  });
28561
28605
  }
28562
- /** A toggle row: the checkbox sits to the LEFT of its label (never in the control area). */
28563
- boolRow(label, value, onChange) {
28564
- return this.toggleRow(label, value, onChange, []);
28606
+ /** A toggle row: the checkbox sits to the LEFT of its label (never in the control area).
28607
+ * `info` (see {@link hint}) rides after the label. */
28608
+ boolRow(label, value, onChange, info) {
28609
+ return this.toggleRow(label, value, onChange, [], void 0, info);
28565
28610
  }
28566
28611
  /** An enable row: checkbox + label in the label column, dependent controls in the
28567
28612
  * shared control column; the control group dims and ignores input while the toggle
28568
28613
  * is off. With `get`, the row re-reads its state on a 'vela-sync' event. */
28569
- toggleRow(label, value, onToggle, controls, get) {
28614
+ toggleRow(label, value, onToggle, controls, get, info) {
28570
28615
  return fieldRow({
28571
28616
  label,
28572
28617
  labelSize: "sm",
28573
28618
  bool: controls.length === 0,
28574
28619
  toggle: { checked: value, onChange: onToggle, get },
28575
28620
  control: controls,
28621
+ info,
28576
28622
  className: controls.length === 0 ? "vela-sd-bool" : "vela-sd-row"
28577
28623
  });
28578
28624
  }
28625
+ /** The shared ⓘ hint after a row label (see {@link chromeHint}). Disposed with the dialog. */
28626
+ hint(text) {
28627
+ const { el, dispose } = chromeHint(text, { host: this.container, theme: () => this.theme });
28628
+ this.hintTips.push(dispose);
28629
+ return el;
28630
+ }
28579
28631
  numberRow(label, value, min, max, step, onChange) {
28580
28632
  return fieldRow({
28581
28633
  label,
@@ -33807,7 +33859,6 @@ var ZOOM_OUT_MARGIN_BARS = 6;
33807
33859
  var ZOOM_TAU_MS = 70;
33808
33860
  var SCALE_TAU_MS = 80;
33809
33861
  var FLING_TAU_MS = 110;
33810
- var LIVE_BAR_TAU_MS = 90;
33811
33862
  var SCROLL_TO_TAU_MS = 130;
33812
33863
  var FLING_STOP_PX = 0.02;
33813
33864
  var PRICE_SCALE_K = 4e-3;
@@ -33878,9 +33929,13 @@ var NativeRenderer = class {
33878
33929
  /** Drawings layer self-serves Ctrl+Z/Y (see the `historyChords` feature). */
33879
33930
  this.historyChordsEnabled = true;
33880
33931
  this.liveRegion = null;
33881
- // ── animation state (eased zoom + inertial pan) ──
33932
+ // ── animation state (eased zoom + inertial pan + live-bar glide) ──
33882
33933
  this.animZoom = true;
33883
33934
  this.animPan = true;
33935
+ this.animLiveBarMs = 0;
33936
+ // forming-bar OHLC glide time-constant; 0 = each tick snaps
33937
+ this.animLiveBarOnMs = LIVE_BAR_EASE_DEFAULT_MS;
33938
+ // the duration the settings-dialog on/off toggle restores (last non-zero value configured)
33884
33939
  // Brand default candles.
33885
33940
  this.candleUp = BULLISH;
33886
33941
  this.candleDown = BEARISH;
@@ -34005,7 +34060,7 @@ var NativeRenderer = class {
34005
34060
  this.moveIndicatorCbs = /* @__PURE__ */ new Set();
34006
34061
  this.priceStyleCbs = /* @__PURE__ */ new Set();
34007
34062
  this.name = "native";
34008
- this.features = ["logScale", "currentPriceLine", "priceLabel", "countdown", "upColor", "downColor", "glow", "animZoom", "animPan", "intro", "zoomAnchor", "axisDrag", "paneResize", "candleZOrder", "candleVisible", "seriesOrder", "highlights", "sessionZones", "gridlines", "axisLabels", "scaleMode", "invertScale", "paneScales", "autoScale", "timezone", "keyboard", "historyChords", "priceStyle", "priceBaseline", "baselinePrice", "settings", "attribution", "dialogHost", "tradeMarkers", "indicatorTitles", "indicatorValues"];
34063
+ this.features = ["logScale", "currentPriceLine", "priceLabel", "countdown", "upColor", "downColor", "glow", "animZoom", "animPan", "animLiveBar", "intro", "zoomAnchor", "axisDrag", "paneResize", "candleZOrder", "candleVisible", "seriesOrder", "highlights", "sessionZones", "gridlines", "axisLabels", "scaleMode", "invertScale", "paneScales", "autoScale", "timezone", "keyboard", "historyChords", "priceStyle", "priceBaseline", "baselinePrice", "settings", "attribution", "dialogHost", "tradeMarkers", "indicatorTitles", "indicatorValues"];
34009
34064
  /** Track cursor proximity to the scroll button on the plot (bubbles from the button too,
34010
34065
  * so moving onto the button doesn't count as leaving). */
34011
34066
  this.onScrollProximityMove = (e) => {
@@ -34039,6 +34094,7 @@ var NativeRenderer = class {
34039
34094
  this.backendMode = opts.nativeBackend;
34040
34095
  this.animZoom = opts.animZoom;
34041
34096
  this.animPan = opts.animPan;
34097
+ this.setLiveBarEase(resolveLiveBarEaseMs(opts.animLiveBar));
34042
34098
  this.glowAmount = opts.glow;
34043
34099
  this.candleUp = opts.upColor;
34044
34100
  this.candleDown = opts.downColor;
@@ -34088,6 +34144,10 @@ var NativeRenderer = class {
34088
34144
  case "animPan":
34089
34145
  this.animPan = Boolean(value);
34090
34146
  return;
34147
+ case "animLiveBar":
34148
+ this.setLiveBarEase(resolveLiveBarEaseMs(value));
34149
+ return;
34150
+ // affects the next tick only; a glide in flight finishes at the new rate (or snaps at 0)
34091
34151
  case "intro": {
34092
34152
  const s = value === false || value === "none" || value === "off" || value == null ? "" : String(value);
34093
34153
  this.introStyle = s;
@@ -34224,6 +34284,8 @@ var NativeRenderer = class {
34224
34284
  return this.animZoom;
34225
34285
  case "animPan":
34226
34286
  return this.animPan;
34287
+ case "animLiveBar":
34288
+ return this.animLiveBarMs;
34227
34289
  case "intro":
34228
34290
  return this.introStyle;
34229
34291
  case "zoomAnchor":
@@ -34392,7 +34454,8 @@ var NativeRenderer = class {
34392
34454
  labelsVisible: this.scene.showAxisLabels,
34393
34455
  currentPriceLine: this.scene.showPriceLine,
34394
34456
  priceLabel: this.scene.showPriceLabel,
34395
- countdown: this.scene.showCountdown
34457
+ countdown: this.scene.showCountdown,
34458
+ animateLastPrice: this.animLiveBarMs > 0
34396
34459
  },
34397
34460
  panes: { separatorColor: s.separatorColor ?? t.borderColor },
34398
34461
  trades: {
@@ -34499,6 +34562,7 @@ var NativeRenderer = class {
34499
34562
  this.scene.showPriceLabel = next.priceScale.priceLabel;
34500
34563
  this.scene.showCountdown = next.priceScale.countdown;
34501
34564
  this.syncCountdownTimer();
34565
+ this.animLiveBarMs = next.priceScale.animateLastPrice ? this.animLiveBarOnMs : 0;
34502
34566
  s.separatorColor = keepInherit(s.separatorColor, next.panes.separatorColor, prevTheme.borderColor);
34503
34567
  this.scene.tradeMarkers = {
34504
34568
  visible: next.trades.visible,
@@ -35315,8 +35379,11 @@ var NativeRenderer = class {
35315
35379
  const last = this.bars[n - 1];
35316
35380
  if (last && bar.time === last.time) {
35317
35381
  this.bars[n - 1] = bar;
35318
- if (this.liveEaseTime !== bar.time) this.syncLiveEase(bar);
35319
- this.animator.start();
35382
+ if (this.animLiveBarMs <= 0 || this.liveEaseTime !== bar.time) {
35383
+ this.syncLiveEase(bar);
35384
+ } else {
35385
+ this.animator.start();
35386
+ }
35320
35387
  } else if (!last || bar.time > last.time) {
35321
35388
  this.bars.push(bar);
35322
35389
  this.syncLiveEase(bar);
@@ -35328,6 +35395,12 @@ var NativeRenderer = class {
35328
35395
  this.scene.bars = this.bars;
35329
35396
  this.scheduler.invalidate(4 /* Full */);
35330
35397
  }
35398
+ /** Set the live-bar glide duration (0 = off). A non-zero value is also remembered as
35399
+ * what the config's on/off toggle (`priceScale.animateLastPrice`) switches back on to. */
35400
+ setLiveBarEase(ms) {
35401
+ this.animLiveBarMs = ms;
35402
+ if (ms > 0) this.animLiveBarOnMs = ms;
35403
+ }
35331
35404
  /** Snap the eased forming-bar state to `bar` — no glide (a fresh bar or the first tick of one). */
35332
35405
  syncLiveEase(bar) {
35333
35406
  this.liveEaseTime = bar.time;
@@ -35340,9 +35413,10 @@ var NativeRenderer = class {
35340
35413
  const target = this.bars[this.bars.length - 1];
35341
35414
  if (!target || this.liveEaseTime !== target.time) return false;
35342
35415
  const eps = Math.max(1e-9, Math.abs(target.close) * 1e-6);
35343
- const nh = easeToward(this.liveEaseHigh, target.high, dtMs, LIVE_BAR_TAU_MS);
35344
- const nl = easeToward(this.liveEaseLow, target.low, dtMs, LIVE_BAR_TAU_MS);
35345
- const nc = easeToward(this.liveEaseClose, target.close, dtMs, LIVE_BAR_TAU_MS);
35416
+ const tau = this.animLiveBarMs;
35417
+ const nh = easeToward(this.liveEaseHigh, target.high, dtMs, tau);
35418
+ const nl = easeToward(this.liveEaseLow, target.low, dtMs, tau);
35419
+ const nc = easeToward(this.liveEaseClose, target.close, dtMs, tau);
35346
35420
  const active = Math.abs(nh - target.high) > eps || Math.abs(nl - target.low) > eps || Math.abs(nc - target.close) > eps;
35347
35421
  this.liveEaseHigh = active ? nh : target.high;
35348
35422
  this.liveEaseLow = active ? nl : target.low;
@@ -39597,21 +39671,11 @@ var Vela = class {
39597
39671
  registerClassicIndicators();
39598
39672
  const element = resolveElement(container);
39599
39673
  const theme = resolveTheme(options.theme);
39600
- let animZoom = true;
39601
- let animPan = true;
39602
- if (typeof options.animations === "boolean") {
39603
- animZoom = options.animations;
39604
- animPan = options.animations;
39605
- } else if (options.animations) {
39606
- animZoom = options.animations.zoom ?? true;
39607
- animPan = options.animations.pan ?? true;
39608
- }
39609
39674
  const display = {
39610
39675
  currentPriceLine: options.currentPriceLine ?? true,
39611
39676
  logScale: options.logScale ?? false,
39612
39677
  nativeBackend: options.nativeBackend ?? "auto",
39613
- animZoom,
39614
- animPan,
39678
+ ...resolveAnimations(options.animations),
39615
39679
  glow: options.glow ?? 0,
39616
39680
  upColor: options.upColor ?? BULLISH,
39617
39681
  downColor: options.downColor ?? BEARISH,
@@ -39926,9 +39990,6 @@ function resolveElement(container) {
39926
39990
  return element;
39927
39991
  }
39928
39992
 
39929
- // src/core/options.ts
39930
- var normalizeSession = (v) => v === "regular" || v === "extended" ? v : void 0;
39931
-
39932
39993
  // src/widget/statusline-model.ts
39933
39994
  function segmentVisibility(parts, chartHidden = false) {
39934
39995
  return { avatar: parts.logo, symbol: parts.name, meta: parts.name, market: parts.market, ohlc: parts.ohlc && !chartHidden, change: parts.change && !chartHidden, eye: chartHidden };
@@ -1,9 +1,9 @@
1
- import { O as OHLCV, V as VisibleRangePreset, a as VisibleRange, b as VelaOptions, I as InputValue, c as VelaTheme, N as NativeBackend, d as MarketSession } from './options-bdSAtp7y.cjs';
2
- import { S as SyncSetting, V as VelaStorage, C as CellState, W as WidgetHistory, R as ResolvedIndicator, a as StatuslinePart, b as RangePreset, T as TrackSizes, c as VelaShellOptions, d as SyncOptions, e as SyncKind, f as WorkspaceState } from './statusline-model-CbPza-Wc.cjs';
3
- export { g as ChartState, P as PanelsState, h as decodeState, i as encodeState, s as sanitizeState } from './statusline-model-CbPza-Wc.cjs';
1
+ import { O as OHLCV, V as VisibleRangePreset, a as VisibleRange, b as VelaOptions, I as InputValue, c as VelaTheme, N as NativeBackend, d as MarketSession } from './options-CX1lSYWA.cjs';
2
+ import { S as SyncSetting, V as VelaStorage, C as CellState, W as WidgetHistory, R as ResolvedIndicator, a as StatuslinePart, b as RangePreset, T as TrackSizes, c as VelaShellOptions, d as SyncOptions, e as SyncKind, f as WorkspaceState } from './statusline-model-D91cU2fF.cjs';
3
+ export { g as ChartState, P as PanelsState, h as decodeState, i as encodeState, s as sanitizeState } from './statusline-model-D91cU2fF.cjs';
4
4
  import { K as KeymapManager } from './keymap-CGOz5F5f.cjs';
5
- import { I as IndicatorHandle, S as ScriptingEngine, W as WidgetContext, V as Vela, E as ExternalIndicatorEntry, a as ScriptRun } from './contributions-BEkxwA5F.cjs';
6
- import { M as MarketDataFeed } from './DataProvider-xH2VBcFT.cjs';
5
+ import { I as IndicatorHandle, S as ScriptingEngine, W as WidgetContext, V as Vela, E as ExternalIndicatorEntry, a as ScriptRun } from './contributions-C3b0Sx5P.cjs';
6
+ import { M as MarketDataFeed } from './DataProvider-OfR3fXg9.cjs';
7
7
 
8
8
  /** The cells that follow `originId` under `setting` — PURE (never includes the origin). */
9
9
  declare function syncTargets(originId: string, setting: SyncSetting | undefined, cellIds: readonly string[]): string[];
@@ -1,9 +1,9 @@
1
- import { O as OHLCV, V as VisibleRangePreset, a as VisibleRange, b as VelaOptions, I as InputValue, c as VelaTheme, N as NativeBackend, d as MarketSession } from './options-bdSAtp7y.js';
2
- import { S as SyncSetting, V as VelaStorage, C as CellState, W as WidgetHistory, R as ResolvedIndicator, a as StatuslinePart, b as RangePreset, T as TrackSizes, c as VelaShellOptions, d as SyncOptions, e as SyncKind, f as WorkspaceState } from './statusline-model-D7cWkw8A.js';
3
- export { g as ChartState, P as PanelsState, h as decodeState, i as encodeState, s as sanitizeState } from './statusline-model-D7cWkw8A.js';
1
+ import { O as OHLCV, V as VisibleRangePreset, a as VisibleRange, b as VelaOptions, I as InputValue, c as VelaTheme, N as NativeBackend, d as MarketSession } from './options-CX1lSYWA.js';
2
+ import { S as SyncSetting, V as VelaStorage, C as CellState, W as WidgetHistory, R as ResolvedIndicator, a as StatuslinePart, b as RangePreset, T as TrackSizes, c as VelaShellOptions, d as SyncOptions, e as SyncKind, f as WorkspaceState } from './statusline-model-IURCya0H.js';
3
+ export { g as ChartState, P as PanelsState, h as decodeState, i as encodeState, s as sanitizeState } from './statusline-model-IURCya0H.js';
4
4
  import { K as KeymapManager } from './keymap-CGOz5F5f.js';
5
- import { I as IndicatorHandle, S as ScriptingEngine, W as WidgetContext, V as Vela, E as ExternalIndicatorEntry, a as ScriptRun } from './contributions-CoAX7_SF.js';
6
- import { M as MarketDataFeed } from './DataProvider-XLdJB86x.js';
5
+ import { I as IndicatorHandle, S as ScriptingEngine, W as WidgetContext, V as Vela, E as ExternalIndicatorEntry, a as ScriptRun } from './contributions-Swzz10fG.js';
6
+ import { M as MarketDataFeed } from './DataProvider-B-Jz59Rf.js';
7
7
 
8
8
  /** The cells that follow `originId` under `setting` — PURE (never includes the origin). */
9
9
  declare function syncTargets(originId: string, setting: SyncSetting | undefined, cellIds: readonly string[]): string[];
package/dist/workspace.js CHANGED
@@ -1,7 +1,7 @@
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-SEOO6YG7.js';
2
- import './chunk-GIJYO4LO.js';
3
- import './chunk-I77F2SVE.js';
4
- import './chunk-Q3TFJNJW.js';
5
- import './chunk-MGU3USTP.js';
6
- import './chunk-6DPAYEGO.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-OSZDSH7F.js';
2
+ import './chunk-YCD72KGK.js';
3
+ import './chunk-IFJJPXSV.js';
4
+ import './chunk-XCBJU674.js';
5
+ import './chunk-T5Z5YUCF.js';
6
+ import './chunk-CAFCLMPF.js';
7
7
  import './chunk-W4EJWLEO.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luxalgo/vela",
3
- "version": "0.6.16",
3
+ "version": "0.6.17",
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",