@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.
Files changed (43) hide show
  1. package/dist/{DataProvider-JJq7M2it.d.ts → DataProvider-BSLlBpB9.d.ts} +10 -0
  2. package/dist/{DataProvider-DDUYw2qP.d.cts → DataProvider-BsQM2WNH.d.cts} +10 -0
  3. package/dist/{bottombar-COnL2Sk4.d.ts → bottombar-Br4rzx_R.d.ts} +52 -6
  4. package/dist/{bottombar-DeDXbF_K.d.cts → bottombar-Div5zibZ.d.cts} +52 -6
  5. package/dist/{chunk-JQFO2WMU.js → chunk-6WFKTAT4.js} +37 -1
  6. package/dist/{chunk-OEUGUXL7.js → chunk-L3I2CCYO.js} +49 -1
  7. package/dist/chunk-W4EJWLEO.js +12 -0
  8. package/dist/{chunk-TMXK2SJR.js → chunk-WVP4XV5A.js} +221 -65
  9. package/dist/{contributions-DNMqrAuw.d.cts → contributions-Hv4_cOJo.d.cts} +46 -3
  10. package/dist/{contributions-BqCIsbaP.d.ts → contributions-Z12BrWCy.d.ts} +46 -3
  11. package/dist/index.cjs +64 -0
  12. package/dist/index.d.cts +8 -4
  13. package/dist/index.d.ts +8 -4
  14. package/dist/index.js +2 -2
  15. package/dist/{plugin-WnvNNJOp.d.ts → plugin-9koBjc5H.d.ts} +2 -2
  16. package/dist/{plugin-CN8U2__Q.d.cts → plugin-BXhDHTYn.d.cts} +2 -2
  17. package/dist/plugin.cjs +28 -0
  18. package/dist/plugin.d.cts +3 -3
  19. package/dist/plugin.d.ts +3 -3
  20. package/dist/plugin.js +1 -1
  21. package/dist/providers/binance.cjs +16 -0
  22. package/dist/providers/binance.d.cts +4 -1
  23. package/dist/providers/binance.d.ts +4 -1
  24. package/dist/providers/binance.js +7 -0
  25. package/dist/providers/coinbase.cjs +16 -0
  26. package/dist/providers/coinbase.d.cts +4 -1
  27. package/dist/providers/coinbase.d.ts +4 -1
  28. package/dist/providers/coinbase.js +7 -0
  29. package/dist/providers/hyperliquid.cjs +16 -0
  30. package/dist/providers/hyperliquid.d.cts +4 -1
  31. package/dist/providers/hyperliquid.d.ts +4 -1
  32. package/dist/providers/hyperliquid.js +7 -0
  33. package/dist/vela.global.js +90 -0
  34. package/dist/vela.global.min.js +42 -42
  35. package/dist/widget.cjs +319 -63
  36. package/dist/widget.d.cts +52 -10
  37. package/dist/widget.d.ts +52 -10
  38. package/dist/widget.js +5 -4
  39. package/dist/workspace.cjs +265 -65
  40. package/dist/workspace.d.cts +13 -4
  41. package/dist/workspace.d.ts +13 -4
  42. package/dist/workspace.js +4 -3
  43. package/package.json +1 -1
