@luxalgo/vela 0.8.4 → 0.8.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-Byo8pEv0.d.ts → DataProvider-BUdlkx9I.d.ts} +1 -1
- package/dist/{DataProvider-Bw58CjYy.d.cts → DataProvider-DdqMxKdl.d.cts} +1 -1
- package/dist/{chunk-MOJ4T26N.js → chunk-BN4DNS3O.js} +27 -7
- package/dist/{chunk-UNUVPQFW.js → chunk-QYIO37K7.js} +482 -94
- package/dist/{contributions-DOm40g5-.d.cts → contributions-D8xuYc9U.d.cts} +37 -5
- package/dist/{contributions-BY3zSYiZ.d.ts → contributions-P9fBBuY1.d.ts} +37 -5
- package/dist/index.cjs +482 -94
- package/dist/index.d.cts +23 -7
- package/dist/index.d.ts +23 -7
- package/dist/index.js +1 -1
- package/dist/{options-CSXbjMM5.d.cts → options-BI5Tp32b.d.cts} +36 -1
- package/dist/{options-CSXbjMM5.d.ts → options-BI5Tp32b.d.ts} +36 -1
- package/dist/{plugin-CiQVyETg.d.cts → plugin-B8F1nor8.d.cts} +14 -8
- package/dist/{plugin-BDxUhGO3.d.ts → plugin-D5Z-Q6TX.d.ts} +14 -8
- 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-DUBX6Fib.d.cts → statusline-model-CTwtDIca.d.cts} +3 -3
- package/dist/{statusline-model-C9tYXuux.d.ts → statusline-model-D9kWC9X5.d.ts} +3 -3
- package/dist/ui.d.cts +1 -1
- package/dist/ui.d.ts +1 -1
- package/dist/vela.global.js +482 -94
- package/dist/vela.global.min.js +53 -53
- package/dist/widget.cjs +508 -100
- package/dist/widget.d.cts +6 -6
- package/dist/widget.d.ts +6 -6
- package/dist/widget.js +3 -3
- package/dist/workspace.cjs +508 -100
- 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
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { x as Millis, ao as InputSchema, am as IndicatorMeta, P as PriceStyle, O as OHLCV, I as InputValue, l as IndicatorModel, k as MoveTarget, aH as PaneAxis, a_ as SeriesSpec, ak as Fill, H as Background, aQ as PriceLine, a7 as DrawingLine, a3 as DrawingBox, a6 as DrawingLabel, ab as DrawingPolyline, a8 as DrawingLinefill, ag as DrawingTable, h as IndicatorStatus, a as VisibleRange, c as VelaTheme, S as SerializedDrawing, z as DrawingTypeKey, y as SnapMode, a9 as DrawingMode, u as MarkClickEvent, e as IChartRenderer, R as RendererCapabilities, o as LegendActionView, p as LegendCalloutView, U as Unsubscribe, C as CrosshairEvent, r as ClickEvent, A as AxisLongPressEvent, v as DataWindowReadout, n as SymbolPickerFn, W as WallClock, bg as PaneInfo, aj as DrawingsOption, ad as DrawingSeriesGateway, bh as DrawingToolDefaults, bi as DrawingToolTemplate, D as Drawing, s as TimelineMark, t as MarkGroup, b as VelaOptions, F as AddIndicatorOptions, aG as MarketSwitch, E as MarketSnapshot, V as VisibleRangePreset, T as ThemeName } from './options-
|
|
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 { x as Millis, ao as InputSchema, am as IndicatorMeta, P as PriceStyle, O as OHLCV, I as InputValue, l as IndicatorModel, k as MoveTarget, aH as PaneAxis, a_ as SeriesSpec, ak as Fill, H as Background, aQ as PriceLine, a7 as DrawingLine, a3 as DrawingBox, a6 as DrawingLabel, ab as DrawingPolyline, a8 as DrawingLinefill, ag as DrawingTable, h as IndicatorStatus, a as VisibleRange, c as VelaTheme, S as SerializedDrawing, z as DrawingTypeKey, y as SnapMode, a9 as DrawingMode, u as MarkClickEvent, e as IChartRenderer, R as RendererCapabilities, o as LegendActionView, p as LegendCalloutView, U as Unsubscribe, C as CrosshairEvent, r as ClickEvent, A as AxisLongPressEvent, v as DataWindowReadout, n as SymbolPickerFn, W as WallClock, bg as PaneInfo, aj as DrawingsOption, ad as DrawingSeriesGateway, bh as DrawingToolDefaults, bi as DrawingToolTemplate, D as Drawing, s as TimelineMark, t as MarkGroup, b as VelaOptions, F as AddIndicatorOptions, aG as MarketSwitch, E as MarketSnapshot, V as VisibleRangePreset, T as ThemeName } from './options-BI5Tp32b.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-DdqMxKdl.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* A strategy's broker state at ONE bar — the flat summary a host reads while a script
|
|
@@ -502,7 +502,13 @@ interface NativeIndicatorContext {
|
|
|
502
502
|
bars(): readonly OHLCV[];
|
|
503
503
|
/** Market-data access (trades / capabilities) for data-driven natives. */
|
|
504
504
|
readonly data: DataControl;
|
|
505
|
-
/**
|
|
505
|
+
/**
|
|
506
|
+
* Push a fresh render output; the chart mounts it (first call) or patches it (subsequent).
|
|
507
|
+
* Series payloads are index-aligned: one slot per bar of `bars()` AS IT STANDS AT THE
|
|
508
|
+
* CALL, first slot on its first bar. The chart keeps an emitted output on those bars
|
|
509
|
+
* when history later lands in front of them (or the oldest bars are trimmed), until the
|
|
510
|
+
* next emit replaces it.
|
|
511
|
+
*/
|
|
506
512
|
emit(out: NativeIndicatorOutput): void;
|
|
507
513
|
/**
|
|
508
514
|
* Push a BESPOKE render payload to the renderer's native layer for this indicator's type (for a
|
|
@@ -521,7 +527,8 @@ interface NativeIndicatorContext {
|
|
|
521
527
|
interface NativeIndicator {
|
|
522
528
|
/** Begin: compute + emit the first output. */
|
|
523
529
|
start(ctx: NativeIndicatorContext, inputs: Record<string, InputValue>): void;
|
|
524
|
-
/**
|
|
530
|
+
/** The bars changed — a live tick, older history landing, or the candles re-derived
|
|
531
|
+
* by a price style — recompute + emit. */
|
|
525
532
|
onBars(): void;
|
|
526
533
|
/** The viewport changed (scroll/zoom) — for range-aware natives (see `reactsToViewport`). */
|
|
527
534
|
onViewport(range: VisibleRange): void;
|
|
@@ -533,7 +540,10 @@ interface NativeIndicator {
|
|
|
533
540
|
suspend(): void;
|
|
534
541
|
/** Shown again — resume + re-emit. */
|
|
535
542
|
resume(): void;
|
|
536
|
-
/** Removed
|
|
543
|
+
/** Removed, or replaced by a fresh instance (a market switch stops it as the switch
|
|
544
|
+
* begins) — full teardown (clear caches, stop timers). Only ever called after `start`.
|
|
545
|
+
* Pushes made inside `stop()` still land (a layer-backed native clears its channel
|
|
546
|
+
* here); once it returns, the context drops every push and emit. */
|
|
537
547
|
stop(): void;
|
|
538
548
|
}
|
|
539
549
|
/**
|
|
@@ -555,6 +565,17 @@ interface NativeIndicatorDescriptor {
|
|
|
555
565
|
readonly overlay: boolean;
|
|
556
566
|
/** Whether instances react to viewport changes (drives the orchestrator's viewport poke). */
|
|
557
567
|
readonly reactsToViewport?: boolean;
|
|
568
|
+
/**
|
|
569
|
+
* Compute only over the chart's COMPLETE history, the way script indicators do. While
|
|
570
|
+
* the history is still loading (a deep load streaming in, a source healing a cold
|
|
571
|
+
* symbol, a deeper depth being fetched), the instance is not started — its legend row
|
|
572
|
+
* shows a loading state, and `ready` / `indicator:added` wait — or, when it already
|
|
573
|
+
* runs, `onBars()` is held and the previous output stays on its bars. The first
|
|
574
|
+
* compute (or the re-run) comes once the history completes, so values computed over
|
|
575
|
+
* a partial history never paint and never repaint. Absent ⇒ the instance starts on
|
|
576
|
+
* the first bars and `onBars()` fires for every history chunk as it lands.
|
|
577
|
+
*/
|
|
578
|
+
readonly waitsForHistory?: boolean;
|
|
558
579
|
/** Marks the type as beta — surfaced in the catalog so a host "add indicator" UI can badge it. */
|
|
559
580
|
readonly beta?: boolean;
|
|
560
581
|
/**
|
|
@@ -1305,6 +1326,7 @@ interface PaneController {
|
|
|
1305
1326
|
removePaneAndIndicators(paneId: string): void;
|
|
1306
1327
|
collapsePane(paneId: string, collapsed: boolean): void;
|
|
1307
1328
|
maximizePane(paneId: string | null): void;
|
|
1329
|
+
setPaneHeightWeight(paneId: string, weight: number): void;
|
|
1308
1330
|
moveIndicator(id: string, target: MoveTarget): void;
|
|
1309
1331
|
}
|
|
1310
1332
|
/**
|
|
@@ -1327,6 +1349,14 @@ declare class PanesControl {
|
|
|
1327
1349
|
collapse(paneId: string, collapsed?: boolean): this;
|
|
1328
1350
|
/** Maximize one pane to fill the plot, or restore the split (`null`). */
|
|
1329
1351
|
maximize(paneId: string | null): this;
|
|
1352
|
+
/**
|
|
1353
|
+
* Set a pane's height weight: the panes share the plot height in proportion to their
|
|
1354
|
+
* weights, so `setHeightWeight('price', 6)` next to two study panes at 1 gives the price
|
|
1355
|
+
* pane three quarters of the height. The weight sticks until the user drags a separator
|
|
1356
|
+
* or it is set again; a collapsed pane applies it when expanded. `weight` must be a
|
|
1357
|
+
* positive number.
|
|
1358
|
+
*/
|
|
1359
|
+
setHeightWeight(paneId: string, weight: number): this;
|
|
1330
1360
|
/** Move/merge an indicator to a pane — sugar for `handle.moveTo(...)` by id. */
|
|
1331
1361
|
moveIndicator(id: string, target: MoveTarget): this;
|
|
1332
1362
|
private guard;
|
|
@@ -1975,6 +2005,8 @@ interface ContextMenuPointer {
|
|
|
1975
2005
|
time: number | null;
|
|
1976
2006
|
/** The kind of pane the pointer is on; null off the plot. */
|
|
1977
2007
|
paneKind: 'price' | 'study' | null;
|
|
2008
|
+
/** The id of the pane the pointer is on, as `chart.panes.list()` reports it; null off the plot. */
|
|
2009
|
+
paneId: string | null;
|
|
1978
2010
|
}
|
|
1979
2011
|
/** What {@link WidgetContext.addIndicator} takes: a named script, ready to run. */
|
|
1980
2012
|
interface ExternalIndicatorEntry {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { x as Millis, ao as InputSchema, am as IndicatorMeta, P as PriceStyle, O as OHLCV, I as InputValue, l as IndicatorModel, k as MoveTarget, aH as PaneAxis, a_ as SeriesSpec, ak as Fill, H as Background, aQ as PriceLine, a7 as DrawingLine, a3 as DrawingBox, a6 as DrawingLabel, ab as DrawingPolyline, a8 as DrawingLinefill, ag as DrawingTable, h as IndicatorStatus, a as VisibleRange, c as VelaTheme, S as SerializedDrawing, z as DrawingTypeKey, y as SnapMode, a9 as DrawingMode, u as MarkClickEvent, e as IChartRenderer, R as RendererCapabilities, o as LegendActionView, p as LegendCalloutView, U as Unsubscribe, C as CrosshairEvent, r as ClickEvent, A as AxisLongPressEvent, v as DataWindowReadout, n as SymbolPickerFn, W as WallClock, bg as PaneInfo, aj as DrawingsOption, ad as DrawingSeriesGateway, bh as DrawingToolDefaults, bi as DrawingToolTemplate, D as Drawing, s as TimelineMark, t as MarkGroup, b as VelaOptions, F as AddIndicatorOptions, aG as MarketSwitch, E as MarketSnapshot, V as VisibleRangePreset, T as ThemeName } from './options-
|
|
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 { x as Millis, ao as InputSchema, am as IndicatorMeta, P as PriceStyle, O as OHLCV, I as InputValue, l as IndicatorModel, k as MoveTarget, aH as PaneAxis, a_ as SeriesSpec, ak as Fill, H as Background, aQ as PriceLine, a7 as DrawingLine, a3 as DrawingBox, a6 as DrawingLabel, ab as DrawingPolyline, a8 as DrawingLinefill, ag as DrawingTable, h as IndicatorStatus, a as VisibleRange, c as VelaTheme, S as SerializedDrawing, z as DrawingTypeKey, y as SnapMode, a9 as DrawingMode, u as MarkClickEvent, e as IChartRenderer, R as RendererCapabilities, o as LegendActionView, p as LegendCalloutView, U as Unsubscribe, C as CrosshairEvent, r as ClickEvent, A as AxisLongPressEvent, v as DataWindowReadout, n as SymbolPickerFn, W as WallClock, bg as PaneInfo, aj as DrawingsOption, ad as DrawingSeriesGateway, bh as DrawingToolDefaults, bi as DrawingToolTemplate, D as Drawing, s as TimelineMark, t as MarkGroup, b as VelaOptions, F as AddIndicatorOptions, aG as MarketSwitch, E as MarketSnapshot, V as VisibleRangePreset, T as ThemeName } from './options-BI5Tp32b.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-BUdlkx9I.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* A strategy's broker state at ONE bar — the flat summary a host reads while a script
|
|
@@ -502,7 +502,13 @@ interface NativeIndicatorContext {
|
|
|
502
502
|
bars(): readonly OHLCV[];
|
|
503
503
|
/** Market-data access (trades / capabilities) for data-driven natives. */
|
|
504
504
|
readonly data: DataControl;
|
|
505
|
-
/**
|
|
505
|
+
/**
|
|
506
|
+
* Push a fresh render output; the chart mounts it (first call) or patches it (subsequent).
|
|
507
|
+
* Series payloads are index-aligned: one slot per bar of `bars()` AS IT STANDS AT THE
|
|
508
|
+
* CALL, first slot on its first bar. The chart keeps an emitted output on those bars
|
|
509
|
+
* when history later lands in front of them (or the oldest bars are trimmed), until the
|
|
510
|
+
* next emit replaces it.
|
|
511
|
+
*/
|
|
506
512
|
emit(out: NativeIndicatorOutput): void;
|
|
507
513
|
/**
|
|
508
514
|
* Push a BESPOKE render payload to the renderer's native layer for this indicator's type (for a
|
|
@@ -521,7 +527,8 @@ interface NativeIndicatorContext {
|
|
|
521
527
|
interface NativeIndicator {
|
|
522
528
|
/** Begin: compute + emit the first output. */
|
|
523
529
|
start(ctx: NativeIndicatorContext, inputs: Record<string, InputValue>): void;
|
|
524
|
-
/**
|
|
530
|
+
/** The bars changed — a live tick, older history landing, or the candles re-derived
|
|
531
|
+
* by a price style — recompute + emit. */
|
|
525
532
|
onBars(): void;
|
|
526
533
|
/** The viewport changed (scroll/zoom) — for range-aware natives (see `reactsToViewport`). */
|
|
527
534
|
onViewport(range: VisibleRange): void;
|
|
@@ -533,7 +540,10 @@ interface NativeIndicator {
|
|
|
533
540
|
suspend(): void;
|
|
534
541
|
/** Shown again — resume + re-emit. */
|
|
535
542
|
resume(): void;
|
|
536
|
-
/** Removed
|
|
543
|
+
/** Removed, or replaced by a fresh instance (a market switch stops it as the switch
|
|
544
|
+
* begins) — full teardown (clear caches, stop timers). Only ever called after `start`.
|
|
545
|
+
* Pushes made inside `stop()` still land (a layer-backed native clears its channel
|
|
546
|
+
* here); once it returns, the context drops every push and emit. */
|
|
537
547
|
stop(): void;
|
|
538
548
|
}
|
|
539
549
|
/**
|
|
@@ -555,6 +565,17 @@ interface NativeIndicatorDescriptor {
|
|
|
555
565
|
readonly overlay: boolean;
|
|
556
566
|
/** Whether instances react to viewport changes (drives the orchestrator's viewport poke). */
|
|
557
567
|
readonly reactsToViewport?: boolean;
|
|
568
|
+
/**
|
|
569
|
+
* Compute only over the chart's COMPLETE history, the way script indicators do. While
|
|
570
|
+
* the history is still loading (a deep load streaming in, a source healing a cold
|
|
571
|
+
* symbol, a deeper depth being fetched), the instance is not started — its legend row
|
|
572
|
+
* shows a loading state, and `ready` / `indicator:added` wait — or, when it already
|
|
573
|
+
* runs, `onBars()` is held and the previous output stays on its bars. The first
|
|
574
|
+
* compute (or the re-run) comes once the history completes, so values computed over
|
|
575
|
+
* a partial history never paint and never repaint. Absent ⇒ the instance starts on
|
|
576
|
+
* the first bars and `onBars()` fires for every history chunk as it lands.
|
|
577
|
+
*/
|
|
578
|
+
readonly waitsForHistory?: boolean;
|
|
558
579
|
/** Marks the type as beta — surfaced in the catalog so a host "add indicator" UI can badge it. */
|
|
559
580
|
readonly beta?: boolean;
|
|
560
581
|
/**
|
|
@@ -1305,6 +1326,7 @@ interface PaneController {
|
|
|
1305
1326
|
removePaneAndIndicators(paneId: string): void;
|
|
1306
1327
|
collapsePane(paneId: string, collapsed: boolean): void;
|
|
1307
1328
|
maximizePane(paneId: string | null): void;
|
|
1329
|
+
setPaneHeightWeight(paneId: string, weight: number): void;
|
|
1308
1330
|
moveIndicator(id: string, target: MoveTarget): void;
|
|
1309
1331
|
}
|
|
1310
1332
|
/**
|
|
@@ -1327,6 +1349,14 @@ declare class PanesControl {
|
|
|
1327
1349
|
collapse(paneId: string, collapsed?: boolean): this;
|
|
1328
1350
|
/** Maximize one pane to fill the plot, or restore the split (`null`). */
|
|
1329
1351
|
maximize(paneId: string | null): this;
|
|
1352
|
+
/**
|
|
1353
|
+
* Set a pane's height weight: the panes share the plot height in proportion to their
|
|
1354
|
+
* weights, so `setHeightWeight('price', 6)` next to two study panes at 1 gives the price
|
|
1355
|
+
* pane three quarters of the height. The weight sticks until the user drags a separator
|
|
1356
|
+
* or it is set again; a collapsed pane applies it when expanded. `weight` must be a
|
|
1357
|
+
* positive number.
|
|
1358
|
+
*/
|
|
1359
|
+
setHeightWeight(paneId: string, weight: number): this;
|
|
1330
1360
|
/** Move/merge an indicator to a pane — sugar for `handle.moveTo(...)` by id. */
|
|
1331
1361
|
moveIndicator(id: string, target: MoveTarget): this;
|
|
1332
1362
|
private guard;
|
|
@@ -1975,6 +2005,8 @@ interface ContextMenuPointer {
|
|
|
1975
2005
|
time: number | null;
|
|
1976
2006
|
/** The kind of pane the pointer is on; null off the plot. */
|
|
1977
2007
|
paneKind: 'price' | 'study' | null;
|
|
2008
|
+
/** The id of the pane the pointer is on, as `chart.panes.list()` reports it; null off the plot. */
|
|
2009
|
+
paneId: string | null;
|
|
1978
2010
|
}
|
|
1979
2011
|
/** What {@link WidgetContext.addIndicator} takes: a named script, ready to run. */
|
|
1980
2012
|
interface ExternalIndicatorEntry {
|