@luxalgo/vela 0.6.0 → 0.6.1

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 (37) hide show
  1. package/dist/{DataProvider-DNx9ntBD.d.ts → DataProvider-BNKtYU5V.d.cts} +13 -3
  2. package/dist/{DataProvider-Ce6PuCzQ.d.cts → DataProvider-gJjN_0eh.d.ts} +13 -3
  3. package/dist/{chunk-CA3N3PYT.js → chunk-4MQEG67Z.js} +16 -12
  4. package/dist/{chunk-7ROONW6H.js → chunk-6LZJRO2S.js} +35 -7
  5. package/dist/{contributions-Dlc7ZWZz.d.cts → contributions-D64UA74H.d.cts} +2 -2
  6. package/dist/{contributions-DToMhiw3.d.ts → contributions-lPAgo9Cu.d.ts} +2 -2
  7. package/dist/{history-BZADxpKx.d.cts → history-CVoFDJ2D.d.ts} +21 -3
  8. package/dist/{history-BuHXJZJ2.d.ts → history-fSMXVLt1.d.cts} +21 -3
  9. package/dist/index.cjs +16 -12
  10. package/dist/index.d.cts +6 -6
  11. package/dist/index.d.ts +6 -6
  12. package/dist/index.js +1 -1
  13. package/dist/{options-BlQ00Fju.d.cts → options-BqGeFHtp.d.cts} +15 -1
  14. package/dist/{options-BlQ00Fju.d.ts → options-BqGeFHtp.d.ts} +15 -1
  15. package/dist/{plugin-BNPLOQO1.d.cts → plugin-D5ni4WEJ.d.cts} +3 -3
  16. package/dist/{plugin-BqjEa5r3.d.ts → plugin-o5HJH46Z.d.ts} +3 -3
  17. package/dist/plugin.d.cts +4 -4
  18. package/dist/plugin.d.ts +4 -4
  19. package/dist/providers/binance.d.cts +2 -2
  20. package/dist/providers/binance.d.ts +2 -2
  21. package/dist/providers/coinbase.d.cts +2 -2
  22. package/dist/providers/coinbase.d.ts +2 -2
  23. package/dist/providers/hyperliquid.d.cts +2 -2
  24. package/dist/providers/hyperliquid.d.ts +2 -2
  25. package/dist/ui.d.cts +1 -1
  26. package/dist/ui.d.ts +1 -1
  27. package/dist/vela.global.js +16 -12
  28. package/dist/vela.global.min.js +2 -2
  29. package/dist/widget.cjs +92 -19
  30. package/dist/widget.d.cts +18 -6
  31. package/dist/widget.d.ts +18 -6
  32. package/dist/widget.js +47 -6
  33. package/dist/workspace.cjs +94 -18
  34. package/dist/workspace.d.cts +20 -5
  35. package/dist/workspace.d.ts +20 -5
  36. package/dist/workspace.js +48 -4
  37. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { M as MarketConfig, O as OHLCV, U as Unsubscribe } from './options-BlQ00Fju.js';
1
+ import { M as MarketConfig, O as OHLCV, U as Unsubscribe } from './options-BqGeFHtp.cjs';
2
2
 
3
3
  /**
4
4
  * Symbol metadata an engine may need (e.g. Pine `syminfo.*`). Free-form beyond
@@ -26,6 +26,12 @@ interface BarRange {
26
26
  to?: number;
27
27
  /** Max bars. */
28
28
  limit?: number;
29
+ /**
30
+ * Trading session to serve (`'regular'` | `'extended'`) — rides every request on
31
+ * markets that have sessions; absent = the provider's default. A provider without
32
+ * a session concept ignores it.
33
+ */
34
+ session?: string;
29
35
  }