package/dist/widget.d.cts CHANGED
@@ -1,10 +1,10 @@
1
- import { V as Vela, W as WidgetContext, A as SidePanelButton } from './contributions-DNMqrAuw.cjs';
2
- export { C as CellStateContext, an as DEFAULT_PANEL_ORDER, E as ExternalIndicatorEntry, G as SidePanelDescriptor, H as SidePanelHandle, K as StatePersistenceHandler, Z as WidgetActionDescriptor, _ as WidgetActionTarget, $ as WidgetAttachment, a7 as registerSidePanel, a8 as registerStatePersistence, a9 as registerWidgetAction, aa as registerWidgetAttachment, ac as sidePanels, ad as statePersistenceHandlers, ah as unregisterSidePanel, ai as unregisterStatePersistence, aj as unregisterWidgetAction, ak as unregisterWidgetAttachment, al as widgetActions, am as widgetAttachments } from './contributions-DNMqrAuw.cjs';
1
+ import { V as Vela, W as WidgetContext, A as SidePanelButton } from './contributions-Hv4_cOJo.cjs';
2
+ export { C as CellStateContext, as as DEFAULT_PANEL_ORDER, E as ExternalIndicatorEntry, O as OVERRIDABLE_TOPBAR_IDS, G as SidePanelDescriptor, H as SidePanelHandle, K as StatePersistenceHandler, U as SymbolRankingHook, $ as WidgetActionDescriptor, a0 as WidgetActionTarget, a1 as WidgetAttachment, a9 as registerSidePanel, aa as registerStatePersistence, ab as registerSymbolRanking, ac as registerWidgetAction, ad as registerWidgetAttachment, af as sidePanels, ag as statePersistenceHandlers, ah as symbolRanking, ai as topbarActionOverride, 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 { b as VelaOptions, d as MarketSession, T as ThemeName, c as VelaTheme, r as DataWindowReadout } from './options-BaVTMXaO.cjs';
4
- import { b as VelaShellOptions, W as WidgetHistory, a as RangePreset, e as WorkspaceState, P as PanelsState } from './bottombar-DeDXbF_K.cjs';
5
- export { B as Bottombar, i as BottombarOptions, C as CellState, f as ChartState, I as IndicatorLoader, j as IndicatorManifest, k as IndicatorManifestEntry, l as RANGE_PRESETS, R as ResolvedIndicator, V as VelaStorage, m as WidgetStorage, g as decodeState, h as encodeState, n as localStorageAdapter, r as resolveIndicators, s as sanitizeState } from './bottombar-DeDXbF_K.cjs';
4
+ import { b as VelaShellOptions, W as WidgetHistory, a as RangePreset, e as WorkspaceState, i as TopbarComposition, P as PanelsState } from './bottombar-Div5zibZ.cjs';
5
+ export { B as Bottombar, j as BottombarOptions, C as CellState, f as ChartState, I as IndicatorLoader, k as IndicatorManifest, l as IndicatorManifestEntry, m as RANGE_PRESETS, R as ResolvedIndicator, n as ResolvedTopbarComposition, o as TOPBAR_BUILTIN_IDS, p as TOPBAR_DEFAULT_LEFT, q as TOPBAR_DEFAULT_RIGHT, V as VelaStorage, r as WidgetStorage, g as decodeState, h as encodeState, t as localStorageAdapter, u as pinnedTopbarActionIds, v as resolveIndicators, w as resolveTopbarComposition, s as sanitizeState, x as topbarHas } from './bottombar-Div5zibZ.cjs';
6
6
  import { K as KeymapManager } from './keymap-CGOz5F5f.cjs';
7
- import { a as SymbolDescriptor } from './DataProvider-DDUYw2qP.cjs';
7
+ import { a as SymbolDescriptor } from './DataProvider-BsQM2WNH.cjs';
8
8
  import { d as SidePanel } from './side-panel-CT9ZwIGz.cjs';
9
9
  export { D as DEFAULT_PANEL_MAX_WIDTH, a as DEFAULT_PANEL_MIN_WIDTH, b as DEFAULT_PANEL_WIDTH, S as SidePanelOptions, c as clampPanelWidth } from './side-panel-CT9ZwIGz.cjs';
10
10
 
@@ -104,6 +104,11 @@ interface TopbarOptions {
104
104
  onAlertsClick?: (anchor: HTMLElement) => void;
105
105
  /** Live widget context for contributed actions (topbar target). */
106
106
  getContext?: () => WidgetContext;
107
+ /** The host's declarative composition (see {@link TopbarComposition}) — which
108
+ * entries render, per side, in list order. An undeclared side keeps its default.
109
+ * The shell that owns this bar also gates the matching mobile entries and
110
+ * keyboard chords on the same composition — the bar only handles its own DOM. */
111
+ composition?: TopbarComposition;
107
112
  }
108
113
  declare class Topbar {
109
114
  readonly el: HTMLElement;
@@ -133,6 +138,14 @@ declare class Topbar {
133
138
  private panelTooltips;
134
139
  private readonly host;
135
140
  private alertsBadge;
141
+ /** The resolved composition (defaults applied) — what renders, where, in order. */
142
+ private readonly comp;
143
+ /** Pinned contributed-action slots, by action id (composition entries that name one,
144
+ * plus built-in slots taken over by an override). */
145
+ private readonly pinned;
146
+ /** Overrides that LEFT their native slot (default side + a declared `order`) — they
147
+ * render through the flow cluster like ordinary actions. */
148
+ private readonly flowingOverrides;
136
149
  private readonly opts;
137
150
  private timeframe;
138
151
  private priceStyle;
@@ -151,7 +164,10 @@ declare class Topbar {
151
164
  setLayout(id: string): void;
152
165
  private renderLayoutButton;
153
166
  private renderStyleButton;
154
- /** Re-project the contributed topbar actions (call after registrations change). */
167
+ /** Re-project the contributed topbar actions (call after registrations change).
168
+ * An action PINNED by the composition renders into its named slot (list position
169
+ * wins over `align`/`order`); the rest flow into the side's `actions` slot — or
170
+ * not at all when an explicit list omits it (the list is the side's contract). */
155
171
  renderActions(): void;
156
172
  setIndicatorCount(_n: number): void;
157
173
  /** Enable/disable the undo and redo tools from the host's unified history. */
@@ -184,6 +200,9 @@ type StatuslineReadout = 'ohlc' | 'value';
184
200
  type MarketStatus = 'open' | 'pre' | 'post' | 'closed' | 'holiday';
185
201
  declare class Statusline {
186
202
  private readonly host;
203
+ /** The avatar's icon URL for a raw symbol — the shell routes it to the owning
204
+ * provider's `resolveSymbolIcon`. Absent ⇒ the initials badge. */
205
+ private readonly iconFor?;
187
206
  readonly el: HTMLElement;
188
207
  private readonly ohlcEl;
189
208
  private readonly changeEl;
@@ -208,7 +227,10 @@ declare class Statusline {
208
227
  /** Fit mode (multi-chart cells): one row, overflowing segments hidden — see {@link setFitMode}. */
209
228
  private fitMode;
210
229
  private fitRO;
211
- constructor(host: HTMLElement, symbol: string);
230
+ constructor(host: HTMLElement, symbol: string,
231
+ /** The avatar's icon URL for a raw symbol — the shell routes it to the owning
232
+ * provider's `resolveSymbolIcon`. Absent ⇒ the initials badge. */
233
+ iconFor?: ((symbol: string) => string | undefined) | undefined);
212
234
  setSymbol(symbol: string): void;
213
235
  /**
214
236
  * Multi-chart cells: keep the line on ONE row whatever the cell width — never wrap.
@@ -268,7 +290,7 @@ declare class Watermark {
268
290
  destroy(): void;
269
291
  }
270
292
 
271
- declare function filterSymbols(list: readonly SymbolDescriptor[], query: string, limit?: number): SymbolDescriptor[];
293
+ declare function filterSymbols(list: readonly SymbolDescriptor[], query: string, limit?: number, top?: readonly string[] | false): SymbolDescriptor[];
272
294
  interface SymbolPickerOptions {
273
295
  /** `provider` is the venue of the chosen row — absent only for a source that has none. */
274
296
  /** Called with the CHOSEN symbol — `EXCHANGE:`-prefixed when the row named a venue,
@@ -276,8 +298,12 @@ interface SymbolPickerOptions {
276
298
  onSelect: (symbol: string) => void;
277
299
  onOpenChange?: (open: boolean) => void;
278
300
  host?: HTMLElement;
301
+ /** The row's icon URL — routed to the descriptor's OWNING provider
302
+ * (`resolveSymbolIcon`). Absent or `undefined` per row ⇒ the initials badge. */
303
+ iconFor?: (d: SymbolDescriptor) => string | undefined;
279
304
  }
280
305
  declare class SymbolPicker {
306
+ private readonly opts;
281
307
  private readonly dialog;
282
308
  private readonly input;
283
309
  private readonly list;
@@ -288,6 +314,9 @@ declare class SymbolPicker {
288
314
  private activeTab;
289
315
  private tabs;
290
316
  private visible;
317
+ /** The ranked pool cache — `key` fingerprints the raw pool the ranking ran on. */
318
+ private ranked;
319
+ private ranking;
291
320
  constructor(opts: SymbolPickerOptions);
292
321
  /** Wire where symbols come from (re-called on every widget rebuild). */
293
322
  setSource(source: () => readonly SymbolDescriptor[]): void;
@@ -297,6 +326,11 @@ declare class SymbolPicker {
297
326
  private select;
298
327
  private moveHighlight;
299
328
  private renderHighlight;
329
+ /** The picker's pool: the source, shaped by the registered symbol ranking. Cached —
330
+ * the hook runs when the pool CHANGES (an index lands or refreshes), never per
331
+ * keystroke; an async hook resolves onto the next repaint (stale-while-revalidate
332
+ * in between, the raw pool before the first resolve). */
333
+ private pool;
300
334
  private computeRows;
301
335
  private refresh;
302
336
  /** Append the page the grown `visible` just uncovered — rows already on screen stay put. */
@@ -428,9 +462,14 @@ declare class PanelDock {
428
462
  }
429
463
 
430
464
  declare class ObjectTree extends SidePanel {
465
+ /** The price row's avatar icon URL for a raw symbol — routed by the shell to the
466
+ * owning provider's `resolveSymbolIcon`. Absent ⇒ the initials badge. */
467
+ private readonly iconFor?;
431
468
  private chart;
432
469
  private selectedDrawing;
433
470
  private symbolName;
471
+ /** The raw (possibly venue-prefixed) symbol — what icon resolution routes on. */
472
+ private symbolRaw;
434
473
  /** Drawing bundles — a view-side grouping, held for the panel's lifetime and never persisted.
435
474
  * Kept per chart because a workspace points this one panel at whichever chart is active, and
436
475
  * each chart's bundles have to survive the switch. */
@@ -454,7 +493,10 @@ declare class ObjectTree extends SidePanel {
454
493
  private menu;
455
494
  private menuActions;
456
495
  private drag;
457
- constructor(host: HTMLElement);
496
+ constructor(host: HTMLElement,
497
+ /** The price row's avatar icon URL for a raw symbol — routed by the shell to the
498
+ * owning provider's `resolveSymbolIcon`. Absent ⇒ the initials badge. */
499
+ iconFor?: ((symbol: string) => string | undefined) | undefined);
458
500
  toggle(open?: boolean): void;
459
501
  setSymbol(symbol: string): void;
460
502
  /** (Re)bind to a chart instance — called after every widget rebuild. */
@@ -685,4 +727,4 @@ declare function fmtPrice(n: number | null | undefined, dp?: number): string;
685
727
  /** Signed change + percent ("+123.45 (+1.23%)") from open→close; `''` when unavailable. */
686
728
  declare function fmtChange(open: number | null | undefined, close: number | null | undefined): string;
687
729
 
688
- export { type BuiltInPanel, ChartContextMenu, type ContextMenuCallbacks, DataWindow, type DataWindowLine, type DataWindowSection, IndicatorPicker, type IndicatorPickerOptions, type IndicatorRow, ObjectTree, type PanelChrome, PanelDock, type PanelDockDeps, PanelsState, type ParsedTimeframe, RangePreset, ShortcutsHelp, SidePanel, SidePanelButton, Statusline, SymbolPicker, type SymbolPickerOptions, TIMEZONES, TimeframeQuick, type TimeframeQuickOptions, type TimezoneEntry, Topbar, type TopbarOptions, VelaShellOptions, VelaWidget, type VelaWidgetOptions, Watermark, WidgetContext, WorkspaceState, dataWindowSections, decimalsFor, filterSymbols, fmtChange, fmtPrice, normalizeTimezone, parseTimeframe, priceStyleLabel, timeframeLabel, timeframeMs, tzButtonLabel, tzMenuLabel, tzOffset };
730
+ export { type BuiltInPanel, ChartContextMenu, type ContextMenuCallbacks, DataWindow, type DataWindowLine, type DataWindowSection, IndicatorPicker, type IndicatorPickerOptions, type IndicatorRow, ObjectTree, type PanelChrome, PanelDock, type PanelDockDeps, PanelsState, type ParsedTimeframe, RangePreset, ShortcutsHelp, SidePanel, SidePanelButton, Statusline, SymbolPicker, type SymbolPickerOptions, TIMEZONES, TimeframeQuick, type TimeframeQuickOptions, type TimezoneEntry, Topbar, TopbarComposition, type TopbarOptions, VelaShellOptions, VelaWidget, type VelaWidgetOptions, Watermark, WidgetContext, WorkspaceState, dataWindowSections, decimalsFor, filterSymbols, fmtChange, fmtPrice, normalizeTimezone, parseTimeframe, priceStyleLabel, timeframeLabel, timeframeMs, tzButtonLabel, tzMenuLabel, tzOffset };
package/dist/widget.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { V as Vela, W as WidgetContext, A as SidePanelButton } from './contributions-BqCIsbaP.js';
2
- export { C as CellStateContext, an as DEFAULT_PANEL_ORDER, E as ExternalIndicatorEntry, G as SidePanelDescriptor, H as SidePanelHandle, K as StatePersistenceHandler, Z as WidgetActionDescriptor, _ as WidgetActionTarget, $ as WidgetAttachment, a7 as registerSidePanel, a8 as registerStatePersistence, a9 as registerWidgetAction, aa as registerWidgetAttachment, ac as sidePanels, ad as statePersistenceHandlers, ah as unregisterSidePanel, ai as unregisterStatePersistence, aj as unregisterWidgetAction, ak as unregisterWidgetAttachment, al as widgetActions, am as widgetAttachments } from './contributions-BqCIsbaP.js';
1
+ import { V as Vela, W as WidgetContext, A as SidePanelButton } from './contributions-Z12BrWCy.js';
2
+ export { C as CellStateContext, as as DEFAULT_PANEL_ORDER, E as ExternalIndicatorEntry, O as OVERRIDABLE_TOPBAR_IDS, G as SidePanelDescriptor, H as SidePanelHandle, K as StatePersistenceHandler, U as SymbolRankingHook, $ as WidgetActionDescriptor, a0 as WidgetActionTarget, a1 as WidgetAttachment, a9 as registerSidePanel, aa as registerStatePersistence, ab as registerSymbolRanking, ac as registerWidgetAction, ad as registerWidgetAttachment, af as sidePanels, ag as statePersistenceHandlers, ah as symbolRanking, ai as topbarActionOverride, 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 { b as VelaOptions, d as MarketSession, T as ThemeName, c as VelaTheme, r as DataWindowReadout } from './options-BaVTMXaO.js';
4
- import { b as VelaShellOptions, W as WidgetHistory, a as RangePreset, e as WorkspaceState, P as PanelsState } from './bottombar-COnL2Sk4.js';
5
- export { B as Bottombar, i as BottombarOptions, C as CellState, f as ChartState, I as IndicatorLoader, j as IndicatorManifest, k as IndicatorManifestEntry, l as RANGE_PRESETS, R as ResolvedIndicator, V as VelaStorage, m as WidgetStorage, g as decodeState, h as encodeState, n as localStorageAdapter, r as resolveIndicators, s as sanitizeState } from './bottombar-COnL2Sk4.js';
4
+ import { b as VelaShellOptions, W as WidgetHistory, a as RangePreset, e as WorkspaceState, i as TopbarComposition, P as PanelsState } from './bottombar-Br4rzx_R.js';
5
+ export { B as Bottombar, j as BottombarOptions, C as CellState, f as ChartState, I as IndicatorLoader, k as IndicatorManifest, l as IndicatorManifestEntry, m as RANGE_PRESETS, R as ResolvedIndicator, n as ResolvedTopbarComposition, o as TOPBAR_BUILTIN_IDS, p as TOPBAR_DEFAULT_LEFT, q as TOPBAR_DEFAULT_RIGHT, V as VelaStorage, r as WidgetStorage, g as decodeState, h as encodeState, t as localStorageAdapter, u as pinnedTopbarActionIds, v as resolveIndicators, w as resolveTopbarComposition, s as sanitizeState, x as topbarHas } from './bottombar-Br4rzx_R.js';
6
6
  import { K as KeymapManager } from './keymap-CGOz5F5f.js';
7
- import { a as SymbolDescriptor } from './DataProvider-JJq7M2it.js';
7
+ import { a as SymbolDescriptor } from './DataProvider-BSLlBpB9.js';
8
8
  import { d as SidePanel } from './side-panel-CT9ZwIGz.js';
9
9
  export { D as DEFAULT_PANEL_MAX_WIDTH, a as DEFAULT_PANEL_MIN_WIDTH, b as DEFAULT_PANEL_WIDTH, S as SidePanelOptions, c as clampPanelWidth } from './side-panel-CT9ZwIGz.js';
10
10
 
@@ -104,6 +104,11 @@ interface TopbarOptions {
104
104
  onAlertsClick?: (anchor: HTMLElement) => void;
105
105
  /** Live widget context for contributed actions (topbar target). */
106
106
  getContext?: () => WidgetContext;
107
+ /** The host's declarative composition (see {@link TopbarComposition}) — which
108
+ * entries render, per side, in list order. An undeclared side keeps its default.
109
+ * The shell that owns this bar also gates the matching mobile entries and
110
+ * keyboard chords on the same composition — the bar only handles its own DOM. */
111
+ composition?: TopbarComposition;
107
112
  }
108
113
  declare class Topbar {
109
114
  readonly el: HTMLElement;
@@ -133,6 +138,14 @@ declare class Topbar {
133
138
  private panelTooltips;
134
139
  private readonly host;
135
140
  private alertsBadge;
141
+ /** The resolved composition (defaults applied) — what renders, where, in order. */
142
+ private readonly comp;
143
+ /** Pinned contributed-action slots, by action id (composition entries that name one,
144
+ * plus built-in slots taken over by an override). */
145
+ private readonly pinned;
146
+ /** Overrides that LEFT their native slot (default side + a declared `order`) — they
147
+ * render through the flow cluster like ordinary actions. */
148
+ private readonly flowingOverrides;
136
149
  private readonly opts;
137
150
  private timeframe;
138
151
  private priceStyle;
@@ -151,7 +164,10 @@ declare class Topbar {
151
164
  setLayout(id: string): void;
152
165
  private renderLayoutButton;
153
166
  private renderStyleButton;
154
- /** Re-project the contributed topbar actions (call after registrations change). */
167
+ /** Re-project the contributed topbar actions (call after registrations change).
168
+ * An action PINNED by the composition renders into its named slot (list position
169
+ * wins over `align`/`order`); the rest flow into the side's `actions` slot — or
170
+ * not at all when an explicit list omits it (the list is the side's contract). */
155
171
  renderActions(): void;
156
172
  setIndicatorCount(_n: number): void;
157
173
  /** Enable/disable the undo and redo tools from the host's unified history. */
@@ -184,6 +200,9 @@ type StatuslineReadout = 'ohlc' | 'value';
184
200
  type MarketStatus = 'open' | 'pre' | 'post' | 'closed' | 'holiday';
185
201
  declare class Statusline {
186
202
  private readonly host;
203
+ /** The avatar's icon URL for a raw symbol — the shell routes it to the owning
204
+ * provider's `resolveSymbolIcon`. Absent ⇒ the initials badge. */
205
+ private readonly iconFor?;
187
206
  readonly el: HTMLElement;
188
207
  private readonly ohlcEl;
189
208
  private readonly changeEl;
@@ -208,7 +227,10 @@ declare class Statusline {
208
227
  /** Fit mode (multi-chart cells): one row, overflowing segments hidden — see {@link setFitMode}. */
209
228
  private fitMode;
210
229
  private fitRO;
211
- constructor(host: HTMLElement, symbol: string);
230
+ constructor(host: HTMLElement, symbol: string,
231
+ /** The avatar's icon URL for a raw symbol — the shell routes it to the owning
232
+ * provider's `resolveSymbolIcon`. Absent ⇒ the initials badge. */
233
+ iconFor?: ((symbol: string) => string | undefined) | undefined);
212
234
  setSymbol(symbol: string): void;
213
235
  /**
214
236
  * Multi-chart cells: keep the line on ONE row whatever the cell width — never wrap.
@@ -268,7 +290,7 @@ declare class Watermark {
268
290
  destroy(): void;
269
291
  }
270
292
 
271
- declare function filterSymbols(list: readonly SymbolDescriptor[], query: string, limit?: number): SymbolDescriptor[];
293
+ declare function filterSymbols(list: readonly SymbolDescriptor[], query: string, limit?: number, top?: readonly string[] | false): SymbolDescriptor[];
272
294
  interface SymbolPickerOptions {
273
295
  /** `provider` is the venue of the chosen row — absent only for a source that has none. */
274
296
  /** Called with the CHOSEN symbol — `EXCHANGE:`-prefixed when the row named a venue,
@@ -276,8 +298,12 @@ interface SymbolPickerOptions {
276
298
  onSelect: (symbol: string) => void;
277
299
  onOpenChange?: (open: boolean) => void;
278
300
  host?: HTMLElement;
301
+ /** The row's icon URL — routed to the descriptor's OWNING provider
302
+ * (`resolveSymbolIcon`). Absent or `undefined` per row ⇒ the initials badge. */
303
+ iconFor?: (d: SymbolDescriptor) => string | undefined;
279
304
  }
280
305
  declare class SymbolPicker {
306
+ private readonly opts;
281
307
  private readonly dialog;
282
308
  private readonly input;
283
309
  private readonly list;
@@ -288,6 +314,9 @@ declare class SymbolPicker {
288
314
  private activeTab;
289
315
  private tabs;
290
316
  private visible;
317
+ /** The ranked pool cache — `key` fingerprints the raw pool the ranking ran on. */
318
+ private ranked;
319
+ private ranking;
291
320
  constructor(opts: SymbolPickerOptions);
292
321
  /** Wire where symbols come from (re-called on every widget rebuild). */
293
322
  setSource(source: () => readonly SymbolDescriptor[]): void;
@@ -297,6 +326,11 @@ declare class SymbolPicker {
297
326
  private select;
298
327
  private moveHighlight;
299
328
  private renderHighlight;
329
+ /** The picker's pool: the source, shaped by the registered symbol ranking. Cached —
330
+ * the hook runs when the pool CHANGES (an index lands or refreshes), never per
331
+ * keystroke; an async hook resolves onto the next repaint (stale-while-revalidate
332
+ * in between, the raw pool before the first resolve). */
333
+ private pool;
300
334
  private computeRows;
301
335
  private refresh;
302
336
  /** Append the page the grown `visible` just uncovered — rows already on screen stay put. */
@@ -428,9 +462,14 @@ declare class PanelDock {
428
462
  }
429
463
 
430
464
  declare class ObjectTree extends SidePanel {
465
+ /** The price row's avatar icon URL for a raw symbol — routed by the shell to the
466
+ * owning provider's `resolveSymbolIcon`. Absent ⇒ the initials badge. */
467
+ private readonly iconFor?;
431
468
  private chart;
432
469
  private selectedDrawing;
433
470
  private symbolName;
471
+ /** The raw (possibly venue-prefixed) symbol — what icon resolution routes on. */
472
+ private symbolRaw;
434
473
  /** Drawing bundles — a view-side grouping, held for the panel's lifetime and never persisted.
435
474
  * Kept per chart because a workspace points this one panel at whichever chart is active, and
436
475
  * each chart's bundles have to survive the switch. */
@@ -454,7 +493,10 @@ declare class ObjectTree extends SidePanel {
454
493
  private menu;
455
494
  private menuActions;
456
495
  private drag;
457
- constructor(host: HTMLElement);
496
+ constructor(host: HTMLElement,
497
+ /** The price row's avatar icon URL for a raw symbol — routed by the shell to the
498
+ * owning provider's `resolveSymbolIcon`. Absent ⇒ the initials badge. */
499
+ iconFor?: ((symbol: string) => string | undefined) | undefined);
458
500
  toggle(open?: boolean): void;
459
501
  setSymbol(symbol: string): void;
460
502
  /** (Re)bind to a chart instance — called after every widget rebuild. */
@@ -685,4 +727,4 @@ declare function fmtPrice(n: number | null | undefined, dp?: number): string;
685
727
  /** Signed change + percent ("+123.45 (+1.23%)") from open→close; `''` when unavailable. */
686
728
  declare function fmtChange(open: number | null | undefined, close: number | null | undefined): string;
687
729
 
688
- export { type BuiltInPanel, ChartContextMenu, type ContextMenuCallbacks, DataWindow, type DataWindowLine, type DataWindowSection, IndicatorPicker, type IndicatorPickerOptions, type IndicatorRow, ObjectTree, type PanelChrome, PanelDock, type PanelDockDeps, PanelsState, type ParsedTimeframe, RangePreset, ShortcutsHelp, SidePanel, SidePanelButton, Statusline, SymbolPicker, type SymbolPickerOptions, TIMEZONES, TimeframeQuick, type TimeframeQuickOptions, type TimezoneEntry, Topbar, type TopbarOptions, VelaShellOptions, VelaWidget, type VelaWidgetOptions, Watermark, WidgetContext, WorkspaceState, dataWindowSections, decimalsFor, filterSymbols, fmtChange, fmtPrice, normalizeTimezone, parseTimeframe, priceStyleLabel, timeframeLabel, timeframeMs, tzButtonLabel, tzMenuLabel, tzOffset };
730
+ export { type BuiltInPanel, ChartContextMenu, type ContextMenuCallbacks, DataWindow, type DataWindowLine, type DataWindowSection, IndicatorPicker, type IndicatorPickerOptions, type IndicatorRow, ObjectTree, type PanelChrome, PanelDock, type PanelDockDeps, PanelsState, type ParsedTimeframe, RangePreset, ShortcutsHelp, SidePanel, SidePanelButton, Statusline, SymbolPicker, type SymbolPickerOptions, TIMEZONES, TimeframeQuick, type TimeframeQuickOptions, type TimezoneEntry, Topbar, TopbarComposition, type TopbarOptions, VelaShellOptions, VelaWidget, type VelaWidgetOptions, Watermark, WidgetContext, WorkspaceState, dataWindowSections, decimalsFor, filterSymbols, fmtChange, fmtPrice, normalizeTimezone, parseTimeframe, priceStyleLabel, timeframeLabel, timeframeMs, tzButtonLabel, tzMenuLabel, tzOffset };
package/dist/widget.js CHANGED
@@ -1,10 +1,11 @@
1
- import { VelaWorkspace } from './chunk-TMXK2SJR.js';
2
- export { Bottombar, ChartContextMenu, DataWindow, IndicatorPicker, ObjectTree, PanelDock, RANGE_PRESETS, ShortcutsHelp, Statusline, SymbolPicker, TimeframeQuick, Topbar, Watermark, dataWindowSections, decimalsFor, decodeState, encodeState, filterSymbols, fmtChange, fmtPrice, localStorageAdapter, parseTimeframe, priceStyleLabel, resolveIndicators, sanitizeState, timeframeLabel, timeframeMs } from './chunk-TMXK2SJR.js';
3
- export { TIMEZONES, normalizeTimezone, tzButtonLabel, tzMenuLabel, tzOffset } from './chunk-JQFO2WMU.js';
4
- export { DEFAULT_PANEL_MAX_WIDTH, DEFAULT_PANEL_MIN_WIDTH, DEFAULT_PANEL_ORDER, DEFAULT_PANEL_WIDTH, SidePanel, clampPanelWidth, registerSidePanel, registerStatePersistence, registerWidgetAction, registerWidgetAttachment, sidePanels, statePersistenceHandlers, unregisterSidePanel, unregisterStatePersistence, unregisterWidgetAction, unregisterWidgetAttachment, widgetActions, widgetAttachments } from './chunk-OEUGUXL7.js';
1
+ import { VelaWorkspace } from './chunk-WVP4XV5A.js';
2
+ export { Bottombar, ChartContextMenu, DataWindow, IndicatorPicker, ObjectTree, PanelDock, RANGE_PRESETS, ShortcutsHelp, Statusline, SymbolPicker, TimeframeQuick, Topbar, Watermark, dataWindowSections, decimalsFor, decodeState, encodeState, filterSymbols, fmtChange, fmtPrice, localStorageAdapter, parseTimeframe, priceStyleLabel, resolveIndicators, sanitizeState, timeframeLabel, timeframeMs } from './chunk-WVP4XV5A.js';
3
+ export { TIMEZONES, normalizeTimezone, tzButtonLabel, tzMenuLabel, tzOffset } from './chunk-6WFKTAT4.js';
4
+ export { DEFAULT_PANEL_MAX_WIDTH, DEFAULT_PANEL_MIN_WIDTH, DEFAULT_PANEL_ORDER, DEFAULT_PANEL_WIDTH, OVERRIDABLE_TOPBAR_IDS, SidePanel, TOPBAR_BUILTIN_IDS, TOPBAR_DEFAULT_LEFT, TOPBAR_DEFAULT_RIGHT, clampPanelWidth, pinnedTopbarActionIds, registerSidePanel, registerStatePersistence, registerSymbolRanking, registerWidgetAction, registerWidgetAttachment, resolveTopbarComposition, sidePanels, statePersistenceHandlers, symbolRanking, topbarActionOverride, topbarHas, unregisterSidePanel, unregisterStatePersistence, unregisterWidgetAction, unregisterWidgetAttachment, widgetActions, widgetAttachments } from './chunk-L3I2CCYO.js';
5
5
  import './chunk-2R7BANEM.js';
6
6
  import './chunk-OICPLNU7.js';
7
7
  import './chunk-PN5KWFZ4.js';
8
+ import './chunk-W4EJWLEO.js';
8
9
 
9
10
  // src/widget/VelaWidget.ts
10
11
  var deprecationWarned = false;