@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.
- package/README.md +4 -0
- package/dist/{DataProvider-XLdJB86x.d.ts → DataProvider-B-Jz59Rf.d.ts} +1 -1
- package/dist/{DataProvider-xH2VBcFT.d.cts → DataProvider-OfR3fXg9.d.cts} +1 -1
- package/dist/{chunk-6DPAYEGO.js → chunk-CAFCLMPF.js} +1 -0
- package/dist/{chunk-I77F2SVE.js → chunk-IFJJPXSV.js} +1 -1
- package/dist/{chunk-SEOO6YG7.js → chunk-OSZDSH7F.js} +5 -8
- package/dist/{chunk-MGU3USTP.js → chunk-T5Z5YUCF.js} +1 -1
- package/dist/{chunk-Q3TFJNJW.js → chunk-XCBJU674.js} +2 -2
- package/dist/{chunk-GIJYO4LO.js → chunk-YCD72KGK.js} +103 -40
- package/dist/{contributions-BEkxwA5F.d.cts → contributions-C3b0Sx5P.d.cts} +2 -2
- package/dist/{contributions-CoAX7_SF.d.ts → contributions-Swzz10fG.d.ts} +2 -2
- package/dist/index.cjs +99 -36
- package/dist/index.d.cts +15 -6
- package/dist/index.d.ts +15 -6
- package/dist/index.js +4 -4
- package/dist/{options-bdSAtp7y.d.ts → options-CX1lSYWA.d.cts} +12 -2
- package/dist/{options-bdSAtp7y.d.cts → options-CX1lSYWA.d.ts} +12 -2
- package/dist/{plugin-Dxyq35Zf.d.cts → plugin-BjnEE1zA.d.cts} +3 -3
- package/dist/{plugin-CNUgbRNq.d.ts → plugin-mvddudqd.d.ts} +3 -3
- package/dist/plugin.cjs +1 -0
- package/dist/plugin.d.cts +4 -4
- package/dist/plugin.d.ts +4 -4
- package/dist/plugin.js +2 -2
- package/dist/providers/binance.d.cts +2 -2
- package/dist/providers/binance.d.ts +2 -2
- package/dist/providers/coinbase.d.cts +2 -2
- package/dist/providers/coinbase.d.ts +2 -2
- package/dist/providers/hyperliquid.d.cts +2 -2
- package/dist/providers/hyperliquid.d.ts +2 -2
- package/dist/{statusline-model-CbPza-Wc.d.cts → statusline-model-D91cU2fF.d.cts} +3 -3
- package/dist/{statusline-model-D7cWkw8A.d.ts → statusline-model-IURCya0H.d.ts} +3 -3
- package/dist/ui.cjs +1 -0
- package/dist/ui.d.cts +1 -1
- package/dist/ui.d.ts +1 -1
- package/dist/ui.js +3 -3
- package/dist/vela.global.js +99 -36
- package/dist/vela.global.min.js +46 -49
- package/dist/widget.cjs +100 -39
- package/dist/widget.d.cts +6 -6
- package/dist/widget.d.ts +6 -6
- package/dist/widget.js +7 -7
- package/dist/workspace.cjs +100 -39
- package/dist/workspace.d.cts +5 -5
- package/dist/workspace.d.ts +5 -5
- package/dist/workspace.js +6 -6
- package/package.json +1 -1
package/dist/widget.cjs
CHANGED
|
@@ -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"/>'));
|
|
@@ -5245,7 +5246,8 @@ function mergeConfig(base, patch) {
|
|
|
5245
5246
|
labelsVisible: isBool(ps.labelsVisible) ? ps.labelsVisible : base.priceScale.labelsVisible,
|
|
5246
5247
|
currentPriceLine: isBool(ps.currentPriceLine) ? ps.currentPriceLine : base.priceScale.currentPriceLine,
|
|
5247
5248
|
priceLabel: isBool(ps.priceLabel) ? ps.priceLabel : base.priceScale.priceLabel,
|
|
5248
|
-
countdown: isBool(ps.countdown) ? ps.countdown : base.priceScale.countdown
|
|
5249
|
+
countdown: isBool(ps.countdown) ? ps.countdown : base.priceScale.countdown,
|
|
5250
|
+
animateLastPrice: isBool(ps.animateLastPrice) ? ps.animateLastPrice : base.priceScale.animateLastPrice
|
|
5249
5251
|
},
|
|
5250
5252
|
panes: {
|
|
5251
5253
|
separatorColor: isColor(panes.separatorColor) ? panes.separatorColor : base.panes.separatorColor
|
|
@@ -17208,6 +17210,23 @@ function attachChromeTooltip(anchor, opts) {
|
|
|
17208
17210
|
clear();
|
|
17209
17211
|
};
|
|
17210
17212
|
}
|
|
17213
|
+
function chromeHint(text, opts) {
|
|
17214
|
+
const px = opts.size ?? 16;
|
|
17215
|
+
const el = document.createElement("span");
|
|
17216
|
+
el.className = "vela-hint";
|
|
17217
|
+
el.setAttribute("role", "img");
|
|
17218
|
+
el.setAttribute("aria-label", text);
|
|
17219
|
+
el.innerHTML = iconAt("info", px);
|
|
17220
|
+
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;`;
|
|
17221
|
+
const hover = (on) => {
|
|
17222
|
+
el.style.background = on ? "var(--vela-active)" : "var(--vela-hover)";
|
|
17223
|
+
el.style.color = on ? "var(--vela-fg-bright)" : "var(--vela-fg-muted)";
|
|
17224
|
+
};
|
|
17225
|
+
el.addEventListener("pointerenter", () => hover(true));
|
|
17226
|
+
el.addEventListener("pointerleave", () => hover(false));
|
|
17227
|
+
const dispose = attachChromeTooltip(el, { host: opts.host, theme: opts.theme, text: () => text, wrap: true, delayMs: 250 });
|
|
17228
|
+
return { el, dispose };
|
|
17229
|
+
}
|
|
17211
17230
|
|
|
17212
17231
|
// src/renderers/native/drawings/DrawingToolbar.ts
|
|
17213
17232
|
var TOOLBAR_WIDTH = 44;
|
|
@@ -18199,6 +18218,24 @@ function localStorageAdapter(storageKey) {
|
|
|
18199
18218
|
};
|
|
18200
18219
|
}
|
|
18201
18220
|
|
|
18221
|
+
// src/core/options.ts
|
|
18222
|
+
var normalizeSession = (v) => v === "regular" || v === "extended" ? v : void 0;
|
|
18223
|
+
var LIVE_BAR_EASE_DEFAULT_MS = 90;
|
|
18224
|
+
var LIVE_BAR_EASE_MAX_MS = 1e3;
|
|
18225
|
+
function resolveLiveBarEaseMs(value) {
|
|
18226
|
+
if (value === true) return LIVE_BAR_EASE_DEFAULT_MS;
|
|
18227
|
+
if (typeof value !== "number" || !Number.isFinite(value) || value <= 0) return 0;
|
|
18228
|
+
return Math.min(value, LIVE_BAR_EASE_MAX_MS);
|
|
18229
|
+
}
|
|
18230
|
+
function resolveAnimations(animations) {
|
|
18231
|
+
if (typeof animations === "boolean") return { animZoom: animations, animPan: animations, animLiveBar: 0 };
|
|
18232
|
+
return {
|
|
18233
|
+
animZoom: animations?.zoom ?? true,
|
|
18234
|
+
animPan: animations?.pan ?? true,
|
|
18235
|
+
animLiveBar: resolveLiveBarEaseMs(animations?.liveBar)
|
|
18236
|
+
};
|
|
18237
|
+
}
|
|
18238
|
+
|
|
18202
18239
|
// src/core/model/series.ts
|
|
18203
18240
|
function isLineLikeSeries(spec) {
|
|
18204
18241
|
return spec.kind !== "candle" && spec.kind !== "bar" && spec.kind !== "markers";
|
|
@@ -21164,14 +21201,11 @@ var IndicatorInputsDialog = class {
|
|
|
21164
21201
|
buildTextField(id, current, emit) {
|
|
21165
21202
|
return buildFieldControl({ kind: "text", id, value: current, onChange: emit }).el;
|
|
21166
21203
|
}
|
|
21167
|
-
/**
|
|
21204
|
+
/** The shared ⓘ hint carrying an input's `tooltip` (see {@link chromeHint}). */
|
|
21168
21205
|
infoButton(tooltip2) {
|
|
21169
|
-
const
|
|
21170
|
-
|
|
21171
|
-
|
|
21172
|
-
b.className = "vela-ind-hint";
|
|
21173
|
-
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;";
|
|
21174
|
-
return b;
|
|
21206
|
+
const { el, dispose } = chromeHint(tooltip2, { host: this.host.container, theme: () => this.host.theme(), size: 18 });
|
|
21207
|
+
this.dialogTips.push(dispose);
|
|
21208
|
+
return el;
|
|
21175
21209
|
}
|
|
21176
21210
|
/** A dropdown over plain string options (value === label) — a thin case of {@link selectPairs}. */
|
|
21177
21211
|
select(id, options, current, emit) {
|
|
@@ -21608,8 +21642,6 @@ function ensureDialogStyles() {
|
|
|
21608
21642
|
${overlayScrollbarCss(".vela-dialog.vela-ind-dialog *", 9)}
|
|
21609
21643
|
.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;}
|
|
21610
21644
|
.vela-ind-tab:not(.vela-ind-tab-active):hover{color:var(--vela-fg-bright);}
|
|
21611
|
-
.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;}
|
|
21612
|
-
.vela-ind-hint:hover{background:var(--vela-active);color:var(--vela-fg-bright);}
|
|
21613
21645
|
.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;}
|
|
21614
21646
|
.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;}
|
|
21615
21647
|
.vela-ind-ctl:hover{background-color:var(--vela-hover-strong);}
|
|
@@ -27655,6 +27687,8 @@ var BUILTIN_SETTINGS_IDS = [
|
|
|
27655
27687
|
"symbol.style.baseline.fill-bottom",
|
|
27656
27688
|
"symbol.style.baseline.base-level",
|
|
27657
27689
|
"symbol.style.baseline.width",
|
|
27690
|
+
"symbol.animation",
|
|
27691
|
+
"symbol.animation.price-changes",
|
|
27658
27692
|
"symbol.timezone",
|
|
27659
27693
|
"scales",
|
|
27660
27694
|
"scales.price-scale",
|
|
@@ -27797,8 +27831,7 @@ ${overlayScrollbarCss(".vela-sd-pane")}
|
|
|
27797
27831
|
.vela-sd-mobile .vela-select-trigger,.vela-sd-mobile .vela-num input,.vela-sd-mobile .vela-width-field{height:34px;}
|
|
27798
27832
|
.vela-sd-mobile .vela-sd-close{width:40px;height:40px;}
|
|
27799
27833
|
.vela-sd-mobile .vela-sd-btn{height:38px;}
|
|
27800
|
-
.vela-sd-mobile .vela-sd-row span,.vela-sd-mobile .vela-sd-bool span,.vela-sd-mobile .vela-field-label{white-space:normal !important;}
|
|
27801
|
-
`;
|
|
27834
|
+
.vela-sd-mobile .vela-sd-row span,.vela-sd-mobile .vela-sd-bool span,.vela-sd-mobile .vela-field-label{white-space:normal !important;}`;
|
|
27802
27835
|
if (!existing) document.head.appendChild(st);
|
|
27803
27836
|
}
|
|
27804
27837
|
var SettingsDialog = class {
|
|
@@ -27819,6 +27852,8 @@ var SettingsDialog = class {
|
|
|
27819
27852
|
this.themeControl = null;
|
|
27820
27853
|
/** The built tabs, by title — how `showSection` reaches a pane while the dialog is open. */
|
|
27821
27854
|
this.tabs = [];
|
|
27855
|
+
this.hintTips = [];
|
|
27856
|
+
// ⓘ tooltip disposers of the open build (see hint)
|
|
27822
27857
|
/** Active instance-strip tab per chart type — remembered across dialog rebuilds. */
|
|
27823
27858
|
this.typeActiveInstance = /* @__PURE__ */ new Map();
|
|
27824
27859
|
/** Active TOC group per structured pane (`<typeId>/<pane>` → group label). */
|
|
@@ -28007,6 +28042,13 @@ var SettingsDialog = class {
|
|
|
28007
28042
|
body.append(g);
|
|
28008
28043
|
}
|
|
28009
28044
|
showActive(config.series.style);
|
|
28045
|
+
body.append(sid(this.sectionTitle("Animation"), "symbol.animation"));
|
|
28046
|
+
body.append(sid(this.boolRow(
|
|
28047
|
+
"Animate price changes",
|
|
28048
|
+
config.priceScale.animateLastPrice,
|
|
28049
|
+
(v) => this.emit({ priceScale: { animateLastPrice: v } }),
|
|
28050
|
+
this.hint("Glide the live bar to each new price instead of snapping.")
|
|
28051
|
+
), "symbol.animation.price-changes"));
|
|
28010
28052
|
body.append(sid(this.sectionTitle("Time zone"), "symbol.timezone"));
|
|
28011
28053
|
body.append(sid(this.selectRowLabeled("Time zone", normalizeTimezone(config.timeScale.timezone), timezoneOptions(config.timeScale.timezone), (v) => this.emit({ timeScale: { timezone: v } })), "symbol.timezone"));
|
|
28012
28054
|
const renderHostSections = (placement) => {
|
|
@@ -28214,6 +28256,8 @@ var SettingsDialog = class {
|
|
|
28214
28256
|
this.ui = null;
|
|
28215
28257
|
this.root = null;
|
|
28216
28258
|
this.tabs = [];
|
|
28259
|
+
for (const dispose of this.hintTips) dispose();
|
|
28260
|
+
this.hintTips = [];
|
|
28217
28261
|
ui?.destroy();
|
|
28218
28262
|
}
|
|
28219
28263
|
destroy() {
|
|
@@ -28627,23 +28671,31 @@ var SettingsDialog = class {
|
|
|
28627
28671
|
}).el
|
|
28628
28672
|
});
|
|
28629
28673
|
}
|
|
28630
|
-
/** A toggle row: the checkbox sits to the LEFT of its label (never in the control area).
|
|
28631
|
-
|
|
28632
|
-
|
|
28674
|
+
/** A toggle row: the checkbox sits to the LEFT of its label (never in the control area).
|
|
28675
|
+
* `info` (see {@link hint}) rides after the label. */
|
|
28676
|
+
boolRow(label, value, onChange, info) {
|
|
28677
|
+
return this.toggleRow(label, value, onChange, [], void 0, info);
|
|
28633
28678
|
}
|
|
28634
28679
|
/** An enable row: checkbox + label in the label column, dependent controls in the
|
|
28635
28680
|
* shared control column; the control group dims and ignores input while the toggle
|
|
28636
28681
|
* is off. With `get`, the row re-reads its state on a 'vela-sync' event. */
|
|
28637
|
-
toggleRow(label, value, onToggle, controls, get) {
|
|
28682
|
+
toggleRow(label, value, onToggle, controls, get, info) {
|
|
28638
28683
|
return fieldRow({
|
|
28639
28684
|
label,
|
|
28640
28685
|
labelSize: "sm",
|
|
28641
28686
|
bool: controls.length === 0,
|
|
28642
28687
|
toggle: { checked: value, onChange: onToggle, get },
|
|
28643
28688
|
control: controls,
|
|
28689
|
+
info,
|
|
28644
28690
|
className: controls.length === 0 ? "vela-sd-bool" : "vela-sd-row"
|
|
28645
28691
|
});
|
|
28646
28692
|
}
|
|
28693
|
+
/** The shared ⓘ hint after a row label (see {@link chromeHint}). Disposed with the dialog. */
|
|
28694
|
+
hint(text) {
|
|
28695
|
+
const { el, dispose } = chromeHint(text, { host: this.container, theme: () => this.theme });
|
|
28696
|
+
this.hintTips.push(dispose);
|
|
28697
|
+
return el;
|
|
28698
|
+
}
|
|
28647
28699
|
numberRow(label, value, min, max, step, onChange) {
|
|
28648
28700
|
return fieldRow({
|
|
28649
28701
|
label,
|
|
@@ -33875,7 +33927,6 @@ var ZOOM_OUT_MARGIN_BARS = 6;
|
|
|
33875
33927
|
var ZOOM_TAU_MS = 70;
|
|
33876
33928
|
var SCALE_TAU_MS = 80;
|
|
33877
33929
|
var FLING_TAU_MS = 110;
|
|
33878
|
-
var LIVE_BAR_TAU_MS = 90;
|
|
33879
33930
|
var SCROLL_TO_TAU_MS = 130;
|
|
33880
33931
|
var FLING_STOP_PX = 0.02;
|
|
33881
33932
|
var PRICE_SCALE_K = 4e-3;
|
|
@@ -33946,9 +33997,13 @@ var NativeRenderer = class {
|
|
|
33946
33997
|
/** Drawings layer self-serves Ctrl+Z/Y (see the `historyChords` feature). */
|
|
33947
33998
|
this.historyChordsEnabled = true;
|
|
33948
33999
|
this.liveRegion = null;
|
|
33949
|
-
// ── animation state (eased zoom + inertial pan) ──
|
|
34000
|
+
// ── animation state (eased zoom + inertial pan + live-bar glide) ──
|
|
33950
34001
|
this.animZoom = true;
|
|
33951
34002
|
this.animPan = true;
|
|
34003
|
+
this.animLiveBarMs = 0;
|
|
34004
|
+
// forming-bar OHLC glide time-constant; 0 = each tick snaps
|
|
34005
|
+
this.animLiveBarOnMs = LIVE_BAR_EASE_DEFAULT_MS;
|
|
34006
|
+
// the duration the settings-dialog on/off toggle restores (last non-zero value configured)
|
|
33952
34007
|
// Brand default candles.
|
|
33953
34008
|
this.candleUp = BULLISH;
|
|
33954
34009
|
this.candleDown = BEARISH;
|
|
@@ -34073,7 +34128,7 @@ var NativeRenderer = class {
|
|
|
34073
34128
|
this.moveIndicatorCbs = /* @__PURE__ */ new Set();
|
|
34074
34129
|
this.priceStyleCbs = /* @__PURE__ */ new Set();
|
|
34075
34130
|
this.name = "native";
|
|
34076
|
-
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"];
|
|
34131
|
+
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"];
|
|
34077
34132
|
/** Track cursor proximity to the scroll button on the plot (bubbles from the button too,
|
|
34078
34133
|
* so moving onto the button doesn't count as leaving). */
|
|
34079
34134
|
this.onScrollProximityMove = (e) => {
|
|
@@ -34107,6 +34162,7 @@ var NativeRenderer = class {
|
|
|
34107
34162
|
this.backendMode = opts.nativeBackend;
|
|
34108
34163
|
this.animZoom = opts.animZoom;
|
|
34109
34164
|
this.animPan = opts.animPan;
|
|
34165
|
+
this.setLiveBarEase(resolveLiveBarEaseMs(opts.animLiveBar));
|
|
34110
34166
|
this.glowAmount = opts.glow;
|
|
34111
34167
|
this.candleUp = opts.upColor;
|
|
34112
34168
|
this.candleDown = opts.downColor;
|
|
@@ -34156,6 +34212,10 @@ var NativeRenderer = class {
|
|
|
34156
34212
|
case "animPan":
|
|
34157
34213
|
this.animPan = Boolean(value);
|
|
34158
34214
|
return;
|
|
34215
|
+
case "animLiveBar":
|
|
34216
|
+
this.setLiveBarEase(resolveLiveBarEaseMs(value));
|
|
34217
|
+
return;
|
|
34218
|
+
// affects the next tick only; a glide in flight finishes at the new rate (or snaps at 0)
|
|
34159
34219
|
case "intro": {
|
|
34160
34220
|
const s = value === false || value === "none" || value === "off" || value == null ? "" : String(value);
|
|
34161
34221
|
this.introStyle = s;
|
|
@@ -34292,6 +34352,8 @@ var NativeRenderer = class {
|
|
|
34292
34352
|
return this.animZoom;
|
|
34293
34353
|
case "animPan":
|
|
34294
34354
|
return this.animPan;
|
|
34355
|
+
case "animLiveBar":
|
|
34356
|
+
return this.animLiveBarMs;
|
|
34295
34357
|
case "intro":
|
|
34296
34358
|
return this.introStyle;
|
|
34297
34359
|
case "zoomAnchor":
|
|
@@ -34460,7 +34522,8 @@ var NativeRenderer = class {
|
|
|
34460
34522
|
labelsVisible: this.scene.showAxisLabels,
|
|
34461
34523
|
currentPriceLine: this.scene.showPriceLine,
|
|
34462
34524
|
priceLabel: this.scene.showPriceLabel,
|
|
34463
|
-
countdown: this.scene.showCountdown
|
|
34525
|
+
countdown: this.scene.showCountdown,
|
|
34526
|
+
animateLastPrice: this.animLiveBarMs > 0
|
|
34464
34527
|
},
|
|
34465
34528
|
panes: { separatorColor: s.separatorColor ?? t.borderColor },
|
|
34466
34529
|
trades: {
|
|
@@ -34567,6 +34630,7 @@ var NativeRenderer = class {
|
|
|
34567
34630
|
this.scene.showPriceLabel = next.priceScale.priceLabel;
|
|
34568
34631
|
this.scene.showCountdown = next.priceScale.countdown;
|
|
34569
34632
|
this.syncCountdownTimer();
|
|
34633
|
+
this.animLiveBarMs = next.priceScale.animateLastPrice ? this.animLiveBarOnMs : 0;
|
|
34570
34634
|
s.separatorColor = keepInherit(s.separatorColor, next.panes.separatorColor, prevTheme.borderColor);
|
|
34571
34635
|
this.scene.tradeMarkers = {
|
|
34572
34636
|
visible: next.trades.visible,
|
|
@@ -35383,8 +35447,11 @@ var NativeRenderer = class {
|
|
|
35383
35447
|
const last = this.bars[n - 1];
|
|
35384
35448
|
if (last && bar.time === last.time) {
|
|
35385
35449
|
this.bars[n - 1] = bar;
|
|
35386
|
-
if (this.liveEaseTime !== bar.time)
|
|
35387
|
-
|
|
35450
|
+
if (this.animLiveBarMs <= 0 || this.liveEaseTime !== bar.time) {
|
|
35451
|
+
this.syncLiveEase(bar);
|
|
35452
|
+
} else {
|
|
35453
|
+
this.animator.start();
|
|
35454
|
+
}
|
|
35388
35455
|
} else if (!last || bar.time > last.time) {
|
|
35389
35456
|
this.bars.push(bar);
|
|
35390
35457
|
this.syncLiveEase(bar);
|
|
@@ -35396,6 +35463,12 @@ var NativeRenderer = class {
|
|
|
35396
35463
|
this.scene.bars = this.bars;
|
|
35397
35464
|
this.scheduler.invalidate(4 /* Full */);
|
|
35398
35465
|
}
|
|
35466
|
+
/** Set the live-bar glide duration (0 = off). A non-zero value is also remembered as
|
|
35467
|
+
* what the config's on/off toggle (`priceScale.animateLastPrice`) switches back on to. */
|
|
35468
|
+
setLiveBarEase(ms) {
|
|
35469
|
+
this.animLiveBarMs = ms;
|
|
35470
|
+
if (ms > 0) this.animLiveBarOnMs = ms;
|
|
35471
|
+
}
|
|
35399
35472
|
/** Snap the eased forming-bar state to `bar` — no glide (a fresh bar or the first tick of one). */
|
|
35400
35473
|
syncLiveEase(bar) {
|
|
35401
35474
|
this.liveEaseTime = bar.time;
|
|
@@ -35408,9 +35481,10 @@ var NativeRenderer = class {
|
|
|
35408
35481
|
const target = this.bars[this.bars.length - 1];
|
|
35409
35482
|
if (!target || this.liveEaseTime !== target.time) return false;
|
|
35410
35483
|
const eps = Math.max(1e-9, Math.abs(target.close) * 1e-6);
|
|
35411
|
-
const
|
|
35412
|
-
const
|
|
35413
|
-
const
|
|
35484
|
+
const tau = this.animLiveBarMs;
|
|
35485
|
+
const nh = easeToward(this.liveEaseHigh, target.high, dtMs, tau);
|
|
35486
|
+
const nl = easeToward(this.liveEaseLow, target.low, dtMs, tau);
|
|
35487
|
+
const nc = easeToward(this.liveEaseClose, target.close, dtMs, tau);
|
|
35414
35488
|
const active = Math.abs(nh - target.high) > eps || Math.abs(nl - target.low) > eps || Math.abs(nc - target.close) > eps;
|
|
35415
35489
|
this.liveEaseHigh = active ? nh : target.high;
|
|
35416
35490
|
this.liveEaseLow = active ? nl : target.low;
|
|
@@ -39665,21 +39739,11 @@ var Vela = class {
|
|
|
39665
39739
|
registerClassicIndicators();
|
|
39666
39740
|
const element = resolveElement(container);
|
|
39667
39741
|
const theme = resolveTheme(options.theme);
|
|
39668
|
-
let animZoom = true;
|
|
39669
|
-
let animPan = true;
|
|
39670
|
-
if (typeof options.animations === "boolean") {
|
|
39671
|
-
animZoom = options.animations;
|
|
39672
|
-
animPan = options.animations;
|
|
39673
|
-
} else if (options.animations) {
|
|
39674
|
-
animZoom = options.animations.zoom ?? true;
|
|
39675
|
-
animPan = options.animations.pan ?? true;
|
|
39676
|
-
}
|
|
39677
39742
|
const display = {
|
|
39678
39743
|
currentPriceLine: options.currentPriceLine ?? true,
|
|
39679
39744
|
logScale: options.logScale ?? false,
|
|
39680
39745
|
nativeBackend: options.nativeBackend ?? "auto",
|
|
39681
|
-
|
|
39682
|
-
animPan,
|
|
39746
|
+
...resolveAnimations(options.animations),
|
|
39683
39747
|
glow: options.glow ?? 0,
|
|
39684
39748
|
upColor: options.upColor ?? BULLISH,
|
|
39685
39749
|
downColor: options.downColor ?? BEARISH,
|
|
@@ -39994,9 +40058,6 @@ function resolveElement(container) {
|
|
|
39994
40058
|
return element;
|
|
39995
40059
|
}
|
|
39996
40060
|
|
|
39997
|
-
// src/core/options.ts
|
|
39998
|
-
var normalizeSession = (v) => v === "regular" || v === "extended" ? v : void 0;
|
|
39999
|
-
|
|
40000
40061
|
// src/widget/statusline-model.ts
|
|
40001
40062
|
function segmentVisibility(parts, chartHidden = false) {
|
|
40002
40063
|
return { avatar: parts.logo, symbol: parts.name, meta: parts.name, market: parts.market, ohlc: parts.ohlc && !chartHidden, change: parts.change && !chartHidden, eye: chartHidden };
|
package/dist/widget.d.cts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { V as Vela, W as WidgetContext, K as SidePanelButton } from './contributions-
|
|
2
|
-
export { C as CellStateContext, az as DEFAULT_PANEL_ORDER, E as ExternalIndicatorEntry, O as OVERRIDABLE_TOPBAR_IDS, M as SidePanelDescriptor, Q as SidePanelHandle, U as StatePersistenceHandler, _ as SymbolRankingHook, a3 as WidgetActionDescriptor, a4 as WidgetActionTarget, a5 as WidgetAttachment, af as registerSidePanel, ag as registerStatePersistence, ah as registerSymbolRanking, ai as registerWidgetAction, aj as registerWidgetAttachment, al as sidePanels, am as statePersistenceHandlers, an as symbolRanking, ao as topbarActionOverride, at as unregisterSidePanel, au as unregisterStatePersistence, av as unregisterWidgetAction, aw as unregisterWidgetAttachment, ax as widgetActions, ay as widgetAttachments } from './contributions-
|
|
3
|
-
import { b as VelaOptions, d as MarketSession, T as ThemeName, c as VelaTheme, s as DataWindowReadout } from './options-
|
|
4
|
-
import { c as VelaShellOptions, W as WidgetHistory, b as RangePreset, f as WorkspaceState, j as TopbarComposition, a as StatuslinePart, P as PanelsState } from './statusline-model-
|
|
5
|
-
export { B as Bottombar, k as BottombarOptions, C as CellState, g as ChartState, I as IndicatorLoader, l as IndicatorManifest, m as IndicatorManifestEntry, n as RANGE_PRESETS, R as ResolvedIndicator, o as ResolvedTopbarComposition, p as TOPBAR_BUILTIN_IDS, q as TOPBAR_DEFAULT_LEFT, r as TOPBAR_DEFAULT_RIGHT, V as VelaStorage, t as WidgetStorage, h as decodeState, i as encodeState, u as localStorageAdapter, v as pinnedTopbarActionIds, w as resolveIndicators, x as resolveTopbarComposition, s as sanitizeState, y as topbarHas } from './statusline-model-
|
|
1
|
+
import { V as Vela, W as WidgetContext, K as SidePanelButton } from './contributions-C3b0Sx5P.cjs';
|
|
2
|
+
export { C as CellStateContext, az as DEFAULT_PANEL_ORDER, E as ExternalIndicatorEntry, O as OVERRIDABLE_TOPBAR_IDS, M as SidePanelDescriptor, Q as SidePanelHandle, U as StatePersistenceHandler, _ as SymbolRankingHook, a3 as WidgetActionDescriptor, a4 as WidgetActionTarget, a5 as WidgetAttachment, af as registerSidePanel, ag as registerStatePersistence, ah as registerSymbolRanking, ai as registerWidgetAction, aj as registerWidgetAttachment, al as sidePanels, am as statePersistenceHandlers, an as symbolRanking, ao as topbarActionOverride, at as unregisterSidePanel, au as unregisterStatePersistence, av as unregisterWidgetAction, aw as unregisterWidgetAttachment, ax as widgetActions, ay as widgetAttachments } from './contributions-C3b0Sx5P.cjs';
|
|
3
|
+
import { b as VelaOptions, d as MarketSession, T as ThemeName, c as VelaTheme, s as DataWindowReadout } from './options-CX1lSYWA.cjs';
|
|
4
|
+
import { c as VelaShellOptions, W as WidgetHistory, b as RangePreset, f as WorkspaceState, j as TopbarComposition, a as StatuslinePart, P as PanelsState } from './statusline-model-D91cU2fF.cjs';
|
|
5
|
+
export { B as Bottombar, k as BottombarOptions, C as CellState, g as ChartState, I as IndicatorLoader, l as IndicatorManifest, m as IndicatorManifestEntry, n as RANGE_PRESETS, R as ResolvedIndicator, o as ResolvedTopbarComposition, p as TOPBAR_BUILTIN_IDS, q as TOPBAR_DEFAULT_LEFT, r as TOPBAR_DEFAULT_RIGHT, V as VelaStorage, t as WidgetStorage, h as decodeState, i as encodeState, u as localStorageAdapter, v as pinnedTopbarActionIds, w as resolveIndicators, x as resolveTopbarComposition, s as sanitizeState, y as topbarHas } from './statusline-model-D91cU2fF.cjs';
|
|
6
6
|
import { K as KeymapManager } from './keymap-CGOz5F5f.cjs';
|
|
7
|
-
import { a as SymbolDescriptor } from './DataProvider-
|
|
7
|
+
import { a as SymbolDescriptor } from './DataProvider-OfR3fXg9.cjs';
|
|
8
8
|
import { d as SidePanel } from './side-panel-HF0IAzwf.cjs';
|
|
9
9
|
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';
|
|
10
10
|
|
package/dist/widget.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { V as Vela, W as WidgetContext, K as SidePanelButton } from './contributions-
|
|
2
|
-
export { C as CellStateContext, az as DEFAULT_PANEL_ORDER, E as ExternalIndicatorEntry, O as OVERRIDABLE_TOPBAR_IDS, M as SidePanelDescriptor, Q as SidePanelHandle, U as StatePersistenceHandler, _ as SymbolRankingHook, a3 as WidgetActionDescriptor, a4 as WidgetActionTarget, a5 as WidgetAttachment, af as registerSidePanel, ag as registerStatePersistence, ah as registerSymbolRanking, ai as registerWidgetAction, aj as registerWidgetAttachment, al as sidePanels, am as statePersistenceHandlers, an as symbolRanking, ao as topbarActionOverride, at as unregisterSidePanel, au as unregisterStatePersistence, av as unregisterWidgetAction, aw as unregisterWidgetAttachment, ax as widgetActions, ay as widgetAttachments } from './contributions-
|
|
3
|
-
import { b as VelaOptions, d as MarketSession, T as ThemeName, c as VelaTheme, s as DataWindowReadout } from './options-
|
|
4
|
-
import { c as VelaShellOptions, W as WidgetHistory, b as RangePreset, f as WorkspaceState, j as TopbarComposition, a as StatuslinePart, P as PanelsState } from './statusline-model-
|
|
5
|
-
export { B as Bottombar, k as BottombarOptions, C as CellState, g as ChartState, I as IndicatorLoader, l as IndicatorManifest, m as IndicatorManifestEntry, n as RANGE_PRESETS, R as ResolvedIndicator, o as ResolvedTopbarComposition, p as TOPBAR_BUILTIN_IDS, q as TOPBAR_DEFAULT_LEFT, r as TOPBAR_DEFAULT_RIGHT, V as VelaStorage, t as WidgetStorage, h as decodeState, i as encodeState, u as localStorageAdapter, v as pinnedTopbarActionIds, w as resolveIndicators, x as resolveTopbarComposition, s as sanitizeState, y as topbarHas } from './statusline-model-
|
|
1
|
+
import { V as Vela, W as WidgetContext, K as SidePanelButton } from './contributions-Swzz10fG.js';
|
|
2
|
+
export { C as CellStateContext, az as DEFAULT_PANEL_ORDER, E as ExternalIndicatorEntry, O as OVERRIDABLE_TOPBAR_IDS, M as SidePanelDescriptor, Q as SidePanelHandle, U as StatePersistenceHandler, _ as SymbolRankingHook, a3 as WidgetActionDescriptor, a4 as WidgetActionTarget, a5 as WidgetAttachment, af as registerSidePanel, ag as registerStatePersistence, ah as registerSymbolRanking, ai as registerWidgetAction, aj as registerWidgetAttachment, al as sidePanels, am as statePersistenceHandlers, an as symbolRanking, ao as topbarActionOverride, at as unregisterSidePanel, au as unregisterStatePersistence, av as unregisterWidgetAction, aw as unregisterWidgetAttachment, ax as widgetActions, ay as widgetAttachments } from './contributions-Swzz10fG.js';
|
|
3
|
+
import { b as VelaOptions, d as MarketSession, T as ThemeName, c as VelaTheme, s as DataWindowReadout } from './options-CX1lSYWA.js';
|
|
4
|
+
import { c as VelaShellOptions, W as WidgetHistory, b as RangePreset, f as WorkspaceState, j as TopbarComposition, a as StatuslinePart, P as PanelsState } from './statusline-model-IURCya0H.js';
|
|
5
|
+
export { B as Bottombar, k as BottombarOptions, C as CellState, g as ChartState, I as IndicatorLoader, l as IndicatorManifest, m as IndicatorManifestEntry, n as RANGE_PRESETS, R as ResolvedIndicator, o as ResolvedTopbarComposition, p as TOPBAR_BUILTIN_IDS, q as TOPBAR_DEFAULT_LEFT, r as TOPBAR_DEFAULT_RIGHT, V as VelaStorage, t as WidgetStorage, h as decodeState, i as encodeState, u as localStorageAdapter, v as pinnedTopbarActionIds, w as resolveIndicators, x as resolveTopbarComposition, s as sanitizeState, y as topbarHas } from './statusline-model-IURCya0H.js';
|
|
6
6
|
import { K as KeymapManager } from './keymap-CGOz5F5f.js';
|
|
7
|
-
import { a as SymbolDescriptor } from './DataProvider-
|
|
7
|
+
import { a as SymbolDescriptor } from './DataProvider-B-Jz59Rf.js';
|
|
8
8
|
import { d as SidePanel } from './side-panel-HF0IAzwf.js';
|
|
9
9
|
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';
|
|
10
10
|
|
package/dist/widget.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { VelaWorkspace } from './chunk-
|
|
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-
|
|
3
|
-
export { TIMEZONES, normalizeTimezone, tzButtonLabel, tzMenuLabel, tzOffset } from './chunk-
|
|
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-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-
|
|
1
|
+
import { VelaWorkspace } from './chunk-OSZDSH7F.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-OSZDSH7F.js';
|
|
3
|
+
export { TIMEZONES, normalizeTimezone, tzButtonLabel, tzMenuLabel, tzOffset } from './chunk-YCD72KGK.js';
|
|
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-IFJJPXSV.js';
|
|
5
|
+
import './chunk-XCBJU674.js';
|
|
6
|
+
import './chunk-T5Z5YUCF.js';
|
|
7
|
+
import './chunk-CAFCLMPF.js';
|
|
8
8
|
import './chunk-W4EJWLEO.js';
|
|
9
9
|
|
|
10
10
|
// src/widget/VelaWidget.ts
|