@luxalgo/vela 0.6.0 → 0.6.2

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 (46) hide show
  1. package/dist/{DataProvider-DNx9ntBD.d.ts → DataProvider-CNmk84SH.d.cts} +27 -3
  2. package/dist/{DataProvider-Ce6PuCzQ.d.cts → DataProvider-DHX4x6-r.d.ts} +27 -3
  3. package/dist/{chunk-CA3N3PYT.js → chunk-7D6YIF34.js} +2151 -2464
  4. package/dist/{chunk-ZNL2X6U2.js → chunk-7Y7CJ7EN.js} +1 -1
  5. package/dist/{chunk-EMS6PO2T.js → chunk-PN5KWFZ4.js} +6 -1
  6. package/dist/chunk-QHZ7IXFL.js +2598 -0
  7. package/dist/chunk-TP56QRMK.js +503 -0
  8. package/dist/{chunk-7ROONW6H.js → chunk-U5KCQHAC.js} +141 -10
  9. package/dist/{contributions-Dlc7ZWZz.d.cts → contributions-DDpv7hEL.d.cts} +6 -2
  10. package/dist/{contributions-DToMhiw3.d.ts → contributions-ciV6Neyd.d.ts} +6 -2
  11. package/dist/{history-BZADxpKx.d.cts → history-CFqZm5re.d.ts} +21 -3
  12. package/dist/{history-BuHXJZJ2.d.ts → history-ChoT34nz.d.cts} +21 -3
  13. package/dist/index.cjs +3724 -2742
  14. package/dist/index.d.cts +6 -6
  15. package/dist/index.d.ts +6 -6
  16. package/dist/index.js +4 -4
  17. package/dist/{options-BlQ00Fju.d.ts → options-BqGeFHtp.d.cts} +15 -1
  18. package/dist/{options-BlQ00Fju.d.cts → options-BqGeFHtp.d.ts} +15 -1
  19. package/dist/{plugin-BqjEa5r3.d.ts → plugin-C97gUCVf.d.ts} +7 -3
  20. package/dist/{plugin-BNPLOQO1.d.cts → plugin-CSb_sTiN.d.cts} +7 -3
  21. package/dist/plugin.d.cts +4 -4
  22. package/dist/plugin.d.ts +4 -4
  23. package/dist/plugin.js +2 -2
  24. package/dist/providers/binance.d.cts +2 -2
  25. package/dist/providers/binance.d.ts +2 -2
  26. package/dist/providers/coinbase.d.cts +2 -2
  27. package/dist/providers/coinbase.d.ts +2 -2
  28. package/dist/providers/hyperliquid.d.cts +2 -2
  29. package/dist/providers/hyperliquid.d.ts +2 -2
  30. package/dist/ui.cjs +1001 -247
  31. package/dist/ui.d.cts +258 -11
  32. package/dist/ui.d.ts +258 -11
  33. package/dist/ui.js +3 -3
  34. package/dist/vela.global.js +12358 -3961
  35. package/dist/vela.global.min.js +479 -124
  36. package/dist/widget.cjs +3463 -2867
  37. package/dist/widget.d.cts +20 -6
  38. package/dist/widget.d.ts +20 -6
  39. package/dist/widget.js +56 -11
  40. package/dist/workspace.cjs +3137 -2538
  41. package/dist/workspace.d.cts +22 -5
  42. package/dist/workspace.d.ts +22 -5
  43. package/dist/workspace.js +56 -8
  44. package/package.json +1 -1
  45. package/dist/chunk-OGRQW3M6.js +0 -1328
  46. package/dist/chunk-QWIEKZRE.js +0 -1042
