@luxalgo/vela 0.6.8 → 0.6.10

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 (45) hide show
  1. package/dist/{DataProvider-BSLlBpB9.d.ts → DataProvider-CWmp31dA.d.ts} +49 -1
  2. package/dist/{DataProvider-BsQM2WNH.d.cts → DataProvider-l_eLMly_.d.cts} +49 -1
  3. package/dist/{chunk-L3I2CCYO.js → chunk-4KZVZ7QQ.js} +49 -2
  4. package/dist/{chunk-SQETIBFU.js → chunk-FFOP37FQ.js} +996 -377
  5. package/dist/{chunk-2R7BANEM.js → chunk-G77Y7LK2.js} +2 -2
  6. package/dist/{chunk-PN5KWFZ4.js → chunk-KG4YT3TI.js} +5 -3
  7. package/dist/{chunk-OICPLNU7.js → chunk-MHY7MVXH.js} +192 -2
  8. package/dist/{chunk-N7LGMKCE.js → chunk-NMTQXNT4.js} +637 -164
  9. package/dist/{contributions-DLLdV9jD.d.ts → contributions-BCz6Dr6a.d.ts} +99 -7
  10. package/dist/{contributions-Vw-Hm58R.d.cts → contributions-D9vTzm5p.d.cts} +99 -7
  11. package/dist/index.cjs +1210 -383
  12. package/dist/index.d.cts +37 -11
  13. package/dist/index.d.ts +37 -11
  14. package/dist/index.js +4 -4
  15. package/dist/{options-BaVTMXaO.d.ts → options-DSqHsQyN.d.cts} +84 -7
  16. package/dist/{options-BaVTMXaO.d.cts → options-DSqHsQyN.d.ts} +84 -7
  17. package/dist/{plugin-BnJgjLAy.d.cts → plugin-Bt8hLR8Z.d.cts} +3 -3
  18. package/dist/{plugin-CC7rBrOY.d.ts → plugin-CH7pfMrE.d.ts} +3 -3
  19. package/dist/plugin.cjs +21 -3
  20. package/dist/plugin.d.cts +4 -4
  21. package/dist/plugin.d.ts +4 -4
  22. package/dist/plugin.js +2 -2
  23. package/dist/providers/binance.d.cts +2 -2
  24. package/dist/providers/binance.d.ts +2 -2
  25. package/dist/providers/coinbase.d.cts +2 -2
  26. package/dist/providers/coinbase.d.ts +2 -2
  27. package/dist/providers/hyperliquid.d.cts +2 -2
  28. package/dist/providers/hyperliquid.d.ts +2 -2
  29. package/dist/{statusline-CGkB2EOo.d.ts → statusline-5K7y4Ya2.d.ts} +5 -3
  30. package/dist/{statusline-DqzBqy42.d.cts → statusline-TYLQmoeh.d.cts} +5 -3
  31. package/dist/ui.cjs +208 -5
  32. package/dist/ui.d.cts +91 -2
  33. package/dist/ui.d.ts +91 -2
  34. package/dist/ui.js +3 -3
  35. package/dist/vela.global.js +1210 -383
  36. package/dist/vela.global.min.js +99 -48
  37. package/dist/widget.cjs +1771 -449
  38. package/dist/widget.d.cts +17 -6
  39. package/dist/widget.d.ts +17 -6
  40. package/dist/widget.js +7 -7
  41. package/dist/workspace.cjs +1771 -449
  42. package/dist/workspace.d.cts +100 -6
  43. package/dist/workspace.d.ts +100 -6
  44. package/dist/workspace.js +6 -6
  45. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { M as MarketConfig, O as OHLCV, U as Unsubscribe } from './options-BaVTMXaO.js';
1
+ import { M as MarketConfig, O as OHLCV, U as Unsubscribe } from './options-DSqHsQyN.js';
2
2
 
3
3
  /**
4
4
  * Symbol metadata an engine may need (e.g. Pine `syminfo.*`). Free-form beyond
@@ -36,6 +36,16 @@ interface BarRange {
36
36
  interface MarketDataFeed {
37
37
  /** Load the initial history (from a provider or the offline `data` array). */
38
38
  load(cfg: MarketConfig): Promise<OHLCV[]>;
