@luxalgo/vela 0.8.1 → 0.8.3

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 (49) hide show
  1. package/README.md +1 -1
  2. package/dist/{DataProvider-DwFIoV4r.d.ts → DataProvider-oH78tYXL.d.ts} +1 -1
  3. package/dist/{DataProvider-BrlxntPN.d.cts → DataProvider-wbtJ3-Sa.d.cts} +1 -1
  4. package/dist/{chunk-DBDXKZUF.js → chunk-2IPXYM4B.js} +306 -177
  5. package/dist/{chunk-NELQJCGK.js → chunk-G7B7ZCBF.js} +167 -10
  6. package/dist/{chunk-ATGTCWHJ.js → chunk-HMHA733L.js} +473 -196
  7. package/dist/{chunk-EZ5FWVLA.js → chunk-KWI3YDBW.js} +343 -17
  8. package/dist/{chunk-LMBYEGUR.js → chunk-TO3GIK7Z.js} +71 -6
  9. package/dist/{chunk-BZQM2XO7.js → chunk-VHGACEHO.js} +62 -1
  10. package/dist/{contributions-tjNExo1o.d.ts → contributions-BhOBRenr.d.cts} +79 -12
  11. package/dist/{contributions-CtlptxR8.d.cts → contributions-HGqnNb_P.d.ts} +79 -12
  12. package/dist/index.cjs +733 -113
  13. package/dist/index.d.cts +34 -14
  14. package/dist/index.d.ts +34 -14
  15. package/dist/index.js +5 -5
  16. package/dist/{options-BnEPUuVV.d.ts → options-lMUwmRwh.d.cts} +69 -4
  17. package/dist/{options-BnEPUuVV.d.cts → options-lMUwmRwh.d.ts} +69 -4
  18. package/dist/{plugin-e2WUEtiI.d.ts → plugin-Cr2Pj8q8.d.ts} +4 -4
  19. package/dist/{plugin-BWxJRKzS.d.cts → plugin-Do5J5xuF.d.cts} +4 -4
  20. package/dist/plugin.cjs +38 -6
  21. package/dist/plugin.d.cts +5 -5
  22. package/dist/plugin.d.ts +5 -5
  23. package/dist/plugin.js +3 -3
  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/{side-panel-HF0IAzwf.d.cts → side-panel-_2UK1gSm.d.cts} +58 -3
  31. package/dist/{side-panel-HF0IAzwf.d.ts → side-panel-_2UK1gSm.d.ts} +58 -3
  32. package/dist/{statusline-model-DFY7tuHj.d.cts → statusline-model-B-2xGlB_.d.cts} +3 -3
  33. package/dist/{statusline-model-zKXtGIjj.d.ts → statusline-model-CY1wzxHg.d.ts} +3 -3
  34. package/dist/ui.cjs +298 -13
  35. package/dist/ui.d.cts +132 -74
  36. package/dist/ui.d.ts +132 -74
  37. package/dist/ui.js +3 -3
  38. package/dist/vela.global.js +734 -114
  39. package/dist/vela.global.min.js +86 -52
  40. package/dist/widget.cjs +1227 -211
  41. package/dist/widget.d.cts +36 -12
  42. package/dist/widget.d.ts +36 -12
  43. package/dist/widget.js +7 -7
  44. package/dist/workspace.cjs +1226 -211
  45. package/dist/workspace.d.cts +47 -20
  46. package/dist/workspace.d.ts +47 -20
  47. package/dist/workspace.js +6 -6
  48. package/package.json +2 -2
  49. /package/dist/{chunk-JU4CWEBF.js → chunk-W5YPYZ2P.js} +0 -0