package/dist/widget.d.cts CHANGED
@@ -1,10 +1,10 @@
1
- import { W as WidgetContext, V as Vela, y as SidePanelButton } from './contributions-Dlc7ZWZz.cjs';
2
- export { ah as DEFAULT_PANEL_ORDER, z as SidePanelDescriptor, A as SidePanelHandle, U as WidgetActionDescriptor, X as WidgetActionTarget, Y as WidgetAttachment, a4 as registerSidePanel, a5 as registerWidgetAction, a6 as registerWidgetAttachment, a8 as sidePanels, ac as unregisterSidePanel, ad as unregisterWidgetAction, ae as unregisterWidgetAttachment, af as widgetActions, ag as widgetAttachments } from './contributions-Dlc7ZWZz.cjs';
3
- import { b as VelaOptions, q as DataWindowReadout } from './options-BlQ00Fju.cjs';
1
+ import { W as WidgetContext, V as Vela, y as SidePanelButton } from './contributions-DDpv7hEL.cjs';
2
+ export { ah as DEFAULT_PANEL_ORDER, z as SidePanelDescriptor, A as SidePanelHandle, U as WidgetActionDescriptor, X as WidgetActionTarget, Y as WidgetAttachment, a4 as registerSidePanel, a5 as registerWidgetAction, a6 as registerWidgetAttachment, a8 as sidePanels, ac as unregisterSidePanel, ad as unregisterWidgetAction, ae as unregisterWidgetAttachment, af as widgetActions, ag as widgetAttachments } from './contributions-DDpv7hEL.cjs';
3
+ import { b as VelaOptions, d as MarketSession, r as DataWindowReadout } from './options-BqGeFHtp.cjs';
4
4
  import { K as KeymapManager } from './keymap-CGOz5F5f.cjs';
5
- import { W as WidgetHistory, b as VelaShellOptions, e as WorkspaceState, a as RangePreset, i as PersistedState, P as PanelsState } from './history-BZADxpKx.cjs';
6
- 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, V as VelaStorage, n as WidgetStorage, g as decodeState, h as encodeState, o as legacyWidgetState, p as loadPersisted, q as localStorageAdapter, r as parsePersisted, t as resolveIndicators, s as sanitizeState, u as savePersisted } from './history-BZADxpKx.cjs';
7
- import { a as SymbolDescriptor } from './DataProvider-Ce6PuCzQ.cjs';
5
+ import { W as WidgetHistory, b as VelaShellOptions, e as WorkspaceState, a as RangePreset, i as PersistedState, P as PanelsState } from './history-ChoT34nz.cjs';
6
+ 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, V as VelaStorage, n as WidgetStorage, g as decodeState, h as encodeState, o as legacyWidgetState, p as loadPersisted, q as localStorageAdapter, r as parsePersisted, t as resolveIndicators, s as sanitizeState, u as savePersisted } from './history-ChoT34nz.cjs';
7
+ import { a as SymbolDescriptor } from './DataProvider-CNmk84SH.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
 
