@luxalgo/vela 0.6.21 → 0.7.0
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-Cb-2lC5O.d.ts → DataProvider-Bu9E5Zh5.d.ts} +1 -1
- package/dist/{DataProvider-UtWw2CgJ.d.cts → DataProvider-Ck2qyS_9.d.cts} +1 -1
- package/dist/{chunk-BRPFYKTT.js → chunk-A347YL2P.js} +30 -7
- package/dist/{chunk-TRZQQUTR.js → chunk-A4G64KVF.js} +1442 -126
- package/dist/{chunk-T5Z5YUCF.js → chunk-CZRNTHD6.js} +24 -2
- package/dist/{chunk-XCBJU674.js → chunk-UHXG5J7C.js} +1 -1
- package/dist/{contributions-D8HdlKmp.d.cts → contributions-BjQ7hyIx.d.ts} +108 -3
- package/dist/{contributions-FqIWhN4p.d.ts → contributions-Cv2Mutvn.d.cts} +108 -3
- package/dist/index.cjs +1465 -125
- package/dist/index.d.cts +76 -20
- package/dist/index.d.ts +76 -20
- package/dist/index.js +2 -2
- package/dist/{options-BCRmYALw.d.cts → options-ex2_gtKp.d.cts} +200 -12
- package/dist/{options-BCRmYALw.d.ts → options-ex2_gtKp.d.ts} +200 -12
- package/dist/{plugin-B4mnNAeh.d.ts → plugin-CiyhU7pi.d.ts} +3 -3
- package/dist/{plugin-Ccupy_BV.d.cts → plugin-absNH7Yn.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-CCP1zm_Z.d.ts → statusline-model-BXoU4Kua.d.ts} +8 -4
- package/dist/{statusline-model-E7CMw5pQ.d.cts → statusline-model-cRhPBLPO.d.cts} +8 -4
- package/dist/ui.cjs +24 -2
- package/dist/ui.d.cts +9 -3
- package/dist/ui.d.ts +9 -3
- package/dist/ui.js +2 -2
- package/dist/vela.global.js +1465 -125
- package/dist/vela.global.min.js +77 -53
- package/dist/widget.cjs +1490 -129
- package/dist/widget.d.cts +6 -6
- package/dist/widget.d.ts +6 -6
- package/dist/widget.js +5 -5
- package/dist/workspace.cjs +1490 -129
- package/dist/workspace.d.cts +8 -5
- package/dist/workspace.d.ts +8 -5
- package/dist/workspace.js +4 -4
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { parseSymbol, priceStyleIds, BUILTIN_PRICE_STYLES, tzButtonLabel, TIMEZONES, normalizeTimezone, tzMenuLabel, isGroupRow, defaultMemberOf, groupKeyOf, groupMembers, LEGEND_AT_TOP_ATTR, normalizeSession, Vela, TypedEventBus, MultiProviderFeed, registerBuiltinChartTypes, resolveTheme, buildToolbar, createCustomMark, createAttributionMark, DrawingToolbar, applyAttributionMarkTheme, sharedBarStore, timeframeToMs } from './chunk-
|
|
1
|
+
import { parseSymbol, priceStyleIds, BUILTIN_PRICE_STYLES, tzButtonLabel, SecondClock, TIMEZONES, normalizeTimezone, tzMenuLabel, isGroupRow, defaultMemberOf, groupKeyOf, groupMembers, LEGEND_AT_TOP_ATTR, normalizeSession, Vela, TypedEventBus, MultiProviderFeed, registerBuiltinChartTypes, resolveTheme, buildToolbar, createCustomMark, createAttributionMark, DrawingToolbar, applyAttributionMarkTheme, sharedBarStore, timeframeToMs } from './chunk-A4G64KVF.js';
|
|
2
2
|
import { chartType, resolveTopbarComposition, topbarActionOverride, TOPBAR_BUILTIN_IDS, widgetActions, SidePanel, sidePanels, DEFAULT_PANEL_ORDER, symbolRanking, resolveEngines, legendActionsProviderFor, legendCalloutsProviderFor, statePersistenceHandlers, topbarHas, rendererDefaults, widgetAttachments, getDrawingType, inputDeltas } from './chunk-IFJJPXSV.js';
|
|
3
|
-
import { Tooltip, KeymapManager, isEditableTarget, Drawer } from './chunk-
|
|
4
|
-
import { Menu, Dialog, CalloutBubble, applyPlotOverlayTokens, ensureUIHost } from './chunk-
|
|
3
|
+
import { Tooltip, KeymapManager, isEditableTarget, Drawer } from './chunk-UHXG5J7C.js';
|
|
4
|
+
import { Menu, Dialog, CalloutBubble, applyPlotOverlayTokens, ensureUIHost } from './chunk-CZRNTHD6.js';
|
|
5
5
|
import { registerIcon, svg16, injectStyles, iconEl, iconMarkup, iconAt, SESSION_OFF, SESSION_POST, SESSION_PRE, icon, categoricalColor } from './chunk-CAFCLMPF.js';
|
|
6
6
|
import { baseOf } from './chunk-W4EJWLEO.js';
|
|
7
7
|
|
|
@@ -1086,7 +1086,6 @@ var Bottombar = class {
|
|
|
1086
1086
|
this.rangeButtons = /* @__PURE__ */ new Map();
|
|
1087
1087
|
this.sessionButtons = /* @__PURE__ */ new Map();
|
|
1088
1088
|
this.sessionEl = null;
|
|
1089
|
-
this.timer = null;
|
|
1090
1089
|
this.timezone = opts.timezone;
|
|
1091
1090
|
const doc = host.ownerDocument;
|
|
1092
1091
|
injectStyles(STYLE_ID3, CSS3, doc);
|
|
@@ -1151,7 +1150,7 @@ var Bottombar = class {
|
|
|
1151
1150
|
}
|
|
1152
1151
|
});
|
|
1153
1152
|
this.tick();
|
|
1154
|
-
this.
|
|
1153
|
+
this.unsubClock = (opts.clock ?? new SecondClock()).onTick(() => this.tick());
|
|
1155
1154
|
}
|
|
1156
1155
|
setTimezone(zone) {
|
|
1157
1156
|
this.timezone = zone;
|
|
@@ -1180,7 +1179,7 @@ var Bottombar = class {
|
|
|
1180
1179
|
}
|
|
1181
1180
|
}
|
|
1182
1181
|
destroy() {
|
|
1183
|
-
|
|
1182
|
+
this.unsubClock();
|
|
1184
1183
|
this.tzMenu.destroy();
|
|
1185
1184
|
this.settingsTip?.destroy();
|
|
1186
1185
|
this.el.remove();
|
|
@@ -5197,6 +5196,11 @@ function followStep(cur, target, follow = FOLLOW, epsFrac = 15e-4) {
|
|
|
5197
5196
|
const done = Math.abs(target.from - nf) <= eps && Math.abs(target.to - nt) <= eps;
|
|
5198
5197
|
return { cur: done ? { ...target } : { from: nf, to: nt }, done };
|
|
5199
5198
|
}
|
|
5199
|
+
function zoomAnimated(chart) {
|
|
5200
|
+
const control = chart.renderer;
|
|
5201
|
+
if (!control || !control.supports("animZoom")) return true;
|
|
5202
|
+
return Boolean(control.get("animZoom"));
|
|
5203
|
+
}
|
|
5200
5204
|
var Glider = class {
|
|
5201
5205
|
constructor(chart) {
|
|
5202
5206
|
this.chart = chart;
|
|
@@ -5224,8 +5228,14 @@ var Glider = class {
|
|
|
5224
5228
|
const chart = this.chart();
|
|
5225
5229
|
const base = this.target ?? chart?.getVisibleRange();
|
|
5226
5230
|
if (!chart || !base) return;
|
|
5231
|
+
const target = make(base);
|
|
5232
|
+
if (!zoomAnimated(chart)) {
|
|
5233
|
+
this.stop();
|
|
5234
|
+
chart.setVisibleRange(target);
|
|
5235
|
+
return;
|
|
5236
|
+
}
|
|
5227
5237
|
this.cur ?? (this.cur = { ...base });
|
|
5228
|
-
this.target =
|
|
5238
|
+
this.target = target;
|
|
5229
5239
|
if (!this.raf) this.tick();
|
|
5230
5240
|
}
|
|
5231
5241
|
tick() {
|
|
@@ -6945,6 +6955,7 @@ var CSS14 = `
|
|
|
6945
6955
|
font-weight: 600;
|
|
6946
6956
|
-webkit-tap-highlight-color: transparent;
|
|
6947
6957
|
}
|
|
6958
|
+
.vela-mb-item[hidden] { display: none !important; }
|
|
6948
6959
|
.vela-mb-item:active { background: var(--vela-hover); }
|
|
6949
6960
|
.vela-mb-item .vela-icon { font-size: 18px; width: 18px; height: 18px; }
|
|
6950
6961
|
/* A lit stop (the maximize toggle while something is isolated): the inverse
|
|
@@ -7034,6 +7045,12 @@ var MobileBar = class {
|
|
|
7034
7045
|
this.maxEl.setAttribute("aria-label", on ? "Restore layout" : "Maximize chart");
|
|
7035
7046
|
this.maxEl.replaceChildren(iconEl(on ? "restore" : "maximize", this.el.ownerDocument));
|
|
7036
7047
|
}
|
|
7048
|
+
/** Show the maximize stop only while the grid holds more than one chart — on a
|
|
7049
|
+
* one-cell layout there is nothing to isolate, so the stop would be a dead press. */
|
|
7050
|
+
setMaximizeVisible(visible) {
|
|
7051
|
+
if (!this.maxEl) return;
|
|
7052
|
+
this.maxEl.hidden = !visible;
|
|
7053
|
+
}
|
|
7037
7054
|
destroy() {
|
|
7038
7055
|
this.el.remove();
|
|
7039
7056
|
}
|
|
@@ -8193,6 +8210,9 @@ var VelaWorkspace = class {
|
|
|
8193
8210
|
this.events = new TypedEventBus();
|
|
8194
8211
|
this.feed = new MultiProviderFeed();
|
|
8195
8212
|
this.cellsById = /* @__PURE__ */ new Map();
|
|
8213
|
+
/** The one second pulse behind every time display: the bottom-bar clock and each
|
|
8214
|
+
* cell's countdown chip subscribe to it, so they can never read different seconds. */
|
|
8215
|
+
this.clock = new SecondClock();
|
|
8196
8216
|
this.pool = /* @__PURE__ */ new Map();
|
|
8197
8217
|
this.trackSizes = /* @__PURE__ */ new Map();
|
|
8198
8218
|
this.resizeObserver = null;
|
|
@@ -8470,6 +8490,7 @@ var VelaWorkspace = class {
|
|
|
8470
8490
|
this.drawToolbar?.setDrawingsSyncMode(!!this.syncOpts.drawings);
|
|
8471
8491
|
this.bottombar = opts.bottombar !== false ? new Bottombar(this.root, {
|
|
8472
8492
|
timezone: this.timezone,
|
|
8493
|
+
clock: this.clock,
|
|
8473
8494
|
onRange: (preset) => {
|
|
8474
8495
|
this.active.applyRange(preset);
|
|
8475
8496
|
this.bottombar?.setActiveRange(preset.id);
|
|
@@ -8913,6 +8934,7 @@ var VelaWorkspace = class {
|
|
|
8913
8934
|
const cell = this.activeId ? this.cellsById.get(this.activeId) : void 0;
|
|
8914
8935
|
const paneMax = cell ? cell.chart.panes.list().some((p) => p.maximized) : false;
|
|
8915
8936
|
this.mobileBar.setMaximizeActive(this.maximizedId != null || paneMax);
|
|
8937
|
+
this.mobileBar.setMaximizeVisible(this.def.cells.length > 1);
|
|
8916
8938
|
}
|
|
8917
8939
|
/**
|
|
8918
8940
|
* Trade the SLOTS of two live cells — the grid arrangement changes, the cells
|
|
@@ -9213,6 +9235,7 @@ var VelaWorkspace = class {
|
|
|
9213
9235
|
if (id === this.activeId) cell.host.dataset.active = "1";
|
|
9214
9236
|
this.wireCell(cell);
|
|
9215
9237
|
cell.chart.renderer.setLayoutMode(this.layoutCtl.current);
|
|
9238
|
+
cell.chart.renderer.setWallClock(this.clock);
|
|
9216
9239
|
cell.setControlsSuspended(this.layoutCtl.current === "mobile");
|
|
9217
9240
|
if (this.favs.length > 0) cell.chart.drawings.setFavorites(this.favs);
|
|
9218
9241
|
cell.setManifest(this.manifest, pooled?.indicators == null);
|