@@ -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-BnEPUuVV.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-DFY7tuHj.cjs';
3
- export { g as ChartState, P as PanelsState, h as decodeState, i as encodeState, s as sanitizeState } from './statusline-model-DFY7tuHj.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-lMUwmRwh.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-B-2xGlB_.cjs';
3
+ export { g as ChartState, P as PanelsState, h as decodeState, i as encodeState, s as sanitizeState } from './statusline-model-B-2xGlB_.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, R as ReplayState, a as ReplayBounds, b as VelaEventMap, c as ScriptRun } from './contributions-CtlptxR8.cjs';
6
- import { M as MarketDataFeed } from './DataProvider-BrlxntPN.cjs';
5
+ import { I as IndicatorHandle, S as ScriptingEngine, W as WidgetContext, V as Vela, E as ExternalIndicatorEntry, R as ReplayState, a as ReplayBounds, b as VelaEventMap, c as ScriptRun } from './contributions-BhOBRenr.cjs';
6
+ import { M as MarketDataFeed } from './DataProvider-wbtJ3-Sa.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[];
@@ -53,14 +53,17 @@ type CellBoot = PooledCellState & Pick<CellSeed, 'data' | 'visibleRange'>;
53
53
  * `nativeBackend` (the WebGL budget policy, explicit value resolved upstream), the
54
54
  * market/view seeds (those flow through {@link CellSeed}), and `drawings`' toolbar
55
55
  * sub-key (see {@link cellDrawings}). */
56
- type CellChartDefaults = Pick<VelaOptions, 'renderer' | 'defaultLanguage' | 'currentPriceLine' | 'logScale' | 'animations' | 'glow' | 'upColor' | 'downColor' | 'drawings' | 'settings'>;
57
- /** A cell's Status line tab prefs as one bundle — the segment toggles (null when the
58
- * shell runs without status lines) plus the indicator legend's titles/values. What
59
- * the workspace's STYLE link mirrors across same-group cells. */
56
+ type CellChartDefaults = Pick<VelaOptions, 'renderer' | 'defaultLanguage' | 'currentPriceLine' | 'logScale' | 'animations' | 'glow' | 'upColor' | 'downColor' | 'drawings' | 'settings' | 'priceAxis'>;
57
+ /** A cell's own look prefs as one bundle — the Status line tab's segment toggles (null
58
+ * when the shell runs without status lines) and indicator legend titles/values, plus
59
+ * the Symbol tab's watermark toggles. What the workspace's STYLE link mirrors across
60
+ * same-group cells, next to the renderer config. */
60
61
  interface CellStatusPrefs {
61
62
  parts: Record<StatuslinePart, boolean> | null;
62
63
  indicatorTitles: boolean;
63
64
  indicatorValues: boolean;
65
+ watermark: boolean;
66
+ replayWatermark: boolean;
64
67
  }
65
68
  /** One entry of the shared indicator picker's native catalog, per cell. */
