@luxalgo/vela 0.6.6 → 0.6.7
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-JJq7M2it.d.ts → DataProvider-BSLlBpB9.d.ts} +10 -0
- package/dist/{DataProvider-DDUYw2qP.d.cts → DataProvider-BsQM2WNH.d.cts} +10 -0
- package/dist/{bottombar-COnL2Sk4.d.ts → bottombar-Br4rzx_R.d.ts} +52 -6
- package/dist/{bottombar-DeDXbF_K.d.cts → bottombar-Div5zibZ.d.cts} +52 -6
- package/dist/{chunk-JQFO2WMU.js → chunk-6WFKTAT4.js} +37 -1
- package/dist/{chunk-OEUGUXL7.js → chunk-L3I2CCYO.js} +49 -1
- package/dist/chunk-W4EJWLEO.js +12 -0
- package/dist/{chunk-TMXK2SJR.js → chunk-WVP4XV5A.js} +221 -65
- package/dist/{contributions-DNMqrAuw.d.cts → contributions-Hv4_cOJo.d.cts} +46 -3
- package/dist/{contributions-BqCIsbaP.d.ts → contributions-Z12BrWCy.d.ts} +46 -3
- package/dist/index.cjs +64 -0
- package/dist/index.d.cts +8 -4
- package/dist/index.d.ts +8 -4
- package/dist/index.js +2 -2
- package/dist/{plugin-WnvNNJOp.d.ts → plugin-9koBjc5H.d.ts} +2 -2
- package/dist/{plugin-CN8U2__Q.d.cts → plugin-BXhDHTYn.d.cts} +2 -2
- package/dist/plugin.cjs +28 -0
- package/dist/plugin.d.cts +3 -3
- package/dist/plugin.d.ts +3 -3
- package/dist/plugin.js +1 -1
- package/dist/providers/binance.cjs +16 -0
- package/dist/providers/binance.d.cts +4 -1
- package/dist/providers/binance.d.ts +4 -1
- package/dist/providers/binance.js +7 -0
- package/dist/providers/coinbase.cjs +16 -0
- package/dist/providers/coinbase.d.cts +4 -1
- package/dist/providers/coinbase.d.ts +4 -1
- package/dist/providers/coinbase.js +7 -0
- package/dist/providers/hyperliquid.cjs +16 -0
- package/dist/providers/hyperliquid.d.cts +4 -1
- package/dist/providers/hyperliquid.d.ts +4 -1
- package/dist/providers/hyperliquid.js +7 -0
- package/dist/vela.global.js +90 -0
- package/dist/vela.global.min.js +42 -42
- package/dist/widget.cjs +319 -63
- package/dist/widget.d.cts +52 -10
- package/dist/widget.d.ts +52 -10
- package/dist/widget.js +5 -4
- package/dist/workspace.cjs +265 -65
- package/dist/workspace.d.cts +13 -4
- package/dist/workspace.d.ts +13 -4
- package/dist/workspace.js +4 -3
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as Millis, ae as InputSchema, ac as IndicatorMeta, P as PriceStyle, O as OHLCV, m as InputValue, k as IndicatorModel, j as MoveTarget, aq as PaneAxis, aD as SeriesSpec, aa as Fill, B as Background, av as PriceLine, a0 as DrawingLine, Y as DrawingBox, $ as DrawingLabel, a4 as DrawingPolyline, a1 as DrawingLinefill, a6 as DrawingTable, g as IndicatorStatus, a as VisibleRange, c as VelaTheme, S as SerializedDrawing, v as DrawingTypeKey, u as SnapMode, a2 as DrawingMode, I as IChartRenderer, R as RendererCapabilities, o as LegendActionView, U as Unsubscribe, C as CrosshairEvent, A as AxisLongPressEvent, r as DataWindowReadout, n as SymbolPickerFn, aR as PaneInfo, a9 as DrawingsOption, D as Drawing, b as VelaOptions, x as AddIndicatorOptions, ap as MarketSwitch, ao as MarketSnapshot, V as VisibleRangePreset, T as ThemeName } from './options-BaVTMXaO.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-
|
|
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-BsQM2WNH.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* A strategy's broker state at ONE bar — the flat summary a host reads while a script
|
|
@@ -361,6 +361,10 @@ declare class DataControl {
|
|
|
361
361
|
providerInstance(name: string): DataProvider | undefined;
|
|
362
362
|
/** Indexed symbols for one provider (or all) — for autocomplete. */
|
|
363
363
|
symbols(provider?: string): SymbolDescriptor[];
|
|
364
|
+
/** The icon URL for `symbol` — its owning provider's `resolveSymbolIcon`, routed
|
|
365
|
+
* through resolution. Undefined while unresolvable, when the provider declares no
|
|
366
|
+
* resolver, or on a custom `deps.dataFeed` — the shells then show initials. */
|
|
367
|
+
symbolIcon(symbol: string): string | undefined;
|
|
364
368
|
/** Per-symbol metadata (Pine `syminfo.*`), resolved through the owning provider. */
|
|
365
369
|
symbolInfo(symbol: string): Promise<SymbolInfo | undefined>;
|
|
366
370
|
/**
|
|
@@ -1577,7 +1581,24 @@ declare function registerSidePanel(desc: SidePanelDescriptor): () => void;
|
|
|
1577
1581
|
declare function unregisterSidePanel(id: string): void;
|
|
1578
1582
|
/** Every registered side panel, `order`-sorted (registration order breaks ties). */
|
|
1579
1583
|
declare function sidePanels(): SidePanelDescriptor[];
|
|
1580
|
-
/**
|
|
1584
|
+
/** The built-in topbar slots a contributed action may TAKE OVER by registering under
|
|
1585
|
+
* their id — the "simple button" slots. The composites (symbol, timeframes, style,
|
|
1586
|
+
* layout, undo-redo, alerts, panels) are stateful controls the shell pushes state
|
|
1587
|
+
* into; a plain `{label, icon, run}` descriptor cannot stand in for them. */
|
|
1588
|
+
declare const OVERRIDABLE_TOPBAR_IDS: readonly ["indicators", "screenshot"];
|
|
1589
|
+
/**
|
|
1590
|
+
* The action OVERRIDING a built-in topbar slot, if one is registered — an action whose
|
|
1591
|
+
* `id` IS the built-in id. An override takes the slot's WHOLE surface: the desktop
|
|
1592
|
+
* button (at the slot's position), the mobile counterpart, and the keyboard chord all
|
|
1593
|
+
* route to `run`, and the native machinery behind the slot (the built-in indicator
|
|
1594
|
+
* picker) is not constructed. Shells resolve this at construction — register at import
|
|
1595
|
+
* time, like every contribution.
|
|
1596
|
+
*/
|
|
1597
|
+
declare function topbarActionOverride(id: string): WidgetActionDescriptor | undefined;
|
|
1598
|
+
/** Register (or replace) a widget action. Widgets read the registry live.
|
|
1599
|
+
* Registering under a RESERVED built-in topbar id (`'indicators'`, `'screenshot'`)
|
|
1600
|
+
* OVERRIDES that slot — see {@link topbarActionOverride}. Built-in ids that are
|
|
1601
|
+
* stateful composites cannot be overridden and the registration is refused. */
|
|
1581
1602
|
declare function registerWidgetAction(desc: WidgetActionDescriptor): () => void;
|
|
1582
1603
|
declare function unregisterWidgetAction(id: string): void;
|
|
1583
1604
|
/** Actions for one target, `order`-sorted, `when`-filtered when a context is given. */
|
|
@@ -1669,6 +1690,28 @@ declare function unregisterStatePersistence(key: string): void;
|
|
|
1669
1690
|
declare function statePersistenceHandlers<S extends StatePersistenceHandler['scope']>(scope: S): Array<Extract<StatePersistenceHandler, {
|
|
1670
1691
|
scope: S;
|
|
1671
1692
|
}>>;
|
|
1693
|
+
/**
|
|
1694
|
+
* Reorder the symbol picker's AGGREGATED pool — every source combined, exactly what
|
|
1695
|
+
* the search dialog displays. Called when the pool changes (a provider's index lands
|
|
1696
|
+
* or refreshes), NOT per keystroke: the picker caches the result. May be async (a
|
|
1697
|
+
* server-fetched top list) — the picker shows the current order and refreshes when
|
|
1698
|
+
* the promise resolves.
|
|
1699
|
+
*
|
|
1700
|
+
* The returned list may INJECT descriptors absent from the pool (they must carry
|
|
1701
|
+
* their `provider` and be genuinely servable, or selecting them parks the load) and
|
|
1702
|
+
* may OMIT entries (hiding them). The picker dedupes by venue+ticker, FIRST
|
|
1703
|
+
* occurrence winning — injecting at the head fixes both position and display data.
|
|
1704
|
+
*
|
|
1705
|
+
* While a ranking is registered, the picker's built-in empty-query pin (the hardcoded
|
|
1706
|
+
* majors) stands down: the head of YOUR list is the dialog's opening screen. Under a
|
|
1707
|
+
* typed query the relevance tiers still lead — the ranking orders within each tier.
|
|
1708
|
+
*/
|
|
1709
|
+
type SymbolRankingHook = (pool: SymbolDescriptor[]) => SymbolDescriptor[] | Promise<SymbolDescriptor[]>;
|
|
1710
|
+
/** Register (or replace — ONE ranking at a time, last wins) the symbol ranking.
|
|
1711
|
+
* Returns an unregister disposer. Register at import time, like every contribution. */
|
|
1712
|
+
declare function registerSymbolRanking(hook: SymbolRankingHook): () => void;
|
|
1713
|
+
/** The registered ranking, if any — what the shells' symbol picker consults. */
|
|
1714
|
+
declare function symbolRanking(): SymbolRankingHook | undefined;
|
|
1672
1715
|
/** Makes ONE engine instance for ONE chart — engines hold per-chart sessions (and
|
|
1673
1716
|
* possibly a worker), so the shell calls the factory per chart build, never shares. */
|
|
1674
1717
|
type EngineFactory = () => ScriptingEngine;
|
|
@@ -1686,4 +1729,4 @@ declare function unregisterDefaultEngine(language: string): void;
|
|
|
1686
1729
|
* language. The shell layers (widget, workspace cell) register exactly this result. */
|
|
1687
1730
|
declare function resolveEngines(overrides?: Record<string, EngineFactory>): Record<string, EngineFactory>;
|
|
1688
1731
|
|
|
1689
|
-
export { type
|
|
1732
|
+
export { type WidgetActionDescriptor as $, type SidePanelButton as A, type BarsChangeReason as B, type CellStateContext as C, type DrawingsDocument as D, type ExternalIndicatorEntry as E, type FetchSeries as F, type SidePanelDescriptor as G, type SidePanelHandle as H, type IndicatorHandle as I, type SidePanelHeader as J, type StatePersistenceHandler as K, type LegendActionDescriptor as L, type StrategyFill as M, type NativeIndicator as N, OVERRIDABLE_TOPBAR_IDS as O, type ParsedSymbol as P, type StrategyState as Q, type Resolved as R, type ScriptingEngine as S, type StrategyTrade as T, type SymbolRankingHook as U, Vela as V, type WidgetContext as W, TypedEventBus as X, type VelaDeps as Y, type VelaEventMap as Z, type VisibleBarRange as _, type ScriptRun as a, type WidgetActionTarget as a0, type WidgetAttachment as a1, getNativeIndicator as a2, legendActions as a3, nativeIndicatorDescriptors as a4, nativeIndicatorTypes as a5, registerDefaultEngine as a6, registerLegendAction as a7, registerNativeIndicator as a8, registerSidePanel as a9, registerStatePersistence as aa, registerSymbolRanking as ab, registerWidgetAction as ac, registerWidgetAttachment as ad, resolveEngines as ae, sidePanels as af, statePersistenceHandlers as ag, symbolRanking as ah, topbarActionOverride as ai, unregisterDefaultEngine as aj, unregisterLegendAction as ak, unregisterNativeIndicator as al, unregisterSidePanel as am, unregisterStatePersistence as an, unregisterWidgetAction as ao, unregisterWidgetAttachment as ap, widgetActions as aq, widgetAttachments as ar, DEFAULT_PANEL_ORDER as as, type ContextSelect as b, DataControl as c, DrawingsControl as d, type EngineAlert as e, type EngineCapabilities as f, type EngineContextSnapshot as g, type EngineFactory as h, type EngineWarning as i, type ExecutionHandlers as j, type ExecutionMarket as k, type ExecutionRequest as l, type ExecutionSession as m, type IndicatorEventMap as n, type IndicatorSummary as o, type LegendIndicatorInfo as p, type NativeIndicatorContext as q, type NativeIndicatorDescriptor as r, type NativeIndicatorInfo as s, type NativeIndicatorOutput as t, type PreparedScript as u, RendererControl as v, type RunIndicatorResult as w, type SceneInspection as x, type ScriptRunCause as y, type ScriptRunResult as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as Millis, ae as InputSchema, ac as IndicatorMeta, P as PriceStyle, O as OHLCV, m as InputValue, k as IndicatorModel, j as MoveTarget, aq as PaneAxis, aD as SeriesSpec, aa as Fill, B as Background, av as PriceLine, a0 as DrawingLine, Y as DrawingBox, $ as DrawingLabel, a4 as DrawingPolyline, a1 as DrawingLinefill, a6 as DrawingTable, g as IndicatorStatus, a as VisibleRange, c as VelaTheme, S as SerializedDrawing, v as DrawingTypeKey, u as SnapMode, a2 as DrawingMode, I as IChartRenderer, R as RendererCapabilities, o as LegendActionView, U as Unsubscribe, C as CrosshairEvent, A as AxisLongPressEvent, r as DataWindowReadout, n as SymbolPickerFn, aR as PaneInfo, a9 as DrawingsOption, D as Drawing, b as VelaOptions, x as AddIndicatorOptions, ap as MarketSwitch, ao as MarketSnapshot, V as VisibleRangePreset, T as ThemeName } from './options-BaVTMXaO.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-
|
|
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-BSLlBpB9.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* A strategy's broker state at ONE bar — the flat summary a host reads while a script
|
|
@@ -361,6 +361,10 @@ declare class DataControl {
|
|
|
361
361
|
providerInstance(name: string): DataProvider | undefined;
|
|
362
362
|
/** Indexed symbols for one provider (or all) — for autocomplete. */
|
|
363
363
|
symbols(provider?: string): SymbolDescriptor[];
|
|
364
|
+
/** The icon URL for `symbol` — its owning provider's `resolveSymbolIcon`, routed
|
|
365
|
+
* through resolution. Undefined while unresolvable, when the provider declares no
|
|
366
|
+
* resolver, or on a custom `deps.dataFeed` — the shells then show initials. */
|
|
367
|
+
symbolIcon(symbol: string): string | undefined;
|
|
364
368
|
/** Per-symbol metadata (Pine `syminfo.*`), resolved through the owning provider. */
|
|
365
369
|
symbolInfo(symbol: string): Promise<SymbolInfo | undefined>;
|
|
366
370
|
/**
|
|
@@ -1577,7 +1581,24 @@ declare function registerSidePanel(desc: SidePanelDescriptor): () => void;
|
|
|
1577
1581
|
declare function unregisterSidePanel(id: string): void;
|
|
1578
1582
|
/** Every registered side panel, `order`-sorted (registration order breaks ties). */
|
|
1579
1583
|
declare function sidePanels(): SidePanelDescriptor[];
|
|
1580
|
-
/**
|
|
1584
|
+
/** The built-in topbar slots a contributed action may TAKE OVER by registering under
|
|
1585
|
+
* their id — the "simple button" slots. The composites (symbol, timeframes, style,
|
|
1586
|
+
* layout, undo-redo, alerts, panels) are stateful controls the shell pushes state
|
|
1587
|
+
* into; a plain `{label, icon, run}` descriptor cannot stand in for them. */
|
|
1588
|
+
declare const OVERRIDABLE_TOPBAR_IDS: readonly ["indicators", "screenshot"];
|
|
1589
|
+
/**
|
|
1590
|
+
* The action OVERRIDING a built-in topbar slot, if one is registered — an action whose
|
|
1591
|
+
* `id` IS the built-in id. An override takes the slot's WHOLE surface: the desktop
|
|
1592
|
+
* button (at the slot's position), the mobile counterpart, and the keyboard chord all
|
|
1593
|
+
* route to `run`, and the native machinery behind the slot (the built-in indicator
|
|
1594
|
+
* picker) is not constructed. Shells resolve this at construction — register at import
|
|
1595
|
+
* time, like every contribution.
|
|
1596
|
+
*/
|
|
1597
|
+
declare function topbarActionOverride(id: string): WidgetActionDescriptor | undefined;
|
|
1598
|
+
/** Register (or replace) a widget action. Widgets read the registry live.
|
|
1599
|
+
* Registering under a RESERVED built-in topbar id (`'indicators'`, `'screenshot'`)
|
|
1600
|
+
* OVERRIDES that slot — see {@link topbarActionOverride}. Built-in ids that are
|
|
1601
|
+
* stateful composites cannot be overridden and the registration is refused. */
|
|
1581
1602
|
declare function registerWidgetAction(desc: WidgetActionDescriptor): () => void;
|
|
1582
1603
|
declare function unregisterWidgetAction(id: string): void;
|
|
1583
1604
|
/** Actions for one target, `order`-sorted, `when`-filtered when a context is given. */
|
|
@@ -1669,6 +1690,28 @@ declare function unregisterStatePersistence(key: string): void;
|
|
|
1669
1690
|
declare function statePersistenceHandlers<S extends StatePersistenceHandler['scope']>(scope: S): Array<Extract<StatePersistenceHandler, {
|
|
1670
1691
|
scope: S;
|
|
1671
1692
|
}>>;
|
|
1693
|
+
/**
|
|
1694
|
+
* Reorder the symbol picker's AGGREGATED pool — every source combined, exactly what
|
|
1695
|
+
* the search dialog displays. Called when the pool changes (a provider's index lands
|
|
1696
|
+
* or refreshes), NOT per keystroke: the picker caches the result. May be async (a
|
|
1697
|
+
* server-fetched top list) — the picker shows the current order and refreshes when
|
|
1698
|
+
* the promise resolves.
|
|
1699
|
+
*
|
|
1700
|
+
* The returned list may INJECT descriptors absent from the pool (they must carry
|
|
1701
|
+
* their `provider` and be genuinely servable, or selecting them parks the load) and
|
|
1702
|
+
* may OMIT entries (hiding them). The picker dedupes by venue+ticker, FIRST
|
|
1703
|
+
* occurrence winning — injecting at the head fixes both position and display data.
|
|
1704
|
+
*
|
|
1705
|
+
* While a ranking is registered, the picker's built-in empty-query pin (the hardcoded
|
|
1706
|
+
* majors) stands down: the head of YOUR list is the dialog's opening screen. Under a
|
|
1707
|
+
* typed query the relevance tiers still lead — the ranking orders within each tier.
|
|
1708
|
+
*/
|
|
1709
|
+
type SymbolRankingHook = (pool: SymbolDescriptor[]) => SymbolDescriptor[] | Promise<SymbolDescriptor[]>;
|
|
1710
|
+
/** Register (or replace — ONE ranking at a time, last wins) the symbol ranking.
|
|
1711
|
+
* Returns an unregister disposer. Register at import time, like every contribution. */
|
|
1712
|
+
declare function registerSymbolRanking(hook: SymbolRankingHook): () => void;
|
|
1713
|
+
/** The registered ranking, if any — what the shells' symbol picker consults. */
|
|
1714
|
+
declare function symbolRanking(): SymbolRankingHook | undefined;
|
|
1672
1715
|
/** Makes ONE engine instance for ONE chart — engines hold per-chart sessions (and
|
|
1673
1716
|
* possibly a worker), so the shell calls the factory per chart build, never shares. */
|
|
1674
1717
|
type EngineFactory = () => ScriptingEngine;
|
|
@@ -1686,4 +1729,4 @@ declare function unregisterDefaultEngine(language: string): void;
|
|
|
1686
1729
|
* language. The shell layers (widget, workspace cell) register exactly this result. */
|
|
1687
1730
|
declare function resolveEngines(overrides?: Record<string, EngineFactory>): Record<string, EngineFactory>;
|
|
1688
1731
|
|
|
1689
|
-
export { type
|
|
1732
|
+
export { type WidgetActionDescriptor as $, type SidePanelButton as A, type BarsChangeReason as B, type CellStateContext as C, type DrawingsDocument as D, type ExternalIndicatorEntry as E, type FetchSeries as F, type SidePanelDescriptor as G, type SidePanelHandle as H, type IndicatorHandle as I, type SidePanelHeader as J, type StatePersistenceHandler as K, type LegendActionDescriptor as L, type StrategyFill as M, type NativeIndicator as N, OVERRIDABLE_TOPBAR_IDS as O, type ParsedSymbol as P, type StrategyState as Q, type Resolved as R, type ScriptingEngine as S, type StrategyTrade as T, type SymbolRankingHook as U, Vela as V, type WidgetContext as W, TypedEventBus as X, type VelaDeps as Y, type VelaEventMap as Z, type VisibleBarRange as _, type ScriptRun as a, type WidgetActionTarget as a0, type WidgetAttachment as a1, getNativeIndicator as a2, legendActions as a3, nativeIndicatorDescriptors as a4, nativeIndicatorTypes as a5, registerDefaultEngine as a6, registerLegendAction as a7, registerNativeIndicator as a8, registerSidePanel as a9, registerStatePersistence as aa, registerSymbolRanking as ab, registerWidgetAction as ac, registerWidgetAttachment as ad, resolveEngines as ae, sidePanels as af, statePersistenceHandlers as ag, symbolRanking as ah, topbarActionOverride as ai, unregisterDefaultEngine as aj, unregisterLegendAction as ak, unregisterNativeIndicator as al, unregisterSidePanel as am, unregisterStatePersistence as an, unregisterWidgetAction as ao, unregisterWidgetAttachment as ap, widgetActions as aq, widgetAttachments as ar, DEFAULT_PANEL_ORDER as as, type ContextSelect as b, DataControl as c, DrawingsControl as d, type EngineAlert as e, type EngineCapabilities as f, type EngineContextSnapshot as g, type EngineFactory as h, type EngineWarning as i, type ExecutionHandlers as j, type ExecutionMarket as k, type ExecutionRequest as l, type ExecutionSession as m, type IndicatorEventMap as n, type IndicatorSummary as o, type LegendIndicatorInfo as p, type NativeIndicatorContext as q, type NativeIndicatorDescriptor as r, type NativeIndicatorInfo as s, type NativeIndicatorOutput as t, type PreparedScript as u, RendererControl as v, type RunIndicatorResult as w, type SceneInspection as x, type ScriptRunCause as y, type ScriptRunResult as z };
|
package/dist/index.cjs
CHANGED
|
@@ -7091,6 +7091,28 @@ var ProviderRegistry = class {
|
|
|
7091
7091
|
const d = this.entries.get(resolved.provider)?.byTicker?.get(normTicker(resolved.ticker));
|
|
7092
7092
|
return `${d?.prefix ?? resolved.provider}:${d?.ticker ?? resolved.ticker}`;
|
|
7093
7093
|
}
|
|
7094
|
+
/** The icon URL for a DESCRIPTOR — routed to its OWNING provider's resolver (the
|
|
7095
|
+
* provider owns the knowledge of where its asset class's icons live). A missing
|
|
7096
|
+
* provider, an absent resolver, or a resolver that throws all mean "no icon" —
|
|
7097
|
+
* the shells' initials badge takes over, never an error. */
|
|
7098
|
+
symbolIconOf(d) {
|
|
7099
|
+
const name = d.provider ? normName(d.provider) : [...this.entries.keys()][0];
|
|
7100
|
+
const entry = name !== void 0 ? this.entries.get(name) : void 0;
|
|
7101
|
+
try {
|
|
7102
|
+
return entry?.provider.resolveSymbolIcon?.(d) ?? void 0;
|
|
7103
|
+
} catch {
|
|
7104
|
+
return void 0;
|
|
7105
|
+
}
|
|
7106
|
+
}
|
|
7107
|
+
/** The icon URL for a raw SYMBOL string (the statusline/object-tree path): resolve
|
|
7108
|
+
* to the owning provider, find its descriptor, route to the resolver. Before the
|
|
7109
|
+
* index settles (or for a lenient sole-provider resolution) a minimal synthetic
|
|
7110
|
+
* descriptor is offered — crypto resolvers can answer from the ticker alone. */
|
|
7111
|
+
symbolIcon(resolved) {
|
|
7112
|
+
if (!resolved) return void 0;
|
|
7113
|
+
const d = this.entries.get(resolved.provider)?.byTicker?.get(normTicker(resolved.ticker));
|
|
7114
|
+
return this.symbolIconOf({ ...d ?? { ticker: resolved.ticker }, provider: d?.provider ?? resolved.provider });
|
|
7115
|
+
}
|
|
7094
7116
|
/** Indexed symbols for one provider (or all, concatenated) — for autocomplete. */
|
|
7095
7117
|
symbolsOf(rawName) {
|
|
7096
7118
|
if (rawName != null) return this.entries.get(normName(rawName))?.descriptors ?? [];
|
|
@@ -9311,6 +9333,14 @@ var MultiProviderFeed = class {
|
|
|
9311
9333
|
providerInstance(name) {
|
|
9312
9334
|
return this.registry.get(name);
|
|
9313
9335
|
}
|
|
9336
|
+
/** The icon URL for a DESCRIPTOR — its owning provider's `resolveSymbolIcon` (picker rows). */
|
|
9337
|
+
symbolIconOf(d) {
|
|
9338
|
+
return this.registry.symbolIconOf(d);
|
|
9339
|
+
}
|
|
9340
|
+
/** The icon URL for a raw SYMBOL string — resolve, then route (statusline, object tree). */
|
|
9341
|
+
symbolIcon(raw) {
|
|
9342
|
+
return this.registry.symbolIcon(this.resolveSymbol(raw));
|
|
9343
|
+
}
|
|
9314
9344
|
symbols(name) {
|
|
9315
9345
|
return this.registry.symbolsOf(name);
|
|
9316
9346
|
}
|
|
@@ -9537,6 +9567,12 @@ var DataControl = class {
|
|
|
9537
9567
|
symbols(provider) {
|
|
9538
9568
|
return this.registry?.symbols(provider) ?? [];
|
|
9539
9569
|
}
|
|
9570
|
+
/** The icon URL for `symbol` — its owning provider's `resolveSymbolIcon`, routed
|
|
9571
|
+
* through resolution. Undefined while unresolvable, when the provider declares no
|
|
9572
|
+
* resolver, or on a custom `deps.dataFeed` — the shells then show initials. */
|
|
9573
|
+
symbolIcon(symbol) {
|
|
9574
|
+
return this.registry?.symbolIcon(symbol);
|
|
9575
|
+
}
|
|
9540
9576
|
/** Per-symbol metadata (Pine `syminfo.*`), resolved through the owning provider. */
|
|
9541
9577
|
symbolInfo(symbol) {
|
|
9542
9578
|
return this.registry?.symbolInfoFor(symbol) ?? Promise.resolve(void 0);
|
|
@@ -29588,6 +29624,9 @@ function resolveElement(container) {
|
|
|
29588
29624
|
return element;
|
|
29589
29625
|
}
|
|
29590
29626
|
|
|
29627
|
+
// src/widget/topbar-composition.ts
|
|
29628
|
+
var TOPBAR_BUILTIN_IDS = ["symbol", "timeframes", "style", "layout", "indicators", "actions", "undo-redo", "alerts", "panels", "screenshot"];
|
|
29629
|
+
|
|
29591
29630
|
// src/widget/contributions.ts
|
|
29592
29631
|
var registry4 = /* @__PURE__ */ new Map();
|
|
29593
29632
|
var attachments = /* @__PURE__ */ new Map();
|
|
@@ -29617,7 +29656,18 @@ function unregisterSidePanel(id) {
|
|
|
29617
29656
|
function sidePanels() {
|
|
29618
29657
|
return [...panels.values()].sort((a, b) => (a.order ?? DEFAULT_PANEL_ORDER) - (b.order ?? DEFAULT_PANEL_ORDER));
|
|
29619
29658
|
}
|
|
29659
|
+
var OVERRIDABLE_TOPBAR_IDS = ["indicators", "screenshot"];
|
|
29660
|
+
var overridableSet = new Set(OVERRIDABLE_TOPBAR_IDS);
|
|
29661
|
+
var builtinTopbarSet = new Set(TOPBAR_BUILTIN_IDS);
|
|
29662
|
+
function topbarActionOverride(id) {
|
|
29663
|
+
if (!overridableSet.has(id)) return void 0;
|
|
29664
|
+
return registry4.get(id);
|
|
29665
|
+
}
|
|
29620
29666
|
function registerWidgetAction(desc) {
|
|
29667
|
+
if (builtinTopbarSet.has(desc.id) && !overridableSet.has(desc.id)) {
|
|
29668
|
+
console.warn(`[vela] widget action "${desc.id}": this built-in topbar slot is a stateful control and cannot be overridden \u2014 ignored. Overridable slots: ${OVERRIDABLE_TOPBAR_IDS.join(", ")}.`);
|
|
29669
|
+
return () => void 0;
|
|
29670
|
+
}
|
|
29621
29671
|
registry4.set(desc.id, desc);
|
|
29622
29672
|
return () => {
|
|
29623
29673
|
if (registry4.get(desc.id) === desc) registry4.delete(desc.id);
|
|
@@ -29657,6 +29707,16 @@ function unregisterStatePersistence(key) {
|
|
|
29657
29707
|
function statePersistenceHandlers(scope) {
|
|
29658
29708
|
return [...stateHandlers.values()].filter((h) => h.scope === scope);
|
|
29659
29709
|
}
|
|
29710
|
+
var symbolRankingHook;
|
|
29711
|
+
function registerSymbolRanking(hook) {
|
|
29712
|
+
symbolRankingHook = hook;
|
|
29713
|
+
return () => {
|
|
29714
|
+
if (symbolRankingHook === hook) symbolRankingHook = void 0;
|
|
29715
|
+
};
|
|
29716
|
+
}
|
|
29717
|
+
function symbolRanking() {
|
|
29718
|
+
return symbolRankingHook;
|
|
29719
|
+
}
|
|
29660
29720
|
var defaultEngines = /* @__PURE__ */ new Map();
|
|
29661
29721
|
function registerDefaultEngine(language, make) {
|
|
29662
29722
|
defaultEngines.set(language, make);
|
|
@@ -29713,6 +29773,7 @@ exports.MARKER = MARKER;
|
|
|
29713
29773
|
exports.MultiProviderFeed = MultiProviderFeed;
|
|
29714
29774
|
exports.NEUTRAL = NEUTRAL;
|
|
29715
29775
|
exports.NativeRenderer = NativeRenderer;
|
|
29776
|
+
exports.OVERRIDABLE_TOPBAR_IDS = OVERRIDABLE_TOPBAR_IDS;
|
|
29716
29777
|
exports.RendererControl = RendererControl;
|
|
29717
29778
|
exports.SERIES_LINE = SERIES_LINE;
|
|
29718
29779
|
exports.SESSION_OFF = SESSION_OFF;
|
|
@@ -29754,6 +29815,7 @@ exports.registerRendererDefaults = registerRendererDefaults;
|
|
|
29754
29815
|
exports.registerRendererLayer = registerRendererLayer;
|
|
29755
29816
|
exports.registerSidePanel = registerSidePanel;
|
|
29756
29817
|
exports.registerStatePersistence = registerStatePersistence;
|
|
29818
|
+
exports.registerSymbolRanking = registerSymbolRanking;
|
|
29757
29819
|
exports.registerWidgetAction = registerWidgetAction;
|
|
29758
29820
|
exports.registerWidgetAttachment = registerWidgetAttachment;
|
|
29759
29821
|
exports.rendererDefaults = rendererDefaults;
|
|
@@ -29765,8 +29827,10 @@ exports.sharedBarStore = sharedBarStore;
|
|
|
29765
29827
|
exports.sidePanels = sidePanels;
|
|
29766
29828
|
exports.stableSeriesId = stableSeriesId;
|
|
29767
29829
|
exports.statePersistenceHandlers = statePersistenceHandlers;
|
|
29830
|
+
exports.symbolRanking = symbolRanking;
|
|
29768
29831
|
exports.tickerModifierIds = tickerModifierIds;
|
|
29769
29832
|
exports.timeframeToMs = timeframeToMs;
|
|
29833
|
+
exports.topbarActionOverride = topbarActionOverride;
|
|
29770
29834
|
exports.unregisterChartType = unregisterChartType;
|
|
29771
29835
|
exports.unregisterDefaultEngine = unregisterDefaultEngine;
|
|
29772
29836
|
exports.unregisterLegendAction = unregisterLegendAction;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { D as DrawingsDocument, R as Resolved } from './contributions-
|
|
2
|
-
export { B as BarsChangeReason, C as CellStateContext, b as ContextSelect, c as DataControl, d as DrawingsControl, e as EngineAlert, f as EngineCapabilities, g as EngineContextSnapshot, h as EngineFactory, i as EngineWarning, j as ExecutionHandlers, k as ExecutionMarket, l as ExecutionRequest, m as ExecutionSession, E as ExternalIndicatorEntry, F as FetchSeries, n as IndicatorEventMap, I as IndicatorHandle, o as IndicatorSummary, L as LegendActionDescriptor, p as LegendIndicatorInfo, N as NativeIndicator, q as NativeIndicatorContext, r as NativeIndicatorDescriptor, s as NativeIndicatorInfo, t as NativeIndicatorOutput, P as ParsedSymbol, u as PreparedScript, v as RendererControl, w as RunIndicatorResult, x as SceneInspection, a as ScriptRun, y as ScriptRunCause, z as ScriptRunResult, S as ScriptingEngine, A as SidePanelButton, G as SidePanelDescriptor, H as SidePanelHandle, J as SidePanelHeader, K as StatePersistenceHandler, M as StrategyFill,
|
|
1
|
+
import { D as DrawingsDocument, R as Resolved } from './contributions-Hv4_cOJo.cjs';
|
|
2
|
+
export { B as BarsChangeReason, C as CellStateContext, b as ContextSelect, c as DataControl, d as DrawingsControl, e as EngineAlert, f as EngineCapabilities, g as EngineContextSnapshot, h as EngineFactory, i as EngineWarning, j as ExecutionHandlers, k as ExecutionMarket, l as ExecutionRequest, m as ExecutionSession, E as ExternalIndicatorEntry, F as FetchSeries, n as IndicatorEventMap, I as IndicatorHandle, o as IndicatorSummary, L as LegendActionDescriptor, p as LegendIndicatorInfo, N as NativeIndicator, q as NativeIndicatorContext, r as NativeIndicatorDescriptor, s as NativeIndicatorInfo, t as NativeIndicatorOutput, O as OVERRIDABLE_TOPBAR_IDS, P as ParsedSymbol, u as PreparedScript, v as RendererControl, w as RunIndicatorResult, x as SceneInspection, a as ScriptRun, y as ScriptRunCause, z as ScriptRunResult, S as ScriptingEngine, A as SidePanelButton, G as SidePanelDescriptor, H as SidePanelHandle, J as SidePanelHeader, K as StatePersistenceHandler, M as StrategyFill, Q as StrategyState, T as StrategyTrade, U as SymbolRankingHook, X as TypedEventBus, V as Vela, Y as VelaDeps, Z as VelaEventMap, _ as VisibleBarRange, $ as WidgetActionDescriptor, a0 as WidgetActionTarget, a1 as WidgetAttachment, W as WidgetContext, a2 as getNativeIndicator, a3 as legendActions, a4 as nativeIndicatorDescriptors, a5 as nativeIndicatorTypes, a6 as registerDefaultEngine, a7 as registerLegendAction, a8 as registerNativeIndicator, a9 as registerSidePanel, aa as registerStatePersistence, ab as registerSymbolRanking, ac as registerWidgetAction, ad as registerWidgetAttachment, ae as resolveEngines, af as sidePanels, ag as statePersistenceHandlers, ah as symbolRanking, ai as topbarActionOverride, aj as unregisterDefaultEngine, ak as unregisterLegendAction, al as unregisterNativeIndicator, am as unregisterSidePanel, an as unregisterStatePersistence, ao as unregisterWidgetAction, ap as unregisterWidgetAttachment, aq as widgetActions, ar as widgetAttachments } from './contributions-Hv4_cOJo.cjs';
|
|
3
3
|
import { D as Drawing, S as SerializedDrawing, U as Unsubscribe, L as LineStyle, P as PriceStyle, I as IChartRenderer, R as RendererCapabilities, e as RendererDisplayOptions, f as IndicatorRenderHandle, g as IndicatorStatus, c as VelaTheme, O as OHLCV, h as Pane, i as PaneAction, j as MoveTarget, k as IndicatorModel, l as ScenePatch, m as InputValue, n as SymbolPickerFn, o as LegendActionView, p as InputChangeEvent, T as ThemeName, C as CrosshairEvent, q as ClickEvent, A as AxisLongPressEvent, a as VisibleRange, r as DataWindowReadout, s as IDrawingsRendererPort, t as Millis, u as SnapMode, v as DrawingTypeKey, w as ToolbarDefinition, M as MarketConfig } from './options-BaVTMXaO.cjs';
|
|
4
4
|
export { x as AddIndicatorOptions, B as Background, y as BoxFontFamily, z as BoxHAlign, E as BoxTextSize, F as BoxVAlign, G as CandleBarColor, H as CandleSeries, J as CandleStyle, K as DataWindowGroup, Q as DataWindowOHLC, W as DataWindowRow, X as DirtyRange, Y as DrawingBox, Z as DrawingExtend, _ as DrawingIntent, $ as DrawingLabel, a0 as DrawingLine, a1 as DrawingLinefill, a2 as DrawingMode, a3 as DrawingPoint, a4 as DrawingPolyline, a5 as DrawingStyle, a6 as DrawingTable, a7 as DrawingText, a8 as DrawingXLoc, a9 as DrawingsOption, aa as Fill, ab as FillGradientStop, ac as IndicatorMeta, ad as InputCondition, ae as InputSchema, af as InputType, ag as InputWhen, ah as LabelStyle, ai as LabelYLoc, aj as LineLikeKind, ak as LineLikeSeries, al as LineLikeStyle, am as MarkerPoint, an as MarkerSeries, ao as MarketSnapshot, ap as MarketSwitch, aq as PaneAxis, ar as PaneAxisBand, as as PaneHint, at as PaneKind, au as PolylinePoint, av as PriceLine, aw as Projector, ax as ProviderName, ay as RendererConstructor, az as Scene, aA as SchemaPatch, aB as SeriesKind, aC as SeriesPoint, aD as SeriesSpec, aE as SeriesValueDelta, aF as SettingsField, aG as SettingsSchema, aH as SettingsVisibilityPolicy, aI as TableCell, aJ as TableMerge, aK as TablePosition, aL as ToolbarGroupConfig, aM as TradeExecution, aN as ValuePatch, b as VelaOptions, V as VisibleRangePreset, aO as buildToolbar, aP as defaultToolbar, aQ as inputVisible } from './options-BaVTMXaO.cjs';
|
|
5
|
-
import { M as MarketDataFeed, D as DataProvider, P as ProviderInfo, a as SymbolDescriptor, S as SymbolInfo, b as ProviderCapabilities, B as BarRange } from './DataProvider-
|
|
6
|
-
export { A as ACCENT, a as ACCENT_BRIGHT, B as BEARISH, b as BULLISH, c as BarTransform, d as BasePaintingModulation, C as CATEGORICAL, e as CROSSHAIR, f as ChartTypeDefinition, g as ChartTypeSettingsInstance, h as ChartTypeSettingsSection, i as ChartTypeSettingsSubsection, D as DrawingTypeMeta, H as HIGHLIGHT, I as INFO, j as INVALID, k as IdentifiableKind, M as MARKER, N as NEUTRAL, l as NormalizedSettingsRow, R as RendererLayerArgs, m as RendererLayerDefinition, n as RendererLayerInstance, S as SERIES_LINE, o as SESSION_OFF, p as SESSION_POST, q as SESSION_PRE, r as SLATE, s as SLATE_DEEP, t as SeriesDataEngine, u as SeriesDataEngineHost, v as SettingsInlineControl, w as SettingsRowCondition, x as SettingsRowDescriptor, y as SettingsRowInlineNumber, z as SettingsRowSwatch, E as SettingsRowValueKey, F as SettingsRowWhen, G as SettingsRowWidth, J as SettingsSelectOption, K as SettingsValueRow, T as TRADE_EXIT, L as TRADE_LONG, O as TRADE_SHORT, V as VALID, W as WARNING, P as categoricalColor, Q as chartType, U as chartTypes, X as createDrawing, Y as deserializeDrawing, Z as drawingTypes, _ as getDrawingType, $ as normalizeSettingsRow, a0 as registerChartType, a1 as registerDrawingType, a2 as registerRendererDefaults, a3 as registerRendererLayer, a4 as rendererDefaults, a5 as rendererLayers, a6 as settingsRowValueKeys, a7 as stableSeriesId, a8 as tickerModifierIds, a9 as unregisterChartType, aa as unregisterRendererDefaults, ab as unregisterRendererLayer } from './plugin-
|
|
5
|
+
import { M as MarketDataFeed, D as DataProvider, P as ProviderInfo, a as SymbolDescriptor, S as SymbolInfo, b as ProviderCapabilities, B as BarRange } from './DataProvider-BsQM2WNH.cjs';
|
|
6
|
+
export { A as ACCENT, a as ACCENT_BRIGHT, B as BEARISH, b as BULLISH, c as BarTransform, d as BasePaintingModulation, C as CATEGORICAL, e as CROSSHAIR, f as ChartTypeDefinition, g as ChartTypeSettingsInstance, h as ChartTypeSettingsSection, i as ChartTypeSettingsSubsection, D as DrawingTypeMeta, H as HIGHLIGHT, I as INFO, j as INVALID, k as IdentifiableKind, M as MARKER, N as NEUTRAL, l as NormalizedSettingsRow, R as RendererLayerArgs, m as RendererLayerDefinition, n as RendererLayerInstance, S as SERIES_LINE, o as SESSION_OFF, p as SESSION_POST, q as SESSION_PRE, r as SLATE, s as SLATE_DEEP, t as SeriesDataEngine, u as SeriesDataEngineHost, v as SettingsInlineControl, w as SettingsRowCondition, x as SettingsRowDescriptor, y as SettingsRowInlineNumber, z as SettingsRowSwatch, E as SettingsRowValueKey, F as SettingsRowWhen, G as SettingsRowWidth, J as SettingsSelectOption, K as SettingsValueRow, T as TRADE_EXIT, L as TRADE_LONG, O as TRADE_SHORT, V as VALID, W as WARNING, P as categoricalColor, Q as chartType, U as chartTypes, X as createDrawing, Y as deserializeDrawing, Z as drawingTypes, _ as getDrawingType, $ as normalizeSettingsRow, a0 as registerChartType, a1 as registerDrawingType, a2 as registerRendererDefaults, a3 as registerRendererLayer, a4 as rendererDefaults, a5 as rendererLayers, a6 as settingsRowValueKeys, a7 as stableSeriesId, a8 as tickerModifierIds, a9 as unregisterChartType, aa as unregisterRendererDefaults, ab as unregisterRendererLayer } from './plugin-BXhDHTYn.cjs';
|
|
7
7
|
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';
|
|
8
8
|
export { i as iconMarkup, r as registerIcon } from './icons-BZYbJXSV.cjs';
|
|
9
9
|
export { a as KeyBindingDescriptor, R as ResolvedBinding } from './keymap-CGOz5F5f.cjs';
|
|
@@ -1241,6 +1241,10 @@ declare class MultiProviderFeed implements MarketDataFeed {
|
|
|
1241
1241
|
canonicalSymbol(raw: string): string | null;
|
|
1242
1242
|
/** The registered provider INSTANCE under `name` (undefined if unknown). */
|
|
1243
1243
|
providerInstance(name: string): DataProvider | undefined;
|
|
1244
|
+
/** The icon URL for a DESCRIPTOR — its owning provider's `resolveSymbolIcon` (picker rows). */
|
|
1245
|
+
symbolIconOf(d: SymbolDescriptor): string | undefined;
|
|
1246
|
+
/** The icon URL for a raw SYMBOL string — resolve, then route (statusline, object tree). */
|
|
1247
|
+
symbolIcon(raw: string): string | undefined;
|
|
1244
1248
|
symbols(name?: string): SymbolDescriptor[];
|
|
1245
1249
|
/** Told when a symbol stays unservable by everything registered (the load is parked). */
|
|
1246
1250
|
onUnresolved(cb: (info: {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { D as DrawingsDocument, R as Resolved } from './contributions-
|
|
2
|
-
export { B as BarsChangeReason, C as CellStateContext, b as ContextSelect, c as DataControl, d as DrawingsControl, e as EngineAlert, f as EngineCapabilities, g as EngineContextSnapshot, h as EngineFactory, i as EngineWarning, j as ExecutionHandlers, k as ExecutionMarket, l as ExecutionRequest, m as ExecutionSession, E as ExternalIndicatorEntry, F as FetchSeries, n as IndicatorEventMap, I as IndicatorHandle, o as IndicatorSummary, L as LegendActionDescriptor, p as LegendIndicatorInfo, N as NativeIndicator, q as NativeIndicatorContext, r as NativeIndicatorDescriptor, s as NativeIndicatorInfo, t as NativeIndicatorOutput, P as ParsedSymbol, u as PreparedScript, v as RendererControl, w as RunIndicatorResult, x as SceneInspection, a as ScriptRun, y as ScriptRunCause, z as ScriptRunResult, S as ScriptingEngine, A as SidePanelButton, G as SidePanelDescriptor, H as SidePanelHandle, J as SidePanelHeader, K as StatePersistenceHandler, M as StrategyFill,
|
|
1
|
+
import { D as DrawingsDocument, R as Resolved } from './contributions-Z12BrWCy.js';
|
|
2
|
+
export { B as BarsChangeReason, C as CellStateContext, b as ContextSelect, c as DataControl, d as DrawingsControl, e as EngineAlert, f as EngineCapabilities, g as EngineContextSnapshot, h as EngineFactory, i as EngineWarning, j as ExecutionHandlers, k as ExecutionMarket, l as ExecutionRequest, m as ExecutionSession, E as ExternalIndicatorEntry, F as FetchSeries, n as IndicatorEventMap, I as IndicatorHandle, o as IndicatorSummary, L as LegendActionDescriptor, p as LegendIndicatorInfo, N as NativeIndicator, q as NativeIndicatorContext, r as NativeIndicatorDescriptor, s as NativeIndicatorInfo, t as NativeIndicatorOutput, O as OVERRIDABLE_TOPBAR_IDS, P as ParsedSymbol, u as PreparedScript, v as RendererControl, w as RunIndicatorResult, x as SceneInspection, a as ScriptRun, y as ScriptRunCause, z as ScriptRunResult, S as ScriptingEngine, A as SidePanelButton, G as SidePanelDescriptor, H as SidePanelHandle, J as SidePanelHeader, K as StatePersistenceHandler, M as StrategyFill, Q as StrategyState, T as StrategyTrade, U as SymbolRankingHook, X as TypedEventBus, V as Vela, Y as VelaDeps, Z as VelaEventMap, _ as VisibleBarRange, $ as WidgetActionDescriptor, a0 as WidgetActionTarget, a1 as WidgetAttachment, W as WidgetContext, a2 as getNativeIndicator, a3 as legendActions, a4 as nativeIndicatorDescriptors, a5 as nativeIndicatorTypes, a6 as registerDefaultEngine, a7 as registerLegendAction, a8 as registerNativeIndicator, a9 as registerSidePanel, aa as registerStatePersistence, ab as registerSymbolRanking, ac as registerWidgetAction, ad as registerWidgetAttachment, ae as resolveEngines, af as sidePanels, ag as statePersistenceHandlers, ah as symbolRanking, ai as topbarActionOverride, aj as unregisterDefaultEngine, ak as unregisterLegendAction, al as unregisterNativeIndicator, am as unregisterSidePanel, an as unregisterStatePersistence, ao as unregisterWidgetAction, ap as unregisterWidgetAttachment, aq as widgetActions, ar as widgetAttachments } from './contributions-Z12BrWCy.js';
|
|
3
3
|
import { D as Drawing, S as SerializedDrawing, U as Unsubscribe, L as LineStyle, P as PriceStyle, I as IChartRenderer, R as RendererCapabilities, e as RendererDisplayOptions, f as IndicatorRenderHandle, g as IndicatorStatus, c as VelaTheme, O as OHLCV, h as Pane, i as PaneAction, j as MoveTarget, k as IndicatorModel, l as ScenePatch, m as InputValue, n as SymbolPickerFn, o as LegendActionView, p as InputChangeEvent, T as ThemeName, C as CrosshairEvent, q as ClickEvent, A as AxisLongPressEvent, a as VisibleRange, r as DataWindowReadout, s as IDrawingsRendererPort, t as Millis, u as SnapMode, v as DrawingTypeKey, w as ToolbarDefinition, M as MarketConfig } from './options-BaVTMXaO.js';
|
|
4
4
|
export { x as AddIndicatorOptions, B as Background, y as BoxFontFamily, z as BoxHAlign, E as BoxTextSize, F as BoxVAlign, G as CandleBarColor, H as CandleSeries, J as CandleStyle, K as DataWindowGroup, Q as DataWindowOHLC, W as DataWindowRow, X as DirtyRange, Y as DrawingBox, Z as DrawingExtend, _ as DrawingIntent, $ as DrawingLabel, a0 as DrawingLine, a1 as DrawingLinefill, a2 as DrawingMode, a3 as DrawingPoint, a4 as DrawingPolyline, a5 as DrawingStyle, a6 as DrawingTable, a7 as DrawingText, a8 as DrawingXLoc, a9 as DrawingsOption, aa as Fill, ab as FillGradientStop, ac as IndicatorMeta, ad as InputCondition, ae as InputSchema, af as InputType, ag as InputWhen, ah as LabelStyle, ai as LabelYLoc, aj as LineLikeKind, ak as LineLikeSeries, al as LineLikeStyle, am as MarkerPoint, an as MarkerSeries, ao as MarketSnapshot, ap as MarketSwitch, aq as PaneAxis, ar as PaneAxisBand, as as PaneHint, at as PaneKind, au as PolylinePoint, av as PriceLine, aw as Projector, ax as ProviderName, ay as RendererConstructor, az as Scene, aA as SchemaPatch, aB as SeriesKind, aC as SeriesPoint, aD as SeriesSpec, aE as SeriesValueDelta, aF as SettingsField, aG as SettingsSchema, aH as SettingsVisibilityPolicy, aI as TableCell, aJ as TableMerge, aK as TablePosition, aL as ToolbarGroupConfig, aM as TradeExecution, aN as ValuePatch, b as VelaOptions, V as VisibleRangePreset, aO as buildToolbar, aP as defaultToolbar, aQ as inputVisible } from './options-BaVTMXaO.js';
|
|
5
|
-
import { M as MarketDataFeed, D as DataProvider, P as ProviderInfo, a as SymbolDescriptor, S as SymbolInfo, b as ProviderCapabilities, B as BarRange } from './DataProvider-
|
|
6
|
-
export { A as ACCENT, a as ACCENT_BRIGHT, B as BEARISH, b as BULLISH, c as BarTransform, d as BasePaintingModulation, C as CATEGORICAL, e as CROSSHAIR, f as ChartTypeDefinition, g as ChartTypeSettingsInstance, h as ChartTypeSettingsSection, i as ChartTypeSettingsSubsection, D as DrawingTypeMeta, H as HIGHLIGHT, I as INFO, j as INVALID, k as IdentifiableKind, M as MARKER, N as NEUTRAL, l as NormalizedSettingsRow, R as RendererLayerArgs, m as RendererLayerDefinition, n as RendererLayerInstance, S as SERIES_LINE, o as SESSION_OFF, p as SESSION_POST, q as SESSION_PRE, r as SLATE, s as SLATE_DEEP, t as SeriesDataEngine, u as SeriesDataEngineHost, v as SettingsInlineControl, w as SettingsRowCondition, x as SettingsRowDescriptor, y as SettingsRowInlineNumber, z as SettingsRowSwatch, E as SettingsRowValueKey, F as SettingsRowWhen, G as SettingsRowWidth, J as SettingsSelectOption, K as SettingsValueRow, T as TRADE_EXIT, L as TRADE_LONG, O as TRADE_SHORT, V as VALID, W as WARNING, P as categoricalColor, Q as chartType, U as chartTypes, X as createDrawing, Y as deserializeDrawing, Z as drawingTypes, _ as getDrawingType, $ as normalizeSettingsRow, a0 as registerChartType, a1 as registerDrawingType, a2 as registerRendererDefaults, a3 as registerRendererLayer, a4 as rendererDefaults, a5 as rendererLayers, a6 as settingsRowValueKeys, a7 as stableSeriesId, a8 as tickerModifierIds, a9 as unregisterChartType, aa as unregisterRendererDefaults, ab as unregisterRendererLayer } from './plugin-
|
|
5
|
+
import { M as MarketDataFeed, D as DataProvider, P as ProviderInfo, a as SymbolDescriptor, S as SymbolInfo, b as ProviderCapabilities, B as BarRange } from './DataProvider-BSLlBpB9.js';
|
|
6
|
+
export { A as ACCENT, a as ACCENT_BRIGHT, B as BEARISH, b as BULLISH, c as BarTransform, d as BasePaintingModulation, C as CATEGORICAL, e as CROSSHAIR, f as ChartTypeDefinition, g as ChartTypeSettingsInstance, h as ChartTypeSettingsSection, i as ChartTypeSettingsSubsection, D as DrawingTypeMeta, H as HIGHLIGHT, I as INFO, j as INVALID, k as IdentifiableKind, M as MARKER, N as NEUTRAL, l as NormalizedSettingsRow, R as RendererLayerArgs, m as RendererLayerDefinition, n as RendererLayerInstance, S as SERIES_LINE, o as SESSION_OFF, p as SESSION_POST, q as SESSION_PRE, r as SLATE, s as SLATE_DEEP, t as SeriesDataEngine, u as SeriesDataEngineHost, v as SettingsInlineControl, w as SettingsRowCondition, x as SettingsRowDescriptor, y as SettingsRowInlineNumber, z as SettingsRowSwatch, E as SettingsRowValueKey, F as SettingsRowWhen, G as SettingsRowWidth, J as SettingsSelectOption, K as SettingsValueRow, T as TRADE_EXIT, L as TRADE_LONG, O as TRADE_SHORT, V as VALID, W as WARNING, P as categoricalColor, Q as chartType, U as chartTypes, X as createDrawing, Y as deserializeDrawing, Z as drawingTypes, _ as getDrawingType, $ as normalizeSettingsRow, a0 as registerChartType, a1 as registerDrawingType, a2 as registerRendererDefaults, a3 as registerRendererLayer, a4 as rendererDefaults, a5 as rendererLayers, a6 as settingsRowValueKeys, a7 as stableSeriesId, a8 as tickerModifierIds, a9 as unregisterChartType, aa as unregisterRendererDefaults, ab as unregisterRendererLayer } from './plugin-9koBjc5H.js';
|
|
7
7
|
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';
|
|
8
8
|
export { i as iconMarkup, r as registerIcon } from './icons-BZYbJXSV.js';
|
|
9
9
|
export { a as KeyBindingDescriptor, R as ResolvedBinding } from './keymap-CGOz5F5f.js';
|
|
@@ -1241,6 +1241,10 @@ declare class MultiProviderFeed implements MarketDataFeed {
|
|
|
1241
1241
|
canonicalSymbol(raw: string): string | null;
|
|
1242
1242
|
/** The registered provider INSTANCE under `name` (undefined if unknown). */
|
|
1243
1243
|
providerInstance(name: string): DataProvider | undefined;
|
|
1244
|
+
/** The icon URL for a DESCRIPTOR — its owning provider's `resolveSymbolIcon` (picker rows). */
|
|
1245
|
+
symbolIconOf(d: SymbolDescriptor): string | undefined;
|
|
1246
|
+
/** The icon URL for a raw SYMBOL string — resolve, then route (statusline, object tree). */
|
|
1247
|
+
symbolIcon(raw: string): string | undefined;
|
|
1244
1248
|
symbols(name?: string): SymbolDescriptor[];
|
|
1245
1249
|
/** Told when a symbol stays unservable by everything registered (the load is parked). */
|
|
1246
1250
|
onUnresolved(cb: (info: {
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { stableSeriesId } from './chunk-AOGZBKUE.js';
|
|
2
|
-
export { BarStore, CachingDataFeed, DARK_THEME, DataControl, DrawingStore, DrawingToolbar, DrawingsControl, LIGHT_THEME, MultiProviderFeed, NativeRenderer, RendererControl, TypedEventBus, Vela, buildToolbar, defaultToolbar, resolveTheme, sharedBarStore, timeframeToMs } from './chunk-
|
|
3
|
-
export { DEFAULT_PANEL_MAX_WIDTH, DEFAULT_PANEL_MIN_WIDTH, DEFAULT_PANEL_WIDTH, Drawing, chartType, chartTypes, clampPanelWidth, createDrawing, deserializeDrawing, drawingTypes, getDrawingType, getNativeIndicator, inputVisible, legendActions, nativeIndicatorDescriptors, nativeIndicatorTypes, normalizeSettingsRow, registerChartType, registerDefaultEngine, registerDrawingType, registerLegendAction, registerNativeIndicator, registerRendererDefaults, registerRendererLayer, registerSidePanel, registerStatePersistence, registerWidgetAction, registerWidgetAttachment, rendererDefaults, rendererLayers, resolveEngines, settingsRowValueKeys, sidePanels, statePersistenceHandlers, tickerModifierIds, unregisterChartType, unregisterDefaultEngine, unregisterLegendAction, unregisterNativeIndicator, unregisterRendererDefaults, unregisterRendererLayer, unregisterSidePanel, unregisterStatePersistence, unregisterWidgetAction, unregisterWidgetAttachment, widgetActions, widgetAttachments } from './chunk-
|
|
2
|
+
export { BarStore, CachingDataFeed, DARK_THEME, DataControl, DrawingStore, DrawingToolbar, DrawingsControl, LIGHT_THEME, MultiProviderFeed, NativeRenderer, RendererControl, TypedEventBus, Vela, buildToolbar, defaultToolbar, resolveTheme, sharedBarStore, timeframeToMs } from './chunk-6WFKTAT4.js';
|
|
3
|
+
export { DEFAULT_PANEL_MAX_WIDTH, DEFAULT_PANEL_MIN_WIDTH, DEFAULT_PANEL_WIDTH, Drawing, OVERRIDABLE_TOPBAR_IDS, chartType, chartTypes, clampPanelWidth, createDrawing, deserializeDrawing, drawingTypes, getDrawingType, getNativeIndicator, inputVisible, legendActions, nativeIndicatorDescriptors, nativeIndicatorTypes, normalizeSettingsRow, registerChartType, registerDefaultEngine, registerDrawingType, registerLegendAction, registerNativeIndicator, registerRendererDefaults, registerRendererLayer, registerSidePanel, registerStatePersistence, registerSymbolRanking, registerWidgetAction, registerWidgetAttachment, rendererDefaults, rendererLayers, resolveEngines, settingsRowValueKeys, sidePanels, statePersistenceHandlers, symbolRanking, tickerModifierIds, topbarActionOverride, unregisterChartType, unregisterDefaultEngine, unregisterLegendAction, unregisterNativeIndicator, unregisterRendererDefaults, unregisterRendererLayer, unregisterSidePanel, unregisterStatePersistence, unregisterWidgetAction, unregisterWidgetAttachment, widgetActions, widgetAttachments } from './chunk-L3I2CCYO.js';
|
|
4
4
|
import './chunk-OICPLNU7.js';
|
|
5
5
|
export { ACCENT, ACCENT_BRIGHT, BEARISH, BULLISH, CATEGORICAL, CROSSHAIR, HIGHLIGHT, INFO, INVALID, MARKER, NEUTRAL, SERIES_LINE, SESSION_OFF, SESSION_POST, SESSION_PRE, SLATE, SLATE_DEEP, TRADE_EXIT, TRADE_LONG, TRADE_SHORT, VALID, WARNING, categoricalColor, iconMarkup, registerIcon } from './chunk-PN5KWFZ4.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { v as DrawingTypeKey, a5 as DrawingStyle, S as SerializedDrawing, D as Drawing, aB as SeriesKind, O as OHLCV, c as VelaTheme } from './options-BaVTMXaO.js';
|
|
2
|
-
import { c as DataControl } from './contributions-
|
|
2
|
+
import { c as DataControl } from './contributions-Z12BrWCy.js';
|
|
3
3
|
import './side-panel-CT9ZwIGz.js';
|
|
4
4
|
import './icons-BZYbJXSV.js';
|
|
5
5
|
import './keymap-CGOz5F5f.js';
|
|
6
|
-
import './DataProvider-
|
|
6
|
+
import './DataProvider-BSLlBpB9.js';
|
|
7
7
|
|
|
8
8
|
/** What a drawing type contributes to the toolbar + factory (renderer-neutral). */
|
|
9
9
|
interface DrawingTypeMeta {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { v as DrawingTypeKey, a5 as DrawingStyle, S as SerializedDrawing, D as Drawing, aB as SeriesKind, O as OHLCV, c as VelaTheme } from './options-BaVTMXaO.cjs';
|
|
2
|
-
import { c as DataControl } from './contributions-
|
|
2
|
+
import { c as DataControl } from './contributions-Hv4_cOJo.cjs';
|
|
3
3
|
import './side-panel-CT9ZwIGz.cjs';
|
|
4
4
|
import './icons-BZYbJXSV.cjs';
|
|
5
5
|
import './keymap-CGOz5F5f.cjs';
|
|
6
|
-
import './DataProvider-
|
|
6
|
+
import './DataProvider-BsQM2WNH.cjs';
|
|
7
7
|
|
|
8
8
|
/** What a drawing type contributes to the toolbar + factory (renderer-neutral). */
|
|
9
9
|
interface DrawingTypeMeta {
|
package/dist/plugin.cjs
CHANGED
|
@@ -103,6 +103,9 @@ function rendererLayers() {
|
|
|
103
103
|
return [...registry2.values()];
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
+
// src/widget/topbar-composition.ts
|
|
107
|
+
var TOPBAR_BUILTIN_IDS = ["symbol", "timeframes", "style", "layout", "indicators", "actions", "undo-redo", "alerts", "panels", "screenshot"];
|
|
108
|
+
|
|
106
109
|
// src/widget/contributions.ts
|
|
107
110
|
var registry3 = /* @__PURE__ */ new Map();
|
|
108
111
|
var attachments = /* @__PURE__ */ new Map();
|
|
@@ -132,7 +135,18 @@ function unregisterSidePanel(id) {
|
|
|
132
135
|
function sidePanels() {
|
|
133
136
|
return [...panels.values()].sort((a, b) => (a.order ?? DEFAULT_PANEL_ORDER) - (b.order ?? DEFAULT_PANEL_ORDER));
|
|
134
137
|
}
|
|
138
|
+
var OVERRIDABLE_TOPBAR_IDS = ["indicators", "screenshot"];
|
|
139
|
+
var overridableSet = new Set(OVERRIDABLE_TOPBAR_IDS);
|
|
140
|
+
var builtinTopbarSet = new Set(TOPBAR_BUILTIN_IDS);
|
|
141
|
+
function topbarActionOverride(id) {
|
|
142
|
+
if (!overridableSet.has(id)) return void 0;
|
|
143
|
+
return registry3.get(id);
|
|
144
|
+
}
|
|
135
145
|
function registerWidgetAction(desc) {
|
|
146
|
+
if (builtinTopbarSet.has(desc.id) && !overridableSet.has(desc.id)) {
|
|
147
|
+
console.warn(`[vela] widget action "${desc.id}": this built-in topbar slot is a stateful control and cannot be overridden \u2014 ignored. Overridable slots: ${OVERRIDABLE_TOPBAR_IDS.join(", ")}.`);
|
|
148
|
+
return () => void 0;
|
|
149
|
+
}
|
|
136
150
|
registry3.set(desc.id, desc);
|
|
137
151
|
return () => {
|
|
138
152
|
if (registry3.get(desc.id) === desc) registry3.delete(desc.id);
|
|
@@ -172,6 +186,16 @@ function unregisterStatePersistence(key) {
|
|
|
172
186
|
function statePersistenceHandlers(scope) {
|
|
173
187
|
return [...stateHandlers.values()].filter((h) => h.scope === scope);
|
|
174
188
|
}
|
|
189
|
+
var symbolRankingHook;
|
|
190
|
+
function registerSymbolRanking(hook) {
|
|
191
|
+
symbolRankingHook = hook;
|
|
192
|
+
return () => {
|
|
193
|
+
if (symbolRankingHook === hook) symbolRankingHook = void 0;
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
function symbolRanking() {
|
|
197
|
+
return symbolRankingHook;
|
|
198
|
+
}
|
|
175
199
|
var defaultEngines = /* @__PURE__ */ new Map();
|
|
176
200
|
function registerDefaultEngine(language, make) {
|
|
177
201
|
defaultEngines.set(language, make);
|
|
@@ -5990,6 +6014,7 @@ exports.INFO = INFO;
|
|
|
5990
6014
|
exports.INVALID = INVALID;
|
|
5991
6015
|
exports.MARKER = MARKER;
|
|
5992
6016
|
exports.NEUTRAL = NEUTRAL;
|
|
6017
|
+
exports.OVERRIDABLE_TOPBAR_IDS = OVERRIDABLE_TOPBAR_IDS;
|
|
5993
6018
|
exports.SERIES_LINE = SERIES_LINE;
|
|
5994
6019
|
exports.SESSION_OFF = SESSION_OFF;
|
|
5995
6020
|
exports.SESSION_POST = SESSION_POST;
|
|
@@ -6022,6 +6047,7 @@ exports.registerRendererDefaults = registerRendererDefaults;
|
|
|
6022
6047
|
exports.registerRendererLayer = registerRendererLayer;
|
|
6023
6048
|
exports.registerSidePanel = registerSidePanel;
|
|
6024
6049
|
exports.registerStatePersistence = registerStatePersistence;
|
|
6050
|
+
exports.registerSymbolRanking = registerSymbolRanking;
|
|
6025
6051
|
exports.registerWidgetAction = registerWidgetAction;
|
|
6026
6052
|
exports.registerWidgetAttachment = registerWidgetAttachment;
|
|
6027
6053
|
exports.rendererDefaults = rendererDefaults;
|
|
@@ -6031,7 +6057,9 @@ exports.settingsRowValueKeys = settingsRowValueKeys;
|
|
|
6031
6057
|
exports.sidePanels = sidePanels;
|
|
6032
6058
|
exports.stableSeriesId = stableSeriesId;
|
|
6033
6059
|
exports.statePersistenceHandlers = statePersistenceHandlers;
|
|
6060
|
+
exports.symbolRanking = symbolRanking;
|
|
6034
6061
|
exports.tickerModifierIds = tickerModifierIds;
|
|
6062
|
+
exports.topbarActionOverride = topbarActionOverride;
|
|
6035
6063
|
exports.unregisterChartType = unregisterChartType;
|
|
6036
6064
|
exports.unregisterDefaultEngine = unregisterDefaultEngine;
|
|
6037
6065
|
exports.unregisterLegendAction = unregisterLegendAction;
|
package/dist/plugin.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { A as ACCENT, a as ACCENT_BRIGHT, B as BEARISH, b as BULLISH, c as BarTransform, d as BasePaintingModulation, C as CATEGORICAL, e as CROSSHAIR, f as ChartTypeDefinition, g as ChartTypeSettingsInstance, h as ChartTypeSettingsSection, i as ChartTypeSettingsSubsection, D as DrawingTypeMeta, H as HIGHLIGHT, I as INFO, j as INVALID, k as IdentifiableKind, M as MARKER, N as NEUTRAL, l as NormalizedSettingsRow, R as RendererLayerArgs, m as RendererLayerDefinition, n as RendererLayerInstance, S as SERIES_LINE, o as SESSION_OFF, p as SESSION_POST, q as SESSION_PRE, r as SLATE, s as SLATE_DEEP, t as SeriesDataEngine, u as SeriesDataEngineHost, v as SettingsInlineControl, w as SettingsRowCondition, x as SettingsRowDescriptor, y as SettingsRowInlineNumber, z as SettingsRowSwatch, E as SettingsRowValueKey, F as SettingsRowWhen, G as SettingsRowWidth, J as SettingsSelectOption, K as SettingsValueRow, T as TRADE_EXIT, L as TRADE_LONG, O as TRADE_SHORT, V as VALID, W as WARNING, P as categoricalColor, Q as chartType, U as chartTypes, Z as drawingTypes, _ as getDrawingType, $ as normalizeSettingsRow, a0 as registerChartType, a2 as registerRendererDefaults, a3 as registerRendererLayer, a4 as rendererDefaults, a5 as rendererLayers, a6 as settingsRowValueKeys, a7 as stableSeriesId, a8 as tickerModifierIds, a9 as unregisterChartType, aa as unregisterRendererDefaults, ab as unregisterRendererLayer } from './plugin-
|
|
2
|
-
export { B as BarsChangeReason, C as CellStateContext, b as ContextSelect, e as EngineAlert, f as EngineCapabilities, g as EngineContextSnapshot, h as EngineFactory, i as EngineWarning, j as ExecutionHandlers, k as ExecutionMarket, l as ExecutionRequest, m as ExecutionSession, E as ExternalIndicatorEntry, F as FetchSeries, L as LegendActionDescriptor, p as LegendIndicatorInfo, N as NativeIndicator, q as NativeIndicatorContext, r as NativeIndicatorDescriptor, s as NativeIndicatorInfo, t as NativeIndicatorOutput, u as PreparedScript, a as ScriptRun, y as ScriptRunCause, z as ScriptRunResult, S as ScriptingEngine, A as SidePanelButton, G as SidePanelDescriptor, H as SidePanelHandle, J as SidePanelHeader, K as StatePersistenceHandler, M as StrategyFill,
|
|
1
|
+
export { A as ACCENT, a as ACCENT_BRIGHT, B as BEARISH, b as BULLISH, c as BarTransform, d as BasePaintingModulation, C as CATEGORICAL, e as CROSSHAIR, f as ChartTypeDefinition, g as ChartTypeSettingsInstance, h as ChartTypeSettingsSection, i as ChartTypeSettingsSubsection, D as DrawingTypeMeta, H as HIGHLIGHT, I as INFO, j as INVALID, k as IdentifiableKind, M as MARKER, N as NEUTRAL, l as NormalizedSettingsRow, R as RendererLayerArgs, m as RendererLayerDefinition, n as RendererLayerInstance, S as SERIES_LINE, o as SESSION_OFF, p as SESSION_POST, q as SESSION_PRE, r as SLATE, s as SLATE_DEEP, t as SeriesDataEngine, u as SeriesDataEngineHost, v as SettingsInlineControl, w as SettingsRowCondition, x as SettingsRowDescriptor, y as SettingsRowInlineNumber, z as SettingsRowSwatch, E as SettingsRowValueKey, F as SettingsRowWhen, G as SettingsRowWidth, J as SettingsSelectOption, K as SettingsValueRow, T as TRADE_EXIT, L as TRADE_LONG, O as TRADE_SHORT, V as VALID, W as WARNING, P as categoricalColor, Q as chartType, U as chartTypes, Z as drawingTypes, _ as getDrawingType, $ as normalizeSettingsRow, a0 as registerChartType, a2 as registerRendererDefaults, a3 as registerRendererLayer, a4 as rendererDefaults, a5 as rendererLayers, a6 as settingsRowValueKeys, a7 as stableSeriesId, a8 as tickerModifierIds, a9 as unregisterChartType, aa as unregisterRendererDefaults, ab as unregisterRendererLayer } from './plugin-BXhDHTYn.cjs';
|
|
2
|
+
export { B as BarsChangeReason, C as CellStateContext, b as ContextSelect, e as EngineAlert, f as EngineCapabilities, g as EngineContextSnapshot, h as EngineFactory, i as EngineWarning, j as ExecutionHandlers, k as ExecutionMarket, l as ExecutionRequest, m as ExecutionSession, E as ExternalIndicatorEntry, F as FetchSeries, L as LegendActionDescriptor, p as LegendIndicatorInfo, N as NativeIndicator, q as NativeIndicatorContext, r as NativeIndicatorDescriptor, s as NativeIndicatorInfo, t as NativeIndicatorOutput, O as OVERRIDABLE_TOPBAR_IDS, u as PreparedScript, a as ScriptRun, y as ScriptRunCause, z as ScriptRunResult, S as ScriptingEngine, A as SidePanelButton, G as SidePanelDescriptor, H as SidePanelHandle, J as SidePanelHeader, K as StatePersistenceHandler, M as StrategyFill, Q as StrategyState, T as StrategyTrade, U as SymbolRankingHook, _ as VisibleBarRange, $ as WidgetActionDescriptor, a0 as WidgetActionTarget, a1 as WidgetAttachment, W as WidgetContext, a2 as getNativeIndicator, a3 as legendActions, a5 as nativeIndicatorTypes, a6 as registerDefaultEngine, a7 as registerLegendAction, a8 as registerNativeIndicator, a9 as registerSidePanel, aa as registerStatePersistence, ab as registerSymbolRanking, ac as registerWidgetAction, ad as registerWidgetAttachment, ae as resolveEngines, af as sidePanels, ag as statePersistenceHandlers, ah as symbolRanking, ai as topbarActionOverride, aj as unregisterDefaultEngine, ak as unregisterLegendAction, al as unregisterNativeIndicator, am as unregisterSidePanel, an as unregisterStatePersistence, ao as unregisterWidgetAction, ap as unregisterWidgetAttachment, aq as widgetActions, ar as widgetAttachments } from './contributions-Hv4_cOJo.cjs';
|
|
3
3
|
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';
|
|
4
4
|
export { B as Background, y as BoxFontFamily, z as BoxHAlign, E as BoxTextSize, F as BoxVAlign, G as CandleBarColor, H as CandleSeries, J as CandleStyle, X as DirtyRange, Y as DrawingBox, Z as DrawingExtend, $ as DrawingLabel, a0 as DrawingLine, a1 as DrawingLinefill, a4 as DrawingPolyline, a6 as DrawingTable, v as DrawingTypeKey, a8 as DrawingXLoc, aa as Fill, ab as FillGradientStop, ac as IndicatorMeta, k as IndicatorModel, ad as InputCondition, ae as InputSchema, af as InputType, m as InputValue, ag as InputWhen, ah as LabelStyle, ai as LabelYLoc, aj as LineLikeKind, ak as LineLikeSeries, al as LineLikeStyle, L as LineStyle, am as MarkerPoint, an as MarkerSeries, t as Millis, O as OHLCV, h as Pane, aq as PaneAxis, ar as PaneAxisBand, as as PaneHint, at as PaneKind, au as PolylinePoint, av as PriceLine, P as PriceStyle, az as Scene, l as ScenePatch, aA as SchemaPatch, aB as SeriesKind, aC as SeriesPoint, aD as SeriesSpec, aE as SeriesValueDelta, aI as TableCell, aJ as TableMerge, aK as TablePosition, aM as TradeExecution, aN as ValuePatch, aQ as inputVisible } from './options-BaVTMXaO.cjs';
|
|
5
5
|
export { i as iconMarkup, r as registerIcon } from './icons-BZYbJXSV.cjs';
|
|
6
6
|
export { a as KeyBindingDescriptor, R as ResolvedBinding } from './keymap-CGOz5F5f.cjs';
|
|
7
|
-
export { B as BarRange, D as DataProvider, M as MarketDataFeed, b as ProviderCapabilities, P as ProviderInfo, a as SymbolDescriptor, S as SymbolInfo } from './DataProvider-
|
|
7
|
+
export { B as BarRange, D as DataProvider, M as MarketDataFeed, b as ProviderCapabilities, P as ProviderInfo, a as SymbolDescriptor, S as SymbolInfo } from './DataProvider-BsQM2WNH.cjs';
|
package/dist/plugin.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { A as ACCENT, a as ACCENT_BRIGHT, B as BEARISH, b as BULLISH, c as BarTransform, d as BasePaintingModulation, C as CATEGORICAL, e as CROSSHAIR, f as ChartTypeDefinition, g as ChartTypeSettingsInstance, h as ChartTypeSettingsSection, i as ChartTypeSettingsSubsection, D as DrawingTypeMeta, H as HIGHLIGHT, I as INFO, j as INVALID, k as IdentifiableKind, M as MARKER, N as NEUTRAL, l as NormalizedSettingsRow, R as RendererLayerArgs, m as RendererLayerDefinition, n as RendererLayerInstance, S as SERIES_LINE, o as SESSION_OFF, p as SESSION_POST, q as SESSION_PRE, r as SLATE, s as SLATE_DEEP, t as SeriesDataEngine, u as SeriesDataEngineHost, v as SettingsInlineControl, w as SettingsRowCondition, x as SettingsRowDescriptor, y as SettingsRowInlineNumber, z as SettingsRowSwatch, E as SettingsRowValueKey, F as SettingsRowWhen, G as SettingsRowWidth, J as SettingsSelectOption, K as SettingsValueRow, T as TRADE_EXIT, L as TRADE_LONG, O as TRADE_SHORT, V as VALID, W as WARNING, P as categoricalColor, Q as chartType, U as chartTypes, Z as drawingTypes, _ as getDrawingType, $ as normalizeSettingsRow, a0 as registerChartType, a2 as registerRendererDefaults, a3 as registerRendererLayer, a4 as rendererDefaults, a5 as rendererLayers, a6 as settingsRowValueKeys, a7 as stableSeriesId, a8 as tickerModifierIds, a9 as unregisterChartType, aa as unregisterRendererDefaults, ab as unregisterRendererLayer } from './plugin-
|
|
2
|
-
export { B as BarsChangeReason, C as CellStateContext, b as ContextSelect, e as EngineAlert, f as EngineCapabilities, g as EngineContextSnapshot, h as EngineFactory, i as EngineWarning, j as ExecutionHandlers, k as ExecutionMarket, l as ExecutionRequest, m as ExecutionSession, E as ExternalIndicatorEntry, F as FetchSeries, L as LegendActionDescriptor, p as LegendIndicatorInfo, N as NativeIndicator, q as NativeIndicatorContext, r as NativeIndicatorDescriptor, s as NativeIndicatorInfo, t as NativeIndicatorOutput, u as PreparedScript, a as ScriptRun, y as ScriptRunCause, z as ScriptRunResult, S as ScriptingEngine, A as SidePanelButton, G as SidePanelDescriptor, H as SidePanelHandle, J as SidePanelHeader, K as StatePersistenceHandler, M as StrategyFill,
|
|
1
|
+
export { A as ACCENT, a as ACCENT_BRIGHT, B as BEARISH, b as BULLISH, c as BarTransform, d as BasePaintingModulation, C as CATEGORICAL, e as CROSSHAIR, f as ChartTypeDefinition, g as ChartTypeSettingsInstance, h as ChartTypeSettingsSection, i as ChartTypeSettingsSubsection, D as DrawingTypeMeta, H as HIGHLIGHT, I as INFO, j as INVALID, k as IdentifiableKind, M as MARKER, N as NEUTRAL, l as NormalizedSettingsRow, R as RendererLayerArgs, m as RendererLayerDefinition, n as RendererLayerInstance, S as SERIES_LINE, o as SESSION_OFF, p as SESSION_POST, q as SESSION_PRE, r as SLATE, s as SLATE_DEEP, t as SeriesDataEngine, u as SeriesDataEngineHost, v as SettingsInlineControl, w as SettingsRowCondition, x as SettingsRowDescriptor, y as SettingsRowInlineNumber, z as SettingsRowSwatch, E as SettingsRowValueKey, F as SettingsRowWhen, G as SettingsRowWidth, J as SettingsSelectOption, K as SettingsValueRow, T as TRADE_EXIT, L as TRADE_LONG, O as TRADE_SHORT, V as VALID, W as WARNING, P as categoricalColor, Q as chartType, U as chartTypes, Z as drawingTypes, _ as getDrawingType, $ as normalizeSettingsRow, a0 as registerChartType, a2 as registerRendererDefaults, a3 as registerRendererLayer, a4 as rendererDefaults, a5 as rendererLayers, a6 as settingsRowValueKeys, a7 as stableSeriesId, a8 as tickerModifierIds, a9 as unregisterChartType, aa as unregisterRendererDefaults, ab as unregisterRendererLayer } from './plugin-9koBjc5H.js';
|
|
2
|
+
export { B as BarsChangeReason, C as CellStateContext, b as ContextSelect, e as EngineAlert, f as EngineCapabilities, g as EngineContextSnapshot, h as EngineFactory, i as EngineWarning, j as ExecutionHandlers, k as ExecutionMarket, l as ExecutionRequest, m as ExecutionSession, E as ExternalIndicatorEntry, F as FetchSeries, L as LegendActionDescriptor, p as LegendIndicatorInfo, N as NativeIndicator, q as NativeIndicatorContext, r as NativeIndicatorDescriptor, s as NativeIndicatorInfo, t as NativeIndicatorOutput, O as OVERRIDABLE_TOPBAR_IDS, u as PreparedScript, a as ScriptRun, y as ScriptRunCause, z as ScriptRunResult, S as ScriptingEngine, A as SidePanelButton, G as SidePanelDescriptor, H as SidePanelHandle, J as SidePanelHeader, K as StatePersistenceHandler, M as StrategyFill, Q as StrategyState, T as StrategyTrade, U as SymbolRankingHook, _ as VisibleBarRange, $ as WidgetActionDescriptor, a0 as WidgetActionTarget, a1 as WidgetAttachment, W as WidgetContext, a2 as getNativeIndicator, a3 as legendActions, a5 as nativeIndicatorTypes, a6 as registerDefaultEngine, a7 as registerLegendAction, a8 as registerNativeIndicator, a9 as registerSidePanel, aa as registerStatePersistence, ab as registerSymbolRanking, ac as registerWidgetAction, ad as registerWidgetAttachment, ae as resolveEngines, af as sidePanels, ag as statePersistenceHandlers, ah as symbolRanking, ai as topbarActionOverride, aj as unregisterDefaultEngine, ak as unregisterLegendAction, al as unregisterNativeIndicator, am as unregisterSidePanel, an as unregisterStatePersistence, ao as unregisterWidgetAction, ap as unregisterWidgetAttachment, aq as widgetActions, ar as widgetAttachments } from './contributions-Z12BrWCy.js';
|
|
3
3
|
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';
|
|
4
4
|
export { B as Background, y as BoxFontFamily, z as BoxHAlign, E as BoxTextSize, F as BoxVAlign, G as CandleBarColor, H as CandleSeries, J as CandleStyle, X as DirtyRange, Y as DrawingBox, Z as DrawingExtend, $ as DrawingLabel, a0 as DrawingLine, a1 as DrawingLinefill, a4 as DrawingPolyline, a6 as DrawingTable, v as DrawingTypeKey, a8 as DrawingXLoc, aa as Fill, ab as FillGradientStop, ac as IndicatorMeta, k as IndicatorModel, ad as InputCondition, ae as InputSchema, af as InputType, m as InputValue, ag as InputWhen, ah as LabelStyle, ai as LabelYLoc, aj as LineLikeKind, ak as LineLikeSeries, al as LineLikeStyle, L as LineStyle, am as MarkerPoint, an as MarkerSeries, t as Millis, O as OHLCV, h as Pane, aq as PaneAxis, ar as PaneAxisBand, as as PaneHint, at as PaneKind, au as PolylinePoint, av as PriceLine, P as PriceStyle, az as Scene, l as ScenePatch, aA as SchemaPatch, aB as SeriesKind, aC as SeriesPoint, aD as SeriesSpec, aE as SeriesValueDelta, aI as TableCell, aJ as TableMerge, aK as TablePosition, aM as TradeExecution, aN as ValuePatch, aQ as inputVisible } from './options-BaVTMXaO.js';
|
|
5
5
|
export { i as iconMarkup, r as registerIcon } from './icons-BZYbJXSV.js';
|
|
6
6
|
export { a as KeyBindingDescriptor, R as ResolvedBinding } from './keymap-CGOz5F5f.js';
|
|
7
|
-
export { B as BarRange, D as DataProvider, M as MarketDataFeed, b as ProviderCapabilities, P as ProviderInfo, a as SymbolDescriptor, S as SymbolInfo } from './DataProvider-
|
|
7
|
+
export { B as BarRange, D as DataProvider, M as MarketDataFeed, b as ProviderCapabilities, P as ProviderInfo, a as SymbolDescriptor, S as SymbolInfo } from './DataProvider-BSLlBpB9.js';
|
package/dist/plugin.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { stableSeriesId } from './chunk-AOGZBKUE.js';
|
|
2
|
-
export { DEFAULT_PANEL_MAX_WIDTH, DEFAULT_PANEL_MIN_WIDTH, DEFAULT_PANEL_WIDTH, chartType, chartTypes, clampPanelWidth, drawingTypes, getDrawingType, getNativeIndicator, inputVisible, legendActions, nativeIndicatorTypes, normalizeSettingsRow, registerChartType, registerDefaultEngine, registerLegendAction, registerNativeIndicator, registerRendererDefaults, registerRendererLayer, registerSidePanel, registerStatePersistence, registerWidgetAction, registerWidgetAttachment, rendererDefaults, rendererLayers, resolveEngines, settingsRowValueKeys, sidePanels, statePersistenceHandlers, tickerModifierIds, unregisterChartType, unregisterDefaultEngine, unregisterLegendAction, unregisterNativeIndicator, unregisterRendererDefaults, unregisterRendererLayer, unregisterSidePanel, unregisterStatePersistence, unregisterWidgetAction, unregisterWidgetAttachment, widgetActions, widgetAttachments } from './chunk-
|
|
2
|
+
export { DEFAULT_PANEL_MAX_WIDTH, DEFAULT_PANEL_MIN_WIDTH, DEFAULT_PANEL_WIDTH, OVERRIDABLE_TOPBAR_IDS, chartType, chartTypes, clampPanelWidth, drawingTypes, getDrawingType, getNativeIndicator, inputVisible, legendActions, nativeIndicatorTypes, normalizeSettingsRow, registerChartType, registerDefaultEngine, registerLegendAction, registerNativeIndicator, registerRendererDefaults, registerRendererLayer, registerSidePanel, registerStatePersistence, registerSymbolRanking, registerWidgetAction, registerWidgetAttachment, rendererDefaults, rendererLayers, resolveEngines, settingsRowValueKeys, sidePanels, statePersistenceHandlers, symbolRanking, tickerModifierIds, topbarActionOverride, unregisterChartType, unregisterDefaultEngine, unregisterLegendAction, unregisterNativeIndicator, unregisterRendererDefaults, unregisterRendererLayer, unregisterSidePanel, unregisterStatePersistence, unregisterWidgetAction, unregisterWidgetAttachment, widgetActions, widgetAttachments } from './chunk-L3I2CCYO.js';
|
|
3
3
|
export { ACCENT, ACCENT_BRIGHT, BEARISH, BULLISH, CATEGORICAL, CROSSHAIR, HIGHLIGHT, INFO, INVALID, MARKER, NEUTRAL, SERIES_LINE, SESSION_OFF, SESSION_POST, SESSION_PRE, SLATE, SLATE_DEEP, TRADE_EXIT, TRADE_LONG, TRADE_SHORT, VALID, WARNING, categoricalColor, iconMarkup, registerIcon } from './chunk-PN5KWFZ4.js';
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
// src/data/symbol-base.ts
|
|
4
|
+
function baseOf(d) {
|
|
5
|
+
const fromDesc = d.description?.split("/")[0]?.trim();
|
|
6
|
+
if (fromDesc) return fromDesc.replace(/\s+Perpetual$/i, "");
|
|
7
|
+
return d.ticker.replace(/[-_/]?(USDT|USDC|USD1|USDS|BUSD|USD|EUR|PERP)$/i, "") || d.ticker;
|
|
8
|
+
}
|
|
9
|
+
function ledgerCryptoIconUrl(base) {
|
|
10
|
+
const key = base.trim().toUpperCase();
|
|
11
|
+
return key ? `https://crypto-icons.ledger.com/${encodeURIComponent(key)}.png` : void 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
3
14
|
// src/data/providers/binance/BinanceProvider.ts
|
|
4
15
|
var SPOT_BASE = "https://api.binance.com/api/v3";
|
|
5
16
|
var SPOT_BASE_US = "https://api.binance.us/api/v3";
|
|
@@ -186,6 +197,11 @@ var BinanceProvider = class {
|
|
|
186
197
|
}
|
|
187
198
|
return this.symbolsPromise;
|
|
188
199
|
}
|
|
200
|
+
/** Predefined icon source for a crypto venue: the Ledger crypto-icon CDN, keyed by
|
|
201
|
+
* the BASE asset (the description's first segment, else the de-suffixed ticker). */
|
|
202
|
+
resolveSymbolIcon(symbol) {
|
|
203
|
+
return ledgerCryptoIconUrl(baseOf(symbol));
|
|
204
|
+
}
|
|
189
205
|
subscribe(ticker, timeframe, onBar) {
|
|
190
206
|
const { apiSymbol, isFutures } = parseTicker(ticker);
|
|
191
207
|
const interval = TF_TO_INTERVAL[normalizeTf(timeframe)];
|