@luxalgo/vela 0.7.5 → 0.7.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/{DataProvider-Dut6lXGM.d.cts → DataProvider-CGa4KHRa.d.cts} +1 -1
  2. package/dist/{DataProvider-DLeFs1gE.d.ts → DataProvider-CmWUtDVL.d.ts} +1 -1
  3. package/dist/{chunk-ZADTVRUO.js → chunk-PVGWNF7V.js} +1 -1
  4. package/dist/{chunk-MCLI6B3S.js → chunk-RVQWJOEE.js} +277 -120
  5. package/dist/{chunk-BKHSQ4YM.js → chunk-WTWGEB7K.js} +23 -9
  6. package/dist/{chunk-MNG5XPLV.js → chunk-ZA2XWTGH.js} +94 -37
  7. package/dist/{contributions-DYtiRtES.d.cts → contributions-DF_Ea07m.d.cts} +25 -2
  8. package/dist/{contributions-CEkgJKTU.d.ts → contributions-nKOSeLy8.d.ts} +25 -2
  9. package/dist/index.cjs +285 -127
  10. package/dist/index.d.cts +22 -7
  11. package/dist/index.d.ts +22 -7
  12. package/dist/index.js +2 -2
  13. package/dist/{options-DNBoMKkX.d.ts → options-D1AJKsn_.d.cts} +10 -0
  14. package/dist/{options-DNBoMKkX.d.cts → options-D1AJKsn_.d.ts} +10 -0
  15. package/dist/{plugin-CLn--oP6.d.ts → plugin-0oFDnexb.d.ts} +3 -3
  16. package/dist/{plugin-DtkeQVAO.d.cts → plugin-DPyVJFoA.d.cts} +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/{statusline-model-gA__yaog.d.cts → statusline-model-BoWJ3cWQ.d.cts} +18 -5
  26. package/dist/{statusline-model-DypGXjtr.d.ts → statusline-model-DAFyqVmR.d.ts} +18 -5
  27. package/dist/ui.cjs +23 -9
  28. package/dist/ui.d.cts +20 -3
  29. package/dist/ui.d.ts +20 -3
  30. package/dist/ui.js +2 -2
  31. package/dist/vela.global.js +285 -127
  32. package/dist/vela.global.min.js +59 -49
  33. package/dist/widget.cjs +389 -161
  34. package/dist/widget.d.cts +7 -7
  35. package/dist/widget.d.ts +7 -7
  36. package/dist/widget.js +5 -5
  37. package/dist/workspace.cjs +389 -161
  38. package/dist/workspace.d.cts +40 -8
  39. package/dist/workspace.d.ts +40 -8
  40. package/dist/workspace.js +4 -4
  41. package/package.json +21 -1
@@ -1,9 +1,9 @@
1
- import { O as OHLCV, V as VisibleRangePreset, a as VisibleRange, b as VelaOptions, I as InputValue, c as VelaTheme, N as NativeBackend, d as MarketSession } from './options-DNBoMKkX.cjs';
2
- import { S as SyncSetting, V as VelaStorage, C as CellState, W as WidgetHistory, R as ResolvedIndicator, a as StatuslinePart, b as RangePreset, T as TrackSizes, c as VelaShellOptions, d as SyncOptions, e as SyncKind, f as WorkspaceState } from './statusline-model-gA__yaog.cjs';
3
- export { g as ChartState, P as PanelsState, h as decodeState, i as encodeState, s as sanitizeState } from './statusline-model-gA__yaog.cjs';
1
+ import { O as OHLCV, V as VisibleRangePreset, a as VisibleRange, b as VelaOptions, I as InputValue, c as VelaTheme, N as NativeBackend, d as MarketSession } from './options-D1AJKsn_.cjs';
2
+ import { S as SyncSetting, V as VelaStorage, C as CellState, W as WidgetHistory, R as ResolvedIndicator, a as StatuslinePart, b as RangePreset, T as TrackSizes, c as VelaShellOptions, d as SyncOptions, e as SyncKind, f as WorkspaceState } from './statusline-model-BoWJ3cWQ.cjs';
3
+ export { g as ChartState, P as PanelsState, h as decodeState, i as encodeState, s as sanitizeState } from './statusline-model-BoWJ3cWQ.cjs';
4
4
  import { K as KeymapManager } from './keymap-CGOz5F5f.cjs';