66
69
  interface CellNativeInfo {
@@ -121,7 +124,7 @@ interface CellDeps {
121
124
  onPriceStyleChanged(id: string): void;
122
125
  /** The cell's indicator ledger changed (count/picker refresh upstream). */
123
126
  onIndicatorsChanged(id: string): void;
124
- /** A Status line tab pref changed on this cell (the style link mirrors upstream). */
127
+ /** A Status line tab or watermark pref changed on this cell (the style link mirrors upstream). */
125
128
  onStatusPrefsChanged(id: string): void;
126
129
  /** Persistable per-cell state changed outside the market/indicator channels
127
130
  * (bars budget, watermark/titles toggles) — the workspace debounces a save. */
@@ -285,11 +288,11 @@ declare class ChartCell {
285
288
  setIndicatorValuesVisible(visible: boolean): void;
286
289
  /** Show/hide one status-line segment (the settings dialog's Status line tab). */
287
290
  private setStatuslinePart;
288
- /** This cell's Status line tab prefs as one bundle (see {@link CellStatusPrefs}). */
291
+ /** This cell's Status line tab and watermark prefs as one bundle (see {@link CellStatusPrefs}). */
289
292
  statusPrefs(): CellStatusPrefs;
290
- /** Converge this cell's Status line tab prefs to `prefs` — the follower half of
291
- * the workspace's style link. Idempotent: matching values change nothing, so a
292
- * propagated echo dies on its own. */
293
+ /** Converge this cell's Status line tab and watermark prefs to `prefs` — the
294
+ * follower half of the workspace's style link. Idempotent: matching values change
295
+ * nothing, so a propagated echo dies on its own. */
293
296
  applyStatusPrefs(prefs: CellStatusPrefs): void;
294
297
  /** The LIVE chart of this cell — never cache it across a layout change (the cell's
295
298
  * identity is what endures; the chart dies with the cell). */
@@ -712,6 +715,19 @@ interface WorkspaceEventMap extends Record<string, unknown> {
712
715
  * change included.
713
716
  */
714
717
  'script:run': WorkspaceScriptRun;
718
+ /**
719
+ * One cell's price style is switching `from` → `to` — the per-chart
720
+ * `priceStyle:change` relayed up with the cell's identity, so one subscription
721
+ * covers the whole grid, cells added by a later layout change included. Only the
722
+ * cell whose style changes emits. Same timing as the chart event: synchronous,
723
+ * before that cell repaints, so `ws.cell(id).priceStyle` and the cell's canvas
724
+ * still show `from` while the listener runs.
725
+ */
726
+ 'cell:priceStyle': {
727
+ id: string;
728
+ from: string;
729
+ to: string;
730
+ };
715
731
  /** The grid switched layouts (cells created/destroyed/restored around it). */
716
732
  'layout:changed': {
717
733
  layout: string;
@@ -1074,12 +1090,23 @@ declare class VelaWorkspace {
1074
1090
  */
1075
1091
  private alignNewCellStyles;
1076
1092
  /**
1077
- * Mirror an origin cell's presentation — the Canvas + Scales-and-lines slice of
1078
- * its renderer config plus its Status line tab prefs — onto its same-group
1079
- * followers (the style link). Loop-safe two ways: the busy guard eats the
1080
- * followers' SYNCHRONOUS echoes (their `applyConfig` re-fires `onConfigChanged`
1081
- * in the same tick), and the equality short-circuits leave already-converged
1082
- * followers untouched, so nothing re-emits once the group agrees.
1093
+ * Bring cells minted by a layout change into their drawings group: with the link
1094
+ * on, a NEW cell (fresh slot, or one returning from the pool that missed edits
1095
+ * while dormant) receives the drawings of a pre-existing group peer — the active
1096
+ * cell when it is one. A drawing the arriving cell already holds a linked copy of
1097
+ * is refreshed in place; any other is copied and linked like a freshly synced
1098
+ * drawing, so later edits and removals follow both ways. The arrival is the cell's
1099
+ * starting state, not an edit: it stays out of the cell's undo timeline, and the
1100
+ * busy guard keeps the copies' own events from fanning back out.
1101
+ */
1102
+ private alignNewCellDrawings;
1103
+ /**
1104
+ * Mirror an origin cell's presentation — the style-link slice of its renderer
1105
+ * config ({@link styleConfigPatch}) plus its Status line and watermark prefs —
1106
+ * onto its same-group followers (the style link). Loop-safe two ways: the busy
1107
+ * guard eats the followers' SYNCHRONOUS echoes (their `applyConfig` re-fires
1108
+ * `onConfigChanged` in the same tick), and the equality short-circuits leave
1109
+ * already-converged followers untouched, so nothing re-emits once the group agrees.
1083
1110
  */
1084
1111
  private propagateStylePrefs;
1085
1112
  /**
@@ -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-BnEPUuVV.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-zKXtGIjj.js';
3
- export { g as ChartState, P as PanelsState, h as decodeState, i as encodeState, s as sanitizeState } from './statusline-model-zKXtGIjj.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-lMUwmRwh.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-CY1wzxHg.js';
3
+ export { g as ChartState, P as PanelsState, h as decodeState, i as encodeState, s as sanitizeState } from './statusline-model-CY1wzxHg.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, R as ReplayState, a as ReplayBounds, b as VelaEventMap, c as ScriptRun } from './contributions-tjNExo1o.js';
6
- import { M as MarketDataFeed } from './DataProvider-DwFIoV4r.js';
5
+ import { I as IndicatorHandle, S as ScriptingEngine, W as WidgetContext, V as Vela, E as ExternalIndicatorEntry, R as ReplayState, a as ReplayBounds, b as VelaEventMap, c as ScriptRun } from './contributions-HGqnNb_P.js';
6
+ import { M as MarketDataFeed } from './DataProvider-oH78tYXL.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[];
@@ -53,14 +53,17 @@ type CellBoot = PooledCellState & Pick<CellSeed, 'data' | 'visibleRange'>;
53
53
  * `nativeBackend` (the WebGL budget policy, explicit value resolved upstream), the
54
54
  * market/view seeds (those flow through {@link CellSeed}), and `drawings`' toolbar
55
55
  * sub-key (see {@link cellDrawings}). */
56
- type CellChartDefaults = Pick<VelaOptions, 'renderer' | 'defaultLanguage' | 'currentPriceLine' | 'logScale' | 'animations' | 'glow' | 'upColor' | 'downColor' | 'drawings' | 'settings'>;
57
- /** A cell's Status line tab prefs as one bundle — the segment toggles (null when the
58
- * shell runs without status lines) plus the indicator legend's titles/values. What
59
- * the workspace's STYLE link mirrors across same-group cells. */
56
+ type CellChartDefaults = Pick<VelaOptions, 'renderer' | 'defaultLanguage' | 'currentPriceLine' | 'logScale' | 'animations' | 'glow' | 'upColor' | 'downColor' | 'drawings' | 'settings' | 'priceAxis'>;
57
+ /** A cell's own look prefs as one bundle — the Status line tab's segment toggles (null
58
+ * when the shell runs without status lines) and indicator legend titles/values, plus
59
+ * the Symbol tab's watermark toggles. What the workspace's STYLE link mirrors across
60
+ * same-group cells, next to the renderer config. */
60
61
  interface CellStatusPrefs {
61
62
  parts: Record<StatuslinePart, boolean> | null;
62
63
  indicatorTitles: boolean;
63
64
  indicatorValues: boolean;
65
+ watermark: boolean;
66
+ replayWatermark: boolean;
64
67
  }
65
68
  /** One entry of the shared indicator picker's native catalog, per cell. */
66
69
  interface CellNativeInfo {
@@ -121,7 +124,7 @@ interface CellDeps {
121
124
  onPriceStyleChanged(id: string): void;
122
125
  /** The cell's indicator ledger changed (count/picker refresh upstream). */
123
126
  onIndicatorsChanged(id: string): void;
124
- /** A Status line tab pref changed on this cell (the style link mirrors upstream). */
127
+ /** A Status line tab or watermark pref changed on this cell (the style link mirrors upstream). */
125
128
  onStatusPrefsChanged(id: string): void;
126
129
  /** Persistable per-cell state changed outside the market/indicator channels
127
130
  * (bars budget, watermark/titles toggles) — the workspace debounces a save. */
@@ -285,11 +288,11 @@ declare class ChartCell {
285
288
  setIndicatorValuesVisible(visible: boolean): void;
286
289
  /** Show/hide one status-line segment (the settings dialog's Status line tab). */
287
290
  private setStatuslinePart;
288
- /** This cell's Status line tab prefs as one bundle (see {@link CellStatusPrefs}). */
291
+ /** This cell's Status line tab and watermark prefs as one bundle (see {@link CellStatusPrefs}). */
289
292
  statusPrefs(): CellStatusPrefs;
290
- /** Converge this cell's Status line tab prefs to `prefs` — the follower half of
291
- * the workspace's style link. Idempotent: matching values change nothing, so a
292
- * propagated echo dies on its own. */
293
+ /** Converge this cell's Status line tab and watermark prefs to `prefs` — the
294
+ * follower half of the workspace's style link. Idempotent: matching values change
295
+ * nothing, so a propagated echo dies on its own. */
293
296
  applyStatusPrefs(prefs: CellStatusPrefs): void;
294
297
  /** The LIVE chart of this cell — never cache it across a layout change (the cell's
295
298
  * identity is what endures; the chart dies with the cell). */
@@ -712,6 +715,19 @@ interface WorkspaceEventMap extends Record<string, unknown> {
712
715
  * change included.
713
716
  */
714
717
  'script:run': WorkspaceScriptRun;
718
+ /**
719
+ * One cell's price style is switching `from` → `to` — the per-chart
720
+ * `priceStyle:change` relayed up with the cell's identity, so one subscription
721
+ * covers the whole grid, cells added by a later layout change included. Only the
722
+ * cell whose style changes emits. Same timing as the chart event: synchronous,
723
+ * before that cell repaints, so `ws.cell(id).priceStyle` and the cell's canvas
724
+ * still show `from` while the listener runs.
725
+ */
726
+ 'cell:priceStyle': {
727
+ id: string;
728
+ from: string;
729
+ to: string;
730
+ };
715
731
  /** The grid switched layouts (cells created/destroyed/restored around it). */
716
732
  'layout:changed': {
717
733
  layout: string;
@@ -1074,12 +1090,23 @@ declare class VelaWorkspace {
1074
1090
  */
1075
1091
  private alignNewCellStyles;
1076
1092
  /**
1077
- * Mirror an origin cell's presentation — the Canvas + Scales-and-lines slice of
1078
- * its renderer config plus its Status line tab prefs — onto its same-group
1079
- * followers (the style link). Loop-safe two ways: the busy guard eats the
1080
- * followers' SYNCHRONOUS echoes (their `applyConfig` re-fires `onConfigChanged`
1081
- * in the same tick), and the equality short-circuits leave already-converged
1082
- * followers untouched, so nothing re-emits once the group agrees.
1093
+ * Bring cells minted by a layout change into their drawings group: with the link
1094
+ * on, a NEW cell (fresh slot, or one returning from the pool that missed edits
1095
+ * while dormant) receives the drawings of a pre-existing group peer — the active
1096
+ * cell when it is one. A drawing the arriving cell already holds a linked copy of
1097
+ * is refreshed in place; any other is copied and linked like a freshly synced
1098
+ * drawing, so later edits and removals follow both ways. The arrival is the cell's
1099
+ * starting state, not an edit: it stays out of the cell's undo timeline, and the
1100
+ * busy guard keeps the copies' own events from fanning back out.
1101
+ */
1102
+ private alignNewCellDrawings;
1103
+ /**
1104
+ * Mirror an origin cell's presentation — the style-link slice of its renderer
1105
+ * config ({@link styleConfigPatch}) plus its Status line and watermark prefs —
1106
+ * onto its same-group followers (the style link). Loop-safe two ways: the busy
1107
+ * guard eats the followers' SYNCHRONOUS echoes (their `applyConfig` re-fires
1108
+ * `onConfigChanged` in the same tick), and the equality short-circuits leave
1109
+ * already-converged followers untouched, so nothing re-emits once the group agrees.
1083
1110
  */
1084
1111
  private propagateStylePrefs;
1085
1112
  /**
package/dist/workspace.js CHANGED
@@ -1,7 +1,7 @@
1
- export { ChartCell, GRID_PICKER_MAX, VelaWorkspace, WorkspaceReplay, activeAfterLayout, barClose, decodeState, encodeState, ensureLayout, evenTracks, gridStyles, lastOpenClosedBy, layoutDefinition, layoutForGrid, layoutShape, layouts, memoryStorageAdapter, rangesWithin, registerBuiltinLayouts, registerLayout, resizeTracks, sanitizeState, syncTargets, trackOffsets, unregisterLayout } from './chunk-DBDXKZUF.js';
2
- import './chunk-ATGTCWHJ.js';
3
- import './chunk-EZ5FWVLA.js';
4
- import './chunk-LMBYEGUR.js';
5
- import './chunk-NELQJCGK.js';
6
- import './chunk-BZQM2XO7.js';
1
+ export { ChartCell, GRID_PICKER_MAX, VelaWorkspace, WorkspaceReplay, activeAfterLayout, barClose, decodeState, encodeState, ensureLayout, evenTracks, gridStyles, lastOpenClosedBy, layoutDefinition, layoutForGrid, layoutShape, layouts, memoryStorageAdapter, rangesWithin, registerBuiltinLayouts, registerLayout, resizeTracks, sanitizeState, syncTargets, trackOffsets, unregisterLayout } from './chunk-2IPXYM4B.js';
2
+ import './chunk-HMHA733L.js';
3
+ import './chunk-KWI3YDBW.js';
4
+ import './chunk-TO3GIK7Z.js';
5
+ import './chunk-G7B7ZCBF.js';
6
+ import './chunk-VHGACEHO.js';
7
7
  import './chunk-W4EJWLEO.js';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@luxalgo/vela",
3
- "version": "0.8.1",
4
- "description": "Open-source charting library with a native high-performance renderer, drawing tools, pluggable chart types and pluggable scripting engines.",
3
+ "version": "0.8.3",
4
+ "description": "The open-source core of Vela by LuxAlgo: a charting library with a native high-performance renderer, drawing tools, pluggable chart types and pluggable scripting engines.",
5
5
  "keywords": [
6
6
  "charting library",
7
7
  "financial charts",
File without changes