@luxalgo/vela 0.6.15 → 0.6.17
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/README.md +12 -1
- package/dist/{DataProvider-XLdJB86x.d.ts → DataProvider-B-Jz59Rf.d.ts} +1 -1
- package/dist/{DataProvider-xH2VBcFT.d.cts → DataProvider-OfR3fXg9.d.cts} +1 -1
- package/dist/{chunk-6DPAYEGO.js → chunk-CAFCLMPF.js} +1 -0
- package/dist/chunk-FE6V2YAQ.js +1 -0
- package/dist/{chunk-32A7KHFM.js → chunk-IFJJPXSV.js} +8 -2
- package/dist/{chunk-7C7NWEXH.js → chunk-OSZDSH7F.js} +83 -59
- package/dist/{chunk-MWDNPGU3.js → chunk-T5Z5YUCF.js} +23 -16
- package/dist/{chunk-MWS4CUJL.js → chunk-XCBJU674.js} +2 -2
- package/dist/{chunk-J5QIR2Z3.js → chunk-YCD72KGK.js} +2543 -159
- package/dist/{contributions-x7iamlnd.d.cts → contributions-C3b0Sx5P.d.cts} +29 -13
- package/dist/{contributions-h5BzEiV2.d.ts → contributions-Swzz10fG.d.ts} +29 -13
- package/dist/index.cjs +2746 -355
- package/dist/index.d.cts +15 -6
- package/dist/index.d.ts +15 -6
- package/dist/index.js +5 -5
- package/dist/{options-bdSAtp7y.d.ts → options-CX1lSYWA.d.cts} +12 -2
- package/dist/{options-bdSAtp7y.d.cts → options-CX1lSYWA.d.ts} +12 -2
- package/dist/{plugin-2sJcf5mk.d.cts → plugin-BjnEE1zA.d.cts} +3 -3
- package/dist/{plugin-BLaNPh55.d.ts → plugin-mvddudqd.d.ts} +3 -3
- package/dist/plugin.cjs +1 -0
- package/dist/plugin.d.cts +4 -4
- package/dist/plugin.d.ts +4 -4
- package/dist/plugin.js +3 -3
- 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--tH0VWCy.d.cts → statusline-model-D91cU2fF.d.cts} +3 -3
- package/dist/{statusline-model-CLpaO3Dl.d.ts → statusline-model-IURCya0H.d.ts} +3 -3
- package/dist/ui.cjs +23 -15
- 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 +2600 -209
- package/dist/vela.global.min.js +52 -55
- package/dist/widget.cjs +2663 -241
- package/dist/widget.d.cts +6 -6
- package/dist/widget.d.ts +6 -6
- package/dist/widget.js +7 -7
- package/dist/workspace.cjs +2663 -241
- package/dist/workspace.d.cts +25 -14
- package/dist/workspace.d.ts +25 -14
- package/dist/workspace.js +6 -6
- package/package.json +1 -1
- package/dist/chunk-H26BEHF4.js +0 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { u 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 { u as Millis, aj as InputSchema, ah as IndicatorMeta, P as PriceStyle, O as OHLCV, I as InputValue, l as IndicatorModel, k as MoveTarget, av as PaneAxis, aI as SeriesSpec, af as Fill, B as Background, aA as PriceLine, a2 as DrawingLine, _ as DrawingBox, a1 as DrawingLabel, a6 as DrawingPolyline, a3 as DrawingLinefill, ab as DrawingTable, h as IndicatorStatus, a as VisibleRange, c as VelaTheme, S as SerializedDrawing, w as DrawingTypeKey, v as SnapMode, a4 as DrawingMode, e as IChartRenderer, R as RendererCapabilities, o as LegendActionView, p as LegendCalloutView, U as Unsubscribe, C as CrosshairEvent, A as AxisLongPressEvent, s as DataWindowReadout, n as SymbolPickerFn, aX as PaneInfo, ae as DrawingsOption, a8 as DrawingSeriesGateway, D as Drawing, b as VelaOptions, y as AddIndicatorOptions, au as MarketSwitch, at as MarketSnapshot, V as VisibleRangePreset, T as ThemeName } from './options-CX1lSYWA.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-OfR3fXg9.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* A strategy's broker state at ONE bar — the flat summary a host reads while a script
|
|
@@ -286,6 +286,9 @@ interface IndicatorHandle {
|
|
|
286
286
|
* (core-computed) indicator — there is no script to show. What a host editor
|
|
287
287
|
* opens when a legend action asks for "the code behind this row". */
|
|
288
288
|
readonly source?: string;
|
|
289
|
+
/** The registered type of a NATIVE (core-computed) indicator — `undefined` for a
|
|
290
|
+
* script indicator. The two are exclusive: a handle has a `source` or a `nativeType`. */
|
|
291
|
+
readonly nativeType?: string;
|
|
289
292
|
/** Inputs parsed from the Pine source (populated once the script is prepared). */
|
|
290
293
|
readonly inputs: readonly InputSchema[];
|
|
291
294
|
/** Declaration-props schema (a strategy's `initial_capital`, an indicator's
|
|
@@ -499,6 +502,13 @@ interface NativeIndicatorDescriptor {
|
|
|
499
502
|
readonly reactsToViewport?: boolean;
|
|
500
503
|
/** Marks the type as beta — surfaced in the catalog so a host "add indicator" UI can badge it. */
|
|
501
504
|
readonly beta?: boolean;
|
|
505
|
+
/**
|
|
506
|
+
* Allow several instances of this type on one chart — every add creates a new one (a study
|
|
507
|
+
* like a moving average is typically stacked at different lengths). Absent ⇒ SINGLE instance
|
|
508
|
+
* per type: a second add returns the existing handle. A type that pushes a bespoke layer
|
|
509
|
+
* payload through `pushData` must stay single-instance (the layer is keyed by type).
|
|
510
|
+
*/
|
|
511
|
+
readonly multiInstance?: boolean;
|
|
502
512
|
inputsSchema(): InputSchema[];
|
|
503
513
|
defaultInputs(): Record<string, InputValue>;
|
|
504
514
|
create(): NativeIndicator;
|
|
@@ -510,8 +520,8 @@ interface NativeIndicatorDescriptor {
|
|
|
510
520
|
}
|
|
511
521
|
/**
|
|
512
522
|
* One entry in the "add native indicator" catalog: the type's static metadata plus its live state
|
|
513
|
-
* on a specific chart — whether it applies to the current symbol (`supported`) and whether
|
|
514
|
-
* instance is already present (`present
|
|
523
|
+
* on a specific chart — whether it applies to the current symbol (`supported`) and whether at
|
|
524
|
+
* least one instance is already present (`present`). Produced by
|
|
515
525
|
* `chart.availableNativeIndicators()`.
|
|
516
526
|
*/
|
|
517
527
|
interface NativeIndicatorInfo {
|
|
@@ -519,8 +529,11 @@ interface NativeIndicatorInfo {
|
|
|
519
529
|
readonly title: string;
|
|
520
530
|
/** Applies to the current symbol (a type may need data the provider lacks). */
|
|
521
531
|
readonly supported: boolean;
|
|
522
|
-
/**
|
|
532
|
+
/** At least one instance is on the chart. For a single-instance type a second add is a no-op;
|
|
533
|
+
* a `multiInstance` type adds another instance regardless. */
|
|
523
534
|
readonly present: boolean;
|
|
535
|
+
/** The type allows several instances per chart (see `NativeIndicatorDescriptor.multiInstance`). */
|
|
536
|
+
readonly multiInstance?: boolean;
|
|
524
537
|
/** The type is flagged beta (for a badge in the picker). */
|
|
525
538
|
readonly beta?: boolean;
|
|
526
539
|
}
|
|
@@ -1344,23 +1357,26 @@ declare class Vela {
|
|
|
1344
1357
|
addIndicator(source: string, options?: AddIndicatorOptions): IndicatorHandle;
|
|
1345
1358
|
/**
|
|
1346
1359
|
* Add a built-in NATIVE indicator (core-computed, no scripting engine) by registered `type` —
|
|
1347
|
-
* e.g. `'vpvr'`. It becomes a first-class indicator (legend row, settings, hide,
|
|
1348
|
-
* events)
|
|
1349
|
-
*
|
|
1360
|
+
* e.g. `'vpvr'` or `'sma'`. It becomes a first-class indicator (legend row, settings, hide,
|
|
1361
|
+
* remove, events). Layer-backed types (`'volume'`, `'vpvr'`) are single-instance — a second
|
|
1362
|
+
* call returns the existing handle; the classic studies allow several instances, so each call
|
|
1363
|
+
* adds one more. Returns a fail-soft handle for an unregistered type. Native renderer only.
|
|
1350
1364
|
*/
|
|
1351
1365
|
addNativeIndicator(type: string, options?: {
|
|
1352
1366
|
inputs?: Record<string, InputValue>;
|
|
1353
1367
|
}): IndicatorHandle;
|
|
1354
1368
|
/**
|
|
1355
1369
|
* The catalog of built-in native indicators with their live state on this chart — each entry's
|
|
1356
|
-
* `type`, `title`, whether it `supported`s the current symbol,
|
|
1357
|
-
*
|
|
1358
|
-
* Lets a host "add indicator" UI list them, gate unsupported
|
|
1359
|
-
*
|
|
1370
|
+
* `type`, `title`, whether it `supported`s the current symbol, whether it's already `present`,
|
|
1371
|
+
* and whether it allows several instances (`multiInstance`; otherwise a second
|
|
1372
|
+
* `addNativeIndicator` is a no-op). Lets a host "add indicator" UI list them, gate unsupported
|
|
1373
|
+
* ones, and de-duplicate the single-instance ones. Async because support may probe the
|
|
1374
|
+
* provider (a type may need data the symbol lacks).
|
|
1360
1375
|
*/
|
|
1361
1376
|
availableNativeIndicators(): Promise<NativeIndicatorInfo[]>;
|
|
1362
1377
|
/**
|
|
1363
|
-
* The native-indicator types PRESENT on the chart right now
|
|
1378
|
+
* The native-indicator types PRESENT on the chart right now, one entry per instance (a
|
|
1379
|
+
* multi-instance type repeats) — the synchronous slice of
|
|
1364
1380
|
* {@link availableNativeIndicators} (only support probing is async; presence never is).
|
|
1365
1381
|
* Persistence snapshots read this: an unload-time flush must see an add/remove that
|
|
1366
1382
|
* happened microseconds ago, which an async catalog mirror cannot guarantee.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { u 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 { u as Millis, aj as InputSchema, ah as IndicatorMeta, P as PriceStyle, O as OHLCV, I as InputValue, l as IndicatorModel, k as MoveTarget, av as PaneAxis, aI as SeriesSpec, af as Fill, B as Background, aA as PriceLine, a2 as DrawingLine, _ as DrawingBox, a1 as DrawingLabel, a6 as DrawingPolyline, a3 as DrawingLinefill, ab as DrawingTable, h as IndicatorStatus, a as VisibleRange, c as VelaTheme, S as SerializedDrawing, w as DrawingTypeKey, v as SnapMode, a4 as DrawingMode, e as IChartRenderer, R as RendererCapabilities, o as LegendActionView, p as LegendCalloutView, U as Unsubscribe, C as CrosshairEvent, A as AxisLongPressEvent, s as DataWindowReadout, n as SymbolPickerFn, aX as PaneInfo, ae as DrawingsOption, a8 as DrawingSeriesGateway, D as Drawing, b as VelaOptions, y as AddIndicatorOptions, au as MarketSwitch, at as MarketSnapshot, V as VisibleRangePreset, T as ThemeName } from './options-CX1lSYWA.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-B-Jz59Rf.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* A strategy's broker state at ONE bar — the flat summary a host reads while a script
|
|
@@ -286,6 +286,9 @@ interface IndicatorHandle {
|
|
|
286
286
|
* (core-computed) indicator — there is no script to show. What a host editor
|
|
287
287
|
* opens when a legend action asks for "the code behind this row". */
|
|
288
288
|
readonly source?: string;
|
|
289
|
+
/** The registered type of a NATIVE (core-computed) indicator — `undefined` for a
|
|
290
|
+
* script indicator. The two are exclusive: a handle has a `source` or a `nativeType`. */
|
|
291
|
+
readonly nativeType?: string;
|
|
289
292
|
/** Inputs parsed from the Pine source (populated once the script is prepared). */
|
|
290
293
|
readonly inputs: readonly InputSchema[];
|
|
291
294
|
/** Declaration-props schema (a strategy's `initial_capital`, an indicator's
|
|
@@ -499,6 +502,13 @@ interface NativeIndicatorDescriptor {
|
|
|
499
502
|
readonly reactsToViewport?: boolean;
|
|
500
503
|
/** Marks the type as beta — surfaced in the catalog so a host "add indicator" UI can badge it. */
|
|
501
504
|
readonly beta?: boolean;
|
|
505
|
+
/**
|
|
506
|
+
* Allow several instances of this type on one chart — every add creates a new one (a study
|
|
507
|
+
* like a moving average is typically stacked at different lengths). Absent ⇒ SINGLE instance
|
|
508
|
+
* per type: a second add returns the existing handle. A type that pushes a bespoke layer
|
|
509
|
+
* payload through `pushData` must stay single-instance (the layer is keyed by type).
|
|
510
|
+
*/
|
|
511
|
+
readonly multiInstance?: boolean;
|
|
502
512
|
inputsSchema(): InputSchema[];
|
|
503
513
|
defaultInputs(): Record<string, InputValue>;
|
|
504
514
|
create(): NativeIndicator;
|
|
@@ -510,8 +520,8 @@ interface NativeIndicatorDescriptor {
|
|
|
510
520
|
}
|
|
511
521
|
/**
|
|
512
522
|
* One entry in the "add native indicator" catalog: the type's static metadata plus its live state
|
|
513
|
-
* on a specific chart — whether it applies to the current symbol (`supported`) and whether
|
|
514
|
-
* instance is already present (`present
|
|
523
|
+
* on a specific chart — whether it applies to the current symbol (`supported`) and whether at
|
|
524
|
+
* least one instance is already present (`present`). Produced by
|
|
515
525
|
* `chart.availableNativeIndicators()`.
|
|
516
526
|
*/
|
|
517
527
|
interface NativeIndicatorInfo {
|
|
@@ -519,8 +529,11 @@ interface NativeIndicatorInfo {
|
|
|
519
529
|
readonly title: string;
|
|
520
530
|
/** Applies to the current symbol (a type may need data the provider lacks). */
|
|
521
531
|
readonly supported: boolean;
|
|
522
|
-
/**
|
|
532
|
+
/** At least one instance is on the chart. For a single-instance type a second add is a no-op;
|
|
533
|
+
* a `multiInstance` type adds another instance regardless. */
|
|
523
534
|
readonly present: boolean;
|
|
535
|
+
/** The type allows several instances per chart (see `NativeIndicatorDescriptor.multiInstance`). */
|
|
536
|
+
readonly multiInstance?: boolean;
|
|
524
537
|
/** The type is flagged beta (for a badge in the picker). */
|
|
525
538
|
readonly beta?: boolean;
|
|
526
539
|
}
|
|
@@ -1344,23 +1357,26 @@ declare class Vela {
|
|
|
1344
1357
|
addIndicator(source: string, options?: AddIndicatorOptions): IndicatorHandle;
|
|
1345
1358
|
/**
|
|
1346
1359
|
* Add a built-in NATIVE indicator (core-computed, no scripting engine) by registered `type` —
|
|
1347
|
-
* e.g. `'vpvr'`. It becomes a first-class indicator (legend row, settings, hide,
|
|
1348
|
-
* events)
|
|
1349
|
-
*
|
|
1360
|
+
* e.g. `'vpvr'` or `'sma'`. It becomes a first-class indicator (legend row, settings, hide,
|
|
1361
|
+
* remove, events). Layer-backed types (`'volume'`, `'vpvr'`) are single-instance — a second
|
|
1362
|
+
* call returns the existing handle; the classic studies allow several instances, so each call
|
|
1363
|
+
* adds one more. Returns a fail-soft handle for an unregistered type. Native renderer only.
|
|
1350
1364
|
*/
|
|
1351
1365
|
addNativeIndicator(type: string, options?: {
|
|
1352
1366
|
inputs?: Record<string, InputValue>;
|
|
1353
1367
|
}): IndicatorHandle;
|
|
1354
1368
|
/**
|
|
1355
1369
|
* The catalog of built-in native indicators with their live state on this chart — each entry's
|
|
1356
|
-
* `type`, `title`, whether it `supported`s the current symbol,
|
|
1357
|
-
*
|
|
1358
|
-
* Lets a host "add indicator" UI list them, gate unsupported
|
|
1359
|
-
*
|
|
1370
|
+
* `type`, `title`, whether it `supported`s the current symbol, whether it's already `present`,
|
|
1371
|
+
* and whether it allows several instances (`multiInstance`; otherwise a second
|
|
1372
|
+
* `addNativeIndicator` is a no-op). Lets a host "add indicator" UI list them, gate unsupported
|
|
1373
|
+
* ones, and de-duplicate the single-instance ones. Async because support may probe the
|
|
1374
|
+
* provider (a type may need data the symbol lacks).
|
|
1360
1375
|
*/
|
|
1361
1376
|
availableNativeIndicators(): Promise<NativeIndicatorInfo[]>;
|
|
1362
1377
|
/**
|
|
1363
|
-
* The native-indicator types PRESENT on the chart right now
|
|
1378
|
+
* The native-indicator types PRESENT on the chart right now, one entry per instance (a
|
|
1379
|
+
* multi-instance type repeats) — the synchronous slice of
|
|
1364
1380
|
* {@link availableNativeIndicators} (only support probing is async; presence never is).
|
|
1365
1381
|
* Persistence snapshots read this: an unload-time flush must see an add/remove that
|
|
1366
1382
|
* happened microseconds ago, which an async catalog mirror cannot guarantee.
|