@luxalgo/vela 0.7.3 → 0.7.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.
- package/dist/{DataProvider-BALR0qPq.d.ts → DataProvider-DLeFs1gE.d.ts} +1 -1
- package/dist/{DataProvider-D5uMiJYz.d.cts → DataProvider-Dut6lXGM.d.cts} +1 -1
- package/dist/{chunk-2EO74GIE.js → chunk-MCLI6B3S.js} +261 -68
- package/dist/{chunk-DH2VF5X7.js → chunk-MNG5XPLV.js} +6 -1
- package/dist/{contributions-BbhbZd3c.d.ts → contributions-CEkgJKTU.d.ts} +7 -3
- package/dist/{contributions-CcBFe-91.d.cts → contributions-DYtiRtES.d.cts} +7 -3
- package/dist/index.cjs +261 -68
- package/dist/index.d.cts +23 -6
- package/dist/index.d.ts +23 -6
- package/dist/index.js +1 -1
- package/dist/{options-C7b_Qssu.d.cts → options-DNBoMKkX.d.cts} +10 -1
- package/dist/{options-C7b_Qssu.d.ts → options-DNBoMKkX.d.ts} +10 -1
- package/dist/{plugin-Cnix5ZBh.d.ts → plugin-CLn--oP6.d.ts} +3 -3
- package/dist/{plugin-D6MlX4--.d.cts → plugin-DtkeQVAO.d.cts} +3 -3
- package/dist/plugin.d.cts +4 -4
- package/dist/plugin.d.ts +4 -4
- 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-D8NL7o4L.d.ts → statusline-model-DypGXjtr.d.ts} +3 -3
- package/dist/{statusline-model-DUKt7_TQ.d.cts → statusline-model-gA__yaog.d.cts} +3 -3
- package/dist/ui.d.cts +1 -1
- package/dist/ui.d.ts +1 -1
- package/dist/vela.global.js +261 -68
- package/dist/vela.global.min.js +53 -49
- package/dist/widget.cjs +266 -68
- package/dist/widget.d.cts +6 -6
- package/dist/widget.d.ts +6 -6
- package/dist/widget.js +3 -3
- package/dist/workspace.cjs +266 -68
- package/dist/workspace.d.cts +5 -5
- package/dist/workspace.d.ts +5 -5
- package/dist/workspace.js +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -7140,6 +7140,42 @@ var DrawingController = class {
|
|
|
7140
7140
|
}
|
|
7141
7141
|
};
|
|
7142
7142
|
|
|
7143
|
+
// src/core/marks/visibility.ts
|
|
7144
|
+
function markGroupOwnVisible(choices, groupId, groups) {
|
|
7145
|
+
const chosen = choices[groupId];
|
|
7146
|
+
if (typeof chosen === "boolean") return chosen;
|
|
7147
|
+
return groups.find((g) => g.id === groupId)?.visible !== false;
|
|
7148
|
+
}
|
|
7149
|
+
function markGroupVisible(choices, groupId, groups) {
|
|
7150
|
+
if (groupId === void 0) return true;
|
|
7151
|
+
const seen = /* @__PURE__ */ new Set();
|
|
7152
|
+
let id = groupId;
|
|
7153
|
+
while (id !== void 0 && !seen.has(id)) {
|
|
7154
|
+
seen.add(id);
|
|
7155
|
+
if (!markGroupOwnVisible(choices, id, groups)) return false;
|
|
7156
|
+
const parent = groups.find((g) => g.id === id)?.parent;
|
|
7157
|
+
id = parent !== void 0 && groups.some((g) => g.id === parent) ? parent : void 0;
|
|
7158
|
+
}
|
|
7159
|
+
return true;
|
|
7160
|
+
}
|
|
7161
|
+
function markGroupRows(groups) {
|
|
7162
|
+
const ids = new Set(groups.map((g) => g.id));
|
|
7163
|
+
const out = [];
|
|
7164
|
+
const placed = /* @__PURE__ */ new Set();
|
|
7165
|
+
const place = (group, depth) => {
|
|
7166
|
+
if (placed.has(group.id)) return;
|
|
7167
|
+
placed.add(group.id);
|
|
7168
|
+
out.push({ group, depth });
|
|
7169
|
+
for (const child of groups) if (child.parent === group.id && child.id !== group.id) place(child, depth + 1);
|
|
7170
|
+
};
|
|
7171
|
+
for (const g of groups) {
|
|
7172
|
+
const parentKnown = g.parent !== void 0 && ids.has(g.parent) && g.parent !== g.id;
|
|
7173
|
+
if (!parentKnown) place(g, 0);
|
|
7174
|
+
}
|
|
7175
|
+
for (const g of groups) place(g, 0);
|
|
7176
|
+
return out;
|
|
7177
|
+
}
|
|
7178
|
+
|
|
7143
7179
|
// src/core/marks/MarksController.ts
|
|
7144
7180
|
var MarksController = class {
|
|
7145
7181
|
constructor(renderer, events) {
|
|
@@ -7184,6 +7220,7 @@ var MarksController = class {
|
|
|
7184
7220
|
defineGroup(group) {
|
|
7185
7221
|
if (!group || typeof group.id !== "string" || group.id.length === 0) throw new Error("[vela] marks.defineGroup: `id` must be a non-empty string");
|
|
7186
7222
|
if (typeof group.label !== "string") throw new Error(`[vela] marks.defineGroup: group "${group.id}" needs a string \`label\``);
|
|
7223
|
+
if (group.parent !== void 0 && (typeof group.parent !== "string" || group.parent.length === 0)) throw new Error(`[vela] marks.defineGroup: group "${group.id}" has a \`parent\` that is not a group id`);
|
|
7187
7224
|
this.groups.set(group.id, { ...group });
|
|
7188
7225
|
this.sync();
|
|
7189
7226
|
}
|
|
@@ -7203,12 +7240,16 @@ var MarksController = class {
|
|
|
7203
7240
|
}
|
|
7204
7241
|
this.renderer.applyFeature("marks", { groups: { [id]: visible } });
|
|
7205
7242
|
}
|
|
7206
|
-
/**
|
|
7243
|
+
/**
|
|
7244
|
+
* A group's effective visibility: its own switch — the user's (persisted) choice, else
|
|
7245
|
+
* the declared default, else visible — AND every ancestor's, so a child under a
|
|
7246
|
+
* switched-off parent reads hidden whatever its own choice says.
|
|
7247
|
+
*/
|
|
7207
7248
|
isGroupVisible(id) {
|
|
7208
7249
|
const state = this.renderer.readFeature("marks");
|
|
7209
|
-
const
|
|
7210
|
-
if (typeof
|
|
7211
|
-
return this.groups.
|
|
7250
|
+
const groups = {};
|
|
7251
|
+
for (const [gid, v] of Object.entries(state?.groups ?? {})) if (typeof v === "boolean") groups[gid] = v;
|
|
7252
|
+
return markGroupVisible(groups, id, [...this.groups.values()]);
|
|
7212
7253
|
}
|
|
7213
7254
|
destroy() {
|
|
7214
7255
|
for (const unsub of this.subs) unsub();
|
|
@@ -15958,6 +15999,17 @@ function hasOwnCandlePaint(style) {
|
|
|
15958
15999
|
for (const t of chartTypes()) if (t.id === style) return (t.basePainting ?? "candles") === "candles";
|
|
15959
16000
|
return false;
|
|
15960
16001
|
}
|
|
16002
|
+
var CANDLE_OVERRIDE_KEYS = [
|
|
16003
|
+
"candleUpColor",
|
|
16004
|
+
"candleDownColor",
|
|
16005
|
+
"candleBodyVisible",
|
|
16006
|
+
"candleBorderVisible",
|
|
16007
|
+
"candleBorderUpColor",
|
|
16008
|
+
"candleBorderDownColor",
|
|
16009
|
+
"candleWickVisible",
|
|
16010
|
+
"candleWickUpColor",
|
|
16011
|
+
"candleWickDownColor"
|
|
16012
|
+
];
|
|
15961
16013
|
function candleOverrideFor(style, bags) {
|
|
15962
16014
|
if (!hasOwnCandlePaint(style)) return null;
|
|
15963
16015
|
const bag = bags[style] ?? {};
|
|
@@ -16029,7 +16081,7 @@ function clampLevel(v) {
|
|
|
16029
16081
|
function clampSpacing(v) {
|
|
16030
16082
|
return v < 0.1 ? 0.1 : v > 10 ? 10 : v;
|
|
16031
16083
|
}
|
|
16032
|
-
function factoryResetConfig(factory) {
|
|
16084
|
+
function factoryResetConfig(factory, priceStyle = factory.series.style) {
|
|
16033
16085
|
const bag = {};
|
|
16034
16086
|
for (const t of chartTypes()) {
|
|
16035
16087
|
const section = t.settings;
|
|
@@ -16051,10 +16103,16 @@ function factoryResetConfig(factory) {
|
|
|
16051
16103
|
if (!section.instances) addRows(section.rows);
|
|
16052
16104
|
bag[t.id] = defaults2;
|
|
16053
16105
|
}
|
|
16106
|
+
for (const t of chartTypes()) {
|
|
16107
|
+
if (!hasOwnCandlePaint(t.id)) continue;
|
|
16108
|
+
const defaults2 = bag[t.id] ?? {};
|
|
16109
|
+
for (const key of CANDLE_OVERRIDE_KEYS) defaults2[key] = null;
|
|
16110
|
+
bag[t.id] = defaults2;
|
|
16111
|
+
}
|
|
16054
16112
|
for (const [typeId, vals] of Object.entries(factory.chartTypes)) {
|
|
16055
16113
|
bag[typeId] = { ...bag[typeId] ?? {}, ...vals };
|
|
16056
16114
|
}
|
|
16057
|
-
return { ...factory, chartTypes: bag };
|
|
16115
|
+
return { ...factory, chartTypes: bag, series: { ...factory.series, style: priceStyle } };
|
|
16058
16116
|
}
|
|
16059
16117
|
function mergeConfig(base, patch) {
|
|
16060
16118
|
const p = asObject(patch);
|
|
@@ -18433,11 +18491,8 @@ function mergeMarksState(base, patch) {
|
|
|
18433
18491
|
for (const [id, v] of Object.entries(g)) if (typeof v === "boolean") groups[id] = v;
|
|
18434
18492
|
return { visible: typeof p.visible === "boolean" ? p.visible : base.visible, groups };
|
|
18435
18493
|
}
|
|
18436
|
-
function
|
|
18437
|
-
|
|
18438
|
-
const chosen = state.groups[groupId];
|
|
18439
|
-
if (typeof chosen === "boolean") return chosen;
|
|
18440
|
-
return groups.find((g) => g.id === groupId)?.visible !== false;
|
|
18494
|
+
function markGroupVisible2(state, groupId, groups) {
|
|
18495
|
+
return markGroupVisible(state.groups, groupId, groups);
|
|
18441
18496
|
}
|
|
18442
18497
|
|
|
18443
18498
|
// src/renderers/native/core/SceneGraph.ts
|
|
@@ -20449,6 +20504,32 @@ function clusterMarks(marks, barTimes, intervalMs2, hidden) {
|
|
|
20449
20504
|
}
|
|
20450
20505
|
return out;
|
|
20451
20506
|
}
|
|
20507
|
+
function foldOverlappingClusters(clusters, xOf, bucketPx = MARK_CLUSTER_PX) {
|
|
20508
|
+
const byGroup = /* @__PURE__ */ new Map();
|
|
20509
|
+
for (const c of clusters) {
|
|
20510
|
+
const list = byGroup.get(c.group);
|
|
20511
|
+
if (list) list.push(c);
|
|
20512
|
+
else byGroup.set(c.group, [c]);
|
|
20513
|
+
}
|
|
20514
|
+
const out = [];
|
|
20515
|
+
for (const list of byGroup.values()) {
|
|
20516
|
+
list.sort((a, b) => a.bar - b.bar);
|
|
20517
|
+
const runs = [];
|
|
20518
|
+
let anchorX = Number.NaN;
|
|
20519
|
+
for (const c of list) {
|
|
20520
|
+
const x = xOf(c.bar);
|
|
20521
|
+
const run = runs[runs.length - 1];
|
|
20522
|
+
if (run && Number.isFinite(x) && Number.isFinite(anchorX) && x - anchorX < bucketPx) {
|
|
20523
|
+
run.marks.push(...c.marks);
|
|
20524
|
+
} else {
|
|
20525
|
+
runs.push({ key: c.key, bar: c.bar, group: c.group, marks: [...c.marks] });
|
|
20526
|
+
anchorX = x;
|
|
20527
|
+
}
|
|
20528
|
+
}
|
|
20529
|
+
out.push(...runs);
|
|
20530
|
+
}
|
|
20531
|
+
return out;
|
|
20532
|
+
}
|
|
20452
20533
|
function groupRank(groups, clusters) {
|
|
20453
20534
|
const rank = /* @__PURE__ */ new Map();
|
|
20454
20535
|
groups.forEach((g, i) => rank.set(g.id, i));
|
|
@@ -20458,7 +20539,7 @@ function groupRank(groups, clusters) {
|
|
|
20458
20539
|
return (group) => group === void 0 ? Number.MAX_SAFE_INTEGER : rank.get(group) ?? Number.MAX_SAFE_INTEGER - 1;
|
|
20459
20540
|
}
|
|
20460
20541
|
function layoutMarkLane(input) {
|
|
20461
|
-
const clusters = clusterMarks(input.marks, input.barTimes, input.intervalMs, input.hidden);
|
|
20542
|
+
const clusters = foldOverlappingClusters(clusterMarks(input.marks, input.barTimes, input.intervalMs, input.hidden), input.xOf);
|
|
20462
20543
|
const rankOf = groupRank(input.groups, clusters);
|
|
20463
20544
|
const byBar = /* @__PURE__ */ new Map();
|
|
20464
20545
|
for (const c of clusters) {
|
|
@@ -20587,13 +20668,29 @@ function paintMarkLane(ctx, layout, deps) {
|
|
|
20587
20668
|
const img = deps.icons.get(mark.glyph.icon, ink, symbolPx, deps.dpr);
|
|
20588
20669
|
if (img) ctx.drawImage(img, center.x - symbolPx / 2, center.y - symbolPx / 2, symbolPx, symbolPx);
|
|
20589
20670
|
} else if (mark.glyph.letter) {
|
|
20671
|
+
const letter = mark.glyph.letter.slice(0, 2);
|
|
20590
20672
|
ctx.fillStyle = ink;
|
|
20591
|
-
|
|
20592
|
-
ctx.
|
|
20673
|
+
let px = letterFontPx(size, letter);
|
|
20674
|
+
ctx.font = `600 ${px}px ${deps.fontFamily}`;
|
|
20675
|
+
if (letter.length > 1) {
|
|
20676
|
+
px = fitLetterPx(px, ctx.measureText(letter).width, symbolInnerWidth(shape, size));
|
|
20677
|
+
ctx.font = `600 ${px}px ${deps.fontFamily}`;
|
|
20678
|
+
}
|
|
20679
|
+
ctx.fillText(letter, center.x, center.y + 0.5);
|
|
20593
20680
|
}
|
|
20594
20681
|
}
|
|
20595
20682
|
ctx.restore();
|
|
20596
20683
|
}
|
|
20684
|
+
function letterFontPx(size, letter) {
|
|
20685
|
+
return Math.round(size * (letter.length > 1 ? 0.38 : 0.58));
|
|
20686
|
+
}
|
|
20687
|
+
function symbolInnerWidth(shape, size) {
|
|
20688
|
+
return (shape === "pin" ? size * 0.82 : size) - 3;
|
|
20689
|
+
}
|
|
20690
|
+
function fitLetterPx(px, width, inner) {
|
|
20691
|
+
if (!(width > inner) || !(width > 0)) return px;
|
|
20692
|
+
return Math.max(4, Math.floor(px * inner / width));
|
|
20693
|
+
}
|
|
20597
20694
|
function traceShape(ctx, shape, x, y, size) {
|
|
20598
20695
|
const r = size / 2;
|
|
20599
20696
|
ctx.beginPath();
|
|
@@ -20795,7 +20892,7 @@ var ChromeRenderer = class {
|
|
|
20795
20892
|
this.markLayout = layoutMarkLane({
|
|
20796
20893
|
marks: scene.timelineMarks,
|
|
20797
20894
|
groups: scene.markGroups,
|
|
20798
|
-
hidden: (groupId) => !
|
|
20895
|
+
hidden: (groupId) => !markGroupVisible2(scene.marks, groupId, scene.markGroups),
|
|
20799
20896
|
barTimes: this.barTimes(scene),
|
|
20800
20897
|
intervalMs: coords.barInterval,
|
|
20801
20898
|
xOf: (bar) => coords.logicalToX(bar),
|
|
@@ -21562,6 +21659,10 @@ ${overlayScrollbarCss(".vela-sd-pane")}
|
|
|
21562
21659
|
muted and non-interactive. Applied to each row's children so it survives display:contents;
|
|
21563
21660
|
!important beats the inline opacity on labels. */
|
|
21564
21661
|
.vela-sd-soft>*{opacity:0.4 !important;pointer-events:none !important;}
|
|
21662
|
+
/* A mark group nested under a parent group on the Events tab: indented one step per level
|
|
21663
|
+
(--vela-sd-depth). The indent rides the first child (the switch) as a MARGIN \u2014 padding
|
|
21664
|
+
would push the switch's own tick out of its box. */
|
|
21665
|
+
.vela-sd-nested>*:first-child{margin-left:calc(var(--vela-sd-depth,1)*24px);}
|
|
21565
21666
|
/* \u2500\u2500 mobile presentation (.vela-sd-mobile on the scrim; structural sizes are inline in open()) \u2500\u2500
|
|
21566
21667
|
The tab rail becomes a burger-opened overlay sidebar; the group TOC becomes a sticky
|
|
21567
21668
|
row of horizontally scrollable tabs; the instance strip scrolls instead of wrapping;
|
|
@@ -21610,6 +21711,8 @@ var SettingsDialog = class {
|
|
|
21610
21711
|
this.hostSections = [];
|
|
21611
21712
|
/** The timeline-mark groups (defined + named by marks) — one checkbox each on the Events tab. */
|
|
21612
21713
|
this.markGroups = [];
|
|
21714
|
+
/** A group's OWN switch (what its checkbox shows) — a child under an off parent keeps its own state. */
|
|
21715
|
+
this.markGroupOwnVisible = () => true;
|
|
21613
21716
|
this.markGroupVisible = () => true;
|
|
21614
21717
|
/** The Canvas → Theme row: current app theme + where a pick is raised. The row is a
|
|
21615
21718
|
* host callback, NOT a config patch — the app theme stays out of the persisted
|
|
@@ -21627,6 +21730,9 @@ var SettingsDialog = class {
|
|
|
21627
21730
|
this.activeSection = null;
|
|
21628
21731
|
/** Mobile chrome: fullscreen card, burger-opened section sidebar, TOC as top tabs. */
|
|
21629
21732
|
this.mobileLayout = false;
|
|
21733
|
+
/** Opens/closes the mobile section sidebar of the CURRENT build (the burger in the
|
|
21734
|
+
* shell header outlives pane rebuilds, so it reaches the rail through here). */
|
|
21735
|
+
this.toggleRail = null;
|
|
21630
21736
|
/** The visibility policy: setting ids hidden by the host (subtree semantics). */
|
|
21631
21737
|
this.hiddenSettings = /* @__PURE__ */ new Set();
|
|
21632
21738
|
if (getComputedStyle(container).position === "static") container.style.position = "relative";
|
|
@@ -21636,7 +21742,8 @@ var SettingsDialog = class {
|
|
|
21636
21742
|
this.hostSections = sections;
|
|
21637
21743
|
}
|
|
21638
21744
|
/** The timeline-mark groups and their current visibility — the Events tab's rows on next open. */
|
|
21639
|
-
setMarkGroups(groups, visible) {
|
|
21745
|
+
setMarkGroups(groups, visible, ownVisible = visible) {
|
|
21746
|
+
this.markGroupOwnVisible = ownVisible;
|
|
21640
21747
|
this.markGroups = groups;
|
|
21641
21748
|
this.markGroupVisible = visible;
|
|
21642
21749
|
}
|
|
@@ -21702,7 +21809,6 @@ var SettingsDialog = class {
|
|
|
21702
21809
|
this.onReset = onReset ?? null;
|
|
21703
21810
|
ensureControlStyles();
|
|
21704
21811
|
const mobile = this.mobileLayout;
|
|
21705
|
-
let toggleRail = null;
|
|
21706
21812
|
let burger;
|
|
21707
21813
|
if (mobile) {
|
|
21708
21814
|
burger = document.createElement("button");
|
|
@@ -21710,8 +21816,83 @@ var SettingsDialog = class {
|
|
|
21710
21816
|
burger.className = "vela-sd-burger";
|
|
21711
21817
|
burger.innerHTML = iconAt("burger", 16);
|
|
21712
21818
|
burger.title = "Sections";
|
|
21713
|
-
burger.addEventListener("click", () => toggleRail?.());
|
|
21819
|
+
burger.addEventListener("click", () => this.toggleRail?.());
|
|
21714
21820
|
}
|
|
21821
|
+
const ui = new Dialog({
|
|
21822
|
+
host: this.container,
|
|
21823
|
+
title: "Chart settings",
|
|
21824
|
+
// Non-modal: a live-edit dialog must leave the page interactive — a modal
|
|
21825
|
+
// machine locks pointer events on the whole body, killing the chart, the
|
|
21826
|
+
// legend, and the body-portaled popovers (color picker, select lists).
|
|
21827
|
+
modal: false,
|
|
21828
|
+
contained: true,
|
|
21829
|
+
align: "top",
|
|
21830
|
+
draggable: !mobile,
|
|
21831
|
+
flush: true,
|
|
21832
|
+
className: "vela-dialog--settings",
|
|
21833
|
+
headerStart: burger,
|
|
21834
|
+
closeOnBackdrop: true,
|
|
21835
|
+
footer: (foot) => {
|
|
21836
|
+
foot.style.cssText = `padding:10px 14px;display:flex;align-items:center;justify-content:flex-start;gap:8px;`;
|
|
21837
|
+
const resetBtn = document.createElement("button");
|
|
21838
|
+
resetBtn.type = "button";
|
|
21839
|
+
resetBtn.textContent = "Reset defaults";
|
|
21840
|
+
resetBtn.className = "vela-sd-btn";
|
|
21841
|
+
resetBtn.addEventListener("click", () => this.onReset?.());
|
|
21842
|
+
foot.appendChild(resetBtn);
|
|
21843
|
+
},
|
|
21844
|
+
// A close signal may only close ITS OWN dialog: the machine reports the exit
|
|
21845
|
+
// asynchronously, so a close-then-reopen in one tick would otherwise see the
|
|
21846
|
+
// old instance's signal tear down the freshly opened one.
|
|
21847
|
+
onOpenChange: (open2) => {
|
|
21848
|
+
if (!open2 && this.ui === ui) this.close();
|
|
21849
|
+
}
|
|
21850
|
+
});
|
|
21851
|
+
if (mobile) ui.positioner.classList.add("vela-sd-mobile");
|
|
21852
|
+
ui.positioner.style.paddingTop = mobile ? "0" : "8vh";
|
|
21853
|
+
this.root = ui.positioner;
|
|
21854
|
+
this.ui = ui;
|
|
21855
|
+
const panes = this.buildContent(ui, config, section, mobile);
|
|
21856
|
+
ui.show();
|
|
21857
|
+
this.layoutPanes(panes);
|
|
21858
|
+
}
|
|
21859
|
+
/**
|
|
21860
|
+
* Re-seed every control of an OPEN dialog from `config`, in place: the shell stays
|
|
21861
|
+
* (no close/open transition), only the tab rail and panes rebuild, landing back on
|
|
21862
|
+
* the current tab. The reset path — the restored values must show without the
|
|
21863
|
+
* dialog re-entering. No-op while closed.
|
|
21864
|
+
*/
|
|
21865
|
+
refresh(config) {
|
|
21866
|
+
const ui = this.ui;
|
|
21867
|
+
if (!ui) return;
|
|
21868
|
+
closeOpenPopovers();
|
|
21869
|
+
closeWidthPopover();
|
|
21870
|
+
for (const dispose of this.hintTips) dispose();
|
|
21871
|
+
this.hintTips = [];
|
|
21872
|
+
this.config = config;
|
|
21873
|
+
ui.body.replaceChildren();
|
|
21874
|
+
this.layoutPanes(this.buildContent(ui, config, this.activeSection ?? void 0, this.mobileLayout));
|
|
21875
|
+
}
|
|
21876
|
+
/** Structured chart-type panes (instance strip / group TOC) own their layout and
|
|
21877
|
+
* tag their rows hosts instead; each host gets its own field grid. Runs on a SHOWN
|
|
21878
|
+
* dialog — the grids measure their labels. */
|
|
21879
|
+
layoutPanes(panes) {
|
|
21880
|
+
for (const el of panes) {
|
|
21881
|
+
const hosts = [...el.querySelectorAll("[data-sd-rows-host]")];
|
|
21882
|
+
if (hosts.length === 0) {
|
|
21883
|
+
this.layoutSettingsGrids(el);
|
|
21884
|
+
continue;
|
|
21885
|
+
}
|
|
21886
|
+
for (const h of hosts) this.layoutSettingsGrids(h);
|
|
21887
|
+
}
|
|
21888
|
+
}
|
|
21889
|
+
/**
|
|
21890
|
+
* Build the tab rail + one pane per section into `ui.body` (the linear `body` of
|
|
21891
|
+
* section markers and rows is split afterwards), select `section` (the active
|
|
21892
|
+
* style's own tab when none is asked for), and return the pane elements for
|
|
21893
|
+
* {@link layoutPanes}.
|
|
21894
|
+
*/
|
|
21895
|
+
buildContent(ui, config, section, mobile) {
|
|
21715
21896
|
const body = document.createElement("div");
|
|
21716
21897
|
body.style.cssText = "display:flex;flex-direction:column;gap:0;";
|
|
21717
21898
|
const sid = (el, id) => {
|
|
@@ -21915,9 +22096,28 @@ var SettingsDialog = class {
|
|
|
21915
22096
|
if (this.markGroups.length > 0) {
|
|
21916
22097
|
body.append(sid(this.section("Events"), MARKS_SETTINGS_ID));
|
|
21917
22098
|
body.append(sid(this.sectionTitle("Visible events"), MARKS_GROUPS_SETTINGS_ID));
|
|
21918
|
-
|
|
21919
|
-
|
|
22099
|
+
const rowsById = /* @__PURE__ */ new Map();
|
|
22100
|
+
const rows = markGroupRows(this.markGroups);
|
|
22101
|
+
const refreshDimming = () => {
|
|
22102
|
+
for (const { group } of rows) {
|
|
22103
|
+
const el = rowsById.get(group.id);
|
|
22104
|
+
if (!el || group.parent === void 0) continue;
|
|
22105
|
+
el.classList.toggle("vela-sd-soft", !this.markGroupVisible(group.parent));
|
|
22106
|
+
}
|
|
22107
|
+
};
|
|
22108
|
+
for (const { group: g, depth } of rows) {
|
|
22109
|
+
const row = this.boolRow(g.label, this.markGroupOwnVisible(g.id), (v) => {
|
|
22110
|
+
this.emit({ marks: { groups: { [g.id]: v } } });
|
|
22111
|
+
refreshDimming();
|
|
22112
|
+
});
|
|
22113
|
+
if (depth > 0) {
|
|
22114
|
+
row.classList.add("vela-sd-nested");
|
|
22115
|
+
row.style.setProperty("--vela-sd-depth", String(depth));
|
|
22116
|
+
}
|
|
22117
|
+
rowsById.set(g.id, row);
|
|
22118
|
+
body.append(sid(row, markGroupSettingsId(g.id)));
|
|
21920
22119
|
}
|
|
22120
|
+
refreshDimming();
|
|
21921
22121
|
}
|
|
21922
22122
|
renderChartTypeSections("end");
|
|
21923
22123
|
renderHostSections("end");
|
|
@@ -21945,8 +22145,8 @@ var SettingsDialog = class {
|
|
|
21945
22145
|
if (mobile) {
|
|
21946
22146
|
railScrim = document.createElement("div");
|
|
21947
22147
|
railScrim.className = "vela-sd-railscrim";
|
|
21948
|
-
railScrim.addEventListener("click", () => toggleRail?.());
|
|
21949
|
-
toggleRail = (open2) => {
|
|
22148
|
+
railScrim.addEventListener("click", () => this.toggleRail?.());
|
|
22149
|
+
this.toggleRail = (open2) => {
|
|
21950
22150
|
const on = open2 ?? !rail.classList.contains("open");
|
|
21951
22151
|
rail.classList.toggle("open", on);
|
|
21952
22152
|
railScrim?.classList.toggle("open", on);
|
|
@@ -21986,35 +22186,6 @@ var SettingsDialog = class {
|
|
|
21986
22186
|
});
|
|
21987
22187
|
if (hidActive) activate(0);
|
|
21988
22188
|
};
|
|
21989
|
-
const ui = new Dialog({
|
|
21990
|
-
host: this.container,
|
|
21991
|
-
title: "Chart settings",
|
|
21992
|
-
// Non-modal: a live-edit dialog must leave the page interactive — a modal
|
|
21993
|
-
// machine locks pointer events on the whole body, killing the chart, the
|
|
21994
|
-
// legend, and the body-portaled popovers (color picker, select lists).
|
|
21995
|
-
modal: false,
|
|
21996
|
-
contained: true,
|
|
21997
|
-
align: "top",
|
|
21998
|
-
draggable: !mobile,
|
|
21999
|
-
flush: true,
|
|
22000
|
-
className: "vela-dialog--settings",
|
|
22001
|
-
headerStart: burger,
|
|
22002
|
-
closeOnBackdrop: true,
|
|
22003
|
-
footer: (foot) => {
|
|
22004
|
-
foot.style.cssText = `padding:10px 14px;display:flex;align-items:center;justify-content:flex-start;gap:8px;`;
|
|
22005
|
-
const resetBtn = document.createElement("button");
|
|
22006
|
-
resetBtn.type = "button";
|
|
22007
|
-
resetBtn.textContent = "Reset defaults";
|
|
22008
|
-
resetBtn.className = "vela-sd-btn";
|
|
22009
|
-
resetBtn.addEventListener("click", () => this.onReset?.());
|
|
22010
|
-
foot.appendChild(resetBtn);
|
|
22011
|
-
},
|
|
22012
|
-
onOpenChange: (open2) => {
|
|
22013
|
-
if (!open2) this.close();
|
|
22014
|
-
}
|
|
22015
|
-
});
|
|
22016
|
-
if (mobile) ui.positioner.classList.add("vela-sd-mobile");
|
|
22017
|
-
ui.positioner.style.paddingTop = mobile ? "0" : "8vh";
|
|
22018
22189
|
const activate = (idx) => {
|
|
22019
22190
|
panes.forEach((p, i) => {
|
|
22020
22191
|
p.el.style.display = i === idx ? "block" : "none";
|
|
@@ -22023,7 +22194,7 @@ var SettingsDialog = class {
|
|
|
22023
22194
|
this.activeSection = panes[idx]?.title ?? null;
|
|
22024
22195
|
if (mobile) {
|
|
22025
22196
|
ui.titleEl.textContent = panes[idx]?.title ?? "Chart settings";
|
|
22026
|
-
toggleRail?.(false);
|
|
22197
|
+
this.toggleRail?.(false);
|
|
22027
22198
|
}
|
|
22028
22199
|
};
|
|
22029
22200
|
panes.forEach((p, i) => {
|
|
@@ -22038,17 +22209,7 @@ var SettingsDialog = class {
|
|
|
22038
22209
|
shell.append(rail, paneHost);
|
|
22039
22210
|
if (railScrim) shell.append(railScrim);
|
|
22040
22211
|
ui.body.appendChild(shell);
|
|
22041
|
-
|
|
22042
|
-
this.ui = ui;
|
|
22043
|
-
ui.show();
|
|
22044
|
-
for (const p of panes) {
|
|
22045
|
-
const hosts = [...p.el.querySelectorAll("[data-sd-rows-host]")];
|
|
22046
|
-
if (hosts.length === 0) {
|
|
22047
|
-
this.layoutSettingsGrids(p.el);
|
|
22048
|
-
continue;
|
|
22049
|
-
}
|
|
22050
|
-
for (const h of hosts) this.layoutSettingsGrids(h);
|
|
22051
|
-
}
|
|
22212
|
+
return panes.map((p) => p.el);
|
|
22052
22213
|
}
|
|
22053
22214
|
close() {
|
|
22054
22215
|
closeOpenPopovers();
|
|
@@ -22056,6 +22217,7 @@ var SettingsDialog = class {
|
|
|
22056
22217
|
const ui = this.ui;
|
|
22057
22218
|
this.ui = null;
|
|
22058
22219
|
this.root = null;
|
|
22220
|
+
this.toggleRail = null;
|
|
22059
22221
|
this.tabs = [];
|
|
22060
22222
|
for (const dispose of this.hintTips) dispose();
|
|
22061
22223
|
this.hintTips = [];
|
|
@@ -30155,7 +30317,11 @@ var NativeRenderer = class {
|
|
|
30155
30317
|
}
|
|
30156
30318
|
this.settingsDialog.setTheme(this.theme);
|
|
30157
30319
|
this.settingsDialog.setHostSections(this.hostSettingsSections);
|
|
30158
|
-
this.settingsDialog.setMarkGroups(
|
|
30320
|
+
this.settingsDialog.setMarkGroups(
|
|
30321
|
+
this.markGroupsForEventsTab(),
|
|
30322
|
+
(id) => markGroupVisible2(this.scene.marks, id, this.scene.markGroups),
|
|
30323
|
+
(id) => markGroupOwnVisible(this.scene.marks.groups, id, this.scene.markGroups)
|
|
30324
|
+
);
|
|
30159
30325
|
this.settingsDialog.setHiddenSettings(this.hiddenSettings);
|
|
30160
30326
|
this.syncThemeControl();
|
|
30161
30327
|
this.settingsDialog.toggle(
|
|
@@ -30163,13 +30329,24 @@ var NativeRenderer = class {
|
|
|
30163
30329
|
(patch) => this.applyConfig(patch),
|
|
30164
30330
|
(json) => this.applyConfig(json),
|
|
30165
30331
|
() => {
|
|
30166
|
-
if (this.factoryConfig) this.applyConfig(
|
|
30167
|
-
this.settingsDialog?.
|
|
30168
|
-
this.openSettingsDialog();
|
|
30332
|
+
if (this.factoryConfig) this.applyConfig(this.factoryResetDocument(this.factoryConfig));
|
|
30333
|
+
this.settingsDialog?.refresh(this.getConfig());
|
|
30169
30334
|
},
|
|
30170
30335
|
section
|
|
30171
30336
|
);
|
|
30172
30337
|
}
|
|
30338
|
+
/**
|
|
30339
|
+
* The document "Reset defaults" applies: every setting back to its first-run value,
|
|
30340
|
+
* with two things that are NOT settings held or resolved here — the price style
|
|
30341
|
+
* stays the one the user is looking at, and the timeline-mark groups (an additive
|
|
30342
|
+
* merge, like the type bags) are named back to their host-declared visibility.
|
|
30343
|
+
*/
|
|
30344
|
+
factoryResetDocument(factory) {
|
|
30345
|
+
const doc = factoryResetConfig(factory, this.scene.priceStyle);
|
|
30346
|
+
const groups = { ...doc.marks.groups };
|
|
30347
|
+
for (const g of this.markGroupsInUse()) groups[g.id] = g.visible !== false;
|
|
30348
|
+
return { ...doc, marks: { ...doc.marks, groups } };
|
|
30349
|
+
}
|
|
30173
30350
|
/** Close the in-chart dialogs (indicator settings + chart-settings gear). No-op when none are open. */
|
|
30174
30351
|
closeDialogs() {
|
|
30175
30352
|
this.inputsUI?.closeOpenDialog();
|
|
@@ -31232,6 +31409,15 @@ var NativeRenderer = class {
|
|
|
31232
31409
|
markGroupsInUse() {
|
|
31233
31410
|
return effectiveMarkGroups(this.scene.timelineMarks, this.scene.markGroups);
|
|
31234
31411
|
}
|
|
31412
|
+
/**
|
|
31413
|
+
* The groups as the Events tab lists them: nested only under a DEFINED parent. The
|
|
31414
|
+
* painter's visibility chain resolves parents against the defined groups alone, so a
|
|
31415
|
+
* parent that marks merely name must not nest (and dim) a child the painter still shows.
|
|
31416
|
+
*/
|
|
31417
|
+
markGroupsForEventsTab() {
|
|
31418
|
+
const defined = new Set(this.scene.markGroups.map((g) => g.id));
|
|
31419
|
+
return this.markGroupsInUse().map((g) => g.parent !== void 0 && !defined.has(g.parent) ? { ...g, parent: void 0 } : g);
|
|
31420
|
+
}
|
|
31235
31421
|
onViewportChange(cb) {
|
|
31236
31422
|
this.viewportCbs.add(cb);
|
|
31237
31423
|
return () => this.viewportCbs.delete(cb);
|
|
@@ -32190,7 +32376,7 @@ var NativeRenderer = class {
|
|
|
32190
32376
|
const or = overlaySeriesRange(this.scene.indicators.values(), i0, i1, (id) => this.scene.offsetOf(id));
|
|
32191
32377
|
if (or) dr = dr ? { min: Math.min(dr.min, or.min), max: Math.max(dr.max, or.max) } : or;
|
|
32192
32378
|
}
|
|
32193
|
-
const includeCandles = pane.kind === "price" && (!this.scene.candlesHidden || this.priceLayersAnchoredToBars(masterModels));
|
|
32379
|
+
const includeCandles = pane.kind === "price" && (!this.scene.candlesHidden || this.priceLayersAnchoredToBars(masterModels) || !this.paneHasMeasurableContent(masterModels, dr));
|
|
32194
32380
|
pane.scaleTarget = computePaneScale(masterModels, this.bars, includeCandles, i0, i1, dr, paneLogScale(this.scene, pane), (id) => this.scene.offsetOf(id));
|
|
32195
32381
|
pane.percentBaseline = pane.kind === "price" ? this.bars[i0]?.close ?? 0 : this.firstVisibleValue(masterModels, i0);
|
|
32196
32382
|
pane.axisFormat = void 0;
|
|
@@ -32440,6 +32626,13 @@ var NativeRenderer = class {
|
|
|
32440
32626
|
priceLayersAnchoredToBars(masterModels) {
|
|
32441
32627
|
return masterModels.some((m) => m.series.length === 0 && !!m.native && this.extLayers.some((l) => l.def.id === m.native.type));
|
|
32442
32628
|
}
|
|
32629
|
+
/** True when the pane's master content contributes SOMETHING to its autoscale besides
|
|
32630
|
+
* the candles: a series painted on the pane (force_overlay ones scale elsewhere), a
|
|
32631
|
+
* price line, or a measured drawings range. Mirrors what `computePaneScale` considers. */
|
|
32632
|
+
paneHasMeasurableContent(masterModels, drawings) {
|
|
32633
|
+
if (drawings) return true;
|
|
32634
|
+
return masterModels.some((m) => m.priceLines.length > 0 || m.series.some((s) => s.overlay !== true));
|
|
32635
|
+
}
|
|
32443
32636
|
/** Per-pane scale state for a host UI (e.g. a price-axis context menu): the pane's pixel
|
|
32444
32637
|
* band (`top`/`height`, so a click y maps to a pane) plus its current axis `mode`/`log`.
|
|
32445
32638
|
* Top-to-bottom order. Every pane is independent — the price pane from the scene setting,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { D as DrawingsDocument, R as Resolved } from './contributions-
|
|
2
|
-
export { B as BarsChangeReason, C as CellStateContext, b as ContextSelect, c as DataControl, d as DrawingsControl, e as EngineAlert, f as EngineCapabilities, g as EngineContextSnapshot, h as EngineFactory, i as EngineWarning, j as ExecutionHandlers, k as ExecutionMarket, l as ExecutionRequest, m as ExecutionSession, E as ExternalIndicatorEntry, F as FetchSeries, n as IndicatorEventMap, I as IndicatorHandle, o as IndicatorSummary, L as LegendActionDescriptor, p as LegendCalloutContent, q as LegendCalloutDescriptor, r as LegendCalloutItem, s as LegendCalloutSpec, t as LegendIndicatorInfo, M as MarksControl, N as NativeIndicator, u as NativeIndicatorContext, v as NativeIndicatorDescriptor, w as NativeIndicatorInfo, x as NativeIndicatorOutput, O as OVERRIDABLE_TOPBAR_IDS, P as ParsedSymbol, y as PreparedScript, z as RendererControl, A as RunIndicatorResult, G as SceneInspection, a as ScriptRun, H as ScriptRunCause, J as ScriptRunResult, S as ScriptingEngine, K as SidePanelButton, Q as SidePanelDescriptor, T as SidePanelHandle, U as SidePanelHeader, X as StatePersistenceHandler, Y as StrategyFill, Z as StrategyState, _ as StrategyTrade, $ as SymbolRankingHook, a0 as TypedEventBus, V as Vela, a1 as VelaDeps, a2 as VelaEventMap, a3 as VisibleBarRange, a4 as WidgetActionDescriptor, a5 as WidgetActionTarget, a6 as WidgetAttachment, W as WidgetContext, a7 as getNativeIndicator, a8 as legendActions, a9 as legendCallouts, aa as nativeIndicatorDescriptors, ab as nativeIndicatorTypes, ac as registerDefaultEngine, ad as registerLegendAction, ae as registerLegendCallout, af as registerNativeIndicator, ag as registerSidePanel, ah as registerStatePersistence, ai as registerSymbolRanking, aj as registerWidgetAction, ak as registerWidgetAttachment, al as resolveEngines, am as sidePanels, an as statePersistenceHandlers, ao as symbolRanking, ap as topbarActionOverride, aq as unregisterDefaultEngine, ar as unregisterLegendAction, as as unregisterLegendCallout, at as unregisterNativeIndicator, au as unregisterSidePanel, av as unregisterStatePersistence, aw as unregisterWidgetAction, ax as unregisterWidgetAttachment, ay as widgetActions, az as widgetAttachments } from './contributions-
|
|
3
|
-
import { D as Drawing, S as SerializedDrawing, U as Unsubscribe, L as LineStyle, P as PriceStyle, e as IChartRenderer, R as RendererCapabilities, f as RendererDisplayOptions, g as IndicatorRenderHandle, h as IndicatorStatus, c as VelaTheme, W as WallClock, O as OHLCV, i as Pane, j as PaneAction, k as MoveTarget, l as IndicatorModel, m as ScenePatch, I as InputValue, n as SymbolPickerFn, o as LegendActionView, p as LegendCalloutView, q as InputChangeEvent, T as ThemeName, C as CrosshairEvent, r as ClickEvent, A as AxisLongPressEvent, s as TimelineMark, t as MarkGroup, u as MarkClickEvent, a as VisibleRange, v as DataWindowReadout, w as IDrawingsRendererPort, x as Millis, y as SnapMode, z as DrawingTypeKey, B as ToolbarDefinition, M as MarketConfig } from './options-
|
|
4
|
-
export { E as AddIndicatorOptions, F as AnimationConfig, G as Background, H as BoxFontFamily, J as BoxHAlign, K as BoxTextSize, Q as BoxVAlign, X as CandleBarColor, Y as CandleSeries, Z as CandleStyle, _ as DataWindowGroup, $ as DataWindowOHLC, a0 as DataWindowRow, a1 as DirtyRange, a2 as DrawingBox, a3 as DrawingExtend, a4 as DrawingIntent, a5 as DrawingLabel, a6 as DrawingLine, a7 as DrawingLinefill, a8 as DrawingMode, a9 as DrawingPoint, aa as DrawingPolyline, ab as DrawingSeriesBar, ac as DrawingSeriesGateway, ad as DrawingSeriesState, ae as DrawingStyle, af as DrawingTable, ag as DrawingText, ah as DrawingXLoc, ai as DrawingsOption, aj as Fill, ak as FillGradientStop, al as IndicatorMeta, am as InputCondition, an as InputSchema, ao as InputType, ap as InputWhen, aq as IntroAnimation, ar as IntroConfig, as as IntroStyle, at as LabelStyle, au as LabelYLoc, av as LineLikeKind, aw as LineLikeSeries, ax as LineLikeStyle, ay as MarkContent, az as MarkContentSource, aA as MarkGlyph, aB as MarkPanelItem, aC as MarkShape, aD as MarkerPoint, aE as MarkerSeries, aF as MarketSnapshot, aG as MarketSwitch, aH as PaneAxis, aI as PaneAxisBand, aJ as PaneHint, aK as PaneKind, aL as PolylinePoint, aM as PriceLine, aN as Projector, aO as ProviderName, aP as RendererConstructor, aQ as Scene, aR as SchemaPatch, aS as SecondClock, aT as SeriesDisplay, aU as SeriesKind, aV as SeriesPoint, aW as SeriesSpec, aX as SeriesSurface, aY as SeriesValueDelta, aZ as SettingsField, a_ as SettingsSchema, a$ as SettingsVisibilityPolicy, b0 as TableCell, b1 as TableMerge, b2 as TablePosition, b3 as ToolbarGroupConfig, b4 as TradeExecution, b5 as ValuePatch, b as VelaOptions, V as VisibleRangePreset, b6 as buildToolbar, b7 as defaultToolbar, b8 as inputDeltas, b9 as inputVisible, ba as seriesInScale, bb as seriesShownOn } from './options-
|
|
5
|
-
import { M as MarketDataFeed, D as DataProvider, P as ProviderInfo, a as SymbolDescriptor, S as SymbolInfo, b as ProviderCapabilities, B as BarRange } from './DataProvider-
|
|
6
|
-
export { A as ACCENT, a as ACCENT_BRIGHT, B as BEARISH, b as BULLISH, c as BarTransform, d as BasePaintingModulation, C as CATEGORICAL, e as CHIP_PLATE, f as CROSSHAIR, g as ChartTypeDefinition, h as ChartTypeSettingsInstance, i as ChartTypeSettingsSection, j as ChartTypeSettingsSubsection, D as DrawingTypeMeta, H as HIGHLIGHT, I as INFO, k as INVALID, l as IdentifiableKind, M as MARKER, N as NEUTRAL, m as NormalizedSettingsRow, R as RendererLayerArgs, n as RendererLayerDefinition, o as RendererLayerInstance, S as SERIES_LINE, p as SESSION_OFF, q as SESSION_POST, r as SESSION_PRE, s as SLATE, t as SLATE_DEEP, u as SeriesDataEngine, v as SeriesDataEngineHost, w as SettingsInlineControl, x as SettingsRowCondition, y as SettingsRowDescriptor, z as SettingsRowInlineNumber, E as SettingsRowSwatch, F as SettingsRowValueKey, G as SettingsRowWhen, J as SettingsRowWidth, K as SettingsSelectOption, L as SettingsValueRow, T as TRADE_EXIT, O as TRADE_LONG, P as TRADE_SHORT, V as VALID, W as WARNING, Q as categoricalColor, U as chartType, X as chartTypes, Y as createDrawing, Z as deserializeDrawing, _ as drawingTypes, $ as getDrawingType, a0 as normalizeSettingsRow, a1 as registerChartType, a2 as registerDrawingType, a3 as registerRendererDefaults, a4 as registerRendererLayer, a5 as rendererDefaults, a6 as rendererLayers, a7 as settingsRowValueKeys, a8 as stableSeriesId, a9 as tickerModifierIds, aa as unregisterChartType, ab as unregisterRendererDefaults, ac as unregisterRendererLayer } from './plugin-
|
|
1
|
+
import { D as DrawingsDocument, R as Resolved } from './contributions-DYtiRtES.cjs';
|
|
2
|
+
export { B as BarsChangeReason, C as CellStateContext, b as ContextSelect, c as DataControl, d as DrawingsControl, e as EngineAlert, f as EngineCapabilities, g as EngineContextSnapshot, h as EngineFactory, i as EngineWarning, j as ExecutionHandlers, k as ExecutionMarket, l as ExecutionRequest, m as ExecutionSession, E as ExternalIndicatorEntry, F as FetchSeries, n as IndicatorEventMap, I as IndicatorHandle, o as IndicatorSummary, L as LegendActionDescriptor, p as LegendCalloutContent, q as LegendCalloutDescriptor, r as LegendCalloutItem, s as LegendCalloutSpec, t as LegendIndicatorInfo, M as MarksControl, N as NativeIndicator, u as NativeIndicatorContext, v as NativeIndicatorDescriptor, w as NativeIndicatorInfo, x as NativeIndicatorOutput, O as OVERRIDABLE_TOPBAR_IDS, P as ParsedSymbol, y as PreparedScript, z as RendererControl, A as RunIndicatorResult, G as SceneInspection, a as ScriptRun, H as ScriptRunCause, J as ScriptRunResult, S as ScriptingEngine, K as SidePanelButton, Q as SidePanelDescriptor, T as SidePanelHandle, U as SidePanelHeader, X as StatePersistenceHandler, Y as StrategyFill, Z as StrategyState, _ as StrategyTrade, $ as SymbolRankingHook, a0 as TypedEventBus, V as Vela, a1 as VelaDeps, a2 as VelaEventMap, a3 as VisibleBarRange, a4 as WidgetActionDescriptor, a5 as WidgetActionTarget, a6 as WidgetAttachment, W as WidgetContext, a7 as getNativeIndicator, a8 as legendActions, a9 as legendCallouts, aa as nativeIndicatorDescriptors, ab as nativeIndicatorTypes, ac as registerDefaultEngine, ad as registerLegendAction, ae as registerLegendCallout, af as registerNativeIndicator, ag as registerSidePanel, ah as registerStatePersistence, ai as registerSymbolRanking, aj as registerWidgetAction, ak as registerWidgetAttachment, al as resolveEngines, am as sidePanels, an as statePersistenceHandlers, ao as symbolRanking, ap as topbarActionOverride, aq as unregisterDefaultEngine, ar as unregisterLegendAction, as as unregisterLegendCallout, at as unregisterNativeIndicator, au as unregisterSidePanel, av as unregisterStatePersistence, aw as unregisterWidgetAction, ax as unregisterWidgetAttachment, ay as widgetActions, az as widgetAttachments } from './contributions-DYtiRtES.cjs';
|
|
3
|
+
import { D as Drawing, S as SerializedDrawing, U as Unsubscribe, L as LineStyle, P as PriceStyle, e as IChartRenderer, R as RendererCapabilities, f as RendererDisplayOptions, g as IndicatorRenderHandle, h as IndicatorStatus, c as VelaTheme, W as WallClock, O as OHLCV, i as Pane, j as PaneAction, k as MoveTarget, l as IndicatorModel, m as ScenePatch, I as InputValue, n as SymbolPickerFn, o as LegendActionView, p as LegendCalloutView, q as InputChangeEvent, T as ThemeName, C as CrosshairEvent, r as ClickEvent, A as AxisLongPressEvent, s as TimelineMark, t as MarkGroup, u as MarkClickEvent, a as VisibleRange, v as DataWindowReadout, w as IDrawingsRendererPort, x as Millis, y as SnapMode, z as DrawingTypeKey, B as ToolbarDefinition, M as MarketConfig } from './options-DNBoMKkX.cjs';
|
|
4
|
+
export { E as AddIndicatorOptions, F as AnimationConfig, G as Background, H as BoxFontFamily, J as BoxHAlign, K as BoxTextSize, Q as BoxVAlign, X as CandleBarColor, Y as CandleSeries, Z as CandleStyle, _ as DataWindowGroup, $ as DataWindowOHLC, a0 as DataWindowRow, a1 as DirtyRange, a2 as DrawingBox, a3 as DrawingExtend, a4 as DrawingIntent, a5 as DrawingLabel, a6 as DrawingLine, a7 as DrawingLinefill, a8 as DrawingMode, a9 as DrawingPoint, aa as DrawingPolyline, ab as DrawingSeriesBar, ac as DrawingSeriesGateway, ad as DrawingSeriesState, ae as DrawingStyle, af as DrawingTable, ag as DrawingText, ah as DrawingXLoc, ai as DrawingsOption, aj as Fill, ak as FillGradientStop, al as IndicatorMeta, am as InputCondition, an as InputSchema, ao as InputType, ap as InputWhen, aq as IntroAnimation, ar as IntroConfig, as as IntroStyle, at as LabelStyle, au as LabelYLoc, av as LineLikeKind, aw as LineLikeSeries, ax as LineLikeStyle, ay as MarkContent, az as MarkContentSource, aA as MarkGlyph, aB as MarkPanelItem, aC as MarkShape, aD as MarkerPoint, aE as MarkerSeries, aF as MarketSnapshot, aG as MarketSwitch, aH as PaneAxis, aI as PaneAxisBand, aJ as PaneHint, aK as PaneKind, aL as PolylinePoint, aM as PriceLine, aN as Projector, aO as ProviderName, aP as RendererConstructor, aQ as Scene, aR as SchemaPatch, aS as SecondClock, aT as SeriesDisplay, aU as SeriesKind, aV as SeriesPoint, aW as SeriesSpec, aX as SeriesSurface, aY as SeriesValueDelta, aZ as SettingsField, a_ as SettingsSchema, a$ as SettingsVisibilityPolicy, b0 as TableCell, b1 as TableMerge, b2 as TablePosition, b3 as ToolbarGroupConfig, b4 as TradeExecution, b5 as ValuePatch, b as VelaOptions, V as VisibleRangePreset, b6 as buildToolbar, b7 as defaultToolbar, b8 as inputDeltas, b9 as inputVisible, ba as seriesInScale, bb as seriesShownOn } from './options-DNBoMKkX.cjs';
|
|
5
|
+
import { M as MarketDataFeed, D as DataProvider, P as ProviderInfo, a as SymbolDescriptor, S as SymbolInfo, b as ProviderCapabilities, B as BarRange } from './DataProvider-Dut6lXGM.cjs';
|
|
6
|
+
export { A as ACCENT, a as ACCENT_BRIGHT, B as BEARISH, b as BULLISH, c as BarTransform, d as BasePaintingModulation, C as CATEGORICAL, e as CHIP_PLATE, f as CROSSHAIR, g as ChartTypeDefinition, h as ChartTypeSettingsInstance, i as ChartTypeSettingsSection, j as ChartTypeSettingsSubsection, D as DrawingTypeMeta, H as HIGHLIGHT, I as INFO, k as INVALID, l as IdentifiableKind, M as MARKER, N as NEUTRAL, m as NormalizedSettingsRow, R as RendererLayerArgs, n as RendererLayerDefinition, o as RendererLayerInstance, S as SERIES_LINE, p as SESSION_OFF, q as SESSION_POST, r as SESSION_PRE, s as SLATE, t as SLATE_DEEP, u as SeriesDataEngine, v as SeriesDataEngineHost, w as SettingsInlineControl, x as SettingsRowCondition, y as SettingsRowDescriptor, z as SettingsRowInlineNumber, E as SettingsRowSwatch, F as SettingsRowValueKey, G as SettingsRowWhen, J as SettingsRowWidth, K as SettingsSelectOption, L as SettingsValueRow, T as TRADE_EXIT, O as TRADE_LONG, P as TRADE_SHORT, V as VALID, W as WARNING, Q as categoricalColor, U as chartType, X as chartTypes, Y as createDrawing, Z as deserializeDrawing, _ as drawingTypes, $ as getDrawingType, a0 as normalizeSettingsRow, a1 as registerChartType, a2 as registerDrawingType, a3 as registerRendererDefaults, a4 as registerRendererLayer, a5 as rendererDefaults, a6 as rendererLayers, a7 as settingsRowValueKeys, a8 as stableSeriesId, a9 as tickerModifierIds, aa as unregisterChartType, ab as unregisterRendererDefaults, ac as unregisterRendererLayer } from './plugin-DtkeQVAO.cjs';
|
|
7
7
|
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';
|
|
8
8
|
export { i as iconMarkup, r as registerIcon } from './icons-BZYbJXSV.cjs';
|
|
9
9
|
export { a as KeyBindingDescriptor, R as ResolvedBinding } from './keymap-CGOz5F5f.cjs';
|
|
@@ -586,6 +586,13 @@ declare class NativeRenderer implements IChartRenderer {
|
|
|
586
586
|
* canonical theme. */
|
|
587
587
|
private syncThemeControl;
|
|
588
588
|
private toggleSettingsDialog;
|
|
589
|
+
/**
|
|
590
|
+
* The document "Reset defaults" applies: every setting back to its first-run value,
|
|
591
|
+
* with two things that are NOT settings held or resolved here — the price style
|
|
592
|
+
* stays the one the user is looking at, and the timeline-mark groups (an additive
|
|
593
|
+
* merge, like the type bags) are named back to their host-declared visibility.
|
|
594
|
+
*/
|
|
595
|
+
private factoryResetDocument;
|
|
589
596
|
/** Close the in-chart dialogs (indicator settings + chart-settings gear). No-op when none are open. */
|
|
590
597
|
closeDialogs(): void;
|
|
591
598
|
/** Jump-back-to-latest button — same size/border chrome as the drawing-toolbar collapse toggle. */
|
|
@@ -772,6 +779,12 @@ declare class NativeRenderer implements IChartRenderer {
|
|
|
772
779
|
onMarkClick(cb: (e: MarkClickEvent) => void): Unsubscribe;
|
|
773
780
|
/** Every group the lane knows: the defined ones, then those marks name without a definition. */
|
|
774
781
|
private markGroupsInUse;
|
|
782
|
+
/**
|
|
783
|
+
* The groups as the Events tab lists them: nested only under a DEFINED parent. The
|
|
784
|
+
* painter's visibility chain resolves parents against the defined groups alone, so a
|
|
785
|
+
* parent that marks merely name must not nest (and dim) a child the painter still shows.
|
|
786
|
+
*/
|
|
787
|
+
private markGroupsForEventsTab;
|
|
775
788
|
onViewportChange(cb: (range: VisibleRange) => void): Unsubscribe;
|
|
776
789
|
getVisibleRange(): VisibleRange | null;
|
|
777
790
|
setVisibleRange(range: VisibleRange): void;
|
|
@@ -1037,6 +1050,10 @@ declare class NativeRenderer implements IChartRenderer {
|
|
|
1037
1050
|
* and vanish. The chart type's own layer does not count: it is blanked with the candles.
|
|
1038
1051
|
*/
|
|
1039
1052
|
private priceLayersAnchoredToBars;
|
|
1053
|
+
/** True when the pane's master content contributes SOMETHING to its autoscale besides
|
|
1054
|
+
* the candles: a series painted on the pane (force_overlay ones scale elsewhere), a
|
|
1055
|
+
* price line, or a measured drawings range. Mirrors what `computePaneScale` considers. */
|
|
1056
|
+
private paneHasMeasurableContent;
|
|
1040
1057
|
/** Per-pane scale state for a host UI (e.g. a price-axis context menu): the pane's pixel
|
|
1041
1058
|
* band (`top`/`height`, so a click y maps to a pane) plus its current axis `mode`/`log`.
|
|
1042
1059
|
* Top-to-bottom order. Every pane is independent — the price pane from the scene setting,
|