@luxalgo/vela 0.5.0 → 0.5.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.
- package/dist/{DataProvider-Dzd-Erlk.d.ts → DataProvider-DTOEXKTI.d.ts} +1 -1
- package/dist/{DataProvider-DKNDHpNv.d.cts → DataProvider-gnzv-dgc.d.cts} +1 -1
- package/dist/{chunk-KM6LHB3Y.js → chunk-ATPU5CI6.js} +6 -1
- package/dist/{chunk-7UFX5ZIG.js → chunk-B5TIKQJ5.js} +65 -7
- package/dist/{chunk-GYD2THPV.js → chunk-LJLZR44Y.js} +9 -2
- package/dist/{chunk-RHIDOUFL.js → chunk-P556H6EA.js} +329 -10
- package/dist/{chunk-KCCZNKH7.js → chunk-RRFGWZNJ.js} +1915 -367
- package/dist/{chunk-OVQKKXLZ.js → chunk-Y7TK4ZWK.js} +1810 -153
- package/dist/{contributions-o1GRKPI_.d.cts → contributions-Ci_i3IN2.d.cts} +77 -31
- package/dist/{contributions-hX3EUyjG.d.ts → contributions-b6AVrqqG.d.ts} +77 -31
- package/dist/{history-LJkz4-sS.d.cts → history-Cf1lVsap.d.cts} +22 -5
- package/dist/{history-Dzxz-MQj.d.ts → history-Ci3M0xLV.d.ts} +22 -5
- package/dist/index.cjs +2010 -397
- package/dist/index.d.cts +83 -25
- package/dist/index.d.ts +83 -25
- package/dist/index.js +4 -4
- package/dist/{options-Q-576hIi.d.cts → options-XTBpbx0s.d.cts} +61 -1
- package/dist/{options-Q-576hIi.d.ts → options-XTBpbx0s.d.ts} +61 -1
- package/dist/{plugin-aGUD1epn.d.ts → plugin-CnNd7cuF.d.ts} +305 -8
- package/dist/{plugin-D94muTV-.d.cts → plugin-DfH4Y-Om.d.cts} +305 -8
- package/dist/plugin.cjs +58 -7
- 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/ui.cjs +342 -9
- package/dist/ui.d.cts +64 -2
- package/dist/ui.d.ts +64 -2
- package/dist/ui.js +3 -3
- package/dist/vela.global.js +2010 -397
- package/dist/vela.global.min.js +115 -34
- package/dist/widget.cjs +5987 -2242
- package/dist/widget.d.cts +89 -17
- package/dist/widget.d.ts +89 -17
- package/dist/widget.js +169 -18
- package/dist/workspace.cjs +5627 -1587
- package/dist/workspace.d.cts +106 -12
- package/dist/workspace.d.ts +106 -12
- package/dist/workspace.js +494 -52
- 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 } 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, b as VelaShellOptions, c as SyncOptions, d as SyncKind, e as WorkspaceState } from './history-
|
|
3
|
-
export { f as ChartState, P as PanelsState, g as decodeState, h as encodeState, s as sanitizeState } from './history-
|
|
1
|
+
import { O as OHLCV, V as VisibleRangePreset, a as VisibleRange, b as VelaOptions, c as VelaTheme, N as NativeBackend } from './options-XTBpbx0s.cjs';
|
|
2
|
+
import { S as SyncSetting, V as VelaStorage, C as CellState, W as WidgetHistory, R as ResolvedIndicator, a as RangePreset, T as TrackSizes, b as VelaShellOptions, c as SyncOptions, d as SyncKind, e as WorkspaceState } from './history-Cf1lVsap.cjs';
|
|
3
|
+
export { f as ChartState, P as PanelsState, g as decodeState, h as encodeState, s as sanitizeState } from './history-Cf1lVsap.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, 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, a as ScriptRun } from './contributions-Ci_i3IN2.cjs';
|
|
6
|
+
import { M as MarketDataFeed } from './DataProvider-gnzv-dgc.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[];
|
|
@@ -146,12 +146,16 @@ declare class ChartCell {
|
|
|
146
146
|
private watermarkOn;
|
|
147
147
|
/** Indicator titles (this cell's in-chart legend rows) shown. */
|
|
148
148
|
private indicatorTitlesOn;
|
|
149
|
+
/** Plot values beside this cell's legend titles shown. */
|
|
150
|
+
private indicatorValuesOn;
|
|
149
151
|
private destroyed;
|
|
150
152
|
constructor(id: string, gridHost: HTMLElement, seed: CellBoot, deps: CellDeps);
|
|
151
153
|
/** Show/hide this cell's symbol watermark (persisted per cell). */
|
|
152
154
|
setWatermarkVisible(visible: boolean): void;
|
|
153
155
|
/** Show/hide this cell's indicator titles — the in-chart legend rows (persisted per cell). */
|
|
154
156
|
setIndicatorTitlesVisible(visible: boolean): void;
|
|
157
|
+
/** Show/hide the plot values beside this cell's legend titles (persisted per cell). */
|
|
158
|
+
setIndicatorValuesVisible(visible: boolean): void;
|
|
155
159
|
/** The LIVE chart of this cell — never cache it across a layout change (the cell's
|
|
156
160
|
* identity is what endures; the chart dies with the cell). */
|
|
157
161
|
get chart(): Vela;
|
|
@@ -169,6 +173,9 @@ declare class ChartCell {
|
|
|
169
173
|
* colors and direction rule (candle bodies by close-vs-open, baseline by position
|
|
170
174
|
* against the live baseline price, …) instead of the fixed theme tokens. */
|
|
171
175
|
private syncStatuslineColors;
|
|
176
|
+
/** Multi-cell grids keep the status line on one row and hide what doesn't fit —
|
|
177
|
+
* the workspace flips this with the layout (see Statusline.setFitMode). */
|
|
178
|
+
setStatuslineFit(on: boolean): void;
|
|
172
179
|
/** The workspace shell keeps the app theme; the cell host's tokens re-derive from
|
|
173
180
|
* the LIVE plot surface (see {@link applyPlotOverlayTokens}). */
|
|
174
181
|
private syncPlotOverlayTokens;
|
|
@@ -279,6 +286,32 @@ declare function layoutDefinition(id: string): LayoutDefinition | undefined;
|
|
|
279
286
|
declare function layouts(): LayoutDefinition[];
|
|
280
287
|
/** Register the built-in presets (idempotent — called by the workspace entry point). */
|
|
281
288
|
declare function registerBuiltinLayouts(): void;
|
|
289
|
+
/** Picker canvas bound — dynamic layouts stay within a 4×4 grid (16 cells, the
|
|
290
|
+
* workspace's dormant-state pool capacity). */
|
|
291
|
+
declare const GRID_PICKER_MAX = 4;
|
|
292
|
+
/**
|
|
293
|
+
* The layout for a UNIFORM rows×cols grid (Grid picker mode), clamped to the
|
|
294
|
+
* picker canvas. Geometry matching a registered classic preset returns that preset
|
|
295
|
+
* (id `'4'`, `'2h'`, …); anything else synthesizes a `g<rows>x<cols>` definition.
|
|
296
|
+
*/
|
|
297
|
+
declare function layoutForGrid(rows: number, cols: number): LayoutDefinition;
|
|
298
|
+
/**
|
|
299
|
+
* Resolve a layout id to its definition, synthesizing the picker's dynamic ids
|
|
300
|
+
* (`g<rows>x<cols>`) when they are not registered — the boot path for persisted
|
|
301
|
+
* picks. Unknown ids stay undefined.
|
|
302
|
+
*/
|
|
303
|
+
declare function ensureLayout(id: string): LayoutDefinition | undefined;
|
|
304
|
+
/** A layout's shape on the picker canvas. */
|
|
305
|
+
type LayoutShape = {
|
|
306
|
+
rows: number;
|
|
307
|
+
cols: number;
|
|
308
|
+
};
|
|
309
|
+
/**
|
|
310
|
+
* The picker-canvas shape of a layout: `{rows, cols}` for uniform grids, `null`
|
|
311
|
+
* when the layout is not expressible on the canvas (bespoke plugin presets) —
|
|
312
|
+
* pickers list those as labeled rows instead.
|
|
313
|
+
*/
|
|
314
|
+
declare function layoutShape(def: LayoutDefinition): LayoutShape | null;
|
|
282
315
|
/** Inline styles for the grid container + each cell — PURE (the workspace applies them). */
|
|
283
316
|
declare function gridStyles(def: LayoutDefinition, trackSizes?: TrackSizes): {
|
|
284
317
|
container: Record<string, string>;
|
|
@@ -317,8 +350,10 @@ interface VelaWorkspaceOptions extends Omit<VelaOptions, 'height'>, VelaShellOpt
|
|
|
317
350
|
/** Sync links between cells: per kind, `true` = all cells, or a `{cellId: group}`
|
|
318
351
|
* record (only same-group cells follow each other). `crosshair` mirrors the
|
|
319
352
|
* pointer time as ghost crosshairs on the followers (also toggleable from the
|
|
320
|
-
* layout dropdown)
|
|
321
|
-
*
|
|
353
|
+
* layout dropdown); `drawings` copies each newly created drawing onto the
|
|
354
|
+
* followers and keeps the set linked — edits and removals follow (also
|
|
355
|
+
* toggleable from the shared drawing toolbar). Default: everything off.
|
|
356
|
+
* Change at runtime via `ws.sync.set(kind, setting)`. */
|
|
322
357
|
sync?: SyncOptions;
|
|
323
358
|
/** Above this many cells, EVERY cell uses the canvas2d backend (uniform look inside
|
|
324
359
|
* the browser's WebGL-context budget; glow is unavailable there). Default 8; an
|
|
@@ -383,6 +418,7 @@ declare class VelaWorkspace {
|
|
|
383
418
|
/** The side-panel column, shared by the whole grid. */
|
|
384
419
|
private readonly dock;
|
|
385
420
|
private readonly symbolPicker;
|
|
421
|
+
/** Null when the host disabled it (`indicatorPicker: false`). */
|
|
386
422
|
private readonly indicatorPicker;
|
|
387
423
|
private readonly tfQuick;
|
|
388
424
|
private shortcutsHelp;
|
|
@@ -408,6 +444,15 @@ declare class VelaWorkspace {
|
|
|
408
444
|
/** Re-entrance guard around one propagation tick: followers' synchronous echoes
|
|
409
445
|
* (their setVisibleRange re-emits viewport:changed) must not re-propagate. */
|
|
410
446
|
private syncBusy;
|
|
447
|
+
/** Same guard for the drawings link: the propagated mutations' own `drawing:*`
|
|
448
|
+
* events fire synchronously inside the propagation loop and must not fan out again. */
|
|
449
|
+
private drawingSyncBusy;
|
|
450
|
+
/** LINKED drawings (the drawings sync): one map per synced set (cellId → that
|
|
451
|
+
* cell's drawing id), reachable from every member under its `cellId\0drawingId`
|
|
452
|
+
* key — any member finds its peers to push edits/removals onto. Survives a
|
|
453
|
+
* toggle-off (propagation freezes while the setting is off; re-enabling resumes
|
|
454
|
+
* edit/delete for these pairs). Cleared on reload / `applyState`. */
|
|
455
|
+
private readonly drawingLinks;
|
|
411
456
|
private manifest;
|
|
412
457
|
/** The shared manifest can no longer change instance sets — resolved, or no
|
|
413
458
|
* `indicators` option so nothing ever will. Gates the cells' ledger fallback. */
|
|
@@ -416,6 +461,17 @@ declare class VelaWorkspace {
|
|
|
416
461
|
private openDialogs;
|
|
417
462
|
private alerts;
|
|
418
463
|
private alertsMenu;
|
|
464
|
+
/** Writes `data-layout` on the root and pushes mode flips into every cell's renderer. */
|
|
465
|
+
private layoutCtl;
|
|
466
|
+
private readonly mobileBar;
|
|
467
|
+
private readonly drawingPill;
|
|
468
|
+
private tfDrawer;
|
|
469
|
+
private drawingsDrawer;
|
|
470
|
+
private moreDrawer;
|
|
471
|
+
private timezoneDrawer;
|
|
472
|
+
private priceScaleDrawer;
|
|
473
|
+
/** Plot-local y of the last price-axis long-press (targets the pane under the finger). */
|
|
474
|
+
private priceScalePressY;
|
|
419
475
|
private readonly attachmentDisposers;
|
|
420
476
|
/** The single grid-wide attribution mark — re-inked on a live theme swap. */
|
|
421
477
|
private attributionMark;
|
|
@@ -514,10 +570,13 @@ declare class VelaWorkspace {
|
|
|
514
570
|
private applySyncSetting;
|
|
515
571
|
/**
|
|
516
572
|
* Mirror an origin cell's pointer time onto its same-group followers as GHOST
|
|
517
|
-
* crosshairs (`renderer.setExternalCrosshair`).
|
|
518
|
-
*
|
|
519
|
-
*
|
|
520
|
-
*
|
|
573
|
+
* crosshairs (`renderer.setExternalCrosshair`). The horizontal price level rides
|
|
574
|
+
* along ONLY to followers showing the same ticker — price scales are comparable
|
|
575
|
+
* there, while an origin's price painted on another market's pane would be noise.
|
|
576
|
+
* Leaving the origin propagates `null` (the event already carries it) and clears
|
|
577
|
+
* every ghost. No busy guard needed: an external crosshair never re-emits
|
|
578
|
+
* `onCrosshairMove` — the flow is one-way by port contract, so no echo loop can
|
|
579
|
+
* exist.
|
|
521
580
|
*/
|
|
522
581
|
private propagateCrosshair;
|
|
523
582
|
/**
|
|
@@ -528,6 +587,27 @@ declare class VelaWorkspace {
|
|
|
528
587
|
* interval is left alone, so cross-timeframe groups settle instead of oscillating.
|
|
529
588
|
*/
|
|
530
589
|
private propagateViewport;
|
|
590
|
+
/**
|
|
591
|
+
* Copy a freshly created drawing onto the origin's same-group followers (fresh ids
|
|
592
|
+
* through `drawings.add` — anchors are time+price, so the copy lands at the same
|
|
593
|
+
* spot whatever the follower shows) and register the whole set as LINKED: edits
|
|
594
|
+
* and removals of any member follow while the link is on ({@link drawingLinks}).
|
|
595
|
+
* The busy guard stops the copies' own `drawing:created` events from fanning out.
|
|
596
|
+
*/
|
|
597
|
+
private propagateDrawing;
|
|
598
|
+
/** Mirror an in-progress placement (its current ghost, `null` = placement ended)
|
|
599
|
+
* onto the origin's same-group followers — the live half of the drawings link;
|
|
600
|
+
* the created copy replaces the ghosts when the placement completes. One-way by
|
|
601
|
+
* contract (an external ghost never re-emits drafts), so no busy guard needed. */
|
|
602
|
+
private propagateDraft;
|
|
603
|
+
/** Push a linked drawing's edited CONTENT (anchors, style, text, per-type props)
|
|
604
|
+
* onto its same-group peers — any member propagates, not just the original. */
|
|
605
|
+
private propagateDrawingEdit;
|
|
606
|
+
/** Remove a linked drawing's peers with it. The removed member always leaves its
|
|
607
|
+
* link group (whatever the setting); peers are only deleted while the link is on.
|
|
608
|
+
* A propagated peer removal re-enters here under the busy guard and just cleans
|
|
609
|
+
* its own link key. */
|
|
610
|
+
private propagateDrawingRemoval;
|
|
531
611
|
/**
|
|
532
612
|
* Push an origin cell's symbol/timeframe onto its same-group followers (fired from
|
|
533
613
|
* `market:changed`). Convergence comes from IDEMPOTENCE, not the guard: a follower's
|
|
@@ -541,6 +621,20 @@ declare class VelaWorkspace {
|
|
|
541
621
|
private onCellIndicatorsChanged;
|
|
542
622
|
/** Timeframe changes routed from the topbar menu / quick entry (chip state follows). */
|
|
543
623
|
private setActiveTimeframe;
|
|
624
|
+
/** The mode flipped (container resized across the breakpoint, or a coarse-pointer
|
|
625
|
+
* change). Close the open surfaces — a desktop card must not linger over the
|
|
626
|
+
* mobile chrome (and vice versa) — and re-present every cell's own chrome. */
|
|
627
|
+
private onLayoutModeChange;
|
|
628
|
+
/** Push the layout-shape-dependent chrome onto every cell: multi-cell grids keep
|
|
629
|
+
* the status line on one row (segments that don't fit hide), and on MOBILE their
|
|
630
|
+
* legends' fold chip routes to the object tree instead of unfolding in place —
|
|
631
|
+
* per-indicator controls live there (the legend rows have no room in a grid cell). */
|
|
632
|
+
private syncCellPresentation;
|
|
633
|
+
private openTimeframeDrawer;
|
|
634
|
+
private openDrawingsDrawer;
|
|
635
|
+
private openMoreDrawer;
|
|
636
|
+
private openTimezoneDrawer;
|
|
637
|
+
private openPriceScaleDrawer;
|
|
544
638
|
/** The aggregated alerts bell — entries carry their cell; selecting one activates it. */
|
|
545
639
|
private openAlertsMenu;
|
|
546
640
|
/** Mount registered attachments not yet mounted on this workspace (idempotent per id). */
|
|
@@ -576,4 +670,4 @@ declare function resizeTracks(weights: readonly number[], index: number, deltaPx
|
|
|
576
670
|
*/
|
|
577
671
|
declare function trackOffsets(weights: readonly number[], sizePx: number, gapPx: number): number[];
|
|
578
672
|
|
|
579
|
-
export { type CellBoot, type CellChartDefaults, type CellNativeInfo, type CellSeed, CellState, ChartCell, type LayoutDefinition, type PooledCellState, SyncKind, SyncOptions, SyncSetting, TrackSizes, VelaWorkspace, type VelaWorkspaceOptions, type WorkspaceEventMap, type WorkspaceScriptRun, WorkspaceState, type WorkspaceStorage, type WorkspaceWidgetContext, activeAfterLayout, evenTracks, gridStyles, layoutDefinition, layouts, memoryStorageAdapter, rangesWithin, registerBuiltinLayouts, registerLayout, resizeTracks, syncTargets, trackOffsets, unregisterLayout };
|
|
673
|
+
export { type CellBoot, type CellChartDefaults, type CellNativeInfo, type CellSeed, CellState, ChartCell, GRID_PICKER_MAX, type LayoutDefinition, type LayoutShape, type PooledCellState, SyncKind, SyncOptions, SyncSetting, TrackSizes, VelaWorkspace, type VelaWorkspaceOptions, type WorkspaceEventMap, type WorkspaceScriptRun, WorkspaceState, type WorkspaceStorage, type WorkspaceWidgetContext, activeAfterLayout, ensureLayout, evenTracks, gridStyles, layoutDefinition, layoutForGrid, layoutShape, layouts, memoryStorageAdapter, rangesWithin, registerBuiltinLayouts, registerLayout, resizeTracks, syncTargets, trackOffsets, unregisterLayout };
|
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 } 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, b as VelaShellOptions, c as SyncOptions, d as SyncKind, e as WorkspaceState } from './history-
|
|
3
|
-
export { f as ChartState, P as PanelsState, g as decodeState, h as encodeState, s as sanitizeState } from './history-
|
|
1
|
+
import { O as OHLCV, V as VisibleRangePreset, a as VisibleRange, b as VelaOptions, c as VelaTheme, N as NativeBackend } from './options-XTBpbx0s.js';
|
|
2
|
+
import { S as SyncSetting, V as VelaStorage, C as CellState, W as WidgetHistory, R as ResolvedIndicator, a as RangePreset, T as TrackSizes, b as VelaShellOptions, c as SyncOptions, d as SyncKind, e as WorkspaceState } from './history-Ci3M0xLV.js';
|
|
3
|
+
export { f as ChartState, P as PanelsState, g as decodeState, h as encodeState, s as sanitizeState } from './history-Ci3M0xLV.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, 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, a as ScriptRun } from './contributions-b6AVrqqG.js';
|
|
6
|
+
import { M as MarketDataFeed } from './DataProvider-DTOEXKTI.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[];
|
|
@@ -146,12 +146,16 @@ declare class ChartCell {
|
|
|
146
146
|
private watermarkOn;
|
|
147
147
|
/** Indicator titles (this cell's in-chart legend rows) shown. */
|
|
148
148
|
private indicatorTitlesOn;
|
|
149
|
+
/** Plot values beside this cell's legend titles shown. */
|
|
150
|
+
private indicatorValuesOn;
|
|
149
151
|
private destroyed;
|
|
150
152
|
constructor(id: string, gridHost: HTMLElement, seed: CellBoot, deps: CellDeps);
|
|
151
153
|
/** Show/hide this cell's symbol watermark (persisted per cell). */
|
|
152
154
|
setWatermarkVisible(visible: boolean): void;
|
|
153
155
|
/** Show/hide this cell's indicator titles — the in-chart legend rows (persisted per cell). */
|
|
154
156
|
setIndicatorTitlesVisible(visible: boolean): void;
|
|
157
|
+
/** Show/hide the plot values beside this cell's legend titles (persisted per cell). */
|
|
158
|
+
setIndicatorValuesVisible(visible: boolean): void;
|
|
155
159
|
/** The LIVE chart of this cell — never cache it across a layout change (the cell's
|
|
156
160
|
* identity is what endures; the chart dies with the cell). */
|
|
157
161
|
get chart(): Vela;
|
|
@@ -169,6 +173,9 @@ declare class ChartCell {
|
|
|
169
173
|
* colors and direction rule (candle bodies by close-vs-open, baseline by position
|
|
170
174
|
* against the live baseline price, …) instead of the fixed theme tokens. */
|
|
171
175
|
private syncStatuslineColors;
|
|
176
|
+
/** Multi-cell grids keep the status line on one row and hide what doesn't fit —
|
|
177
|
+
* the workspace flips this with the layout (see Statusline.setFitMode). */
|
|
178
|
+
setStatuslineFit(on: boolean): void;
|
|
172
179
|
/** The workspace shell keeps the app theme; the cell host's tokens re-derive from
|
|
173
180
|
* the LIVE plot surface (see {@link applyPlotOverlayTokens}). */
|
|
174
181
|
private syncPlotOverlayTokens;
|
|
@@ -279,6 +286,32 @@ declare function layoutDefinition(id: string): LayoutDefinition | undefined;
|
|
|
279
286
|
declare function layouts(): LayoutDefinition[];
|
|
280
287
|
/** Register the built-in presets (idempotent — called by the workspace entry point). */
|
|
281
288
|
declare function registerBuiltinLayouts(): void;
|
|
289
|
+
/** Picker canvas bound — dynamic layouts stay within a 4×4 grid (16 cells, the
|
|
290
|
+
* workspace's dormant-state pool capacity). */
|
|
291
|
+
declare const GRID_PICKER_MAX = 4;
|
|
292
|
+
/**
|
|
293
|
+
* The layout for a UNIFORM rows×cols grid (Grid picker mode), clamped to the
|
|
294
|
+
* picker canvas. Geometry matching a registered classic preset returns that preset
|
|
295
|
+
* (id `'4'`, `'2h'`, …); anything else synthesizes a `g<rows>x<cols>` definition.
|
|
296
|
+
*/
|
|
297
|
+
declare function layoutForGrid(rows: number, cols: number): LayoutDefinition;
|
|
298
|
+
/**
|
|
299
|
+
* Resolve a layout id to its definition, synthesizing the picker's dynamic ids
|
|
300
|
+
* (`g<rows>x<cols>`) when they are not registered — the boot path for persisted
|
|
301
|
+
* picks. Unknown ids stay undefined.
|
|
302
|
+
*/
|
|
303
|
+
declare function ensureLayout(id: string): LayoutDefinition | undefined;
|
|
304
|
+
/** A layout's shape on the picker canvas. */
|
|
305
|
+
type LayoutShape = {
|
|
306
|
+
rows: number;
|
|
307
|
+
cols: number;
|
|
308
|
+
};
|
|
309
|
+
/**
|
|
310
|
+
* The picker-canvas shape of a layout: `{rows, cols}` for uniform grids, `null`
|
|
311
|
+
* when the layout is not expressible on the canvas (bespoke plugin presets) —
|
|
312
|
+
* pickers list those as labeled rows instead.
|
|
313
|
+
*/
|
|
314
|
+
declare function layoutShape(def: LayoutDefinition): LayoutShape | null;
|
|
282
315
|
/** Inline styles for the grid container + each cell — PURE (the workspace applies them). */
|
|
283
316
|
declare function gridStyles(def: LayoutDefinition, trackSizes?: TrackSizes): {
|
|
284
317
|
container: Record<string, string>;
|
|
@@ -317,8 +350,10 @@ interface VelaWorkspaceOptions extends Omit<VelaOptions, 'height'>, VelaShellOpt
|
|
|
317
350
|
/** Sync links between cells: per kind, `true` = all cells, or a `{cellId: group}`
|
|
318
351
|
* record (only same-group cells follow each other). `crosshair` mirrors the
|
|
319
352
|
* pointer time as ghost crosshairs on the followers (also toggleable from the
|
|
320
|
-
* layout dropdown)
|
|
321
|
-
*
|
|
353
|
+
* layout dropdown); `drawings` copies each newly created drawing onto the
|
|
354
|
+
* followers and keeps the set linked — edits and removals follow (also
|
|
355
|
+
* toggleable from the shared drawing toolbar). Default: everything off.
|
|
356
|
+
* Change at runtime via `ws.sync.set(kind, setting)`. */
|
|
322
357
|
sync?: SyncOptions;
|
|
323
358
|
/** Above this many cells, EVERY cell uses the canvas2d backend (uniform look inside
|
|
324
359
|
* the browser's WebGL-context budget; glow is unavailable there). Default 8; an
|
|
@@ -383,6 +418,7 @@ declare class VelaWorkspace {
|
|
|
383
418
|
/** The side-panel column, shared by the whole grid. */
|
|
384
419
|
private readonly dock;
|
|
385
420
|
private readonly symbolPicker;
|
|
421
|
+
/** Null when the host disabled it (`indicatorPicker: false`). */
|
|
386
422
|
private readonly indicatorPicker;
|
|
387
423
|
private readonly tfQuick;
|
|
388
424
|
private shortcutsHelp;
|
|
@@ -408,6 +444,15 @@ declare class VelaWorkspace {
|
|
|
408
444
|
/** Re-entrance guard around one propagation tick: followers' synchronous echoes
|
|
409
445
|
* (their setVisibleRange re-emits viewport:changed) must not re-propagate. */
|
|
410
446
|
private syncBusy;
|
|
447
|
+
/** Same guard for the drawings link: the propagated mutations' own `drawing:*`
|
|
448
|
+
* events fire synchronously inside the propagation loop and must not fan out again. */
|
|
449
|
+
private drawingSyncBusy;
|
|
450
|
+
/** LINKED drawings (the drawings sync): one map per synced set (cellId → that
|
|
451
|
+
* cell's drawing id), reachable from every member under its `cellId\0drawingId`
|
|
452
|
+
* key — any member finds its peers to push edits/removals onto. Survives a
|
|
453
|
+
* toggle-off (propagation freezes while the setting is off; re-enabling resumes
|
|
454
|
+
* edit/delete for these pairs). Cleared on reload / `applyState`. */
|
|
455
|
+
private readonly drawingLinks;
|
|
411
456
|
private manifest;
|
|
412
457
|
/** The shared manifest can no longer change instance sets — resolved, or no
|
|
413
458
|
* `indicators` option so nothing ever will. Gates the cells' ledger fallback. */
|
|
@@ -416,6 +461,17 @@ declare class VelaWorkspace {
|
|
|
416
461
|
private openDialogs;
|
|
417
462
|
private alerts;
|
|
418
463
|
private alertsMenu;
|
|
464
|
+
/** Writes `data-layout` on the root and pushes mode flips into every cell's renderer. */
|
|
465
|
+
private layoutCtl;
|
|
466
|
+
private readonly mobileBar;
|
|
467
|
+
private readonly drawingPill;
|
|
468
|
+
private tfDrawer;
|
|
469
|
+
private drawingsDrawer;
|
|
470
|
+
private moreDrawer;
|
|
471
|
+
private timezoneDrawer;
|
|
472
|
+
private priceScaleDrawer;
|
|
473
|
+
/** Plot-local y of the last price-axis long-press (targets the pane under the finger). */
|
|
474
|
+
private priceScalePressY;
|
|
419
475
|
private readonly attachmentDisposers;
|
|
420
476
|
/** The single grid-wide attribution mark — re-inked on a live theme swap. */
|
|
421
477
|
private attributionMark;
|
|
@@ -514,10 +570,13 @@ declare class VelaWorkspace {
|
|
|
514
570
|
private applySyncSetting;
|
|
515
571
|
/**
|
|
516
572
|
* Mirror an origin cell's pointer time onto its same-group followers as GHOST
|
|
517
|
-
* crosshairs (`renderer.setExternalCrosshair`).
|
|
518
|
-
*
|
|
519
|
-
*
|
|
520
|
-
*
|
|
573
|
+
* crosshairs (`renderer.setExternalCrosshair`). The horizontal price level rides
|
|
574
|
+
* along ONLY to followers showing the same ticker — price scales are comparable
|
|
575
|
+
* there, while an origin's price painted on another market's pane would be noise.
|
|
576
|
+
* Leaving the origin propagates `null` (the event already carries it) and clears
|
|
577
|
+
* every ghost. No busy guard needed: an external crosshair never re-emits
|
|
578
|
+
* `onCrosshairMove` — the flow is one-way by port contract, so no echo loop can
|
|
579
|
+
* exist.
|
|
521
580
|
*/
|
|
522
581
|
private propagateCrosshair;
|
|
523
582
|
/**
|
|
@@ -528,6 +587,27 @@ declare class VelaWorkspace {
|
|
|
528
587
|
* interval is left alone, so cross-timeframe groups settle instead of oscillating.
|
|
529
588
|
*/
|
|
530
589
|
private propagateViewport;
|
|
590
|
+
/**
|
|
591
|
+
* Copy a freshly created drawing onto the origin's same-group followers (fresh ids
|
|
592
|
+
* through `drawings.add` — anchors are time+price, so the copy lands at the same
|
|
593
|
+
* spot whatever the follower shows) and register the whole set as LINKED: edits
|
|
594
|
+
* and removals of any member follow while the link is on ({@link drawingLinks}).
|
|
595
|
+
* The busy guard stops the copies' own `drawing:created` events from fanning out.
|
|
596
|
+
*/
|
|
597
|
+
private propagateDrawing;
|
|
598
|
+
/** Mirror an in-progress placement (its current ghost, `null` = placement ended)
|
|
599
|
+
* onto the origin's same-group followers — the live half of the drawings link;
|
|
600
|
+
* the created copy replaces the ghosts when the placement completes. One-way by
|
|
601
|
+
* contract (an external ghost never re-emits drafts), so no busy guard needed. */
|
|
602
|
+
private propagateDraft;
|
|
603
|
+
/** Push a linked drawing's edited CONTENT (anchors, style, text, per-type props)
|
|
604
|
+
* onto its same-group peers — any member propagates, not just the original. */
|
|
605
|
+
private propagateDrawingEdit;
|
|
606
|
+
/** Remove a linked drawing's peers with it. The removed member always leaves its
|
|
607
|
+
* link group (whatever the setting); peers are only deleted while the link is on.
|
|
608
|
+
* A propagated peer removal re-enters here under the busy guard and just cleans
|
|
609
|
+
* its own link key. */
|
|
610
|
+
private propagateDrawingRemoval;
|
|
531
611
|
/**
|
|
532
612
|
* Push an origin cell's symbol/timeframe onto its same-group followers (fired from
|
|
533
613
|
* `market:changed`). Convergence comes from IDEMPOTENCE, not the guard: a follower's
|
|
@@ -541,6 +621,20 @@ declare class VelaWorkspace {
|
|
|
541
621
|
private onCellIndicatorsChanged;
|
|
542
622
|
/** Timeframe changes routed from the topbar menu / quick entry (chip state follows). */
|
|
543
623
|
private setActiveTimeframe;
|
|
624
|
+
/** The mode flipped (container resized across the breakpoint, or a coarse-pointer
|
|
625
|
+
* change). Close the open surfaces — a desktop card must not linger over the
|
|
626
|
+
* mobile chrome (and vice versa) — and re-present every cell's own chrome. */
|
|
627
|
+
private onLayoutModeChange;
|
|
628
|
+
/** Push the layout-shape-dependent chrome onto every cell: multi-cell grids keep
|
|
629
|
+
* the status line on one row (segments that don't fit hide), and on MOBILE their
|
|
630
|
+
* legends' fold chip routes to the object tree instead of unfolding in place —
|
|
631
|
+
* per-indicator controls live there (the legend rows have no room in a grid cell). */
|
|
632
|
+
private syncCellPresentation;
|
|
633
|
+
private openTimeframeDrawer;
|
|
634
|
+
private openDrawingsDrawer;
|
|
635
|
+
private openMoreDrawer;
|
|
636
|
+
private openTimezoneDrawer;
|
|
637
|
+
private openPriceScaleDrawer;
|
|
544
638
|
/** The aggregated alerts bell — entries carry their cell; selecting one activates it. */
|
|
545
639
|
private openAlertsMenu;
|
|
546
640
|
/** Mount registered attachments not yet mounted on this workspace (idempotent per id). */
|
|
@@ -576,4 +670,4 @@ declare function resizeTracks(weights: readonly number[], index: number, deltaPx
|
|
|
576
670
|
*/
|
|
577
671
|
declare function trackOffsets(weights: readonly number[], sizePx: number, gapPx: number): number[];
|
|
578
672
|
|
|
579
|
-
export { type CellBoot, type CellChartDefaults, type CellNativeInfo, type CellSeed, CellState, ChartCell, type LayoutDefinition, type PooledCellState, SyncKind, SyncOptions, SyncSetting, TrackSizes, VelaWorkspace, type VelaWorkspaceOptions, type WorkspaceEventMap, type WorkspaceScriptRun, WorkspaceState, type WorkspaceStorage, type WorkspaceWidgetContext, activeAfterLayout, evenTracks, gridStyles, layoutDefinition, layouts, memoryStorageAdapter, rangesWithin, registerBuiltinLayouts, registerLayout, resizeTracks, syncTargets, trackOffsets, unregisterLayout };
|
|
673
|
+
export { type CellBoot, type CellChartDefaults, type CellNativeInfo, type CellSeed, CellState, ChartCell, GRID_PICKER_MAX, type LayoutDefinition, type LayoutShape, type PooledCellState, SyncKind, SyncOptions, SyncSetting, TrackSizes, VelaWorkspace, type VelaWorkspaceOptions, type WorkspaceEventMap, type WorkspaceScriptRun, WorkspaceState, type WorkspaceStorage, type WorkspaceWidgetContext, activeAfterLayout, ensureLayout, evenTracks, gridStyles, layoutDefinition, layoutForGrid, layoutShape, layouts, memoryStorageAdapter, rangesWithin, registerBuiltinLayouts, registerLayout, resizeTracks, syncTargets, trackOffsets, unregisterLayout };
|