@luxalgo/vela 0.5.0 → 0.5.1
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-DKNDHpNv.d.cts → DataProvider-BBQ3Hr21.d.cts} +1 -1
- package/dist/{DataProvider-Dzd-Erlk.d.ts → DataProvider-DGesjOJT.d.ts} +1 -1
- package/dist/{chunk-OVQKKXLZ.js → chunk-5SE4PL3H.js} +402 -60
- package/dist/{chunk-RHIDOUFL.js → chunk-AIW3EJUE.js} +2 -2
- package/dist/{chunk-GYD2THPV.js → chunk-EP6NDJYK.js} +5 -0
- package/dist/{chunk-KCCZNKH7.js → chunk-FNOMKHEZ.js} +668 -78
- package/dist/{chunk-7UFX5ZIG.js → chunk-S6F6SQ2L.js} +7 -2
- package/dist/{chunk-KM6LHB3Y.js → chunk-ULIX6AE2.js} +6 -1
- package/dist/{contributions-hX3EUyjG.d.ts → contributions-6N0rbrPC.d.ts} +46 -31
- package/dist/{contributions-o1GRKPI_.d.cts → contributions-BlV3kb0O.d.cts} +46 -31
- package/dist/{history-Dzxz-MQj.d.ts → history-BTd52YMA.d.ts} +10 -5
- package/dist/{history-LJkz4-sS.d.cts → history-DX3Zne3a.d.cts} +10 -5
- package/dist/index.cjs +680 -75
- package/dist/index.d.cts +37 -12
- package/dist/index.d.ts +37 -12
- package/dist/index.js +4 -4
- package/dist/{options-Q-576hIi.d.cts → options-DbQholFV.d.cts} +14 -0
- package/dist/{options-Q-576hIi.d.ts → options-DbQholFV.d.ts} +14 -0
- package/dist/{plugin-D94muTV-.d.cts → plugin-O34MbXf-.d.cts} +157 -7
- package/dist/{plugin-aGUD1epn.d.ts → plugin-TN3n-9YN.d.ts} +157 -7
- package/dist/plugin.cjs +5 -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/ui.cjs +10 -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 +680 -75
- package/dist/vela.global.min.js +59 -28
- package/dist/widget.cjs +1081 -134
- package/dist/widget.d.cts +30 -16
- package/dist/widget.d.ts +30 -16
- package/dist/widget.js +9 -9
- package/dist/workspace.cjs +1372 -183
- package/dist/workspace.d.cts +66 -8
- package/dist/workspace.d.ts +66 -8
- package/dist/workspace.js +275 -37
- package/package.json +1 -1
package/dist/widget.d.cts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { W as WidgetContext, V as Vela, y as SidePanelButton } from './contributions-
|
|
2
|
-
export { ah as DEFAULT_PANEL_ORDER, z as SidePanelDescriptor, A as SidePanelHandle, U as WidgetActionDescriptor, X as WidgetActionTarget, Y as WidgetAttachment, a4 as registerSidePanel, a5 as registerWidgetAction, a6 as registerWidgetAttachment, a8 as sidePanels, ac as unregisterSidePanel, ad as unregisterWidgetAction, ae as unregisterWidgetAttachment, af as widgetActions, ag as widgetAttachments } from './contributions-
|
|
3
|
-
import { b as VelaOptions, q as DataWindowReadout } from './options-
|
|
1
|
+
import { W as WidgetContext, V as Vela, y as SidePanelButton } from './contributions-BlV3kb0O.cjs';
|
|
2
|
+
export { ah as DEFAULT_PANEL_ORDER, z as SidePanelDescriptor, A as SidePanelHandle, U as WidgetActionDescriptor, X as WidgetActionTarget, Y as WidgetAttachment, a4 as registerSidePanel, a5 as registerWidgetAction, a6 as registerWidgetAttachment, a8 as sidePanels, ac as unregisterSidePanel, ad as unregisterWidgetAction, ae as unregisterWidgetAttachment, af as widgetActions, ag as widgetAttachments } from './contributions-BlV3kb0O.cjs';
|
|
3
|
+
import { b as VelaOptions, q as DataWindowReadout } from './options-DbQholFV.cjs';
|
|
4
4
|
import { K as KeymapManager } from './keymap-CGOz5F5f.cjs';
|
|
5
|
-
import { W as WidgetHistory, b as VelaShellOptions, e as WorkspaceState, a as RangePreset, i as PersistedState, P as PanelsState } from './history-
|
|
6
|
-
export { B as Bottombar, j as BottombarOptions, C as CellState, f as ChartState, I as IndicatorLoader, k as IndicatorManifest, l as IndicatorManifestEntry, m as RANGE_PRESETS, R as ResolvedIndicator, V as VelaStorage, n as WidgetStorage, g as decodeState, h as encodeState, o as legacyWidgetState, p as loadPersisted, q as localStorageAdapter, r as parsePersisted, t as resolveIndicators, s as sanitizeState, u as savePersisted } from './history-
|
|
7
|
-
import { a as SymbolDescriptor } from './DataProvider-
|
|
5
|
+
import { W as WidgetHistory, b as VelaShellOptions, e as WorkspaceState, a as RangePreset, i as PersistedState, P as PanelsState } from './history-DX3Zne3a.cjs';
|
|
6
|
+
export { B as Bottombar, j as BottombarOptions, C as CellState, f as ChartState, I as IndicatorLoader, k as IndicatorManifest, l as IndicatorManifestEntry, m as RANGE_PRESETS, R as ResolvedIndicator, V as VelaStorage, n as WidgetStorage, g as decodeState, h as encodeState, o as legacyWidgetState, p as loadPersisted, q as localStorageAdapter, r as parsePersisted, t as resolveIndicators, s as sanitizeState, u as savePersisted } from './history-DX3Zne3a.cjs';
|
|
7
|
+
import { a as SymbolDescriptor } from './DataProvider-BBQ3Hr21.cjs';
|
|
8
8
|
import { d as SidePanel } from './side-panel-CT9ZwIGz.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-CT9ZwIGz.cjs';
|
|
10
10
|
|
|
@@ -215,6 +215,12 @@ declare class VelaWidget {
|
|
|
215
215
|
private persistNow;
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
+
/** The current layout's footprint on the canvas (mirrors the workspace's LayoutShape). */
|
|
219
|
+
type LayoutPickerShape = {
|
|
220
|
+
rows: number;
|
|
221
|
+
cols: number;
|
|
222
|
+
};
|
|
223
|
+
|
|
218
224
|
declare function priceStyleLabel(id: string): string;
|
|
219
225
|
interface TopbarOptions {
|
|
220
226
|
symbol: string;
|
|
@@ -224,23 +230,28 @@ interface TopbarOptions {
|
|
|
224
230
|
priceStyle: string;
|
|
225
231
|
onTimeframe: (tf: string) => void;
|
|
226
232
|
onPriceStyle: (style: string) => void;
|
|
227
|
-
/** Optional workspace LAYOUT dropdown (rendered after the style dropdown when
|
|
228
|
-
*
|
|
233
|
+
/** Optional workspace LAYOUT dropdown (rendered after the style dropdown when
|
|
234
|
+
* given) — the grid-canvas picker composing uniform grids, with the workspace
|
|
235
|
+
* SYNC switches beside it. Everything is read live, so plugin-registered
|
|
236
|
+
* layouts and setting flips appear automatically. */
|
|
229
237
|
layout?: {
|
|
230
238
|
current: string;
|
|
231
|
-
|
|
239
|
+
/** Current layout's picker-canvas shape (null = not canvas-expressible). */
|
|
240
|
+
shape: () => LayoutPickerShape | null;
|
|
241
|
+
/** Registered layouts the canvas cannot express — rendered as labeled rows. */
|
|
242
|
+
presets: () => Array<{
|
|
232
243
|
id: string;
|
|
233
244
|
label: string;
|
|
234
245
|
}>;
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
246
|
+
onSelectGrid: (rows: number, cols: number) => void;
|
|
247
|
+
onSelectPreset: (id: string) => void;
|
|
248
|
+
/** SYNC switch rows (re-read on every open and after each toggle). */
|
|
249
|
+
syncs: () => Array<{
|
|
239
250
|
id: string;
|
|
240
251
|
label: string;
|
|
241
252
|
checked: boolean;
|
|
242
253
|
}>;
|
|
243
|
-
|
|
254
|
+
onToggleSync: (id: string) => void;
|
|
244
255
|
};
|
|
245
256
|
onIndicatorsClick?: () => void;
|
|
246
257
|
/** Unified undo/redo (same stack as Ctrl+Z / Ctrl+Y). Enabled state is pushed with
|
|
@@ -258,7 +269,7 @@ declare class Topbar {
|
|
|
258
269
|
private readonly tfButton;
|
|
259
270
|
private readonly styleButton;
|
|
260
271
|
private layoutButton;
|
|
261
|
-
private
|
|
272
|
+
private layoutPicker;
|
|
262
273
|
private layoutId;
|
|
263
274
|
private readonly tfMenu;
|
|
264
275
|
private readonly styleMenu;
|
|
@@ -286,7 +297,6 @@ declare class Topbar {
|
|
|
286
297
|
/** Reflect the current workspace layout (no-op without the layout dropdown). */
|
|
287
298
|
setLayout(id: string): void;
|
|
288
299
|
private renderLayoutButton;
|
|
289
|
-
private layoutItems;
|
|
290
300
|
private renderStyleButton;
|
|
291
301
|
/** Re-project the contributed topbar actions (call after registrations change). */
|
|
292
302
|
renderActions(): void;
|
|
@@ -372,9 +382,13 @@ declare class Statusline {
|
|
|
372
382
|
|
|
373
383
|
declare class Watermark {
|
|
374
384
|
readonly el: HTMLElement;
|
|
385
|
+
private readonly text;
|
|
386
|
+
private readonly resizeObserver;
|
|
375
387
|
constructor(host: HTMLElement, symbol: string, timeframe: string);
|
|
376
388
|
setVisible(visible: boolean): void;
|
|
377
389
|
update(symbol: string, timeframe: string): void;
|
|
390
|
+
/** Measure the text at the cap and shrink it to the chart's own width. */
|
|
391
|
+
private fit;
|
|
378
392
|
destroy(): void;
|
|
379
393
|
}
|
|
380
394
|
|
package/dist/widget.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { W as WidgetContext, V as Vela, y as SidePanelButton } from './contributions-
|
|
2
|
-
export { ah as DEFAULT_PANEL_ORDER, z as SidePanelDescriptor, A as SidePanelHandle, U as WidgetActionDescriptor, X as WidgetActionTarget, Y as WidgetAttachment, a4 as registerSidePanel, a5 as registerWidgetAction, a6 as registerWidgetAttachment, a8 as sidePanels, ac as unregisterSidePanel, ad as unregisterWidgetAction, ae as unregisterWidgetAttachment, af as widgetActions, ag as widgetAttachments } from './contributions-
|
|
3
|
-
import { b as VelaOptions, q as DataWindowReadout } from './options-
|
|
1
|
+
import { W as WidgetContext, V as Vela, y as SidePanelButton } from './contributions-6N0rbrPC.js';
|
|
2
|
+
export { ah as DEFAULT_PANEL_ORDER, z as SidePanelDescriptor, A as SidePanelHandle, U as WidgetActionDescriptor, X as WidgetActionTarget, Y as WidgetAttachment, a4 as registerSidePanel, a5 as registerWidgetAction, a6 as registerWidgetAttachment, a8 as sidePanels, ac as unregisterSidePanel, ad as unregisterWidgetAction, ae as unregisterWidgetAttachment, af as widgetActions, ag as widgetAttachments } from './contributions-6N0rbrPC.js';
|
|
3
|
+
import { b as VelaOptions, q as DataWindowReadout } from './options-DbQholFV.js';
|
|
4
4
|
import { K as KeymapManager } from './keymap-CGOz5F5f.js';
|
|
5
|
-
import { W as WidgetHistory, b as VelaShellOptions, e as WorkspaceState, a as RangePreset, i as PersistedState, P as PanelsState } from './history-
|
|
6
|
-
export { B as Bottombar, j as BottombarOptions, C as CellState, f as ChartState, I as IndicatorLoader, k as IndicatorManifest, l as IndicatorManifestEntry, m as RANGE_PRESETS, R as ResolvedIndicator, V as VelaStorage, n as WidgetStorage, g as decodeState, h as encodeState, o as legacyWidgetState, p as loadPersisted, q as localStorageAdapter, r as parsePersisted, t as resolveIndicators, s as sanitizeState, u as savePersisted } from './history-
|
|
7
|
-
import { a as SymbolDescriptor } from './DataProvider-
|
|
5
|
+
import { W as WidgetHistory, b as VelaShellOptions, e as WorkspaceState, a as RangePreset, i as PersistedState, P as PanelsState } from './history-BTd52YMA.js';
|
|
6
|
+
export { B as Bottombar, j as BottombarOptions, C as CellState, f as ChartState, I as IndicatorLoader, k as IndicatorManifest, l as IndicatorManifestEntry, m as RANGE_PRESETS, R as ResolvedIndicator, V as VelaStorage, n as WidgetStorage, g as decodeState, h as encodeState, o as legacyWidgetState, p as loadPersisted, q as localStorageAdapter, r as parsePersisted, t as resolveIndicators, s as sanitizeState, u as savePersisted } from './history-BTd52YMA.js';
|
|
7
|
+
import { a as SymbolDescriptor } from './DataProvider-DGesjOJT.js';
|
|
8
8
|
import { d as SidePanel } from './side-panel-CT9ZwIGz.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-CT9ZwIGz.js';
|
|
10
10
|
|
|
@@ -215,6 +215,12 @@ declare class VelaWidget {
|
|
|
215
215
|
private persistNow;
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
+
/** The current layout's footprint on the canvas (mirrors the workspace's LayoutShape). */
|
|
219
|
+
type LayoutPickerShape = {
|
|
220
|
+
rows: number;
|
|
221
|
+
cols: number;
|
|
222
|
+
};
|
|
223
|
+
|
|
218
224
|
declare function priceStyleLabel(id: string): string;
|
|
219
225
|
interface TopbarOptions {
|
|
220
226
|
symbol: string;
|
|
@@ -224,23 +230,28 @@ interface TopbarOptions {
|
|
|
224
230
|
priceStyle: string;
|
|
225
231
|
onTimeframe: (tf: string) => void;
|
|
226
232
|
onPriceStyle: (style: string) => void;
|
|
227
|
-
/** Optional workspace LAYOUT dropdown (rendered after the style dropdown when
|
|
228
|
-
*
|
|
233
|
+
/** Optional workspace LAYOUT dropdown (rendered after the style dropdown when
|
|
234
|
+
* given) — the grid-canvas picker composing uniform grids, with the workspace
|
|
235
|
+
* SYNC switches beside it. Everything is read live, so plugin-registered
|
|
236
|
+
* layouts and setting flips appear automatically. */
|
|
229
237
|
layout?: {
|
|
230
238
|
current: string;
|
|
231
|
-
|
|
239
|
+
/** Current layout's picker-canvas shape (null = not canvas-expressible). */
|
|
240
|
+
shape: () => LayoutPickerShape | null;
|
|
241
|
+
/** Registered layouts the canvas cannot express — rendered as labeled rows. */
|
|
242
|
+
presets: () => Array<{
|
|
232
243
|
id: string;
|
|
233
244
|
label: string;
|
|
234
245
|
}>;
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
246
|
+
onSelectGrid: (rows: number, cols: number) => void;
|
|
247
|
+
onSelectPreset: (id: string) => void;
|
|
248
|
+
/** SYNC switch rows (re-read on every open and after each toggle). */
|
|
249
|
+
syncs: () => Array<{
|
|
239
250
|
id: string;
|
|
240
251
|
label: string;
|
|
241
252
|
checked: boolean;
|
|
242
253
|
}>;
|
|
243
|
-
|
|
254
|
+
onToggleSync: (id: string) => void;
|
|
244
255
|
};
|
|
245
256
|
onIndicatorsClick?: () => void;
|
|
246
257
|
/** Unified undo/redo (same stack as Ctrl+Z / Ctrl+Y). Enabled state is pushed with
|
|
@@ -258,7 +269,7 @@ declare class Topbar {
|
|
|
258
269
|
private readonly tfButton;
|
|
259
270
|
private readonly styleButton;
|
|
260
271
|
private layoutButton;
|
|
261
|
-
private
|
|
272
|
+
private layoutPicker;
|
|
262
273
|
private layoutId;
|
|
263
274
|
private readonly tfMenu;
|
|
264
275
|
private readonly styleMenu;
|
|
@@ -286,7 +297,6 @@ declare class Topbar {
|
|
|
286
297
|
/** Reflect the current workspace layout (no-op without the layout dropdown). */
|
|
287
298
|
setLayout(id: string): void;
|
|
288
299
|
private renderLayoutButton;
|
|
289
|
-
private layoutItems;
|
|
290
300
|
private renderStyleButton;
|
|
291
301
|
/** Re-project the contributed topbar actions (call after registrations change). */
|
|
292
302
|
renderActions(): void;
|
|
@@ -372,9 +382,13 @@ declare class Statusline {
|
|
|
372
382
|
|
|
373
383
|
declare class Watermark {
|
|
374
384
|
readonly el: HTMLElement;
|
|
385
|
+
private readonly text;
|
|
386
|
+
private readonly resizeObserver;
|
|
375
387
|
constructor(host: HTMLElement, symbol: string, timeframe: string);
|
|
376
388
|
setVisible(visible: boolean): void;
|
|
377
389
|
update(symbol: string, timeframe: string): void;
|
|
390
|
+
/** Measure the text at the cap and shrink it to the chart's own width. */
|
|
391
|
+
private fit;
|
|
378
392
|
destroy(): void;
|
|
379
393
|
}
|
|
380
394
|
|
package/dist/widget.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Glider, WidgetHistory, localStorageAdapter, decodeState, prefixedSymbol, SymbolPicker, IndicatorPicker, TimeframeQuick, Topbar, PanelDock, ObjectTree, DataWindow, ChartContextMenu, Toast, Watermark, Statusline, Bottombar, ZOOM_IN, ZOOM_OUT, PAN_FAST, ShortcutsHelp, indicatorLedger, sanitizeState, legacyWidgetState, parsePersisted, statuslineInkOf, toolShortcutHints, resolveIndicators, encodeState } 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, legacyWidgetState, loadPersisted, localStorageAdapter, parsePersisted, parseTimeframe, priceStyleLabel, resolveIndicators, sanitizeState, savePersisted, timeframeLabel, timeframeMs } from './chunk-
|
|
3
|
-
import { registerBuiltinChartTypes, resolveTheme, parseSymbol, Vela, normalizeTimezone } from './chunk-
|
|
4
|
-
export { TIMEZONES, normalizeTimezone, tzButtonLabel, tzMenuLabel, tzOffset } from './chunk-
|
|
5
|
-
import { widgetAttachments, legendActionsProviderFor, resolveEngines } from './chunk-
|
|
6
|
-
export { DEFAULT_PANEL_MAX_WIDTH, DEFAULT_PANEL_MIN_WIDTH, DEFAULT_PANEL_ORDER, DEFAULT_PANEL_WIDTH, SidePanel, clampPanelWidth, registerSidePanel, registerWidgetAction, registerWidgetAttachment, sidePanels, unregisterSidePanel, unregisterWidgetAction, unregisterWidgetAttachment, widgetActions, widgetAttachments } from './chunk-
|
|
7
|
-
import { ensureUIHost, KeymapManager, Menu, applyPlotOverlayTokens, isEditableTarget } from './chunk-
|
|
8
|
-
import './chunk-
|
|
9
|
-
import { injectStyles } from './chunk-
|
|
1
|
+
import { Glider, WidgetHistory, localStorageAdapter, decodeState, prefixedSymbol, SymbolPicker, IndicatorPicker, TimeframeQuick, Topbar, PanelDock, ObjectTree, DataWindow, ChartContextMenu, Toast, Watermark, Statusline, Bottombar, ZOOM_IN, ZOOM_OUT, PAN_FAST, ShortcutsHelp, indicatorLedger, sanitizeState, legacyWidgetState, parsePersisted, statuslineInkOf, toolShortcutHints, resolveIndicators, encodeState } from './chunk-5SE4PL3H.js';
|
|
2
|
+
export { Bottombar, ChartContextMenu, DataWindow, IndicatorPicker, ObjectTree, PanelDock, RANGE_PRESETS, ShortcutsHelp, Statusline, SymbolPicker, TimeframeQuick, Topbar, Watermark, dataWindowSections, decimalsFor, decodeState, encodeState, filterSymbols, fmtChange, fmtPrice, legacyWidgetState, loadPersisted, localStorageAdapter, parsePersisted, parseTimeframe, priceStyleLabel, resolveIndicators, sanitizeState, savePersisted, timeframeLabel, timeframeMs } from './chunk-5SE4PL3H.js';
|
|
3
|
+
import { registerBuiltinChartTypes, resolveTheme, parseSymbol, Vela, normalizeTimezone } from './chunk-FNOMKHEZ.js';
|
|
4
|
+
export { TIMEZONES, normalizeTimezone, tzButtonLabel, tzMenuLabel, tzOffset } from './chunk-FNOMKHEZ.js';
|
|
5
|
+
import { widgetAttachments, legendActionsProviderFor, resolveEngines } from './chunk-S6F6SQ2L.js';
|
|
6
|
+
export { DEFAULT_PANEL_MAX_WIDTH, DEFAULT_PANEL_MIN_WIDTH, DEFAULT_PANEL_ORDER, DEFAULT_PANEL_WIDTH, SidePanel, clampPanelWidth, registerSidePanel, registerWidgetAction, registerWidgetAttachment, sidePanels, unregisterSidePanel, unregisterWidgetAction, unregisterWidgetAttachment, widgetActions, widgetAttachments } from './chunk-S6F6SQ2L.js';
|
|
7
|
+
import { ensureUIHost, KeymapManager, Menu, applyPlotOverlayTokens, isEditableTarget } from './chunk-AIW3EJUE.js';
|
|
8
|
+
import './chunk-ULIX6AE2.js';
|
|
9
|
+
import { injectStyles } from './chunk-EP6NDJYK.js';
|
|
10
10
|
|
|
11
11
|
// src/widget/url-state.ts
|
|
12
12
|
var PARAMS = [
|