@@ -21,6 +21,8 @@ declare class VelaWidget {
21
21
  private readonly chartHost;
22
22
  private readonly topbar;
23
23
  private readonly statusline;
24
+ /** Keeps the statusline's market badge on the symbol's real calendar (see {@link MarketStatusTracker}). */
25
+ private readonly marketStatus;
24
26
  private readonly watermark;
25
27
  private readonly bottombar;
26
28
  private readonly objectTree;
@@ -51,6 +53,8 @@ declare class VelaWidget {
51
53
  private priceStyle;
52
54
  private timezone;
53
55
  private bars;
56
+ /** The shown trading session — undefined = the provider default (regular). */
57
+ private session;
54
58
  private watermarkOn;
55
59
  /** Indicator titles (the in-chart legend rows) shown — reapplied across rebuilds. */
56
60
  private indicatorTitlesOn;
@@ -149,6 +153,16 @@ declare class VelaWidget {
149
153
  */
150
154
  private providerLabel;
151
155
  setTimeframe(tf: string): void;
156
+ /**
157
+ * Switch the shown trading session (RTH/ETH) in place — a full reload, like a
158
+ * timeframe change (the two sessions are different bar series). No-op on a chart
159
+ * already showing that session; meaningless on continuous markets (the toggle is
160
+ * disabled there, but the API tolerates the call — the provider ignores the flag).
161
+ */
162
+ setSession(session: MarketSession): void;
163
+ /** Re-derive the RTH/ETH toggle's posture from the ACTIVE symbol's metadata: enabled
164
+ * iff the resolved symbol declares a real session vocabulary (not `24x7`). */
165
+ private refreshSessionToggle;
152
166
  /** Star/unstar a timeframe — the topbar chips and dropdown stars follow, and the
153
167
  * set persists with the rest of the shell state. */
154
168
  private setTimeframeFavorite;
package/dist/widget.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { W as WidgetContext, V as Vela, y as SidePanelButton } from './contributions-DToMhiw3.js';
2
- export { ah as DEFAULT_PANEL_ORDER, z as SidePanelDescriptor, A as SidePanelHandle, U as WidgetActionDescriptor, X as WidgetActionTarget, Y as WidgetAttachment, a4 as registerSidePanel, a5 as registerWidgetAction, a6 as registerWidgetAttachment, a8 as sidePanels, ac as unregisterSidePanel, ad as unregisterWidgetAction, ae as unregisterWidgetAttachment, af as widgetActions, ag as widgetAttachments } from './contributions-DToMhiw3.js';
3
- import { b as VelaOptions, q as DataWindowReadout } from './options-BlQ00Fju.js';
1
+ import { W as WidgetContext, V as Vela, y as SidePanelButton } from './contributions-ciV6Neyd.js';
2
+ export { ah as DEFAULT_PANEL_ORDER, z as SidePanelDescriptor, A as SidePanelHandle, U as WidgetActionDescriptor, X as WidgetActionTarget, Y as WidgetAttachment, a4 as registerSidePanel, a5 as registerWidgetAction, a6 as registerWidgetAttachment, a8 as sidePanels, ac as unregisterSidePanel, ad as unregisterWidgetAction, ae as unregisterWidgetAttachment, af as widgetActions, ag as widgetAttachments } from './contributions-ciV6Neyd.js';
3
+ import { b as VelaOptions, d as MarketSession, r as DataWindowReadout } from './options-BqGeFHtp.js';
4
4
  import { K as KeymapManager } from './keymap-CGOz5F5f.js';
5
- import { W as WidgetHistory, b as VelaShellOptions, e as WorkspaceState, a as RangePreset, i as PersistedState, P as PanelsState } from './history-BuHXJZJ2.js';
6
- 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, V as VelaStorage, n as WidgetStorage, g as decodeState, h as encodeState, o as legacyWidgetState, p as loadPersisted, q as localStorageAdapter, r as parsePersisted, t as resolveIndicators, s as sanitizeState, u as savePersisted } from './history-BuHXJZJ2.js';
7
- import { a as SymbolDescriptor } from './DataProvider-DNx9ntBD.js';
5
+ import { W as WidgetHistory, b as VelaShellOptions, e as WorkspaceState, a as RangePreset, i as PersistedState, P as PanelsState } from './history-CFqZm5re.js';
6
+ 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, V as VelaStorage, n as WidgetStorage, g as decodeState, h as encodeState, o as legacyWidgetState, p as loadPersisted, q as localStorageAdapter, r as parsePersisted, t as resolveIndicators, s as sanitizeState, u as savePersisted } from './history-CFqZm5re.js';
7
+ import { a as SymbolDescriptor } from './DataProvider-DHX4x6-r.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
 
@@ -21,6 +21,8 @@ declare class VelaWidget {
21
21
  private readonly chartHost;
22
22
  private readonly topbar;
23
23
  private readonly statusline;
24
+ /** Keeps the statusline's market badge on the symbol's real calendar (see {@link MarketStatusTracker}). */
25
+ private readonly marketStatus;
24
26
  private readonly watermark;
25
27
  private readonly bottombar;
26
28
  private readonly objectTree;
@@ -51,6 +53,8 @@ declare class VelaWidget {
51
53
  private priceStyle;
52
54
  private timezone;
53
55
  private bars;
56
+ /** The shown trading session — undefined = the provider default (regular). */
57
+ private session;
54
58
  private watermarkOn;
55
59
  /** Indicator titles (the in-chart legend rows) shown — reapplied across rebuilds. */
56
60
  private indicatorTitlesOn;
@@ -149,6 +153,16 @@ declare class VelaWidget {
149
153
  */
150
154
  private providerLabel;
151
155
  setTimeframe(tf: string): void;
156
+ /**
157
+ * Switch the shown trading session (RTH/ETH) in place — a full reload, like a
158
+ * timeframe change (the two sessions are different bar series). No-op on a chart
159
+ * already showing that session; meaningless on continuous markets (the toggle is
160
+ * disabled there, but the API tolerates the call — the provider ignores the flag).
161
+ */
162
+ setSession(session: MarketSession): void;
163
+ /** Re-derive the RTH/ETH toggle's posture from the ACTIVE symbol's metadata: enabled
164
+ * iff the resolved symbol declares a real session vocabulary (not `24x7`). */
165
+ private refreshSessionToggle;
152
166
  /** Star/unstar a timeframe — the topbar chips and dropdown stars follow, and the
153
167
  * set persists with the rest of the shell state. */
154
168
  private setTimeframeFavorite;
package/dist/widget.js CHANGED
@@ -1,12 +1,12 @@
1
- import { Glider, WidgetHistory, localStorageAdapter, decodeState, prefixedSymbol, SymbolPicker, IndicatorPicker, TimeframeQuick, Topbar, PanelDock, ObjectTree, DataWindow, ChartContextMenu, Toast, Watermark, Statusline, Bottombar, MobileBar, DrawingPill, LayoutModeController, ZOOM_IN, ZOOM_OUT, PAN_FAST, ShortcutsHelp, TimeframeDrawer, RANGE_PRESETS, DrawingsDrawer, MoreDrawer, priceStyleIcon, priceStyleLabel, TimezoneDrawer, PriceScaleDrawer, indicatorLedger, sanitizeState, legacyWidgetState, parsePersisted, statuslineInkOf, toolShortcutHints, resolveIndicators, encodeState } from './chunk-7ROONW6H.js';
2
- export { Bottombar, ChartContextMenu, DataWindow, IndicatorPicker, ObjectTree, PanelDock, RANGE_PRESETS, ShortcutsHelp, Statusline, SymbolPicker, TimeframeQuick, Topbar, Watermark, dataWindowSections, decimalsFor, decodeState, encodeState, filterSymbols, fmtChange, fmtPrice, legacyWidgetState, loadPersisted, localStorageAdapter, parsePersisted, parseTimeframe, priceStyleLabel, resolveIndicators, sanitizeState, savePersisted, timeframeLabel, timeframeMs } from './chunk-7ROONW6H.js';
3
- import { registerBuiltinChartTypes, resolveTheme, parseSymbol, buildToolbar, priceStyleIds, Vela, normalizeTimezone } from './chunk-CA3N3PYT.js';
4
- export { TIMEZONES, normalizeTimezone, tzButtonLabel, tzMenuLabel, tzOffset } from './chunk-CA3N3PYT.js';
5
- import { widgetActions, widgetAttachments, legendActionsProviderFor, resolveEngines } from './chunk-ZNL2X6U2.js';
6
- export { DEFAULT_PANEL_MAX_WIDTH, DEFAULT_PANEL_MIN_WIDTH, DEFAULT_PANEL_ORDER, DEFAULT_PANEL_WIDTH, SidePanel, clampPanelWidth, registerSidePanel, registerWidgetAction, registerWidgetAttachment, sidePanels, unregisterSidePanel, unregisterWidgetAction, unregisterWidgetAttachment, widgetActions, widgetAttachments } from './chunk-ZNL2X6U2.js';
7
- import { KeymapManager, Menu, isEditableTarget } from './chunk-QWIEKZRE.js';
8
- import { ensureUIHost, applyPlotOverlayTokens } from './chunk-OGRQW3M6.js';
9
- import { injectStyles } from './chunk-EMS6PO2T.js';
1
+ import { Glider, WidgetHistory, localStorageAdapter, decodeState, prefixedSymbol, normalizeSession, SymbolPicker, IndicatorPicker, TimeframeQuick, Topbar, PanelDock, ObjectTree, DataWindow, ChartContextMenu, Toast, Watermark, Statusline, MarketStatusTracker, Bottombar, MobileBar, DrawingPill, LayoutModeController, ZOOM_IN, ZOOM_OUT, PAN_FAST, ShortcutsHelp, TimeframeDrawer, RANGE_PRESETS, DrawingsDrawer, MoreDrawer, priceStyleIcon, priceStyleLabel, TimezoneDrawer, PriceScaleDrawer, indicatorLedger, sanitizeState, legacyWidgetState, parsePersisted, statuslineInkOf, toolShortcutHints, resolveIndicators, encodeState } from './chunk-U5KCQHAC.js';
2
+ export { Bottombar, ChartContextMenu, DataWindow, IndicatorPicker, ObjectTree, PanelDock, RANGE_PRESETS, ShortcutsHelp, Statusline, SymbolPicker, TimeframeQuick, Topbar, Watermark, dataWindowSections, decimalsFor, decodeState, encodeState, filterSymbols, fmtChange, fmtPrice, legacyWidgetState, loadPersisted, localStorageAdapter, parsePersisted, parseTimeframe, priceStyleLabel, resolveIndicators, sanitizeState, savePersisted, timeframeLabel, timeframeMs } from './chunk-U5KCQHAC.js';
3
+ import { registerBuiltinChartTypes, resolveTheme, parseSymbol, buildToolbar, priceStyleIds, Vela, normalizeTimezone } from './chunk-7D6YIF34.js';
4
+ export { TIMEZONES, normalizeTimezone, tzButtonLabel, tzMenuLabel, tzOffset } from './chunk-7D6YIF34.js';
5
+ import { widgetActions, widgetAttachments, legendActionsProviderFor, resolveEngines } from './chunk-7Y7CJ7EN.js';
6
+ export { DEFAULT_PANEL_MAX_WIDTH, DEFAULT_PANEL_MIN_WIDTH, DEFAULT_PANEL_ORDER, DEFAULT_PANEL_WIDTH, SidePanel, clampPanelWidth, registerSidePanel, registerWidgetAction, registerWidgetAttachment, sidePanels, unregisterSidePanel, unregisterWidgetAction, unregisterWidgetAttachment, widgetActions, widgetAttachments } from './chunk-7Y7CJ7EN.js';
7
+ import { KeymapManager, isEditableTarget } from './chunk-TP56QRMK.js';
8
+ import { ensureUIHost, Menu, applyPlotOverlayTokens } from './chunk-QHZ7IXFL.js';
9
+ import { injectStyles } from './chunk-PN5KWFZ4.js';
10
10
 
11
11
  // src/widget/url-state.ts
12
12
  var PARAMS = [
@@ -14,7 +14,8 @@ var PARAMS = [
14
14
  ["timeframe", "interval"],
15
15
  ["priceStyle", "style"],
16
16
  ["timezone", "tz"],
17
- ["bars", "bars"]
17
+ ["bars", "bars"],
18
+ ["session", "session"]
18
19
  ];
19
20
  function readUrlState(search) {
20
21
  const out = {};
@@ -146,6 +147,7 @@ var VelaWidget = class {
146
147
  this.priceStyle = fromUrl.priceStyle ?? bootCell?.priceStyle ?? opts.priceStyle ?? "candles";
147
148
  this.timezone = fromUrl.timezone ?? boot?.timezone ?? opts.timezone ?? "Etc/UTC";
148
149
  this.bars = Number(fromUrl.bars ?? bootCell?.bars ?? opts.bars ?? 1e3);
150
+ this.session = normalizeSession(fromUrl.session ?? bootCell?.session ?? opts.session);
149
151
  this.watermarkOn = bootCell?.watermark !== void 0 ? bootCell.watermark : opts.watermark !== false;
150
152
  this.indicatorTitlesOn = bootCell?.indicatorTitles ?? true;
151
153
  this.indicatorValuesOn = bootCell?.indicatorValues ?? true;
@@ -248,10 +250,12 @@ var VelaWidget = class {
248
250
  this.watermark?.setVisible(this.watermarkOn);
249
251
  this.statusline = opts.statusline !== false ? new Statusline(this.chartHost, this.symbol) : null;
250
252
  this.statusline?.setMeta(this.timeframe, parseSymbol(this.symbol).provider ?? "");
253
+ this.marketStatus = this.statusline ? new MarketStatusTracker((s) => this.statusline?.setMarketStatus(s)) : null;
251
254
  this.bottombar = opts.bottombar !== false ? new Bottombar(this.root, {
252
255
  timezone: this.timezone,
253
256
  onRange: (preset) => this.applyRange(preset),
254
257
  onTimezone: (zone) => this.setTimezone(zone),
258
+ onSession: (session) => this.setSession(session),
255
259
  onSettingsClick: () => this.inner?.renderer.openSettings()
256
260
  }) : null;
257
261
  this.mobileBar = opts.bottombar !== false ? new MobileBar(this.root, {
@@ -500,6 +504,30 @@ var VelaWidget = class {
500
504
  this.markStateDirty();
501
505
  void this.inner?.setMarket({ timeframe: tf, bars: this.bars });
502
506
  }
507
+ /**
508
+ * Switch the shown trading session (RTH/ETH) in place — a full reload, like a
509
+ * timeframe change (the two sessions are different bar series). No-op on a chart
510
+ * already showing that session; meaningless on continuous markets (the toggle is
511
+ * disabled there, but the API tolerates the call — the provider ignores the flag).
512
+ */
513
+ setSession(session) {
514
+ if (session === this.session || session === "regular" && this.session === void 0 || this.destroyed) return;
515
+ this.session = session;
516
+ this.refreshSessionToggle();
517
+ this.markStateDirty();
518
+ void this.inner?.setMarket({ session });
519
+ }
520
+ /** Re-derive the RTH/ETH toggle's posture from the ACTIVE symbol's metadata: enabled
521
+ * iff the resolved symbol declares a real session vocabulary (not `24x7`). */
522
+ refreshSessionToggle() {
523
+ const chart = this.inner;
524
+ if (!chart || !this.bottombar) return;
525
+ void chart.data.symbolInfo(this.symbol).then((si) => {
526
+ if (this.destroyed || this.inner !== chart) return;
527
+ const enabled = typeof si?.session === "string" && si.session !== "" && si.session !== "24x7";
528
+ this.bottombar?.setSession({ session: this.session ?? "regular", enabled });
529
+ });
530
+ }
503
531
  /** Star/unstar a timeframe — the topbar chips and dropdown stars follow, and the
504
532
  * set persists with the rest of the shell state. */
505
533
  setTimeframeFavorite(tf, on) {
@@ -546,6 +574,8 @@ var VelaWidget = class {
546
574
  cell.timeframe = live?.timeframe ?? this.timeframe;
547
575
  cell.priceStyle = this.priceStyle;
548
576
  if (this.bars > 0) cell.bars = this.bars;
577
+ const session = normalizeSession(live?.session ?? this.session);
578
+ if (session === "extended") cell.session = session;
549
579
  cell.watermark = this.watermarkOn;
550
580
  cell.indicatorTitles = this.indicatorTitlesOn;
551
581
  cell.indicatorValues = this.indicatorValuesOn;
@@ -612,9 +642,15 @@ var VelaWidget = class {
612
642
  const symbol = fromUrl.symbol ?? prefixedSymbol(cell);
613
643
  const timeframe = fromUrl.timeframe ?? cell.timeframe;
614
644
  const bars = Number(fromUrl.bars ?? cell.bars ?? 0);
645
+ const session = normalizeSession(fromUrl.session ?? cell.session);
615
646
  const next = {};
616
647
  if (symbol && symbol !== this.symbol) next.symbol = symbol;
617
648
  if (timeframe && timeframe !== this.timeframe) next.timeframe = timeframe;
649
+ if (session && session !== (this.session ?? "regular")) {
650
+ this.session = session;
651
+ next.session = session;
652
+ this.refreshSessionToggle();
653
+ }
618
654
  if (bars > 0 && bars !== this.bars) {
619
655
  this.bars = bars;
620
656
  next.bars = Math.max(bars, this.rangeBars);
@@ -796,6 +832,7 @@ var VelaWidget = class {
796
832
  this.symbolPicker.destroy();
797
833
  this.indicatorPicker?.destroy();
798
834
  this.tfQuick.destroy();
835
+ this.marketStatus?.stop();
799
836
  this.statusline?.destroy();
800
837
  this.watermark?.destroy();
801
838
  this.bottombar?.destroy();
@@ -841,6 +878,7 @@ var VelaWidget = class {
841
878
  symbol: this.symbol,
842
879
  timeframe: this.timeframe,
843
880
  bars: Math.max(this.bars, this.rangeBars),
881
+ session: this.session,
844
882
  volume: this.ledgerVolume ?? chartOpts.volume,
845
883
  // A pending range chip frames the FIRST paint (no preview flash, no re-frame).
846
884
  ...this.pendingRange ? { visibleRange: this.pendingRange.preset } : {}
@@ -850,7 +888,10 @@ var VelaWidget = class {
850
888
  this.inner = chart;
851
889
  this.symbolPicker.setSource(() => chart.data.symbols());
852
890
  void chart.data.ready().then(() => {
853
- if (this.inner === chart) this.statusline?.setMeta(this.timeframe, this.providerLabel());
891
+ if (this.inner !== chart) return;
892
+ this.statusline?.setMeta(this.timeframe, this.providerLabel());
893
+ this.refreshSessionToggle();
894
+ this.marketStatus?.track(chart.data, this.symbol);
854
895
  });
855
896
  if (this.layoutCtl !== void 0) chart.renderer.setLayoutMode(this.layoutCtl.current);
856
897
  this.objectTree.setSymbol(this.symbol);
@@ -927,6 +968,8 @@ var VelaWidget = class {
927
968
  this.statusline?.setSymbol(symbol);
928
969
  this.objectTree.setSymbol(symbol);
929
970
  this.watermark?.update(symbol, this.timeframe);
971
+ this.refreshSessionToggle();
972
+ this.marketStatus?.track(chart.data, symbol);
930
973
  }
931
974
  if (timeframe !== this.timeframe) this.syncTimeframeChrome(timeframe);
932
975
  });
@@ -1224,6 +1267,8 @@ var VelaWidget = class {
1224
1267
  priceStyle: this.priceStyle,
1225
1268
  timezone: this.timezone,
1226
1269
  bars: String(this.bars),
1270
+ // Empty clears the param — the default (regular) keeps links lean.
1271
+ session: this.session === "extended" ? "extended" : "",
1227
1272
  watermark: this.watermarkOn ? "1" : "0",
1228
1273
  favorites: this.favs.join(",")
1229
1274
  });