39
+ /**
40
+ * Progressive load: emit growing snapshots while the source heals a cold symbol,
41
+ * resolve with the final answer — `DataProvider.getBarsProgressive` semantics
42
+ * (cumulative, confirmed-from-the-newest-bar snapshots; each extends the last).
43
+ * Resolves NULL when the resolved source lacks the capability — the caller then
44
+ * runs its non-progressive paths (single load, deep head + backfill) untouched.
45
+ */
46
+ loadProgressive?(cfg: MarketConfig, onBatch: (bars: OHLCV[]) => void, opts?: {
47
+ signal?: AbortSignal;
48
+ }): Promise<OHLCV[] | null>;
39
49
  /** Subscribe to live forming-candle ticks. Returns an unsubscribe fn. */
40
50
  subscribe(cfg: MarketConfig, onBar: (bar: OHLCV) => void): Unsubscribe;
41
51
  /** Optional symbol metadata for engines that need it; absent/undefined ≡ engine synthesizes. */
@@ -70,6 +80,26 @@ interface SymbolDescriptor {
70
80
  description?: string;
71
81
  /** Instrument class, free-form (e.g. `crypto`, `futures`, `stock`). */
72
82
  type?: string;
83
+ /**
84
+ * The GROUP this row belongs to (futures: the product root — `ES1!` and `ES2!`
85
+ * carry `group: "ES"`). The group's own row repeats the value in `ticker` with a
86
+ * distinguishing `type` and is NOT directly loadable — pickers fold members under
87
+ * it and load the member marked {@link default} when the group itself is picked.
88
+ */
89
+ group?: string;
90
+ /**
91
+ * The member a picker loads when its whole GROUP is picked. At most one per group;
92
+ * the agreed fallback for zero-or-many is the group's FIRST listed member, so
93
+ * providers emit members in deliberate order.
94
+ */
95
+ default?: boolean;
96
+ /**
97
+ * The provider-side market (product class) serving this symbol, on providers whose
98
+ * markets differ in session shape (futures: index, grains, energy… hours differ on
99
+ * one source). Consumers resolving per-market vocabulary (session template,
100
+ * calendar windows) key on it; absent where the market is unambiguous.
101
+ */
102
+ market?: string;
73
103
  /**
74
104
  * The instrument's LISTING-venue prefix (`NASDAQ`, `NYSE`, `AMEX`) — a property of the
75
105
  * SYMBOL, not of the provider: AAPL is Nasdaq-listed and IBM NYSE-listed even when one
@@ -121,6 +151,24 @@ interface DataProvider {
121
151
  * sorted + de-duplicated by open-time.
122
152
  */
123
153
  getBars(ticker: string, timeframe: string, range: BarRange): Promise<OHLCV[]>;
154
+ /**
155
+ * Progressive variant of {@link getBars}, for sources that HEAL a cold symbol while
156
+ * answering: instead of holding the load until the whole depth converged, the
157
+ * provider emits growing snapshots as history lands and the chart paints each one.
158
+ * Every `onBatch` list (and the resolved final list) is the WHOLE answer so far —
159
+ * ascending, and CONFIRMED from its newest bar backward: a snapshot is cut at the
160
+ * newest stretch the SOURCE still owes (its own accounting of unanswered work,
161
+ * oldest-last), NEVER inferred from bar-time gaps — markets hold real empty
162
+ * stretches (holidays, quiet sessions) that must flow through immediately. Bars
163
+ * never move or vanish between snapshots; each extends the previous one. The
164
+ * resolved value is the final answer. `opts.signal` aborts the stream — the chart
165
+ * switched away: stop polling PROMPTLY and resolve with whatever is confirmed
166
+ * (an abandoned load left polling starves the browser's per-host connection pool
167
+ * and the next symbol with it). Absent ≡ single-answer `getBars` semantics.
168
+ */
169
+ getBarsProgressive?(ticker: string, timeframe: string, range: BarRange, onBatch: (bars: OHLCV[]) => void, opts?: {
170
+ signal?: AbortSignal;
171
+ }): Promise<OHLCV[]>;
124
172
  /** Provider metadata. Absent ⇒ the registry synthesizes a record from the methods present. */
125
173
  info?(): ProviderInfo;
126
174
  /**
@@ -1,4 +1,4 @@
1
- import { M as MarketConfig, O as OHLCV, U as Unsubscribe } from './options-BaVTMXaO.cjs';
1
+ import { M as MarketConfig, O as OHLCV, U as Unsubscribe } from './options-DSqHsQyN.cjs';
2
2
 
3
3
  /**
4
4
  * Symbol metadata an engine may need (e.g. Pine `syminfo.*`). Free-form beyond
@@ -36,6 +36,16 @@ interface BarRange {
36
36
  interface MarketDataFeed {
37
37
  /** Load the initial history (from a provider or the offline `data` array). */
38
38
  load(cfg: MarketConfig): Promise<OHLCV[]>;
39
+ /**
40
+ * Progressive load: emit growing snapshots while the source heals a cold symbol,
41
+ * resolve with the final answer — `DataProvider.getBarsProgressive` semantics
42
+ * (cumulative, confirmed-from-the-newest-bar snapshots; each extends the last).
43
+ * Resolves NULL when the resolved source lacks the capability — the caller then
44
+ * runs its non-progressive paths (single load, deep head + backfill) untouched.
45
+ */
46
+ loadProgressive?(cfg: MarketConfig, onBatch: (bars: OHLCV[]) => void, opts?: {
47
+ signal?: AbortSignal;
48
+ }): Promise<OHLCV[] | null>;
39
49
  /** Subscribe to live forming-candle ticks. Returns an unsubscribe fn. */
40
50
  subscribe(cfg: MarketConfig, onBar: (bar: OHLCV) => void): Unsubscribe;
41
51
  /** Optional symbol metadata for engines that need it; absent/undefined ≡ engine synthesizes. */
@@ -70,6 +80,26 @@ interface SymbolDescriptor {
70
80
  description?: string;
71
81
  /** Instrument class, free-form (e.g. `crypto`, `futures`, `stock`). */
72
82
  type?: string;
83
+ /**
84
+ * The GROUP this row belongs to (futures: the product root — `ES1!` and `ES2!`
85
+ * carry `group: "ES"`). The group's own row repeats the value in `ticker` with a
86
+ * distinguishing `type` and is NOT directly loadable — pickers fold members under
87
+ * it and load the member marked {@link default} when the group itself is picked.
88
+ */
89
+ group?: string;
90
+ /**
91
+ * The member a picker loads when its whole GROUP is picked. At most one per group;
92
+ * the agreed fallback for zero-or-many is the group's FIRST listed member, so
93
+ * providers emit members in deliberate order.
94
+ */
95
+ default?: boolean;
96
+ /**
97
+ * The provider-side market (product class) serving this symbol, on providers whose
98
+ * markets differ in session shape (futures: index, grains, energy… hours differ on
99
+ * one source). Consumers resolving per-market vocabulary (session template,
100
+ * calendar windows) key on it; absent where the market is unambiguous.
101
+ */
102
+ market?: string;
73
103
  /**
74
104
  * The instrument's LISTING-venue prefix (`NASDAQ`, `NYSE`, `AMEX`) — a property of the
75
105
  * SYMBOL, not of the provider: AAPL is Nasdaq-listed and IBM NYSE-listed even when one
@@ -121,6 +151,24 @@ interface DataProvider {
121
151
  * sorted + de-duplicated by open-time.
122
152
  */
123
153
  getBars(ticker: string, timeframe: string, range: BarRange): Promise<OHLCV[]>;
154
+ /**
155
+ * Progressive variant of {@link getBars}, for sources that HEAL a cold symbol while
156
+ * answering: instead of holding the load until the whole depth converged, the
157
+ * provider emits growing snapshots as history lands and the chart paints each one.
158
+ * Every `onBatch` list (and the resolved final list) is the WHOLE answer so far —
159
+ * ascending, and CONFIRMED from its newest bar backward: a snapshot is cut at the
160
+ * newest stretch the SOURCE still owes (its own accounting of unanswered work,
161
+ * oldest-last), NEVER inferred from bar-time gaps — markets hold real empty
162
+ * stretches (holidays, quiet sessions) that must flow through immediately. Bars
163
+ * never move or vanish between snapshots; each extends the previous one. The
164
+ * resolved value is the final answer. `opts.signal` aborts the stream — the chart
165
+ * switched away: stop polling PROMPTLY and resolve with whatever is confirmed
166
+ * (an abandoned load left polling starves the browser's per-host connection pool
167
+ * and the next symbol with it). Absent ≡ single-answer `getBars` semantics.
168
+ */
169
+ getBarsProgressive?(ticker: string, timeframe: string, range: BarRange, onBatch: (bars: OHLCV[]) => void, opts?: {
170
+ signal?: AbortSignal;
171
+ }): Promise<OHLCV[]>;
124
172
  /** Provider metadata. Absent ⇒ the registry synthesizes a record from the methods present. */
125
173
  info?(): ProviderInfo;
126
174
  /**
@@ -1,4 +1,4 @@
1
- import { svg24, NEUTRAL, BEARISH, WARNING, BULLISH, INFO, ACCENT_BRIGHT, VALID, INVALID, MARKER, ACCENT, injectStyles, iconEl } from './chunk-PN5KWFZ4.js';
1
+ import { svg24, NEUTRAL, BEARISH, WARNING, BULLISH, INFO, ACCENT_BRIGHT, VALID, INVALID, MARKER, ACCENT, injectStyles, iconEl } from './chunk-KG4YT3TI.js';
2
2
 
3
3
  // src/core/native-indicators/NativeIndicator.ts
4
4
  var REGISTRY = /* @__PURE__ */ new Map();
@@ -5863,6 +5863,53 @@ function legendActionsProviderFor(chart, context) {
5863
5863
  return legendActions().filter((d) => !d.when || d.when(info)).map((d) => ({ id: d.id, icon: d.icon, tooltip: d.tooltip, run: () => d.run(context(), info) }));
5864
5864
  };
5865
5865
  }
5866
+ var calloutRegistry = /* @__PURE__ */ new Map();
5867
+ function registerLegendCallout(desc) {
5868
+ calloutRegistry.set(desc.id, desc);
5869
+ return () => {
5870
+ if (calloutRegistry.get(desc.id) === desc) calloutRegistry.delete(desc.id);
5871
+ };
5872
+ }
5873
+ function unregisterLegendCallout(id) {
5874
+ calloutRegistry.delete(id);
5875
+ }
5876
+ function legendCallouts() {
5877
+ return [...calloutRegistry.values()].sort((a, b) => (a.order ?? 0) - (b.order ?? 0));
5878
+ }
5879
+ function legendCalloutsProviderFor(chart, context) {
5880
+ return (indicatorId) => {
5881
+ const handle = chart.indicators().find((h) => h.id === indicatorId);
5882
+ if (!handle) return [];
5883
+ const info = { id: handle.id, title: handle.title, ...handle.source !== void 0 ? { source: handle.source } : {} };
5884
+ const views = [];
5885
+ for (const d of legendCallouts()) {
5886
+ const spec = d.callout(info);
5887
+ if (!spec) continue;
5888
+ views.push({
5889
+ id: d.id,
5890
+ icon: spec.icon,
5891
+ background: spec.background,
5892
+ ...spec.color !== void 0 ? { color: spec.color } : {},
5893
+ tooltip: spec.tooltip,
5894
+ ...spec.content !== void 0 ? {
5895
+ content: {
5896
+ ...spec.content.title !== void 0 ? { title: spec.content.title } : {},
5897
+ items: spec.content.items.map(
5898
+ (item) => item.type === "text" ? item : {
5899
+ type: "button",
5900
+ label: item.label,
5901
+ ...item.primary !== void 0 ? { primary: item.primary } : {},
5902
+ ...item.close !== void 0 ? { close: item.close } : {},
5903
+ run: () => item.run(context(), info)
5904
+ }
5905
+ )
5906
+ }
5907
+ } : {}
5908
+ });
5909
+ }
5910
+ return views;
5911
+ };
5912
+ }
5866
5913
  var stateHandlers = /* @__PURE__ */ new Map();
5867
5914
  function registerStatePersistence(handler) {
5868
5915
  stateHandlers.set(handler.key, handler);
@@ -6113,4 +6160,4 @@ var SidePanel = class {
6113
6160
  }
6114
6161
  };
6115
6162
 
6116
- export { AnchoredVwap, ArrowMark, Callout, CalloutBase, Comment, DEDEKIND_CURVATURE_OPTIONS, DEFAULT_DRAWING_COLOR, DEFAULT_PANEL_MAX_WIDTH, DEFAULT_PANEL_MIN_WIDTH, DEFAULT_PANEL_ORDER, DEFAULT_PANEL_WIDTH, DIRECTION_OPTIONS, DedekindTessellation, Drawing, FibRatios, FibSpiral, FixedRangeVolumeProfile, GANN_SQUARE_ARCS, GLYPH_OPTIONS, GannSquare, GlyphStamp, LINE_STYLE_OPTIONS, MACH_NUMBER_OPTIONS, MACH_WAVE_COUNT_OPTIONS, MachFigure, MeasureBox, Note, OVERRIDABLE_TOPBAR_IDS, PatternDrawing, PositionTool, PriceLabel, PriceNote, RadialFib, RegressionChannel, STAMP_SIZE_OPTIONS, SegmentDrawing, SidePanel, Signpost, TEXT_SIZE_OPTIONS, TOPBAR_BUILTIN_IDS, TOPBAR_DEFAULT_LEFT, TOPBAR_DEFAULT_RIGHT, TextLabel, chartType, chartTypes, clampPanelWidth, createDrawing, deserializeDrawing, drawingTypes, foldBaseModulation, formatDuration, getDrawingType, getNativeIndicator, inputVisible, legendActions, legendActionsProviderFor, lineSegmentIntersection, nativeIndicatorDescriptors, nativeIndicatorTypes, normalizeSettingsRow, pinnedTopbarActionIds, registerChartType, registerDefaultEngine, registerDrawingType, registerLegendAction, registerNativeIndicator, registerRendererDefaults, registerRendererLayer, registerSidePanel, registerStatePersistence, registerSymbolRanking, registerWidgetAction, registerWidgetAttachment, rendererDefaults, rendererLayers, resetDrawingSettings, resolveEngines, resolveTopbarComposition, settingsRowValueKeys, settingsRowVisible, sidePanels, statePersistenceHandlers, symbolRanking, tickerModifierIds, topbarActionOverride, topbarHas, unregisterChartType, unregisterDefaultEngine, unregisterLegendAction, unregisterNativeIndicator, unregisterRendererDefaults, unregisterRendererLayer, unregisterSidePanel, unregisterStatePersistence, unregisterWidgetAction, unregisterWidgetAttachment, widgetActions, widgetAttachments };
6163
+ export { AnchoredVwap, ArrowMark, Callout, CalloutBase, Comment, DEDEKIND_CURVATURE_OPTIONS, DEFAULT_DRAWING_COLOR, DEFAULT_PANEL_MAX_WIDTH, DEFAULT_PANEL_MIN_WIDTH, DEFAULT_PANEL_ORDER, DEFAULT_PANEL_WIDTH, DIRECTION_OPTIONS, DedekindTessellation, Drawing, FibRatios, FibSpiral, FixedRangeVolumeProfile, GANN_SQUARE_ARCS, GLYPH_OPTIONS, GannSquare, GlyphStamp, LINE_STYLE_OPTIONS, MACH_NUMBER_OPTIONS, MACH_WAVE_COUNT_OPTIONS, MachFigure, MeasureBox, Note, OVERRIDABLE_TOPBAR_IDS, PatternDrawing, PositionTool, PriceLabel, PriceNote, RadialFib, RegressionChannel, STAMP_SIZE_OPTIONS, SegmentDrawing, SidePanel, Signpost, TEXT_SIZE_OPTIONS, TOPBAR_BUILTIN_IDS, TOPBAR_DEFAULT_LEFT, TOPBAR_DEFAULT_RIGHT, TextLabel, chartType, chartTypes, clampPanelWidth, createDrawing, deserializeDrawing, drawingTypes, foldBaseModulation, formatDuration, getDrawingType, getNativeIndicator, inputVisible, legendActions, legendActionsProviderFor, legendCallouts, legendCalloutsProviderFor, lineSegmentIntersection, nativeIndicatorDescriptors, nativeIndicatorTypes, normalizeSettingsRow, pinnedTopbarActionIds, registerChartType, registerDefaultEngine, registerDrawingType, registerLegendAction, registerLegendCallout, registerNativeIndicator, registerRendererDefaults, registerRendererLayer, registerSidePanel, registerStatePersistence, registerSymbolRanking, registerWidgetAction, registerWidgetAttachment, rendererDefaults, rendererLayers, resetDrawingSettings, resolveEngines, resolveTopbarComposition, settingsRowValueKeys, settingsRowVisible, sidePanels, statePersistenceHandlers, symbolRanking, tickerModifierIds, topbarActionOverride, topbarHas, unregisterChartType, unregisterDefaultEngine, unregisterLegendAction, unregisterLegendCallout, unregisterNativeIndicator, unregisterRendererDefaults, unregisterRendererLayer, unregisterSidePanel, unregisterStatePersistence, unregisterWidgetAction, unregisterWidgetAttachment, widgetActions, widgetAttachments };