30
36
  interface MarketDataFeed {
31
37
  /** Load the initial history (from a provider or the offline `data` array). */
@@ -128,9 +134,13 @@ interface DataProvider {
128
134
  /**
129
135
  * Open a true live stream for `ticker`/`timeframe`. Each call to `onBar` delivers
130
136
  * the forming candle (or a freshly-closed one). Returns an unsubscribe fn. Absent
131
- * ⇒ the feed polls `getBars` for ticks instead.
137
+ * ⇒ the feed polls `getBars` for ticks instead. `opts.session` names the trading
138
+ * session the chart is showing (see {@link BarRange.session}) — a provider whose
139
+ * live source cannot filter by session may fall back to polling internally.
132
140
  */
133
- subscribe?(ticker: string, timeframe: string, onBar: (bar: OHLCV) => void): Unsubscribe;
141
+ subscribe?(ticker: string, timeframe: string, onBar: (bar: OHLCV) => void, opts?: {
142
+ session?: string;
143
+ }): Unsubscribe;
134
144
  /** Apply runtime config (e.g. API keys). Absent ⇒ no configuration needed. */
135
145
  configure?(config: unknown): void;
136
146
  /**
@@ -1,4 +1,4 @@
1
- import { M as MarketConfig, O as OHLCV, U as Unsubscribe } from './options-BlQ00Fju.cjs';
1
+ import { M as MarketConfig, O as OHLCV, U as Unsubscribe } from './options-BqGeFHtp.js';
2
2
 
3
3
  /**
4
4
  * Symbol metadata an engine may need (e.g. Pine `syminfo.*`). Free-form beyond
@@ -26,6 +26,12 @@ interface BarRange {
26
26
  to?: number;
27
27
  /** Max bars. */
28
28
  limit?: number;
29
+ /**
30
+ * Trading session to serve (`'regular'` | `'extended'`) — rides every request on
31
+ * markets that have sessions; absent = the provider's default. A provider without
32
+ * a session concept ignores it.
33
+ */
34
+ session?: string;
29
35
  }
30
36
  interface MarketDataFeed {
31
37
  /** Load the initial history (from a provider or the offline `data` array). */
@@ -128,9 +134,13 @@ interface DataProvider {
128
134
  /**
129
135
  * Open a true live stream for `ticker`/`timeframe`. Each call to `onBar` delivers
130
136
  * the forming candle (or a freshly-closed one). Returns an unsubscribe fn. Absent
131
- * ⇒ the feed polls `getBars` for ticks instead.
137
+ * ⇒ the feed polls `getBars` for ticks instead. `opts.session` names the trading
138
+ * session the chart is showing (see {@link BarRange.session}) — a provider whose
139
+ * live source cannot filter by session may fall back to polling internally.
132
140
  */
133
- subscribe?(ticker: string, timeframe: string, onBar: (bar: OHLCV) => void): Unsubscribe;
141
+ subscribe?(ticker: string, timeframe: string, onBar: (bar: OHLCV) => void, opts?: {
142
+ session?: string;
143
+ }): Unsubscribe;
134
144
  /** Apply runtime config (e.g. API keys). Absent ⇒ no configuration needed. */
135
145
  configure?(config: unknown): void;
136
146
  /**
@@ -575,8 +575,8 @@ var RendererControl = class {
575
575
  };
576
576
 
577
577
  // src/data/BarStore.ts
578
- function seriesKey(provider, symbol, timeframe) {
579
- return `${provider}|${symbol}|${timeframe}`;
578
+ function seriesKey(provider, symbol, timeframe, session) {
579
+ return `${provider}|${symbol}|${timeframe}${session && session !== "regular" ? `|${session}` : ""}`;
580
580
  }
581
581
  function symbolOf(key) {
582
582
  return key.split("|")[1] ?? "";
@@ -859,9 +859,9 @@ var ProviderRegistry = class {
859
859
  };
860
860
 
861
861
  // src/data/CachingDataFeed.ts
862
- function cacheKey(symbol, timeframe) {
862
+ function cacheKey(symbol, timeframe, session) {
863
863
  const { provider, ticker } = parseSymbol(symbol);
864
- return seriesKey(provider ?? "", ticker, timeframe);
864
+ return seriesKey(provider ?? "", ticker, timeframe, session);
865
865
  }
866
866
  var PAGE_BARS = 1e4;
867
867
  var SINGLE_FETCH_BARS = PAGE_BARS + 1;
@@ -873,7 +873,7 @@ var CachingDataFeed = class {
873
873
  async load(cfg) {
874
874
  if (cfg.data && cfg.data.length > 0) return this.inner.load(cfg);
875
875
  const symbol = cfg.symbol ?? "TEST";
876
- const key = cacheKey(symbol, cfg.timeframe ?? "60");
876
+ const key = cacheKey(symbol, cfg.timeframe ?? "60", cfg.session);
877
877
  this.store.retainSymbol(symbol);
878
878
  const cached = this.store.get(key);
879
879
  const n = cfg.bars ?? 500;
@@ -902,7 +902,7 @@ var CachingDataFeed = class {
902
902
  */
903
903
  async loadRange(cfg, range) {
904
904
  if (!this.inner.loadRange) return this.inner.load(cfg);
905
- const key = cacheKey(cfg.symbol ?? "TEST", cfg.timeframe ?? "60");
905
+ const key = cacheKey(cfg.symbol ?? "TEST", cfg.timeframe ?? "60", cfg.session);
906
906
  let cached = this.store.get(key);
907
907
  let newest = cached?.[cached.length - 1];
908
908
  if (range.to != null && newest && range.to < newest.time) {
@@ -1209,13 +1209,13 @@ var RegistryFetchFeed = class {
1209
1209
  const { provider: name, ticker } = parseSymbol(cfg.symbol ?? "");
1210
1210
  const provider = this.registry.get(name ?? "");
1211
1211
  if (!provider) return Promise.resolve([]);
1212
- return safeBars(provider, ticker, cfg.timeframe ?? "60", { limit: cfg.bars ?? 500 });
1212
+ return safeBars(provider, ticker, cfg.timeframe ?? "60", { limit: cfg.bars ?? 500, session: cfg.session });
1213
1213
  }
1214
1214
  loadRange(cfg, range) {
1215
1215
  const { provider: name, ticker } = parseSymbol(cfg.symbol ?? "");
1216
1216
  const provider = this.registry.get(name ?? "");
1217
1217
  if (!provider) return Promise.resolve([]);
1218
- return safeBars(provider, ticker, cfg.timeframe ?? "60", range);
1218
+ return safeBars(provider, ticker, cfg.timeframe ?? "60", { ...range, session: cfg.session });
1219
1219
  }
1220
1220
  subscribe(cfg, onBar) {
1221
1221
  const { provider: name, ticker } = parseSymbol(cfg.symbol ?? "");
@@ -1223,13 +1223,13 @@ var RegistryFetchFeed = class {
1223
1223
  if (!provider) return () => {
1224
1224
  };
1225
1225
  const tf = cfg.timeframe ?? "60";
1226
- if (provider.subscribe) return provider.subscribe(ticker, tf, onBar);
1226
+ if (provider.subscribe) return provider.subscribe(ticker, tf, onBar, cfg.session ? { session: cfg.session } : void 0);
1227
1227
  let stopped = false;
1228
1228
  let timer = null;
1229
1229
  const poll = async () => {
1230
1230
  if (stopped) return;
1231
1231
  try {
1232
- const bars = await provider.getBars(ticker, tf, { limit: 2 });
1232
+ const bars = await provider.getBars(ticker, tf, { limit: 2, session: cfg.session });
1233
1233
  if (stopped) return;
1234
1234
  for (const b of bars) onBar(b);
1235
1235
  } catch {
@@ -18958,7 +18958,7 @@ var EngineOrchestrator = class _EngineOrchestrator {
18958
18958
  * an in-flight `setMarket` immediately (the config mutates before the load). */
18959
18959
  marketSnapshot() {
18960
18960
  const m = this.config.market;
18961
- return { symbol: m.symbol, provider: parseSymbol(m.symbol ?? "").provider ?? void 0, timeframe: m.timeframe, bars: m.bars, offline: m.data !== void 0 };
18961
+ return { symbol: m.symbol, provider: parseSymbol(m.symbol ?? "").provider ?? void 0, timeframe: m.timeframe, bars: m.bars, session: m.session, offline: m.data !== void 0 };
18962
18962
  }
18963
18963
  /**
18964
18964
  * Switch the chart's market IN PLACE — no destroy/recreate. The renderer stays
@@ -18977,7 +18977,9 @@ var EngineOrchestrator = class _EngineOrchestrator {
18977
18977
  */
18978
18978
  async setMarket(next) {
18979
18979
  const m = this.config.market;
18980
- const identityChanged = next.symbol !== void 0 && next.symbol !== m.symbol || next.timeframe !== void 0 && next.timeframe !== m.timeframe || next.data !== void 0;
18980
+ const identityChanged = next.symbol !== void 0 && next.symbol !== m.symbol || next.timeframe !== void 0 && next.timeframe !== m.timeframe || // A session switch changes WHICH bars exist (RTH vs ETH) — a full reload,
18981
+ // exactly like a timeframe change; the cache keys the sessions apart.
18982
+ next.session !== void 0 && next.session !== m.session || next.data !== void 0;
18981
18983
  const depthChanged = next.bars !== void 0 && next.bars !== m.bars;
18982
18984
  const depthOnly = depthChanged && !identityChanged && this.rawBars.length > 0 && !m.data?.length && ((next.bars ?? 0) <= this.rawBars.length || typeof this.feed.loadRange === "function");
18983
18985
  if (!identityChanged && !depthChanged) {
@@ -18999,6 +19001,7 @@ var EngineOrchestrator = class _EngineOrchestrator {
18999
19001
  if (next.symbol !== void 0) m.symbol = next.symbol;
19000
19002
  if (next.timeframe !== void 0) m.timeframe = next.timeframe;
19001
19003
  if (next.bars !== void 0) m.bars = next.bars;
19004
+ if (next.session !== void 0) m.session = next.session;
19002
19005
  if (next.data !== void 0) m.data = next.data;
19003
19006
  else if (next.symbol !== void 0) delete m.data;
19004
19007
  m.visibleRange = next.visibleRange;
@@ -20369,6 +20372,7 @@ var Vela = class {
20369
20372
  symbol: options.symbol,
20370
20373
  timeframe: options.timeframe,
20371
20374
  bars: options.bars,
20375
+ session: options.session,
20372
20376
  visibleRange: options.visibleRange,
20373
20377
  data: options.data
20374
20378
  },
@@ -1,4 +1,4 @@
1
- import { parseSymbol, priceStyleIds, BUILTIN_PRICE_STYLES, tzButtonLabel, TIMEZONES, normalizeTimezone, tzMenuLabel } from './chunk-CA3N3PYT.js';
1
+ import { parseSymbol, priceStyleIds, BUILTIN_PRICE_STYLES, tzButtonLabel, TIMEZONES, normalizeTimezone, tzMenuLabel } from './chunk-4MQEG67Z.js';
2
2
  import { chartType, widgetActions, SidePanel, sidePanels, DEFAULT_PANEL_ORDER, getDrawingType } from './chunk-ZNL2X6U2.js';
3
3
  import { Tooltip, Menu, Dialog, Drawer } from './chunk-QWIEKZRE.js';
4
4
  import { iconMarkup, registerIcon, injectStyles, iconEl, SESSION_PRE, SESSION_POST, SESSION_OFF, icon, categoricalColor } from './chunk-EMS6PO2T.js';
@@ -1468,10 +1468,12 @@ var CSS5 = `
1468
1468
  color: var(--vela-fg-muted);
1469
1469
  font-size: 11px;
1470
1470
  font-weight: 600;
1471
- cursor: not-allowed;
1472
- opacity: 0.55;
1471
+ cursor: pointer;
1473
1472
  }
1474
- .vela-bb-session-btn.is-active { color: var(--vela-fg); background: var(--vela-surface-elev); opacity: 0.8; }
1473
+ .vela-bb-session-btn:disabled { cursor: not-allowed; opacity: 0.55; }
1474
+ .vela-bb-session-btn:not(:disabled):hover { background: var(--vela-hover); color: var(--vela-fg-bright); }
1475
+ .vela-bb-session-btn.is-active { color: var(--vela-fg); background: var(--vela-surface-elev); }
1476
+ .vela-bb-session-btn.is-active:disabled { opacity: 0.8; }
1475
1477
  .vela-bb-settings {
1476
1478
  all: unset;
1477
1479
  display: inline-flex;
@@ -1491,6 +1493,8 @@ var Bottombar = class {
1491
1493
  constructor(host, opts) {
1492
1494
  this.settingsTip = null;
1493
1495
  this.rangeButtons = /* @__PURE__ */ new Map();
1496
+ this.sessionButtons = /* @__PURE__ */ new Map();
1497
+ this.sessionEl = null;
1494
1498
  this.timer = null;
1495
1499
  this.timezone = opts.timezone;
1496
1500
  const doc = host.ownerDocument;
@@ -1520,12 +1524,19 @@ var Bottombar = class {
1520
1524
  this.tzButton.append(this.clockEl, this.tzLabelEl);
1521
1525
  const session = doc.createElement("span");
1522
1526
  session.className = "vela-bb-session";
1527
+ this.sessionEl = session;
1523
1528
  session.title = "Session \u2014 stocks & ETFs only";
1524
- for (const [label, active] of [["RTH", true], ["ETH", false]]) {
1529
+ for (const [key, label] of [["regular", "RTH"], ["extended", "ETH"]]) {
1525
1530
  const b = doc.createElement("button");
1526
- b.className = "vela-bb-session-btn" + (active ? " is-active" : "");
1531
+ b.className = "vela-bb-session-btn" + (key === "regular" ? " is-active" : "");
1527
1532
  b.textContent = label;
1528
1533
  b.disabled = true;
1534
+ b.addEventListener("click", () => {
1535
+ if (b.disabled) return;
1536
+ this.setSession({ session: key, enabled: true });
1537
+ opts.onSession?.(key);
1538
+ });
1539
+ this.sessionButtons.set(key, b);
1529
1540
  session.appendChild(b);
1530
1541
  }
1531
1542
  const settingsBtn = doc.createElement("button");
@@ -1563,6 +1574,19 @@ var Bottombar = class {
1563
1574
  else delete b.dataset.active;
1564
1575
  }
1565
1576
  }
1577
+ /**
1578
+ * Reflect the ACTIVE chart's session posture. `enabled: false` (a continuous
1579
+ * market, or metadata not landed yet) shows the disabled RTH-active stub — the
1580
+ * pre-session-model look, byte-for-byte. Enabled, the chips become clickable and
1581
+ * the active one tracks the chart's current session.
1582
+ */
1583
+ setSession(state) {
1584
+ if (this.sessionEl) this.sessionEl.title = state.enabled ? "Session \u2014 regular (RTH) vs extended (ETH) hours" : "Session \u2014 stocks & ETFs only";
1585
+ for (const [key, b] of this.sessionButtons) {
1586
+ b.disabled = !state.enabled;
1587
+ b.classList.toggle("is-active", state.enabled ? key === state.session : key === "regular");
1588
+ }
1589
+ }
1566
1590
  destroy() {
1567
1591
  if (this.timer !== null) clearInterval(this.timer);
1568
1592
  this.tzMenu.destroy();
@@ -4266,6 +4290,7 @@ function sanitizeCell(raw) {
4266
4290
  if (typeof c.timeframe === "string") out.timeframe = c.timeframe;
4267
4291
  if (typeof c.priceStyle === "string") out.priceStyle = c.priceStyle;
4268
4292
  if (typeof c.bars === "number" && Number.isFinite(c.bars) && c.bars > 0) out.bars = c.bars;
4293
+ if (c.session === "regular" || c.session === "extended") out.session = c.session;
4269
4294
  if (typeof c.watermark === "boolean") out.watermark = c.watermark;
4270
4295
  if (typeof c.indicatorTitles === "boolean") out.indicatorTitles = c.indicatorTitles;
4271
4296
  if (typeof c.indicatorValues === "boolean") out.indicatorValues = c.indicatorValues;
@@ -4375,6 +4400,9 @@ function indicatorLedger(i) {
4375
4400
  };
4376
4401
  }
4377
4402
 
4403
+ // src/core/options.ts
4404
+ var normalizeSession = (v) => v === "regular" || v === "extended" ? v : void 0;
4405
+
4378
4406
  // src/widget/layout-mode.ts
4379
4407
  var MOBILE_BREAKPOINT_PX = 640;
4380
4408
  var COARSE_BREAKPOINT_PX = 920;
@@ -5741,4 +5769,4 @@ var Toast = class {
5741
5769
  }
5742
5770
  };
5743
5771
 
5744
- export { Bottombar, ChartContextMenu, DataWindow, DrawingPill, DrawingsDrawer, Glider, IndicatorPicker, LayoutModeController, MobileBar, MoreDrawer, ObjectTree, PAN_FAST, PanelDock, PriceScaleDrawer, RANGE_PRESETS, ShortcutsHelp, Statusline, SymbolPicker, TimeframeDrawer, TimeframeQuick, TimezoneDrawer, Toast, Topbar, Watermark, WidgetHistory, ZOOM_IN, ZOOM_OUT, dataWindowSections, decimalsFor, decodeState, encodeState, filterSymbols, fmtChange, fmtPrice, indicatorLedger, legacyWidgetState, loadPersisted, localStorageAdapter, parsePersisted, parseTimeframe, prefixedSymbol, priceStyleIcon, priceStyleLabel, resolveIndicators, sanitizeState, savePersisted, statuslineInkOf, timeframeLabel, timeframeMs, toolShortcutHints };
5772
+ export { Bottombar, ChartContextMenu, DataWindow, DrawingPill, DrawingsDrawer, Glider, IndicatorPicker, LayoutModeController, MobileBar, MoreDrawer, ObjectTree, PAN_FAST, PanelDock, PriceScaleDrawer, RANGE_PRESETS, ShortcutsHelp, Statusline, SymbolPicker, TimeframeDrawer, TimeframeQuick, TimezoneDrawer, Toast, Topbar, Watermark, WidgetHistory, ZOOM_IN, ZOOM_OUT, dataWindowSections, decimalsFor, decodeState, encodeState, filterSymbols, fmtChange, fmtPrice, indicatorLedger, legacyWidgetState, loadPersisted, localStorageAdapter, normalizeSession, parsePersisted, parseTimeframe, prefixedSymbol, priceStyleIcon, priceStyleLabel, resolveIndicators, sanitizeState, savePersisted, statuslineInkOf, timeframeLabel, timeframeMs, toolShortcutHints };
@@ -1,5 +1,5 @@
1
- import { s as Millis, ac as InputSchema, ab as IndicatorMeta, P as PriceStyle, O as OHLCV, l as InputValue, j as IndicatorModel, i as MoveTarget, ay as SeriesSpec, a9 as Fill, B as Background, aq as PriceLine, $ as DrawingLine, X as DrawingBox, _ as DrawingLabel, a3 as DrawingPolyline, a0 as DrawingLinefill, a5 as DrawingTable, f as IndicatorStatus, a as VisibleRange, c as VelaTheme, S as SerializedDrawing, u as DrawingTypeKey, t as SnapMode, a1 as DrawingMode, I as IChartRenderer, R as RendererCapabilities, n as LegendActionView, U as Unsubscribe, C as CrosshairEvent, A as AxisLongPressEvent, q as DataWindowReadout, m as SymbolPickerFn, aK as PaneInfo, a8 as DrawingsOption, D as Drawing, b as VelaOptions, w as AddIndicatorOptions, am as MarketSwitch, al as MarketSnapshot, V as VisibleRangePreset, T as ThemeName } from './options-BlQ00Fju.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-Ce6PuCzQ.cjs';
1
+ import { t as Millis, ad as InputSchema, ac as IndicatorMeta, P as PriceStyle, O as OHLCV, m as InputValue, k as IndicatorModel, j as MoveTarget, az as SeriesSpec, aa as Fill, B as Background, ar 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, aL as PaneInfo, a9 as DrawingsOption, D as Drawing, b as VelaOptions, x as AddIndicatorOptions, an as MarketSwitch, am as MarketSnapshot, V as VisibleRangePreset, T as ThemeName } from './options-BqGeFHtp.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-BNKtYU5V.cjs';
3
3
 
4
4
  /**
5
5
  * A strategy's broker state at ONE bar — the flat summary a host reads while a script
@@ -1,5 +1,5 @@
1
- import { s as Millis, ac as InputSchema, ab as IndicatorMeta, P as PriceStyle, O as OHLCV, l as InputValue, j as IndicatorModel, i as MoveTarget, ay as SeriesSpec, a9 as Fill, B as Background, aq as PriceLine, $ as DrawingLine, X as DrawingBox, _ as DrawingLabel, a3 as DrawingPolyline, a0 as DrawingLinefill, a5 as DrawingTable, f as IndicatorStatus, a as VisibleRange, c as VelaTheme, S as SerializedDrawing, u as DrawingTypeKey, t as SnapMode, a1 as DrawingMode, I as IChartRenderer, R as RendererCapabilities, n as LegendActionView, U as Unsubscribe, C as CrosshairEvent, A as AxisLongPressEvent, q as DataWindowReadout, m as SymbolPickerFn, aK as PaneInfo, a8 as DrawingsOption, D as Drawing, b as VelaOptions, w as AddIndicatorOptions, am as MarketSwitch, al as MarketSnapshot, V as VisibleRangePreset, T as ThemeName } from './options-BlQ00Fju.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-DNx9ntBD.js';
1
+ import { t as Millis, ad as InputSchema, ac as IndicatorMeta, P as PriceStyle, O as OHLCV, m as InputValue, k as IndicatorModel, j as MoveTarget, az as SeriesSpec, aa as Fill, B as Background, ar 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, aL as PaneInfo, a9 as DrawingsOption, D as Drawing, b as VelaOptions, x as AddIndicatorOptions, an as MarketSwitch, am as MarketSnapshot, V as VisibleRangePreset, T as ThemeName } from './options-BqGeFHtp.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-gJjN_0eh.js';
3
3
 
4
4
  /**
5
5
  * A strategy's broker state at ONE bar — the flat summary a host reads while a script
@@ -1,6 +1,6 @@
1
- import { V as VisibleRangePreset } from './options-BlQ00Fju.cjs';
2
- import { D as DataProvider } from './DataProvider-Ce6PuCzQ.cjs';
3
- import { S as ScriptingEngine, V as Vela } from './contributions-Dlc7ZWZz.cjs';
1
+ import { V as VisibleRangePreset } from './options-BqGeFHtp.js';
2
+ import { D as DataProvider } from './DataProvider-gJjN_0eh.js';
3
+ import { S as ScriptingEngine, V as Vela } from './contributions-lPAgo9Cu.js';
4
4
 
5
5
  interface RangePreset {
6
6
  /** Button label. */
@@ -27,6 +27,8 @@ interface BottombarOptions {
27
27
  timezone: string;
28
28
  onRange: (preset: RangePreset) => void;
29
29
  onTimezone: (zone: string) => void;
30
+ /** RTH/ETH toggled by the user. Fires only while the toggle is ENABLED (see {@link Bottombar.setSession}). */
31
+ onSession?: (session: 'regular' | 'extended') => void;
30
32
  onSettingsClick?: () => void;
31
33
  }
32
34
  declare class Bottombar {
@@ -37,12 +39,24 @@ declare class Bottombar {
37
39
  private readonly tzMenu;
38
40
  private readonly settingsTip;
39
41
  private readonly rangeButtons;
42
+ private readonly sessionButtons;
43
+ private sessionEl;
40
44
  private timezone;
41
45
  private timer;
42
46
  constructor(host: HTMLElement, opts: BottombarOptions);
43
47
  setTimezone(zone: string): void;
44
48
  /** Highlight (or clear with null) the active range chip — cleared on manual tf changes. */
45
49
  setActiveRange(id: string | null): void;
50
+ /**
51
+ * Reflect the ACTIVE chart's session posture. `enabled: false` (a continuous
52
+ * market, or metadata not landed yet) shows the disabled RTH-active stub — the
53
+ * pre-session-model look, byte-for-byte. Enabled, the chips become clickable and
54
+ * the active one tracks the chart's current session.
55
+ */
56
+ setSession(state: {
57
+ session: 'regular' | 'extended';
58
+ enabled: boolean;
59
+ }): void;
46
60
  destroy(): void;
47
61
  private tzItems;
48
62
  private tick;
@@ -130,6 +144,8 @@ interface CellState {
130
144
  timeframe?: string;
131
145
  priceStyle?: string;
132
146
  bars?: number;
147
+ /** Trading session shown (`'extended'` persisted; absent = regular, the default). */
148
+ session?: string;
133
149
  /** Symbol watermark visibility — a per-chart display pref. */
134
150
  watermark?: boolean;
135
151
  /** Indicator titles (the in-chart legend rows) visibility — a per-chart display pref. */
@@ -212,6 +228,8 @@ interface PersistedState {
212
228
  priceStyle?: string;
213
229
  timezone?: string;
214
230
  bars?: string;
231
+ /** Trading session (`regular` | `extended`) — URL param `session`. */
232
+ session?: string;
215
233
  watermark?: string;
216
234
  /** Comma-joined favorite drawing-tool types. */
217
235
  favorites?: string;
@@ -1,6 +1,6 @@
1
- import { V as VisibleRangePreset } from './options-BlQ00Fju.js';
2
- import { D as DataProvider } from './DataProvider-DNx9ntBD.js';
3
- import { S as ScriptingEngine, V as Vela } from './contributions-DToMhiw3.js';
1
+ import { V as VisibleRangePreset } from './options-BqGeFHtp.cjs';
2
+ import { D as DataProvider } from './DataProvider-BNKtYU5V.cjs';
3
+ import { S as ScriptingEngine, V as Vela } from './contributions-D64UA74H.cjs';
4
4
 
5
5
  interface RangePreset {
6
6
  /** Button label. */
@@ -27,6 +27,8 @@ interface BottombarOptions {
27
27
  timezone: string;
28
28
  onRange: (preset: RangePreset) => void;
29
29
  onTimezone: (zone: string) => void;
30
+ /** RTH/ETH toggled by the user. Fires only while the toggle is ENABLED (see {@link Bottombar.setSession}). */
31
+ onSession?: (session: 'regular' | 'extended') => void;
30
32
  onSettingsClick?: () => void;
31
33
  }
32
34
  declare class Bottombar {
@@ -37,12 +39,24 @@ declare class Bottombar {
37
39
  private readonly tzMenu;
38
40
  private readonly settingsTip;
39
41
  private readonly rangeButtons;
42
+ private readonly sessionButtons;
43
+ private sessionEl;
40
44
  private timezone;
41
45
  private timer;
42
46
  constructor(host: HTMLElement, opts: BottombarOptions);
43
47
  setTimezone(zone: string): void;
44
48
  /** Highlight (or clear with null) the active range chip — cleared on manual tf changes. */
45
49
  setActiveRange(id: string | null): void;
50
+ /**
51
+ * Reflect the ACTIVE chart's session posture. `enabled: false` (a continuous
52
+ * market, or metadata not landed yet) shows the disabled RTH-active stub — the
53
+ * pre-session-model look, byte-for-byte. Enabled, the chips become clickable and
54
+ * the active one tracks the chart's current session.
55
+ */
56
+ setSession(state: {
57
+ session: 'regular' | 'extended';
58
+ enabled: boolean;
59
+ }): void;
46
60
  destroy(): void;
47
61
  private tzItems;
48
62
  private tick;
@@ -130,6 +144,8 @@ interface CellState {
130
144
  timeframe?: string;
131
145
  priceStyle?: string;
132
146
  bars?: number;
147
+ /** Trading session shown (`'extended'` persisted; absent = regular, the default). */
148
+ session?: string;
133
149
  /** Symbol watermark visibility — a per-chart display pref. */
134
150
  watermark?: boolean;
135
151
  /** Indicator titles (the in-chart legend rows) visibility — a per-chart display pref. */
@@ -212,6 +228,8 @@ interface PersistedState {
212
228
  priceStyle?: string;
213
229
  timezone?: string;
214
230
  bars?: string;
231
+ /** Trading session (`regular` | `extended`) — URL param `session`. */
232
+ session?: string;
215
233
  watermark?: string;
216
234
  /** Comma-joined favorite drawing-tool types. */
217
235
  favorites?: string;
package/dist/index.cjs CHANGED
@@ -7528,7 +7528,7 @@ var EngineOrchestrator = class _EngineOrchestrator {
7528
7528
  * an in-flight `setMarket` immediately (the config mutates before the load). */
7529
7529
  marketSnapshot() {
7530
7530
  const m = this.config.market;
7531
- return { symbol: m.symbol, provider: parseSymbol(m.symbol ?? "").provider ?? void 0, timeframe: m.timeframe, bars: m.bars, offline: m.data !== void 0 };
7531
+ return { symbol: m.symbol, provider: parseSymbol(m.symbol ?? "").provider ?? void 0, timeframe: m.timeframe, bars: m.bars, session: m.session, offline: m.data !== void 0 };
7532
7532
  }
7533
7533
  /**
7534
7534
  * Switch the chart's market IN PLACE — no destroy/recreate. The renderer stays
@@ -7547,7 +7547,9 @@ var EngineOrchestrator = class _EngineOrchestrator {
7547
7547
  */
7548
7548
  async setMarket(next) {
7549
7549
  const m = this.config.market;
7550
- const identityChanged = next.symbol !== void 0 && next.symbol !== m.symbol || next.timeframe !== void 0 && next.timeframe !== m.timeframe || next.data !== void 0;
7550
+ const identityChanged = next.symbol !== void 0 && next.symbol !== m.symbol || next.timeframe !== void 0 && next.timeframe !== m.timeframe || // A session switch changes WHICH bars exist (RTH vs ETH) — a full reload,
7551
+ // exactly like a timeframe change; the cache keys the sessions apart.
7552
+ next.session !== void 0 && next.session !== m.session || next.data !== void 0;
7551
7553
  const depthChanged = next.bars !== void 0 && next.bars !== m.bars;
7552
7554
  const depthOnly = depthChanged && !identityChanged && this.rawBars.length > 0 && !m.data?.length && ((next.bars ?? 0) <= this.rawBars.length || typeof this.feed.loadRange === "function");
7553
7555
  if (!identityChanged && !depthChanged) {
@@ -7569,6 +7571,7 @@ var EngineOrchestrator = class _EngineOrchestrator {
7569
7571
  if (next.symbol !== void 0) m.symbol = next.symbol;
7570
7572
  if (next.timeframe !== void 0) m.timeframe = next.timeframe;
7571
7573
  if (next.bars !== void 0) m.bars = next.bars;
7574
+ if (next.session !== void 0) m.session = next.session;
7572
7575
  if (next.data !== void 0) m.data = next.data;
7573
7576
  else if (next.symbol !== void 0) delete m.data;
7574
7577
  m.visibleRange = next.visibleRange;
@@ -8933,8 +8936,8 @@ var PanesControl = class {
8933
8936
  };
8934
8937
 
8935
8938
  // src/data/BarStore.ts
8936
- function seriesKey(provider, symbol, timeframe) {
8937
- return `${provider}|${symbol}|${timeframe}`;
8939
+ function seriesKey(provider, symbol, timeframe, session) {
8940
+ return `${provider}|${symbol}|${timeframe}${session && session !== "regular" ? `|${session}` : ""}`;
8938
8941
  }
8939
8942
  function symbolOf(key) {
8940
8943
  return key.split("|")[1] ?? "";
@@ -9017,9 +9020,9 @@ var BarStore = class {
9017
9020
  var sharedBarStore = new BarStore();
9018
9021
 
9019
9022
  // src/data/CachingDataFeed.ts
9020
- function cacheKey(symbol, timeframe) {
9023
+ function cacheKey(symbol, timeframe, session) {
9021
9024
  const { provider, ticker } = parseSymbol(symbol);
9022
- return seriesKey(provider ?? "", ticker, timeframe);
9025
+ return seriesKey(provider ?? "", ticker, timeframe, session);
9023
9026
  }
9024
9027
  var PAGE_BARS = 1e4;
9025
9028
  var SINGLE_FETCH_BARS = PAGE_BARS + 1;
@@ -9031,7 +9034,7 @@ var CachingDataFeed = class {
9031
9034
  async load(cfg) {
9032
9035
  if (cfg.data && cfg.data.length > 0) return this.inner.load(cfg);
9033
9036
  const symbol = cfg.symbol ?? "TEST";
9034
- const key = cacheKey(symbol, cfg.timeframe ?? "60");
9037
+ const key = cacheKey(symbol, cfg.timeframe ?? "60", cfg.session);
9035
9038
  this.store.retainSymbol(symbol);
9036
9039
  const cached = this.store.get(key);
9037
9040
  const n = cfg.bars ?? 500;
@@ -9060,7 +9063,7 @@ var CachingDataFeed = class {
9060
9063
  */
9061
9064
  async loadRange(cfg, range) {
9062
9065
  if (!this.inner.loadRange) return this.inner.load(cfg);
9063
- const key = cacheKey(cfg.symbol ?? "TEST", cfg.timeframe ?? "60");
9066
+ const key = cacheKey(cfg.symbol ?? "TEST", cfg.timeframe ?? "60", cfg.session);
9064
9067
  let cached = this.store.get(key);
9065
9068
  let newest = cached?.[cached.length - 1];
9066
9069
  if (range.to != null && newest && range.to < newest.time) {
@@ -9367,13 +9370,13 @@ var RegistryFetchFeed = class {
9367
9370
  const { provider: name, ticker } = parseSymbol(cfg.symbol ?? "");
9368
9371
  const provider = this.registry.get(name ?? "");
9369
9372
  if (!provider) return Promise.resolve([]);
9370
- return safeBars(provider, ticker, cfg.timeframe ?? "60", { limit: cfg.bars ?? 500 });
9373
+ return safeBars(provider, ticker, cfg.timeframe ?? "60", { limit: cfg.bars ?? 500, session: cfg.session });
9371
9374
  }
9372
9375
  loadRange(cfg, range) {
9373
9376
  const { provider: name, ticker } = parseSymbol(cfg.symbol ?? "");
9374
9377
  const provider = this.registry.get(name ?? "");
9375
9378
  if (!provider) return Promise.resolve([]);
9376
- return safeBars(provider, ticker, cfg.timeframe ?? "60", range);
9379
+ return safeBars(provider, ticker, cfg.timeframe ?? "60", { ...range, session: cfg.session });
9377
9380
  }
9378
9381
  subscribe(cfg, onBar) {
9379
9382
  const { provider: name, ticker } = parseSymbol(cfg.symbol ?? "");
@@ -9381,13 +9384,13 @@ var RegistryFetchFeed = class {
9381
9384
  if (!provider) return () => {
9382
9385
  };
9383
9386
  const tf = cfg.timeframe ?? "60";
9384
- if (provider.subscribe) return provider.subscribe(ticker, tf, onBar);
9387
+ if (provider.subscribe) return provider.subscribe(ticker, tf, onBar, cfg.session ? { session: cfg.session } : void 0);
9385
9388
  let stopped = false;
9386
9389
  let timer = null;
9387
9390
  const poll = async () => {
9388
9391
  if (stopped) return;
9389
9392
  try {
9390
- const bars = await provider.getBars(ticker, tf, { limit: 2 });
9393
+ const bars = await provider.getBars(ticker, tf, { limit: 2, session: cfg.session });
9391
9394
  if (stopped) return;
9392
9395
  for (const b of bars) onBar(b);
9393
9396
  } catch {
@@ -27668,6 +27671,7 @@ var Vela = class {
27668
27671
  symbol: options.symbol,
27669
27672
  timeframe: options.timeframe,
27670
27673
  bars: options.bars,
27674
+ session: options.session,
27671
27675
  visibleRange: options.visibleRange,
27672
27676
  data: options.data
27673
27677
  },
package/dist/index.d.cts CHANGED
@@ -1,9 +1,9 @@
1
- import { D as DrawingsDocument, R as Resolved } from './contributions-Dlc7ZWZz.cjs';
2
- export { B as BarsChangeReason, C as ContextSelect, b as DataControl, c as DrawingsControl, E as EngineAlert, d as EngineCapabilities, e as EngineContextSnapshot, f as EngineFactory, g as EngineWarning, h as ExecutionHandlers, i as ExecutionMarket, j as ExecutionRequest, k as ExecutionSession, F as FetchSeries, l as IndicatorEventMap, I as IndicatorHandle, m as IndicatorSummary, L as LegendActionDescriptor, n as LegendIndicatorInfo, N as NativeIndicator, o as NativeIndicatorContext, p as NativeIndicatorDescriptor, q as NativeIndicatorInfo, r as NativeIndicatorOutput, P as ParsedSymbol, s as PreparedScript, t as RendererControl, u as RunIndicatorResult, v as SceneInspection, a as ScriptRun, w as ScriptRunCause, x as ScriptRunResult, S as ScriptingEngine, y as SidePanelButton, z as SidePanelDescriptor, A as SidePanelHandle, G as SidePanelHeader, H as StrategyFill, J as StrategyState, K as StrategyTrade, T as TypedEventBus, V as Vela, M as VelaDeps, O as VelaEventMap, Q as VisibleBarRange, U as WidgetActionDescriptor, X as WidgetActionTarget, Y as WidgetAttachment, W as WidgetContext, Z as getNativeIndicator, _ as legendActions, $ as nativeIndicatorDescriptors, a0 as nativeIndicatorTypes, a1 as registerDefaultEngine, a2 as registerLegendAction, a3 as registerNativeIndicator, a4 as registerSidePanel, a5 as registerWidgetAction, a6 as registerWidgetAttachment, a7 as resolveEngines, a8 as sidePanels, a9 as unregisterDefaultEngine, aa as unregisterLegendAction, ab as unregisterNativeIndicator, ac as unregisterSidePanel, ad as unregisterWidgetAction, ae as unregisterWidgetAttachment, af as widgetActions, ag as widgetAttachments } from './contributions-Dlc7ZWZz.cjs';
3
- import { D as Drawing, S as SerializedDrawing, U as Unsubscribe, L as LineStyle, P as PriceStyle, I as IChartRenderer, R as RendererCapabilities, d as RendererDisplayOptions, e as IndicatorRenderHandle, f as IndicatorStatus, c as VelaTheme, O as OHLCV, g as Pane, h as PaneAction, i as MoveTarget, j as IndicatorModel, k as ScenePatch, l as InputValue, m as SymbolPickerFn, n as LegendActionView, o as InputChangeEvent, T as ThemeName, C as CrosshairEvent, p as ClickEvent, A as AxisLongPressEvent, a as VisibleRange, q as DataWindowReadout, r as IDrawingsRendererPort, s as Millis, t as SnapMode, u as DrawingTypeKey, v as ToolbarDefinition, M as MarketConfig } from './options-BlQ00Fju.cjs';
4
- export { w as AddIndicatorOptions, B as Background, x as BoxFontFamily, y as BoxHAlign, z as BoxTextSize, E as BoxVAlign, F as CandleBarColor, G as CandleSeries, H as CandleStyle, J as DataWindowGroup, K as DataWindowOHLC, Q as DataWindowRow, W as DirtyRange, X as DrawingBox, Y as DrawingExtend, Z as DrawingIntent, _ as DrawingLabel, $ as DrawingLine, a0 as DrawingLinefill, a1 as DrawingMode, a2 as DrawingPoint, a3 as DrawingPolyline, a4 as DrawingStyle, a5 as DrawingTable, a6 as DrawingText, a7 as DrawingXLoc, a8 as DrawingsOption, a9 as Fill, aa as FillGradientStop, ab as IndicatorMeta, ac as InputSchema, ad as InputType, ae as LabelStyle, af as LabelYLoc, ag as LineLikeKind, ah as LineLikeSeries, ai as LineLikeStyle, aj as MarkerPoint, ak as MarkerSeries, al as MarketSnapshot, am as MarketSwitch, an as PaneHint, ao as PaneKind, ap as PolylinePoint, aq as PriceLine, ar as Projector, as as ProviderName, at as RendererConstructor, au as Scene, av as SchemaPatch, aw as SeriesKind, ax as SeriesPoint, ay as SeriesSpec, az as SeriesValueDelta, aA as SettingsField, aB as SettingsSchema, aC as TableCell, aD as TableMerge, aE as TablePosition, aF as ToolbarGroupConfig, aG as TradeExecution, aH as ValuePatch, b as VelaOptions, V as VisibleRangePreset, aI as buildToolbar, aJ as defaultToolbar } from './options-BlQ00Fju.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-Ce6PuCzQ.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-BNPLOQO1.cjs';
1
+ import { D as DrawingsDocument, R as Resolved } from './contributions-D64UA74H.cjs';
2
+ export { B as BarsChangeReason, C as ContextSelect, b as DataControl, c as DrawingsControl, E as EngineAlert, d as EngineCapabilities, e as EngineContextSnapshot, f as EngineFactory, g as EngineWarning, h as ExecutionHandlers, i as ExecutionMarket, j as ExecutionRequest, k as ExecutionSession, F as FetchSeries, l as IndicatorEventMap, I as IndicatorHandle, m as IndicatorSummary, L as LegendActionDescriptor, n as LegendIndicatorInfo, N as NativeIndicator, o as NativeIndicatorContext, p as NativeIndicatorDescriptor, q as NativeIndicatorInfo, r as NativeIndicatorOutput, P as ParsedSymbol, s as PreparedScript, t as RendererControl, u as RunIndicatorResult, v as SceneInspection, a as ScriptRun, w as ScriptRunCause, x as ScriptRunResult, S as ScriptingEngine, y as SidePanelButton, z as SidePanelDescriptor, A as SidePanelHandle, G as SidePanelHeader, H as StrategyFill, J as StrategyState, K as StrategyTrade, T as TypedEventBus, V as Vela, M as VelaDeps, O as VelaEventMap, Q as VisibleBarRange, U as WidgetActionDescriptor, X as WidgetActionTarget, Y as WidgetAttachment, W as WidgetContext, Z as getNativeIndicator, _ as legendActions, $ as nativeIndicatorDescriptors, a0 as nativeIndicatorTypes, a1 as registerDefaultEngine, a2 as registerLegendAction, a3 as registerNativeIndicator, a4 as registerSidePanel, a5 as registerWidgetAction, a6 as registerWidgetAttachment, a7 as resolveEngines, a8 as sidePanels, a9 as unregisterDefaultEngine, aa as unregisterLegendAction, ab as unregisterNativeIndicator, ac as unregisterSidePanel, ad as unregisterWidgetAction, ae as unregisterWidgetAttachment, af as widgetActions, ag as widgetAttachments } from './contributions-D64UA74H.cjs';
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-BqGeFHtp.cjs';
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 InputSchema, ae as InputType, af as LabelStyle, ag as LabelYLoc, ah as LineLikeKind, ai as LineLikeSeries, aj as LineLikeStyle, ak as MarkerPoint, al as MarkerSeries, am as MarketSnapshot, an as MarketSwitch, ao as PaneHint, ap as PaneKind, aq as PolylinePoint, ar as PriceLine, as as Projector, at as ProviderName, au as RendererConstructor, av as Scene, aw as SchemaPatch, ax as SeriesKind, ay as SeriesPoint, az as SeriesSpec, aA as SeriesValueDelta, aB as SettingsField, aC as SettingsSchema, aD as TableCell, aE as TableMerge, aF as TablePosition, aG as ToolbarGroupConfig, aH as TradeExecution, aI as ValuePatch, b as VelaOptions, V as VisibleRangePreset, aJ as buildToolbar, aK as defaultToolbar } from './options-BqGeFHtp.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-BNKtYU5V.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-D5ni4WEJ.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';
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { D as DrawingsDocument, R as Resolved } from './contributions-DToMhiw3.js';
2
- export { B as BarsChangeReason, C as ContextSelect, b as DataControl, c as DrawingsControl, E as EngineAlert, d as EngineCapabilities, e as EngineContextSnapshot, f as EngineFactory, g as EngineWarning, h as ExecutionHandlers, i as ExecutionMarket, j as ExecutionRequest, k as ExecutionSession, F as FetchSeries, l as IndicatorEventMap, I as IndicatorHandle, m as IndicatorSummary, L as LegendActionDescriptor, n as LegendIndicatorInfo, N as NativeIndicator, o as NativeIndicatorContext, p as NativeIndicatorDescriptor, q as NativeIndicatorInfo, r as NativeIndicatorOutput, P as ParsedSymbol, s as PreparedScript, t as RendererControl, u as RunIndicatorResult, v as SceneInspection, a as ScriptRun, w as ScriptRunCause, x as ScriptRunResult, S as ScriptingEngine, y as SidePanelButton, z as SidePanelDescriptor, A as SidePanelHandle, G as SidePanelHeader, H as StrategyFill, J as StrategyState, K as StrategyTrade, T as TypedEventBus, V as Vela, M as VelaDeps, O as VelaEventMap, Q as VisibleBarRange, U as WidgetActionDescriptor, X as WidgetActionTarget, Y as WidgetAttachment, W as WidgetContext, Z as getNativeIndicator, _ as legendActions, $ as nativeIndicatorDescriptors, a0 as nativeIndicatorTypes, a1 as registerDefaultEngine, a2 as registerLegendAction, a3 as registerNativeIndicator, a4 as registerSidePanel, a5 as registerWidgetAction, a6 as registerWidgetAttachment, a7 as resolveEngines, a8 as sidePanels, a9 as unregisterDefaultEngine, aa as unregisterLegendAction, ab as unregisterNativeIndicator, ac as unregisterSidePanel, ad as unregisterWidgetAction, ae as unregisterWidgetAttachment, af as widgetActions, ag as widgetAttachments } from './contributions-DToMhiw3.js';
3
- import { D as Drawing, S as SerializedDrawing, U as Unsubscribe, L as LineStyle, P as PriceStyle, I as IChartRenderer, R as RendererCapabilities, d as RendererDisplayOptions, e as IndicatorRenderHandle, f as IndicatorStatus, c as VelaTheme, O as OHLCV, g as Pane, h as PaneAction, i as MoveTarget, j as IndicatorModel, k as ScenePatch, l as InputValue, m as SymbolPickerFn, n as LegendActionView, o as InputChangeEvent, T as ThemeName, C as CrosshairEvent, p as ClickEvent, A as AxisLongPressEvent, a as VisibleRange, q as DataWindowReadout, r as IDrawingsRendererPort, s as Millis, t as SnapMode, u as DrawingTypeKey, v as ToolbarDefinition, M as MarketConfig } from './options-BlQ00Fju.js';
4
- export { w as AddIndicatorOptions, B as Background, x as BoxFontFamily, y as BoxHAlign, z as BoxTextSize, E as BoxVAlign, F as CandleBarColor, G as CandleSeries, H as CandleStyle, J as DataWindowGroup, K as DataWindowOHLC, Q as DataWindowRow, W as DirtyRange, X as DrawingBox, Y as DrawingExtend, Z as DrawingIntent, _ as DrawingLabel, $ as DrawingLine, a0 as DrawingLinefill, a1 as DrawingMode, a2 as DrawingPoint, a3 as DrawingPolyline, a4 as DrawingStyle, a5 as DrawingTable, a6 as DrawingText, a7 as DrawingXLoc, a8 as DrawingsOption, a9 as Fill, aa as FillGradientStop, ab as IndicatorMeta, ac as InputSchema, ad as InputType, ae as LabelStyle, af as LabelYLoc, ag as LineLikeKind, ah as LineLikeSeries, ai as LineLikeStyle, aj as MarkerPoint, ak as MarkerSeries, al as MarketSnapshot, am as MarketSwitch, an as PaneHint, ao as PaneKind, ap as PolylinePoint, aq as PriceLine, ar as Projector, as as ProviderName, at as RendererConstructor, au as Scene, av as SchemaPatch, aw as SeriesKind, ax as SeriesPoint, ay as SeriesSpec, az as SeriesValueDelta, aA as SettingsField, aB as SettingsSchema, aC as TableCell, aD as TableMerge, aE as TablePosition, aF as ToolbarGroupConfig, aG as TradeExecution, aH as ValuePatch, b as VelaOptions, V as VisibleRangePreset, aI as buildToolbar, aJ as defaultToolbar } from './options-BlQ00Fju.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-DNx9ntBD.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-BqjEa5r3.js';
1
+ import { D as DrawingsDocument, R as Resolved } from './contributions-lPAgo9Cu.js';
2
+ export { B as BarsChangeReason, C as ContextSelect, b as DataControl, c as DrawingsControl, E as EngineAlert, d as EngineCapabilities, e as EngineContextSnapshot, f as EngineFactory, g as EngineWarning, h as ExecutionHandlers, i as ExecutionMarket, j as ExecutionRequest, k as ExecutionSession, F as FetchSeries, l as IndicatorEventMap, I as IndicatorHandle, m as IndicatorSummary, L as LegendActionDescriptor, n as LegendIndicatorInfo, N as NativeIndicator, o as NativeIndicatorContext, p as NativeIndicatorDescriptor, q as NativeIndicatorInfo, r as NativeIndicatorOutput, P as ParsedSymbol, s as PreparedScript, t as RendererControl, u as RunIndicatorResult, v as SceneInspection, a as ScriptRun, w as ScriptRunCause, x as ScriptRunResult, S as ScriptingEngine, y as SidePanelButton, z as SidePanelDescriptor, A as SidePanelHandle, G as SidePanelHeader, H as StrategyFill, J as StrategyState, K as StrategyTrade, T as TypedEventBus, V as Vela, M as VelaDeps, O as VelaEventMap, Q as VisibleBarRange, U as WidgetActionDescriptor, X as WidgetActionTarget, Y as WidgetAttachment, W as WidgetContext, Z as getNativeIndicator, _ as legendActions, $ as nativeIndicatorDescriptors, a0 as nativeIndicatorTypes, a1 as registerDefaultEngine, a2 as registerLegendAction, a3 as registerNativeIndicator, a4 as registerSidePanel, a5 as registerWidgetAction, a6 as registerWidgetAttachment, a7 as resolveEngines, a8 as sidePanels, a9 as unregisterDefaultEngine, aa as unregisterLegendAction, ab as unregisterNativeIndicator, ac as unregisterSidePanel, ad as unregisterWidgetAction, ae as unregisterWidgetAttachment, af as widgetActions, ag as widgetAttachments } from './contributions-lPAgo9Cu.js';
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-BqGeFHtp.js';
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 InputSchema, ae as InputType, af as LabelStyle, ag as LabelYLoc, ah as LineLikeKind, ai as LineLikeSeries, aj as LineLikeStyle, ak as MarkerPoint, al as MarkerSeries, am as MarketSnapshot, an as MarketSwitch, ao as PaneHint, ap as PaneKind, aq as PolylinePoint, ar as PriceLine, as as Projector, at as ProviderName, au as RendererConstructor, av as Scene, aw as SchemaPatch, ax as SeriesKind, ay as SeriesPoint, az as SeriesSpec, aA as SeriesValueDelta, aB as SettingsField, aC as SettingsSchema, aD as TableCell, aE as TableMerge, aF as TablePosition, aG as ToolbarGroupConfig, aH as TradeExecution, aI as ValuePatch, b as VelaOptions, V as VisibleRangePreset, aJ as buildToolbar, aK as defaultToolbar } from './options-BqGeFHtp.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-gJjN_0eh.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-o5HJH46Z.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';
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export { stableSeriesId } from './chunk-Q3XQHLIH.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-CA3N3PYT.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-4MQEG67Z.js';
3
3
  export { DEFAULT_PANEL_MAX_WIDTH, DEFAULT_PANEL_MIN_WIDTH, DEFAULT_PANEL_WIDTH, Drawing, chartType, chartTypes, clampPanelWidth, createDrawing, deserializeDrawing, drawingTypes, getDrawingType, getNativeIndicator, legendActions, nativeIndicatorDescriptors, nativeIndicatorTypes, normalizeSettingsRow, registerChartType, registerDefaultEngine, registerDrawingType, registerLegendAction, registerNativeIndicator, registerRendererDefaults, registerRendererLayer, registerSidePanel, registerWidgetAction, registerWidgetAttachment, rendererDefaults, rendererLayers, resolveEngines, settingsRowValueKeys, sidePanels, tickerModifierIds, unregisterChartType, unregisterDefaultEngine, unregisterLegendAction, unregisterNativeIndicator, unregisterRendererDefaults, unregisterRendererLayer, unregisterSidePanel, unregisterWidgetAction, unregisterWidgetAttachment, widgetActions, widgetAttachments } from './chunk-ZNL2X6U2.js';
4
4
  import './chunk-OGRQW3M6.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-EMS6PO2T.js';