5
- import { I as IndicatorHandle, S as ScriptingEngine, W as WidgetContext, V as Vela, E as ExternalIndicatorEntry, a as ScriptRun } from './contributions-DYtiRtES.cjs';
6
- import { M as MarketDataFeed } from './DataProvider-Dut6lXGM.cjs';
5
+ import { I as IndicatorHandle, S as ScriptingEngine, W as WidgetContext, V as Vela, E as ExternalIndicatorEntry, a as ScriptRun } from './contributions-DF_Ea07m.cjs';
6
+ import { M as MarketDataFeed } from './DataProvider-CGa4KHRa.cjs';
7
7
 
8
8
  /** The cells that follow `originId` under `setting` — PURE (never includes the origin). */
9
9
  declare function syncTargets(originId: string, setting: SyncSetting | undefined, cellIds: readonly string[]): string[];
@@ -88,7 +88,8 @@ interface CellDeps {
88
88
  /** Where the renderer mounts its MODAL dialogs (chart/indicator settings) — the
89
89
  * workspace root, so dialogs center over the whole grid instead of one cell. */
90
90
  dialogHost: HTMLElement;
91
- /** The workspace-global display timezone (applied to every cell's renderer). */
91
+ /** The workspace-global display-timezone CHOICE an IANA zone, or the exchange
92
+ * rule, which each cell resolves to its own market's zone ({@link ChartCell.applyTimezone}). */
92
93
  timezone(): string;
93
94
  /** Switch the workspace-global display timezone (a cell's time-axis menu). */
94
95
  setTimezone(zone: string): void;
@@ -133,6 +134,10 @@ interface CellDeps {
133
134
  interface CellInstance {
134
135
  entry: ResolvedIndicator;
135
136
  handle: IndicatorHandle | null;
137
+ /** The id the indicator runs under on the chart — recorded on the first add (host-
138
+ * supplied or minted) so an undo/redo resurrection re-adds it under the SAME id:
139
+ * whatever a host keyed on it (a document, an editor tab) keeps pointing at it. */
140
+ id?: string;
136
141
  external?: boolean;
137
142
  values?: {
138
143
  inputs?: Record<string, InputValue>;
@@ -164,6 +169,9 @@ declare class ChartCell {
164
169
  /** Latched: the symbol's extended tape wraps midnight (an overnight roll market) —
165
170
  * one extended-hours shading phase instead of the pre/post split. */
166
171
  private sessionOvernightFlag;
172
+ /** Latched: the symbol's own trading zone (`SymbolInfo.timezone`) — what the exchange
173
+ * rule resolves to on this cell. Undefined until metadata lands or when none is declared. */
174
+ private exchangeZone;
167
175
  private inner;
168
176
  /** The live app theme — seeded from deps, updated on `theme:changed` (the base the
169
177
  * plot-overlay tokens re-derive from). */
@@ -229,7 +237,23 @@ declare class ChartCell {
229
237
  get session(): MarketSession;
230
238
  /** Switch this cell's shown session in place (a reload — RTH and ETH are different bars). */
231
239
  setSession(session: MarketSession): void;
232
- private refreshSessionAvailable;
240
+ /**
241
+ * The symbol's own trading zone, once its metadata has landed — what the exchange
242
+ * rule resolves to on this cell (the workspace labels the shared bottom bar with the
243
+ * ACTIVE cell's). Undefined = unknown or undeclared (the rule then renders UTC).
244
+ */
245
+ get exchangeTimezone(): string | undefined;
246
+ /** The IANA zone this cell's axis renders in: the workspace choice, resolved. */
247
+ get displayTimezone(): string;
248
+ /**
249
+ * Push the resolved zone to the renderer — on the workspace choice changing, and on
250
+ * this cell's market zone changing under the exchange rule. Skips the write when the
251
+ * renderer already holds it (its config default is the bare `'UTC'` alias).
252
+ */
253
+ applyTimezone(): void;
254
+ /** Re-read the symbol's metadata: session posture (RTH/ETH toggle, shading) and its
255
+ * trading zone (the exchange rule). Async — the workspace re-projects when a verdict lands. */
256
+ private refreshSymbolMetadata;
233
257
  /** (Re)derive the pre/post-market shading bands for this cell's market. The bands
234
258
  * expand locally from the symbol's session vocabulary, so they paint as soon as
235
259
  * metadata is known and follow any pan depth without provider round trips. */
@@ -359,6 +383,7 @@ declare class ChartCell {
359
383
  addManifestInstance(entry: ResolvedIndicator, opts?: {
360
384
  record?: boolean;
361
385
  external?: boolean;
386
+ id?: string;
362
387
  inputs?: Record<string, InputValue>;
363
388
  props?: Record<string, InputValue>;
364
389
  hidden?: boolean;
@@ -788,8 +813,15 @@ declare class VelaWorkspace {
788
813
  * Handlers whose restore touches chart content should be `scope: 'cell'` instead
789
814
  * (those run inside the cell's history-mute). */
790
815
  private restoreGlobalExt;
791
- /** Set the workspace-global display timezone — applied to EVERY cell. */
816
+ /**
817
+ * Set the workspace-global display timezone — applied to EVERY cell. An IANA zone,
818
+ * or `'exchange'` (the exchange rule): each cell then renders in its OWN market's
819
+ * zone (Chicago for a CME future, New York for a US equity, UTC for crypto), and the
820
+ * bottom bar follows the active cell's.
821
+ */
792
822
  setTimezone(zone: string): void;
823
+ /** Bottom bar ⇐ the stored choice + the ACTIVE cell's market zone (labels the exchange row). */
824
+ private projectTimezone;
793
825
  /**
794
826
  * Swap the workspace theme at runtime — `'dark'`, `'light'`, or a full custom theme,
795
827
  * applied to the shared chrome (topbar, panels, drawing toolbar) and EVERY cell.
@@ -1,9 +1,9 @@
1
- import { O as OHLCV, V as VisibleRangePreset, a as VisibleRange, b as VelaOptions, I as InputValue, c as VelaTheme, N as NativeBackend, d as MarketSession } from './options-DNBoMKkX.js';
2
- import { S as SyncSetting, V as VelaStorage, C as CellState, W as WidgetHistory, R as ResolvedIndicator, a as StatuslinePart, b as RangePreset, T as TrackSizes, c as VelaShellOptions, d as SyncOptions, e as SyncKind, f as WorkspaceState } from './statusline-model-DypGXjtr.js';
3
- export { g as ChartState, P as PanelsState, h as decodeState, i as encodeState, s as sanitizeState } from './statusline-model-DypGXjtr.js';
1
+ import { O as OHLCV, V as VisibleRangePreset, a as VisibleRange, b as VelaOptions, I as InputValue, c as VelaTheme, N as NativeBackend, d as MarketSession } from './options-D1AJKsn_.js';
2
+ import { S as SyncSetting, V as VelaStorage, C as CellState, W as WidgetHistory, R as ResolvedIndicator, a as StatuslinePart, b as RangePreset, T as TrackSizes, c as VelaShellOptions, d as SyncOptions, e as SyncKind, f as WorkspaceState } from './statusline-model-DAFyqVmR.js';
3
+ export { g as ChartState, P as PanelsState, h as decodeState, i as encodeState, s as sanitizeState } from './statusline-model-DAFyqVmR.js';
4
4
  import { K as KeymapManager } from './keymap-CGOz5F5f.js';
5
- import { I as IndicatorHandle, S as ScriptingEngine, W as WidgetContext, V as Vela, E as ExternalIndicatorEntry, a as ScriptRun } from './contributions-CEkgJKTU.js';
6
- import { M as MarketDataFeed } from './DataProvider-DLeFs1gE.js';
5
+ import { I as IndicatorHandle, S as ScriptingEngine, W as WidgetContext, V as Vela, E as ExternalIndicatorEntry, a as ScriptRun } from './contributions-nKOSeLy8.js';
6
+ import { M as MarketDataFeed } from './DataProvider-CmWUtDVL.js';
7
7
 
8
8
  /** The cells that follow `originId` under `setting` — PURE (never includes the origin). */
9
9
  declare function syncTargets(originId: string, setting: SyncSetting | undefined, cellIds: readonly string[]): string[];
@@ -88,7 +88,8 @@ interface CellDeps {
88
88
  /** Where the renderer mounts its MODAL dialogs (chart/indicator settings) — the
89
89
  * workspace root, so dialogs center over the whole grid instead of one cell. */
90
90
  dialogHost: HTMLElement;
91
- /** The workspace-global display timezone (applied to every cell's renderer). */
91
+ /** The workspace-global display-timezone CHOICE an IANA zone, or the exchange
92
+ * rule, which each cell resolves to its own market's zone ({@link ChartCell.applyTimezone}). */
92
93
  timezone(): string;
93
94
  /** Switch the workspace-global display timezone (a cell's time-axis menu). */
94
95
  setTimezone(zone: string): void;
@@ -133,6 +134,10 @@ interface CellDeps {
133
134
  interface CellInstance {
134
135
  entry: ResolvedIndicator;
135
136
  handle: IndicatorHandle | null;
137
+ /** The id the indicator runs under on the chart — recorded on the first add (host-
138
+ * supplied or minted) so an undo/redo resurrection re-adds it under the SAME id:
139
+ * whatever a host keyed on it (a document, an editor tab) keeps pointing at it. */
140
+ id?: string;
136
141
  external?: boolean;
137
142
  values?: {
138
143
  inputs?: Record<string, InputValue>;
@@ -164,6 +169,9 @@ declare class ChartCell {
164
169
  /** Latched: the symbol's extended tape wraps midnight (an overnight roll market) —
165
170
  * one extended-hours shading phase instead of the pre/post split. */
166
171
  private sessionOvernightFlag;
172
+ /** Latched: the symbol's own trading zone (`SymbolInfo.timezone`) — what the exchange
173
+ * rule resolves to on this cell. Undefined until metadata lands or when none is declared. */
174
+ private exchangeZone;
167
175
  private inner;
168
176
  /** The live app theme — seeded from deps, updated on `theme:changed` (the base the
169
177
  * plot-overlay tokens re-derive from). */
@@ -229,7 +237,23 @@ declare class ChartCell {
229
237
  get session(): MarketSession;
230
238
  /** Switch this cell's shown session in place (a reload — RTH and ETH are different bars). */
231
239
  setSession(session: MarketSession): void;
232
- private refreshSessionAvailable;
240
+ /**
241
+ * The symbol's own trading zone, once its metadata has landed — what the exchange
242
+ * rule resolves to on this cell (the workspace labels the shared bottom bar with the
243
+ * ACTIVE cell's). Undefined = unknown or undeclared (the rule then renders UTC).
244
+ */
245
+ get exchangeTimezone(): string | undefined;
246
+ /** The IANA zone this cell's axis renders in: the workspace choice, resolved. */
247
+ get displayTimezone(): string;
248
+ /**
249
+ * Push the resolved zone to the renderer — on the workspace choice changing, and on
250
+ * this cell's market zone changing under the exchange rule. Skips the write when the
251
+ * renderer already holds it (its config default is the bare `'UTC'` alias).
252
+ */
253
+ applyTimezone(): void;
254
+ /** Re-read the symbol's metadata: session posture (RTH/ETH toggle, shading) and its
255
+ * trading zone (the exchange rule). Async — the workspace re-projects when a verdict lands. */
256
+ private refreshSymbolMetadata;
233
257
  /** (Re)derive the pre/post-market shading bands for this cell's market. The bands
234
258
  * expand locally from the symbol's session vocabulary, so they paint as soon as
235
259
  * metadata is known and follow any pan depth without provider round trips. */
@@ -359,6 +383,7 @@ declare class ChartCell {
359
383
  addManifestInstance(entry: ResolvedIndicator, opts?: {
360
384
  record?: boolean;
361
385
  external?: boolean;
386
+ id?: string;
362
387
  inputs?: Record<string, InputValue>;
363
388
  props?: Record<string, InputValue>;
364
389
  hidden?: boolean;
@@ -788,8 +813,15 @@ declare class VelaWorkspace {
788
813
  * Handlers whose restore touches chart content should be `scope: 'cell'` instead
789
814
  * (those run inside the cell's history-mute). */
790
815
  private restoreGlobalExt;
791
- /** Set the workspace-global display timezone — applied to EVERY cell. */
816
+ /**
817
+ * Set the workspace-global display timezone — applied to EVERY cell. An IANA zone,
818
+ * or `'exchange'` (the exchange rule): each cell then renders in its OWN market's
819
+ * zone (Chicago for a CME future, New York for a US equity, UTC for crypto), and the
820
+ * bottom bar follows the active cell's.
821
+ */
792
822
  setTimezone(zone: string): void;
823
+ /** Bottom bar ⇐ the stored choice + the ACTIVE cell's market zone (labels the exchange row). */
824
+ private projectTimezone;
793
825
  /**
794
826
  * Swap the workspace theme at runtime — `'dark'`, `'light'`, or a full custom theme,
795
827
  * applied to the shared chrome (topbar, panels, drawing toolbar) and EVERY cell.
package/dist/workspace.js CHANGED
@@ -1,7 +1,7 @@
1
- export { ChartCell, GRID_PICKER_MAX, VelaWorkspace, activeAfterLayout, decodeState, encodeState, ensureLayout, evenTracks, gridStyles, layoutDefinition, layoutForGrid, layoutShape, layouts, memoryStorageAdapter, rangesWithin, registerBuiltinLayouts, registerLayout, resizeTracks, sanitizeState, syncTargets, trackOffsets, unregisterLayout } from './chunk-MNG5XPLV.js';
2
- import './chunk-MCLI6B3S.js';
1
+ export { ChartCell, GRID_PICKER_MAX, VelaWorkspace, activeAfterLayout, decodeState, encodeState, ensureLayout, evenTracks, gridStyles, layoutDefinition, layoutForGrid, layoutShape, layouts, memoryStorageAdapter, rangesWithin, registerBuiltinLayouts, registerLayout, resizeTracks, sanitizeState, syncTargets, trackOffsets, unregisterLayout } from './chunk-ZA2XWTGH.js';
2
+ import './chunk-RVQWJOEE.js';
3
3
  import './chunk-BFA32GOU.js';
4
- import './chunk-ZADTVRUO.js';
5
- import './chunk-BKHSQ4YM.js';
4
+ import './chunk-PVGWNF7V.js';
5
+ import './chunk-WTWGEB7K.js';
6
6
  import './chunk-CAFCLMPF.js';
7
7
  import './chunk-W4EJWLEO.js';
package/package.json CHANGED
@@ -1,7 +1,27 @@
1
1
  {
2
2
  "name": "@luxalgo/vela",
3
- "version": "0.7.5",
3
+ "version": "0.7.7",
4
4
  "description": "Open-source charting library with a native high-performance renderer, drawing tools, pluggable chart types and pluggable scripting engines.",
5
+ "keywords": [
6
+ "charting library",
7
+ "financial charts",
8
+ "trading charts",
9
+ "candlestick chart",
10
+ "stock chart",
11
+ "crypto chart",
12
+ "webgl",
13
+ "canvas",
14
+ "technical analysis",
15
+ "indicators",
16
+ "drawing tools",
17
+ "orderflow",
18
+ "pine script",
19
+ "pinets",
20
+ "lightweight-charts alternative",
21
+ "typescript",
22
+ "luxalgo",
23
+ "vela"
24
+ ],
5
25
  "license": "Apache-2.0",
6
26
  "homepage": "https://luxalgo.com/vela",
7
27
  "repository": {