@luxalgo/vela 0.5.1 → 0.5.2
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-DGesjOJT.d.ts → DataProvider-DTOEXKTI.d.ts} +1 -1
- package/dist/{DataProvider-BBQ3Hr21.d.cts → DataProvider-gnzv-dgc.d.cts} +1 -1
- package/dist/{chunk-ULIX6AE2.js → chunk-ATPU5CI6.js} +1 -1
- package/dist/{chunk-S6F6SQ2L.js → chunk-B5TIKQJ5.js} +60 -7
- package/dist/{chunk-EP6NDJYK.js → chunk-LJLZR44Y.js} +4 -2
- package/dist/{chunk-AIW3EJUE.js → chunk-P556H6EA.js} +329 -10
- package/dist/{chunk-FNOMKHEZ.js → chunk-RRFGWZNJ.js} +1321 -363
- package/dist/{chunk-5SE4PL3H.js → chunk-Y7TK4ZWK.js} +1363 -48
- package/dist/{contributions-BlV3kb0O.d.cts → contributions-Ci_i3IN2.d.cts} +33 -2
- package/dist/{contributions-6N0rbrPC.d.ts → contributions-b6AVrqqG.d.ts} +33 -2
- package/dist/{history-DX3Zne3a.d.cts → history-Cf1lVsap.d.cts} +15 -3
- package/dist/{history-BTd52YMA.d.ts → history-Ci3M0xLV.d.ts} +15 -3
- package/dist/index.cjs +1374 -366
- package/dist/index.d.cts +52 -19
- package/dist/index.d.ts +52 -19
- package/dist/index.js +4 -4
- package/dist/{options-DbQholFV.d.cts → options-XTBpbx0s.d.cts} +47 -1
- package/dist/{options-DbQholFV.d.ts → options-XTBpbx0s.d.ts} +47 -1
- package/dist/{plugin-TN3n-9YN.d.ts → plugin-CnNd7cuF.d.ts} +172 -25
- package/dist/{plugin-O34MbXf-.d.cts → plugin-DfH4Y-Om.d.cts} +172 -25
- package/dist/plugin.cjs +53 -7
- 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 +332 -9
- package/dist/ui.d.cts +64 -2
- package/dist/ui.d.ts +64 -2
- package/dist/ui.js +3 -3
- package/dist/vela.global.js +1374 -366
- package/dist/vela.global.min.js +84 -34
- package/dist/widget.cjs +3348 -550
- package/dist/widget.d.cts +65 -7
- package/dist/widget.d.ts +65 -7
- package/dist/widget.js +169 -18
- package/dist/workspace.cjs +4251 -1400
- package/dist/workspace.d.cts +45 -9
- package/dist/workspace.d.ts +45 -9
- package/dist/workspace.js +226 -22
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { s as Millis,
|
|
2
|
-
import { S as SymbolInfo, B as BarRange, M as MarketDataFeed, D as DataProvider, P as ProviderInfo, a as SymbolDescriptor, b as ProviderCapabilities } from './DataProvider-
|
|
1
|
+
import { s as Millis, ac as InputSchema, ab as IndicatorMeta, P as PriceStyle, O as OHLCV, l as InputValue, j as IndicatorModel, i as MoveTarget, ay as SeriesSpec, a9 as Fill, B as Background, aq as PriceLine, $ as DrawingLine, X as DrawingBox, _ as DrawingLabel, a3 as DrawingPolyline, a0 as DrawingLinefill, a5 as DrawingTable, f as IndicatorStatus, a as VisibleRange, c as VelaTheme, S as SerializedDrawing, u as DrawingTypeKey, t as SnapMode, a1 as DrawingMode, I as IChartRenderer, R as RendererCapabilities, n as LegendActionView, U as Unsubscribe, C as CrosshairEvent, A as AxisLongPressEvent, q as DataWindowReadout, m as SymbolPickerFn, aK as PaneInfo, a8 as DrawingsOption, D as Drawing, b as VelaOptions, w as AddIndicatorOptions, am as MarketSwitch, al as MarketSnapshot, V as VisibleRangePreset, T as ThemeName } from './options-XTBpbx0s.cjs';
|
|
2
|
+
import { S as SymbolInfo, B as BarRange, M as MarketDataFeed, D as DataProvider, P as ProviderInfo, a as SymbolDescriptor, b as ProviderCapabilities } from './DataProvider-gnzv-dgc.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* A strategy's broker state at ONE bar — the flat summary a host reads while a script
|
|
@@ -434,7 +434,13 @@ interface NativeIndicator {
|
|
|
434
434
|
*/
|
|
435
435
|
interface NativeIndicatorDescriptor {
|
|
436
436
|
readonly type: string;
|
|
437
|
+
/** Full display name (picker, settings header, handle title). */
|
|
437
438
|
readonly title: string;
|
|
439
|
+
/**
|
|
440
|
+
* Compact name for the on-chart legend chip. Absent ⇒ {@link title}. The picker and
|
|
441
|
+
* settings dialog keep the full title either way.
|
|
442
|
+
*/
|
|
443
|
+
readonly shortTitle?: string;
|
|
438
444
|
readonly paneHint: 'price' | 'new';
|
|
439
445
|
readonly overlay: boolean;
|
|
440
446
|
/** Whether instances react to viewport changes (drives the orchestrator's viewport poke). */
|
|
@@ -821,6 +827,20 @@ declare class RendererControl {
|
|
|
821
827
|
* degradation as the sync ghost crosshair.
|
|
822
828
|
*/
|
|
823
829
|
setLegendActions(provider: ((indicatorId: string) => LegendActionView[]) | null): void;
|
|
830
|
+
/**
|
|
831
|
+
* Replace the indicator legend's fold toggle with a host action (or restore it with
|
|
832
|
+
* `null`) — multi-chart shells point the chip at their indicator overview instead of
|
|
833
|
+
* unfolding rows in place. Silent no-op on a renderer without a foldable legend.
|
|
834
|
+
*/
|
|
835
|
+
setLegendOverviewAction(action: (() => void) | null): this;
|
|
836
|
+
/** Whether the active renderer can open a per-indicator settings dialog. */
|
|
837
|
+
get supportsIndicatorSettings(): boolean;
|
|
838
|
+
/**
|
|
839
|
+
* Open one indicator's settings dialog — the programmatic twin of the legend gear
|
|
840
|
+
* (see {@link supportsIndicatorSettings}). Silent no-op without the seam or for an
|
|
841
|
+
* unknown id.
|
|
842
|
+
*/
|
|
843
|
+
openIndicatorSettings(indicatorId: string): this;
|
|
824
844
|
/**
|
|
825
845
|
* Export the current chart as a PNG data URL, or null if the active renderer
|
|
826
846
|
* doesn't support it (warns). DOM overlays (tables, legend) are not included.
|
|
@@ -851,6 +871,8 @@ declare class RendererControl {
|
|
|
851
871
|
* public seam host chrome (status lines, data windows) builds on.
|
|
852
872
|
*/
|
|
853
873
|
onCrosshairMove(cb: (e: CrosshairEvent) => void): Unsubscribe;
|
|
874
|
+
/** Touch long-press on a price or time axis strip — silent no-op without the seam. */
|
|
875
|
+
onAxisLongPress(cb: (e: AxisLongPressEvent) => void): Unsubscribe;
|
|
854
876
|
/**
|
|
855
877
|
* The current data-window readout — the hovered bar's date/time and OHLCV plus every
|
|
856
878
|
* indicator's value there, each already formatted on its pane's scale (the latest bar when
|
|
@@ -896,6 +918,10 @@ declare class RendererControl {
|
|
|
896
918
|
title: string;
|
|
897
919
|
rows: readonly unknown[];
|
|
898
920
|
}>): this;
|
|
921
|
+
/** Tell the renderer's own chrome which size class the host shell is in —
|
|
922
|
+
* `'mobile'` switches its dialogs/toolbars to the touch-first presentation.
|
|
923
|
+
* Silent no-op on a renderer without adaptive chrome. */
|
|
924
|
+
setLayoutMode(mode: 'mobile' | 'desktop'): this;
|
|
899
925
|
}
|
|
900
926
|
|
|
901
927
|
/** Callback surface `PanesControl` uses to drive the orchestrator. */
|
|
@@ -1400,6 +1426,11 @@ interface WidgetActionDescriptor {
|
|
|
1400
1426
|
icon?: string;
|
|
1401
1427
|
/** Sort key within the contributed group (ascending; default 0). */
|
|
1402
1428
|
order?: number;
|
|
1429
|
+
/** Topbar only: which cluster the button joins. `'right'` (default) is the
|
|
1430
|
+
* right-hand tools cluster; `'left'` puts it with the PRIMARY chrome buttons —
|
|
1431
|
+
* right after the style/layout dropdowns, styled like them (the spot and look of
|
|
1432
|
+
* the built-in Indicators button, for actions that replace it). */
|
|
1433
|
+
align?: 'left' | 'right';
|
|
1403
1434
|
/** Runtime gate — omitted ⇒ always shown. */
|
|
1404
1435
|
when?: (ctx: WidgetContext) => boolean;
|
|
1405
1436
|
run: (ctx: WidgetContext) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { s as Millis,
|
|
2
|
-
import { S as SymbolInfo, B as BarRange, M as MarketDataFeed, D as DataProvider, P as ProviderInfo, a as SymbolDescriptor, b as ProviderCapabilities } from './DataProvider-
|
|
1
|
+
import { s as Millis, ac as InputSchema, ab as IndicatorMeta, P as PriceStyle, O as OHLCV, l as InputValue, j as IndicatorModel, i as MoveTarget, ay as SeriesSpec, a9 as Fill, B as Background, aq as PriceLine, $ as DrawingLine, X as DrawingBox, _ as DrawingLabel, a3 as DrawingPolyline, a0 as DrawingLinefill, a5 as DrawingTable, f as IndicatorStatus, a as VisibleRange, c as VelaTheme, S as SerializedDrawing, u as DrawingTypeKey, t as SnapMode, a1 as DrawingMode, I as IChartRenderer, R as RendererCapabilities, n as LegendActionView, U as Unsubscribe, C as CrosshairEvent, A as AxisLongPressEvent, q as DataWindowReadout, m as SymbolPickerFn, aK as PaneInfo, a8 as DrawingsOption, D as Drawing, b as VelaOptions, w as AddIndicatorOptions, am as MarketSwitch, al as MarketSnapshot, V as VisibleRangePreset, T as ThemeName } from './options-XTBpbx0s.js';
|
|
2
|
+
import { S as SymbolInfo, B as BarRange, M as MarketDataFeed, D as DataProvider, P as ProviderInfo, a as SymbolDescriptor, b as ProviderCapabilities } from './DataProvider-DTOEXKTI.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* A strategy's broker state at ONE bar — the flat summary a host reads while a script
|
|
@@ -434,7 +434,13 @@ interface NativeIndicator {
|
|
|
434
434
|
*/
|
|
435
435
|
interface NativeIndicatorDescriptor {
|
|
436
436
|
readonly type: string;
|
|
437
|
+
/** Full display name (picker, settings header, handle title). */
|
|
437
438
|
readonly title: string;
|
|
439
|
+
/**
|
|
440
|
+
* Compact name for the on-chart legend chip. Absent ⇒ {@link title}. The picker and
|
|
441
|
+
* settings dialog keep the full title either way.
|
|
442
|
+
*/
|
|
443
|
+
readonly shortTitle?: string;
|
|
438
444
|
readonly paneHint: 'price' | 'new';
|
|
439
445
|
readonly overlay: boolean;
|
|
440
446
|
/** Whether instances react to viewport changes (drives the orchestrator's viewport poke). */
|
|
@@ -821,6 +827,20 @@ declare class RendererControl {
|
|
|
821
827
|
* degradation as the sync ghost crosshair.
|
|
822
828
|
*/
|
|
823
829
|
setLegendActions(provider: ((indicatorId: string) => LegendActionView[]) | null): void;
|
|
830
|
+
/**
|
|
831
|
+
* Replace the indicator legend's fold toggle with a host action (or restore it with
|
|
832
|
+
* `null`) — multi-chart shells point the chip at their indicator overview instead of
|
|
833
|
+
* unfolding rows in place. Silent no-op on a renderer without a foldable legend.
|
|
834
|
+
*/
|
|
835
|
+
setLegendOverviewAction(action: (() => void) | null): this;
|
|
836
|
+
/** Whether the active renderer can open a per-indicator settings dialog. */
|
|
837
|
+
get supportsIndicatorSettings(): boolean;
|
|
838
|
+
/**
|
|
839
|
+
* Open one indicator's settings dialog — the programmatic twin of the legend gear
|
|
840
|
+
* (see {@link supportsIndicatorSettings}). Silent no-op without the seam or for an
|
|
841
|
+
* unknown id.
|
|
842
|
+
*/
|
|
843
|
+
openIndicatorSettings(indicatorId: string): this;
|
|
824
844
|
/**
|
|
825
845
|
* Export the current chart as a PNG data URL, or null if the active renderer
|
|
826
846
|
* doesn't support it (warns). DOM overlays (tables, legend) are not included.
|
|
@@ -851,6 +871,8 @@ declare class RendererControl {
|
|
|
851
871
|
* public seam host chrome (status lines, data windows) builds on.
|
|
852
872
|
*/
|
|
853
873
|
onCrosshairMove(cb: (e: CrosshairEvent) => void): Unsubscribe;
|
|
874
|
+
/** Touch long-press on a price or time axis strip — silent no-op without the seam. */
|
|
875
|
+
onAxisLongPress(cb: (e: AxisLongPressEvent) => void): Unsubscribe;
|
|
854
876
|
/**
|
|
855
877
|
* The current data-window readout — the hovered bar's date/time and OHLCV plus every
|
|
856
878
|
* indicator's value there, each already formatted on its pane's scale (the latest bar when
|
|
@@ -896,6 +918,10 @@ declare class RendererControl {
|
|
|
896
918
|
title: string;
|
|
897
919
|
rows: readonly unknown[];
|
|
898
920
|
}>): this;
|
|
921
|
+
/** Tell the renderer's own chrome which size class the host shell is in —
|
|
922
|
+
* `'mobile'` switches its dialogs/toolbars to the touch-first presentation.
|
|
923
|
+
* Silent no-op on a renderer without adaptive chrome. */
|
|
924
|
+
setLayoutMode(mode: 'mobile' | 'desktop'): this;
|
|
899
925
|
}
|
|
900
926
|
|
|
901
927
|
/** Callback surface `PanesControl` uses to drive the orchestrator. */
|
|
@@ -1400,6 +1426,11 @@ interface WidgetActionDescriptor {
|
|
|
1400
1426
|
icon?: string;
|
|
1401
1427
|
/** Sort key within the contributed group (ascending; default 0). */
|
|
1402
1428
|
order?: number;
|
|
1429
|
+
/** Topbar only: which cluster the button joins. `'right'` (default) is the
|
|
1430
|
+
* right-hand tools cluster; `'left'` puts it with the PRIMARY chrome buttons —
|
|
1431
|
+
* right after the style/layout dropdowns, styled like them (the spot and look of
|
|
1432
|
+
* the built-in Indicators button, for actions that replace it). */
|
|
1433
|
+
align?: 'left' | 'right';
|
|
1403
1434
|
/** Runtime gate — omitted ⇒ always shown. */
|
|
1404
1435
|
when?: (ctx: WidgetContext) => boolean;
|
|
1405
1436
|
run: (ctx: WidgetContext) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { V as VisibleRangePreset } from './options-
|
|
2
|
-
import { D as DataProvider } from './DataProvider-
|
|
3
|
-
import { S as ScriptingEngine, V as Vela } from './contributions-
|
|
1
|
+
import { V as VisibleRangePreset } from './options-XTBpbx0s.cjs';
|
|
2
|
+
import { D as DataProvider } from './DataProvider-gnzv-dgc.cjs';
|
|
3
|
+
import { S as ScriptingEngine, V as Vela } from './contributions-Ci_i3IN2.cjs';
|
|
4
4
|
|
|
5
5
|
interface RangePreset {
|
|
6
6
|
/** Button label. */
|
|
@@ -134,6 +134,8 @@ interface CellState {
|
|
|
134
134
|
watermark?: boolean;
|
|
135
135
|
/** Indicator titles (the in-chart legend rows) visibility — a per-chart display pref. */
|
|
136
136
|
indicatorTitles?: boolean;
|
|
137
|
+
/** Plot values beside the legend titles visibility — a per-chart display pref. */
|
|
138
|
+
indicatorValues?: boolean;
|
|
137
139
|
/** The renderer's cosmetic config document (`renderer.getConfig()`). */
|
|
138
140
|
rendererConfig?: unknown;
|
|
139
141
|
/** The user-drawings document (`drawings.toJSON()`). */
|
|
@@ -252,6 +254,16 @@ interface VelaShellOptions {
|
|
|
252
254
|
statusline?: boolean;
|
|
253
255
|
watermark?: boolean;
|
|
254
256
|
bottombar?: boolean;
|
|
257
|
+
/** The built-in indicator picker's entry points — the topbar button, the mobile-bar
|
|
258
|
+
* item, and the `/` shortcut. `false` removes them, for hosts that replace the
|
|
259
|
+
* picker with their own indicator UI (e.g. a contributed topbar action opening a
|
|
260
|
+
* custom dialog). The `indicators` manifest still resolves and auto-adds. */
|
|
261
|
+
indicatorPicker?: boolean;
|
|
262
|
+
/** Chrome size class. `'auto'` (default) follows the CONTAINER width plus a
|
|
263
|
+
* coarse-pointer heuristic; `'mobile'` / `'desktop'` pin it. Mobile swaps the
|
|
264
|
+
* topbar + desktop bottombar for one touch-first bottom bar, presents pickers
|
|
265
|
+
* fullscreen and menus as bottom drawers, and enables the touch chart gestures. */
|
|
266
|
+
layoutMode?: 'auto' | 'mobile' | 'desktop';
|
|
255
267
|
/** Focus the chart when the shell mounts so keyboard shortcuts work from the first
|
|
256
268
|
* keystroke — no initial click needed. Default false: an embedded shell must never
|
|
257
269
|
* steal the page's focus from the host's own controls. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { V as VisibleRangePreset } from './options-
|
|
2
|
-
import { D as DataProvider } from './DataProvider-
|
|
3
|
-
import { S as ScriptingEngine, V as Vela } from './contributions-
|
|
1
|
+
import { V as VisibleRangePreset } from './options-XTBpbx0s.js';
|
|
2
|
+
import { D as DataProvider } from './DataProvider-DTOEXKTI.js';
|
|
3
|
+
import { S as ScriptingEngine, V as Vela } from './contributions-b6AVrqqG.js';
|
|
4
4
|
|
|
5
5
|
interface RangePreset {
|
|
6
6
|
/** Button label. */
|
|
@@ -134,6 +134,8 @@ interface CellState {
|
|
|
134
134
|
watermark?: boolean;
|
|
135
135
|
/** Indicator titles (the in-chart legend rows) visibility — a per-chart display pref. */
|
|
136
136
|
indicatorTitles?: boolean;
|
|
137
|
+
/** Plot values beside the legend titles visibility — a per-chart display pref. */
|
|
138
|
+
indicatorValues?: boolean;
|
|
137
139
|
/** The renderer's cosmetic config document (`renderer.getConfig()`). */
|
|
138
140
|
rendererConfig?: unknown;
|
|
139
141
|
/** The user-drawings document (`drawings.toJSON()`). */
|
|
@@ -252,6 +254,16 @@ interface VelaShellOptions {
|
|
|
252
254
|
statusline?: boolean;
|
|
253
255
|
watermark?: boolean;
|
|
254
256
|
bottombar?: boolean;
|
|
257
|
+
/** The built-in indicator picker's entry points — the topbar button, the mobile-bar
|
|
258
|
+
* item, and the `/` shortcut. `false` removes them, for hosts that replace the
|
|
259
|
+
* picker with their own indicator UI (e.g. a contributed topbar action opening a
|
|
260
|
+
* custom dialog). The `indicators` manifest still resolves and auto-adds. */
|
|
261
|
+
indicatorPicker?: boolean;
|
|
262
|
+
/** Chrome size class. `'auto'` (default) follows the CONTAINER width plus a
|
|
263
|
+
* coarse-pointer heuristic; `'mobile'` / `'desktop'` pin it. Mobile swaps the
|
|
264
|
+
* topbar + desktop bottombar for one touch-first bottom bar, presents pickers
|
|
265
|
+
* fullscreen and menus as bottom drawers, and enables the touch chart gestures. */
|
|
266
|
+
layoutMode?: 'auto' | 'mobile' | 'desktop';
|
|
255
267
|
/** Focus the chart when the shell mounts so keyboard shortcuts work from the first
|
|
256
268
|
* keystroke — no initial click needed. Default false: an embedded shell must never
|
|
257
269
|
* steal the page's focus from the host's own controls. */
|