@luxalgo/vela 0.6.7 → 0.6.9
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.
- package/dist/{DataProvider-BsQM2WNH.d.cts → DataProvider-8Z95Q-RJ.d.cts} +1 -1
- package/dist/{DataProvider-BSLlBpB9.d.ts → DataProvider-DExJrfut.d.ts} +1 -1
- package/dist/{chunk-2R7BANEM.js → chunk-62SVGONC.js} +2 -2
- package/dist/{chunk-6WFKTAT4.js → chunk-6WDDVMBJ.js} +548 -147
- package/dist/{chunk-L3I2CCYO.js → chunk-EQCHJZOT.js} +49 -2
- package/dist/{chunk-OICPLNU7.js → chunk-FCVIG7JG.js} +188 -2
- package/dist/{chunk-WVP4XV5A.js → chunk-STHSKXOR.js} +407 -159
- package/dist/{chunk-PN5KWFZ4.js → chunk-WFSZBX3R.js} +2 -2
- package/dist/{contributions-Z12BrWCy.d.ts → contributions-C1U2Krwg.d.cts} +112 -7
- package/dist/{contributions-Hv4_cOJo.d.cts → contributions-D7PVZO2i.d.ts} +112 -7
- package/dist/index.cjs +755 -152
- package/dist/index.d.cts +12 -7
- package/dist/index.d.ts +12 -7
- package/dist/index.js +4 -4
- package/dist/{options-BaVTMXaO.d.ts → options-FM0peknS.d.cts} +84 -7
- package/dist/{options-BaVTMXaO.d.cts → options-FM0peknS.d.ts} +84 -7
- package/dist/{plugin-9koBjc5H.d.ts → plugin-7bkF32Rk.d.ts} +3 -3
- package/dist/{plugin-BXhDHTYn.d.cts → plugin-DfVqBz9p.d.cts} +3 -3
- package/dist/plugin.cjs +18 -2
- package/dist/plugin.d.cts +4 -4
- package/dist/plugin.d.ts +4 -4
- package/dist/plugin.js +2 -2
- package/dist/providers/binance.d.cts +2 -2
- package/dist/providers/binance.d.ts +2 -2
- package/dist/providers/coinbase.d.cts +2 -2
- package/dist/providers/coinbase.d.ts +2 -2
- package/dist/providers/hyperliquid.d.cts +2 -2
- package/dist/providers/hyperliquid.d.ts +2 -2
- package/dist/{bottombar-Br4rzx_R.d.ts → statusline-DOPiT6I6.d.cts} +91 -6
- package/dist/{bottombar-Div5zibZ.d.cts → statusline-zdF4eZLr.d.ts} +91 -6
- package/dist/ui.cjs +201 -4
- package/dist/ui.d.cts +89 -2
- package/dist/ui.d.ts +89 -2
- package/dist/ui.js +3 -3
- package/dist/vela.global.js +755 -152
- package/dist/vela.global.min.js +93 -44
- package/dist/widget.cjs +1144 -271
- package/dist/widget.d.cts +12 -85
- package/dist/widget.d.ts +12 -85
- package/dist/widget.js +7 -7
- package/dist/workspace.cjs +1144 -271
- package/dist/workspace.d.cts +65 -11
- package/dist/workspace.d.ts +65 -11
- package/dist/workspace.js +6 -6
- package/package.json +1 -1
package/dist/workspace.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { O as OHLCV, V as VisibleRangePreset, a as VisibleRange, b as VelaOptions, c as VelaTheme, N as NativeBackend, d as MarketSession } from './options-
|
|
2
|
-
import { S as SyncSetting, V as VelaStorage, C as CellState, W as WidgetHistory, R as ResolvedIndicator, a as RangePreset, T as TrackSizes,
|
|
3
|
-
export {
|
|
1
|
+
import { O as OHLCV, V as VisibleRangePreset, a as VisibleRange, b as VelaOptions, c as VelaTheme, N as NativeBackend, d as MarketSession } from './options-FM0peknS.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-DOPiT6I6.cjs';
|
|
3
|
+
export { g as ChartState, P as PanelsState, h as decodeState, i as encodeState, s as sanitizeState } from './statusline-DOPiT6I6.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-
|
|
6
|
-
import { M as MarketDataFeed } from './DataProvider-
|
|
5
|
+
import { I as IndicatorHandle, S as ScriptingEngine, W as WidgetContext, V as Vela, E as ExternalIndicatorEntry, a as ScriptRun } from './contributions-C1U2Krwg.cjs';
|
|
6
|
+
import { M as MarketDataFeed } from './DataProvider-8Z95Q-RJ.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[];
|
|
@@ -54,6 +54,14 @@ type CellBoot = PooledCellState & Pick<CellSeed, 'data' | 'visibleRange'>;
|
|
|
54
54
|
* market/view seeds (those flow through {@link CellSeed}), and `drawings`' toolbar
|
|
55
55
|
* sub-key (see {@link cellDrawings}). */
|
|
56
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. */
|
|
60
|
+
interface CellStatusPrefs {
|
|
61
|
+
parts: Record<StatuslinePart, boolean> | null;
|
|
62
|
+
indicatorTitles: boolean;
|
|
63
|
+
indicatorValues: boolean;
|
|
64
|
+
}
|
|
57
65
|
/** One entry of the shared indicator picker's native catalog, per cell. */
|
|
58
66
|
interface CellNativeInfo {
|
|
59
67
|
type: string;
|
|
@@ -99,6 +107,8 @@ interface CellDeps {
|
|
|
99
107
|
onPriceStyleChanged(id: string): void;
|
|
100
108
|
/** The cell's indicator ledger changed (count/picker refresh upstream). */
|
|
101
109
|
onIndicatorsChanged(id: string): void;
|
|
110
|
+
/** A Status line tab pref changed on this cell (the style link mirrors upstream). */
|
|
111
|
+
onStatusPrefsChanged(id: string): void;
|
|
102
112
|
/** Persistable per-cell state changed outside the market/indicator channels
|
|
103
113
|
* (bars budget, watermark/titles toggles) — the workspace debounces a save. */
|
|
104
114
|
onStateDirty(): void;
|
|
@@ -176,6 +186,14 @@ declare class ChartCell {
|
|
|
176
186
|
private indicatorValuesOn;
|
|
177
187
|
private destroyed;
|
|
178
188
|
constructor(id: string, gridHost: HTMLElement, seed: CellBoot, deps: CellDeps);
|
|
189
|
+
/**
|
|
190
|
+
* Project a market identity into the cell state and its display overlays (watermark,
|
|
191
|
+
* statusline), WITHOUT the data-dependent bookkeeping. Runs twice per user pick: once
|
|
192
|
+
* optimistically from the cell setters — the labels reflect the pick immediately, not
|
|
193
|
+
* after the bars load — and again from `market:changed` (the committed pass, and the
|
|
194
|
+
* only pass for host `chart.setMarket` calls). Idempotent, so the double run converges.
|
|
195
|
+
*/
|
|
196
|
+
private projectMarket;
|
|
179
197
|
/**
|
|
180
198
|
* Does this cell's market HAVE sessions (RTH/ETH meaningful)? Derived from the
|
|
181
199
|
* symbol's own metadata (`syminfo.session !== '24x7'`), asynchronously — the
|
|
@@ -187,8 +205,9 @@ declare class ChartCell {
|
|
|
187
205
|
/** Switch this cell's shown session in place (a reload — RTH and ETH are different bars). */
|
|
188
206
|
setSession(session: MarketSession): void;
|
|
189
207
|
private refreshSessionAvailable;
|
|
190
|
-
/** (Re)derive the pre/post-market shading bands for this cell's market. The
|
|
191
|
-
*
|
|
208
|
+
/** (Re)derive the pre/post-market shading bands for this cell's market. The bands
|
|
209
|
+
* expand locally from the symbol's session vocabulary, so they paint as soon as
|
|
210
|
+
* metadata is known and follow any pan depth without provider round trips. */
|
|
192
211
|
private refreshSessionShading;
|
|
193
212
|
/** The session-shade colors live in the renderer CONFIG (persisted with it, edited
|
|
194
213
|
* live by the dialog swatch) — the cell only proxies them into its settings rows. */
|
|
@@ -209,6 +228,14 @@ declare class ChartCell {
|
|
|
209
228
|
setIndicatorTitlesVisible(visible: boolean): void;
|
|
210
229
|
/** Show/hide the plot values beside this cell's legend titles (persisted per cell). */
|
|
211
230
|
setIndicatorValuesVisible(visible: boolean): void;
|
|
231
|
+
/** Show/hide one status-line segment (the settings dialog's Status line tab). */
|
|
232
|
+
private setStatuslinePart;
|
|
233
|
+
/** This cell's Status line tab prefs as one bundle (see {@link CellStatusPrefs}). */
|
|
234
|
+
statusPrefs(): CellStatusPrefs;
|
|
235
|
+
/** Converge this cell's Status line tab prefs to `prefs` — the follower half of
|
|
236
|
+
* the workspace's style link. Idempotent: matching values change nothing, so a
|
|
237
|
+
* propagated echo dies on its own. */
|
|
238
|
+
applyStatusPrefs(prefs: CellStatusPrefs): void;
|
|
212
239
|
/** The LIVE chart of this cell — never cache it across a layout change (the cell's
|
|
213
240
|
* identity is what endures; the chart dies with the cell). */
|
|
214
241
|
get chart(): Vela;
|
|
@@ -217,7 +244,9 @@ declare class ChartCell {
|
|
|
217
244
|
get priceStyle(): string;
|
|
218
245
|
/** Manifest instances + present natives — the topbar indicator count. */
|
|
219
246
|
get indicatorCount(): number;
|
|
220
|
-
/** Switch this cell's market in place (the chart instance survives).
|
|
247
|
+
/** Switch this cell's market in place (the chart instance survives). The projection
|
|
248
|
+
* is OPTIMISTIC — labels and chrome show the pick before the bars load; it follows
|
|
249
|
+
* the setMarket call so the statusline reads the already-blanked chart. */
|
|
221
250
|
setSymbol(symbol: string): void;
|
|
222
251
|
setTimeframe(timeframe: string): void;
|
|
223
252
|
/** Applied live (renderer feature) — no reload. */
|
|
@@ -336,13 +365,15 @@ declare class ChartCell {
|
|
|
336
365
|
|
|
337
366
|
/** The extended context a workspace hands to contributed actions/attachments. */
|
|
338
367
|
interface WorkspaceWidgetContext extends WidgetContext {
|
|
339
|
-
/** Every live cell (layout order) — id + LIVE chart + market
|
|
368
|
+
/** Every live cell (layout order) — id + LIVE chart + its market. A LIVE getter
|
|
369
|
+
* (fresh array per read): read it at the point of use, never keep the array. */
|
|
340
370
|
cells: ReadonlyArray<{
|
|
341
371
|
id: string;
|
|
342
372
|
chart: Vela;
|
|
343
373
|
symbol: string;
|
|
344
374
|
timeframe: string;
|
|
345
375
|
}>;
|
|
376
|
+
/** LIVE getter — follows every active-cell switch. */
|
|
346
377
|
activeCellId: string;
|
|
347
378
|
setActiveCell(id: string): void;
|
|
348
379
|
}
|
|
@@ -454,8 +485,9 @@ interface VelaWorkspaceOptions extends Omit<VelaOptions, 'height'>, VelaShellOpt
|
|
|
454
485
|
/** Sync links between cells: per kind, `true` = all cells, or a `{cellId: group}`
|
|
455
486
|
* record (only same-group cells follow each other). `crosshair` mirrors the
|
|
456
487
|
* pointer time as ghost crosshairs on the followers (also toggleable from the
|
|
457
|
-
* layout dropdown); `
|
|
458
|
-
*
|
|
488
|
+
* layout dropdown); `style` mirrors Canvas, Scales-and-lines, and Status line
|
|
489
|
+
* settings (same dropdown); `drawings` copies each newly created drawing onto
|
|
490
|
+
* the followers and keeps the set linked — edits and removals follow (also
|
|
459
491
|
* toggleable from the shared drawing toolbar). Default: everything off.
|
|
460
492
|
* Change at runtime via `ws.sync.set(kind, setting)`. */
|
|
461
493
|
sync?: SyncOptions;
|
|
@@ -563,6 +595,10 @@ declare class VelaWorkspace {
|
|
|
563
595
|
/** Same guard for the drawings link: the propagated mutations' own `drawing:*`
|
|
564
596
|
* events fire synchronously inside the propagation loop and must not fan out again. */
|
|
565
597
|
private drawingSyncBusy;
|
|
598
|
+
/** Same guard for the style link: a follower's `applyConfig` re-fires its
|
|
599
|
+
* `onConfigChanged` in the same tick, and a state restore applies per-cell
|
|
600
|
+
* configs that legitimately differ — neither must propagate. */
|
|
601
|
+
private styleSyncBusy;
|
|
566
602
|
/** LINKED drawings (the drawings sync): one map per synced set (cellId → that
|
|
567
603
|
* cell's drawing id), reachable from every member under its `cellId\0drawingId`
|
|
568
604
|
* key — any member finds its peers to push edits/removals onto. Survives a
|
|
@@ -710,6 +746,24 @@ declare class VelaWorkspace {
|
|
|
710
746
|
* cell's whole life, so these live and die with the cell). */
|
|
711
747
|
private wireCell;
|
|
712
748
|
private applySyncSetting;
|
|
749
|
+
/**
|
|
750
|
+
* Align cells minted by a layout change to their style group: with the link on, a
|
|
751
|
+
* NEW cell (fresh slot or one returning from the pool, which missed edits while
|
|
752
|
+
* dormant) inherits the presentation of a pre-existing group peer — the active
|
|
753
|
+
* cell when it is one — instead of sitting on its own state beside a styled
|
|
754
|
+
* group. Propagation runs FROM the peer, so a newborn's defaults never overwrite
|
|
755
|
+
* the group, and the equality short-circuits keep converged peers untouched.
|
|
756
|
+
*/
|
|
757
|
+
private alignNewCellStyles;
|
|
758
|
+
/**
|
|
759
|
+
* Mirror an origin cell's presentation — the Canvas + Scales-and-lines slice of
|
|
760
|
+
* its renderer config plus its Status line tab prefs — onto its same-group
|
|
761
|
+
* followers (the style link). Loop-safe two ways: the busy guard eats the
|
|
762
|
+
* followers' SYNCHRONOUS echoes (their `applyConfig` re-fires `onConfigChanged`
|
|
763
|
+
* in the same tick), and the equality short-circuits leave already-converged
|
|
764
|
+
* followers untouched, so nothing re-emits once the group agrees.
|
|
765
|
+
*/
|
|
766
|
+
private propagateStylePrefs;
|
|
713
767
|
/**
|
|
714
768
|
* Mirror an origin cell's pointer time onto its same-group followers as GHOST
|
|
715
769
|
* crosshairs (`renderer.setExternalCrosshair`). The horizontal price level rides
|
package/dist/workspace.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { O as OHLCV, V as VisibleRangePreset, a as VisibleRange, b as VelaOptions, c as VelaTheme, N as NativeBackend, d as MarketSession } from './options-
|
|
2
|
-
import { S as SyncSetting, V as VelaStorage, C as CellState, W as WidgetHistory, R as ResolvedIndicator, a as RangePreset, T as TrackSizes,
|
|
3
|
-
export {
|
|
1
|
+
import { O as OHLCV, V as VisibleRangePreset, a as VisibleRange, b as VelaOptions, c as VelaTheme, N as NativeBackend, d as MarketSession } from './options-FM0peknS.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-zdF4eZLr.js';
|
|
3
|
+
export { g as ChartState, P as PanelsState, h as decodeState, i as encodeState, s as sanitizeState } from './statusline-zdF4eZLr.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-
|
|
6
|
-
import { M as MarketDataFeed } from './DataProvider-
|
|
5
|
+
import { I as IndicatorHandle, S as ScriptingEngine, W as WidgetContext, V as Vela, E as ExternalIndicatorEntry, a as ScriptRun } from './contributions-D7PVZO2i.js';
|
|
6
|
+
import { M as MarketDataFeed } from './DataProvider-DExJrfut.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[];
|
|
@@ -54,6 +54,14 @@ type CellBoot = PooledCellState & Pick<CellSeed, 'data' | 'visibleRange'>;
|
|
|
54
54
|
* market/view seeds (those flow through {@link CellSeed}), and `drawings`' toolbar
|
|
55
55
|
* sub-key (see {@link cellDrawings}). */
|
|
56
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. */
|
|
60
|
+
interface CellStatusPrefs {
|
|
61
|
+
parts: Record<StatuslinePart, boolean> | null;
|
|
62
|
+
indicatorTitles: boolean;
|
|
63
|
+
indicatorValues: boolean;
|
|
64
|
+
}
|
|
57
65
|
/** One entry of the shared indicator picker's native catalog, per cell. */
|
|
58
66
|
interface CellNativeInfo {
|
|
59
67
|
type: string;
|
|
@@ -99,6 +107,8 @@ interface CellDeps {
|
|
|
99
107
|
onPriceStyleChanged(id: string): void;
|
|
100
108
|
/** The cell's indicator ledger changed (count/picker refresh upstream). */
|
|
101
109
|
onIndicatorsChanged(id: string): void;
|
|
110
|
+
/** A Status line tab pref changed on this cell (the style link mirrors upstream). */
|
|
111
|
+
onStatusPrefsChanged(id: string): void;
|
|
102
112
|
/** Persistable per-cell state changed outside the market/indicator channels
|
|
103
113
|
* (bars budget, watermark/titles toggles) — the workspace debounces a save. */
|
|
104
114
|
onStateDirty(): void;
|
|
@@ -176,6 +186,14 @@ declare class ChartCell {
|
|
|
176
186
|
private indicatorValuesOn;
|
|
177
187
|
private destroyed;
|
|
178
188
|
constructor(id: string, gridHost: HTMLElement, seed: CellBoot, deps: CellDeps);
|
|
189
|
+
/**
|
|
190
|
+
* Project a market identity into the cell state and its display overlays (watermark,
|
|
191
|
+
* statusline), WITHOUT the data-dependent bookkeeping. Runs twice per user pick: once
|
|
192
|
+
* optimistically from the cell setters — the labels reflect the pick immediately, not
|
|
193
|
+
* after the bars load — and again from `market:changed` (the committed pass, and the
|
|
194
|
+
* only pass for host `chart.setMarket` calls). Idempotent, so the double run converges.
|
|
195
|
+
*/
|
|
196
|
+
private projectMarket;
|
|
179
197
|
/**
|
|
180
198
|
* Does this cell's market HAVE sessions (RTH/ETH meaningful)? Derived from the
|
|
181
199
|
* symbol's own metadata (`syminfo.session !== '24x7'`), asynchronously — the
|
|
@@ -187,8 +205,9 @@ declare class ChartCell {
|
|
|
187
205
|
/** Switch this cell's shown session in place (a reload — RTH and ETH are different bars). */
|
|
188
206
|
setSession(session: MarketSession): void;
|
|
189
207
|
private refreshSessionAvailable;
|
|
190
|
-
/** (Re)derive the pre/post-market shading bands for this cell's market. The
|
|
191
|
-
*
|
|
208
|
+
/** (Re)derive the pre/post-market shading bands for this cell's market. The bands
|
|
209
|
+
* expand locally from the symbol's session vocabulary, so they paint as soon as
|
|
210
|
+
* metadata is known and follow any pan depth without provider round trips. */
|
|
192
211
|
private refreshSessionShading;
|
|
193
212
|
/** The session-shade colors live in the renderer CONFIG (persisted with it, edited
|
|
194
213
|
* live by the dialog swatch) — the cell only proxies them into its settings rows. */
|
|
@@ -209,6 +228,14 @@ declare class ChartCell {
|
|
|
209
228
|
setIndicatorTitlesVisible(visible: boolean): void;
|
|
210
229
|
/** Show/hide the plot values beside this cell's legend titles (persisted per cell). */
|
|
211
230
|
setIndicatorValuesVisible(visible: boolean): void;
|
|
231
|
+
/** Show/hide one status-line segment (the settings dialog's Status line tab). */
|
|
232
|
+
private setStatuslinePart;
|
|
233
|
+
/** This cell's Status line tab prefs as one bundle (see {@link CellStatusPrefs}). */
|
|
234
|
+
statusPrefs(): CellStatusPrefs;
|
|
235
|
+
/** Converge this cell's Status line tab prefs to `prefs` — the follower half of
|
|
236
|
+
* the workspace's style link. Idempotent: matching values change nothing, so a
|
|
237
|
+
* propagated echo dies on its own. */
|
|
238
|
+
applyStatusPrefs(prefs: CellStatusPrefs): void;
|
|
212
239
|
/** The LIVE chart of this cell — never cache it across a layout change (the cell's
|
|
213
240
|
* identity is what endures; the chart dies with the cell). */
|
|
214
241
|
get chart(): Vela;
|
|
@@ -217,7 +244,9 @@ declare class ChartCell {
|
|
|
217
244
|
get priceStyle(): string;
|
|
218
245
|
/** Manifest instances + present natives — the topbar indicator count. */
|
|
219
246
|
get indicatorCount(): number;
|
|
220
|
-
/** Switch this cell's market in place (the chart instance survives).
|
|
247
|
+
/** Switch this cell's market in place (the chart instance survives). The projection
|
|
248
|
+
* is OPTIMISTIC — labels and chrome show the pick before the bars load; it follows
|
|
249
|
+
* the setMarket call so the statusline reads the already-blanked chart. */
|
|
221
250
|
setSymbol(symbol: string): void;
|
|
222
251
|
setTimeframe(timeframe: string): void;
|
|
223
252
|
/** Applied live (renderer feature) — no reload. */
|
|
@@ -336,13 +365,15 @@ declare class ChartCell {
|
|
|
336
365
|
|
|
337
366
|
/** The extended context a workspace hands to contributed actions/attachments. */
|
|
338
367
|
interface WorkspaceWidgetContext extends WidgetContext {
|
|
339
|
-
/** Every live cell (layout order) — id + LIVE chart + market
|
|
368
|
+
/** Every live cell (layout order) — id + LIVE chart + its market. A LIVE getter
|
|
369
|
+
* (fresh array per read): read it at the point of use, never keep the array. */
|
|
340
370
|
cells: ReadonlyArray<{
|
|
341
371
|
id: string;
|
|
342
372
|
chart: Vela;
|
|
343
373
|
symbol: string;
|
|
344
374
|
timeframe: string;
|
|
345
375
|
}>;
|
|
376
|
+
/** LIVE getter — follows every active-cell switch. */
|
|
346
377
|
activeCellId: string;
|
|
347
378
|
setActiveCell(id: string): void;
|
|
348
379
|
}
|
|
@@ -454,8 +485,9 @@ interface VelaWorkspaceOptions extends Omit<VelaOptions, 'height'>, VelaShellOpt
|
|
|
454
485
|
/** Sync links between cells: per kind, `true` = all cells, or a `{cellId: group}`
|
|
455
486
|
* record (only same-group cells follow each other). `crosshair` mirrors the
|
|
456
487
|
* pointer time as ghost crosshairs on the followers (also toggleable from the
|
|
457
|
-
* layout dropdown); `
|
|
458
|
-
*
|
|
488
|
+
* layout dropdown); `style` mirrors Canvas, Scales-and-lines, and Status line
|
|
489
|
+
* settings (same dropdown); `drawings` copies each newly created drawing onto
|
|
490
|
+
* the followers and keeps the set linked — edits and removals follow (also
|
|
459
491
|
* toggleable from the shared drawing toolbar). Default: everything off.
|
|
460
492
|
* Change at runtime via `ws.sync.set(kind, setting)`. */
|
|
461
493
|
sync?: SyncOptions;
|
|
@@ -563,6 +595,10 @@ declare class VelaWorkspace {
|
|
|
563
595
|
/** Same guard for the drawings link: the propagated mutations' own `drawing:*`
|
|
564
596
|
* events fire synchronously inside the propagation loop and must not fan out again. */
|
|
565
597
|
private drawingSyncBusy;
|
|
598
|
+
/** Same guard for the style link: a follower's `applyConfig` re-fires its
|
|
599
|
+
* `onConfigChanged` in the same tick, and a state restore applies per-cell
|
|
600
|
+
* configs that legitimately differ — neither must propagate. */
|
|
601
|
+
private styleSyncBusy;
|
|
566
602
|
/** LINKED drawings (the drawings sync): one map per synced set (cellId → that
|
|
567
603
|
* cell's drawing id), reachable from every member under its `cellId\0drawingId`
|
|
568
604
|
* key — any member finds its peers to push edits/removals onto. Survives a
|
|
@@ -710,6 +746,24 @@ declare class VelaWorkspace {
|
|
|
710
746
|
* cell's whole life, so these live and die with the cell). */
|
|
711
747
|
private wireCell;
|
|
712
748
|
private applySyncSetting;
|
|
749
|
+
/**
|
|
750
|
+
* Align cells minted by a layout change to their style group: with the link on, a
|
|
751
|
+
* NEW cell (fresh slot or one returning from the pool, which missed edits while
|
|
752
|
+
* dormant) inherits the presentation of a pre-existing group peer — the active
|
|
753
|
+
* cell when it is one — instead of sitting on its own state beside a styled
|
|
754
|
+
* group. Propagation runs FROM the peer, so a newborn's defaults never overwrite
|
|
755
|
+
* the group, and the equality short-circuits keep converged peers untouched.
|
|
756
|
+
*/
|
|
757
|
+
private alignNewCellStyles;
|
|
758
|
+
/**
|
|
759
|
+
* Mirror an origin cell's presentation — the Canvas + Scales-and-lines slice of
|
|
760
|
+
* its renderer config plus its Status line tab prefs — onto its same-group
|
|
761
|
+
* followers (the style link). Loop-safe two ways: the busy guard eats the
|
|
762
|
+
* followers' SYNCHRONOUS echoes (their `applyConfig` re-fires `onConfigChanged`
|
|
763
|
+
* in the same tick), and the equality short-circuits leave already-converged
|
|
764
|
+
* followers untouched, so nothing re-emits once the group agrees.
|
|
765
|
+
*/
|
|
766
|
+
private propagateStylePrefs;
|
|
713
767
|
/**
|
|
714
768
|
* Mirror an origin cell's pointer time onto its same-group followers as GHOST
|
|
715
769
|
* crosshairs (`renderer.setExternalCrosshair`). The horizontal price level rides
|
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-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
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-STHSKXOR.js';
|
|
2
|
+
import './chunk-6WDDVMBJ.js';
|
|
3
|
+
import './chunk-EQCHJZOT.js';
|
|
4
|
+
import './chunk-62SVGONC.js';
|
|
5
|
+
import './chunk-FCVIG7JG.js';
|
|
6
|
+
import './chunk-WFSZBX3R.js';
|
|
7
7
|
import './chunk-W4EJWLEO.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luxalgo/vela",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.9",
|
|
4
4
|
"description": "Open-source charting library with a native high-performance renderer, drawing tools, pluggable chart types and pluggable scripting engines.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://luxalgo.com/vela",
|