@luxalgo/vela 0.6.8 → 0.6.10
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-BSLlBpB9.d.ts → DataProvider-CWmp31dA.d.ts} +49 -1
- package/dist/{DataProvider-BsQM2WNH.d.cts → DataProvider-l_eLMly_.d.cts} +49 -1
- package/dist/{chunk-L3I2CCYO.js → chunk-4KZVZ7QQ.js} +49 -2
- package/dist/{chunk-SQETIBFU.js → chunk-FFOP37FQ.js} +996 -377
- package/dist/{chunk-2R7BANEM.js → chunk-G77Y7LK2.js} +2 -2
- package/dist/{chunk-PN5KWFZ4.js → chunk-KG4YT3TI.js} +5 -3
- package/dist/{chunk-OICPLNU7.js → chunk-MHY7MVXH.js} +192 -2
- package/dist/{chunk-N7LGMKCE.js → chunk-NMTQXNT4.js} +637 -164
- package/dist/{contributions-DLLdV9jD.d.ts → contributions-BCz6Dr6a.d.ts} +99 -7
- package/dist/{contributions-Vw-Hm58R.d.cts → contributions-D9vTzm5p.d.cts} +99 -7
- package/dist/index.cjs +1210 -383
- package/dist/index.d.cts +37 -11
- package/dist/index.d.ts +37 -11
- package/dist/index.js +4 -4
- package/dist/{options-BaVTMXaO.d.ts → options-DSqHsQyN.d.cts} +84 -7
- package/dist/{options-BaVTMXaO.d.cts → options-DSqHsQyN.d.ts} +84 -7
- package/dist/{plugin-BnJgjLAy.d.cts → plugin-Bt8hLR8Z.d.cts} +3 -3
- package/dist/{plugin-CC7rBrOY.d.ts → plugin-CH7pfMrE.d.ts} +3 -3
- package/dist/plugin.cjs +21 -3
- 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/{statusline-CGkB2EOo.d.ts → statusline-5K7y4Ya2.d.ts} +5 -3
- package/dist/{statusline-DqzBqy42.d.cts → statusline-TYLQmoeh.d.cts} +5 -3
- package/dist/ui.cjs +208 -5
- package/dist/ui.d.cts +91 -2
- package/dist/ui.d.ts +91 -2
- package/dist/ui.js +3 -3
- package/dist/vela.global.js +1210 -383
- package/dist/vela.global.min.js +99 -48
- package/dist/widget.cjs +1771 -449
- package/dist/widget.d.cts +17 -6
- package/dist/widget.d.ts +17 -6
- package/dist/widget.js +7 -7
- package/dist/workspace.cjs +1771 -449
- package/dist/workspace.d.cts +100 -6
- package/dist/workspace.d.ts +100 -6
- 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 StatuslinePart, b as RangePreset, T as TrackSizes, c as VelaShellOptions, d as SyncOptions, e as SyncKind, f as WorkspaceState } from './statusline-
|
|
3
|
-
export { g as ChartState, P as PanelsState, h as decodeState, i as encodeState, s as sanitizeState } from './statusline-
|
|
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-DSqHsQyN.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-TYLQmoeh.cjs';
|
|
3
|
+
export { g as ChartState, P as PanelsState, h as decodeState, i as encodeState, s as sanitizeState } from './statusline-TYLQmoeh.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-D9vTzm5p.cjs';
|
|
6
|
+
import { M as MarketDataFeed } from './DataProvider-l_eLMly_.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[];
|
|
@@ -101,6 +101,19 @@ interface CellDeps {
|
|
|
101
101
|
manifestSettled(): boolean;
|
|
102
102
|
/** Report a pointer-down/focus in this cell (the workspace sets it active). */
|
|
103
103
|
activate(id: string): void;
|
|
104
|
+
/** Whether the grid holds more than one cell — gates the cluster's maximize
|
|
105
|
+
* button and its drag handle (a lone chart has neither use). */
|
|
106
|
+
multiCell(): boolean;
|
|
107
|
+
/** Is this cell the one the workspace currently maximizes over the grid? */
|
|
108
|
+
isMaximized(id: string): boolean;
|
|
109
|
+
/** Maximize this cell over the whole grid, or restore the grid when it already is. */
|
|
110
|
+
toggleMaximize(id: string): void;
|
|
111
|
+
/** Drag-handle hit-test: the OTHER live cell under a viewport point (never `id`). */
|
|
112
|
+
cellDragTarget(id: string, x: number, y: number): string | null;
|
|
113
|
+
/** Live drop-target highlight while a grip drag is underway (null clears). */
|
|
114
|
+
previewDropTarget(id: string | null): void;
|
|
115
|
+
/** Commit a grip drag: the two cells trade slots in the grid. */
|
|
116
|
+
dropCell(id: string, targetId: string): void;
|
|
104
117
|
/** The cell's market changed in place (chrome/retention refresh upstream). */
|
|
105
118
|
onMarketChanged(id: string): void;
|
|
106
119
|
/** The cell's price style changed in place (topbar icon/menu refresh upstream). */
|
|
@@ -151,6 +164,8 @@ declare class ChartCell {
|
|
|
151
164
|
/** Keeps the pre/post-market shading on the symbol's real calendar (see {@link SessionShadingTracker}). */
|
|
152
165
|
private readonly sessionShading;
|
|
153
166
|
private readonly watermark;
|
|
167
|
+
/** Bottom-center hover cluster: drag handle, zoom in/out, maximize/restore, reset view. */
|
|
168
|
+
private readonly cellControls;
|
|
154
169
|
private readonly contextMenu;
|
|
155
170
|
private readonly offMarket;
|
|
156
171
|
/** The cell's durable market state — the seed vocabulary plus the venue mirror the
|
|
@@ -186,6 +201,14 @@ declare class ChartCell {
|
|
|
186
201
|
private indicatorValuesOn;
|
|
187
202
|
private destroyed;
|
|
188
203
|
constructor(id: string, gridHost: HTMLElement, seed: CellBoot, deps: CellDeps);
|
|
204
|
+
/**
|
|
205
|
+
* Project a market identity into the cell state and its display overlays (watermark,
|
|
206
|
+
* statusline), WITHOUT the data-dependent bookkeeping. Runs twice per user pick: once
|
|
207
|
+
* optimistically from the cell setters — the labels reflect the pick immediately, not
|
|
208
|
+
* after the bars load — and again from `market:changed` (the committed pass, and the
|
|
209
|
+
* only pass for host `chart.setMarket` calls). Idempotent, so the double run converges.
|
|
210
|
+
*/
|
|
211
|
+
private projectMarket;
|
|
189
212
|
/**
|
|
190
213
|
* Does this cell's market HAVE sessions (RTH/ETH meaningful)? Derived from the
|
|
191
214
|
* symbol's own metadata (`syminfo.session !== '24x7'`), asynchronously — the
|
|
@@ -236,7 +259,9 @@ declare class ChartCell {
|
|
|
236
259
|
get priceStyle(): string;
|
|
237
260
|
/** Manifest instances + present natives — the topbar indicator count. */
|
|
238
261
|
get indicatorCount(): number;
|
|
239
|
-
/** Switch this cell's market in place (the chart instance survives).
|
|
262
|
+
/** Switch this cell's market in place (the chart instance survives). The projection
|
|
263
|
+
* is OPTIMISTIC — labels and chrome show the pick before the bars load; it follows
|
|
264
|
+
* the setMarket call so the statusline reads the already-blanked chart. */
|
|
240
265
|
setSymbol(symbol: string): void;
|
|
241
266
|
setTimeframe(timeframe: string): void;
|
|
242
267
|
/** Applied live (renderer feature) — no reload. */
|
|
@@ -256,6 +281,13 @@ declare class ChartCell {
|
|
|
256
281
|
* needs, and keep it framed (re-asserted once the deeper history is painted).
|
|
257
282
|
*/
|
|
258
283
|
applyRange(preset: RangePreset): void;
|
|
284
|
+
/** Reset this cell's view: re-enable auto scale and frame the full history —
|
|
285
|
+
* the same action the chart context menu offers. */
|
|
286
|
+
resetView(): void;
|
|
287
|
+
/** Rebuild the view-controls cluster (the maximize gate or state changed). */
|
|
288
|
+
refreshControls(): void;
|
|
289
|
+
/** Mobile flips the per-cell cluster off (the shell's mobile bar replaces it). */
|
|
290
|
+
setControlsSuspended(on: boolean): void;
|
|
259
291
|
/** Make this cell the active one and put keyboard focus on its chart surface. */
|
|
260
292
|
focus(): void;
|
|
261
293
|
/** Download this cell's chart as a PNG (named after its market). */
|
|
@@ -508,6 +540,10 @@ interface WorkspaceEventMap extends Record<string, unknown> {
|
|
|
508
540
|
'layout:changed': {
|
|
509
541
|
layout: string;
|
|
510
542
|
};
|
|
543
|
+
/** A cell was maximized over the whole grid, or the grid restored (`id: null`). */
|
|
544
|
+
'cell:maximized': {
|
|
545
|
+
id: string | null;
|
|
546
|
+
};
|
|
511
547
|
'cell:created': {
|
|
512
548
|
id: string;
|
|
513
549
|
};
|
|
@@ -537,6 +573,9 @@ declare class VelaWorkspace {
|
|
|
537
573
|
* slots beyond the list get auto identities. Grows, never reorders. */
|
|
538
574
|
private order;
|
|
539
575
|
private activeId;
|
|
576
|
+
/** The cell maximized over the whole grid (null = normal grid). TRANSIENT view
|
|
577
|
+
* state — never persisted; any structural change (layout, applyState) restores. */
|
|
578
|
+
private maximizedId;
|
|
540
579
|
private cellBackend;
|
|
541
580
|
/** `layout: false` — the grid is pinned to the one-cell layout, the layout picker
|
|
542
581
|
* and sync switches never render, and `setLayout` no-ops. */
|
|
@@ -704,6 +743,32 @@ declare class VelaWorkspace {
|
|
|
704
743
|
* the pool so the backend stays uniform.
|
|
705
744
|
*/
|
|
706
745
|
setLayout(layout: string | LayoutDefinition): void;
|
|
746
|
+
/** The identity of the cell maximized over the whole grid, or null. */
|
|
747
|
+
get maximizedCell(): string | null;
|
|
748
|
+
/**
|
|
749
|
+
* Maximize one cell over the whole grid, or restore the layout with `null`. Pure
|
|
750
|
+
* presentation: the other cells stay alive underneath — charts, subscriptions and
|
|
751
|
+
* state untouched — so restoring is instant. The maximized cell becomes the active
|
|
752
|
+
* one. Transient view state (also reachable from each cell's bottom-center view
|
|
753
|
+
* cluster): switching layouts or applying a state document restores the grid.
|
|
754
|
+
*/
|
|
755
|
+
maximizeCell(id: string | null): void;
|
|
756
|
+
/** The mobile bar's maximize stop: one press isolates the ACTIVE chart over the
|
|
757
|
+
* grid; while something is already isolated — the chart, or a pane inside it
|
|
758
|
+
* (mobile's double-tap) — the press restores that instead. Every branch re-syncs
|
|
759
|
+
* the stop on its own (`maximizeCell` directly, `panes.maximize` via its
|
|
760
|
+
* synchronous `pane:changed`). */
|
|
761
|
+
private toggleMobileMaximize;
|
|
762
|
+
/** Keep the mobile bar's maximize stop truthful: lit (inverse chip, restore
|
|
763
|
+
* glyph) while the active chart covers the grid OR one of its panes is
|
|
764
|
+
* maximized — the state a double-tap toggles is otherwise invisible on mobile. */
|
|
765
|
+
private syncMobileMaximize;
|
|
766
|
+
/**
|
|
767
|
+
* Trade the SLOTS of two live cells — the grid arrangement changes, the cells
|
|
768
|
+
* themselves (charts, indicators, drawings, the active flag) stay untouched.
|
|
769
|
+
* What each cell's drag handle commits; also callable directly by hosts.
|
|
770
|
+
*/
|
|
771
|
+
swapCells(a: string, b: string): void;
|
|
707
772
|
resize(): void;
|
|
708
773
|
/** Show a toast over the grid — the same surface the shell's own notices use
|
|
709
774
|
* (alerts, script errors) and the one contributions reach via `ctx.toast`. */
|
|
@@ -728,6 +793,35 @@ declare class VelaWorkspace {
|
|
|
728
793
|
* Geometry is keyed by SLOT (`perCell[slot.id]`); the cell living there is
|
|
729
794
|
* `order[i]` — the identity/position decoupling in one line. */
|
|
730
795
|
private applyGrid;
|
|
796
|
+
/** Overlay the maximize presentation on the freshly applied grid: EVERY cell spans
|
|
797
|
+
* the full track grid — the maximized one on top, the siblings invisible beneath
|
|
798
|
+
* it (their charts stay alive — restoring is instant). The siblings must span too:
|
|
799
|
+
* left in their slots they would auto-flow into implicit zero-height rows, whose
|
|
800
|
+
* gaps steal height from the maximized cell and collapse their renderers to 0.
|
|
801
|
+
* The splitter strips and the active ring hide via the `data-maximized` rules. */
|
|
802
|
+
private applyMaximizePresentation;
|
|
803
|
+
/** Rebuild every cell's view cluster (the maximize gate or state changed). */
|
|
804
|
+
private refreshCellControls;
|
|
805
|
+
/** Drop the transient maximize on a structural change (layout switch, state
|
|
806
|
+
* document) — WITH the event, so hosts tracking `cell:maximized` never drift
|
|
807
|
+
* from `maximizedCell`. The caller's own grid re-apply paints the restore. */
|
|
808
|
+
private clearMaximized;
|
|
809
|
+
/** The live cell under a viewport point, excluding `excludeId` and any host a
|
|
810
|
+
* maximize has hidden — the drag handle's hit-test. */
|
|
811
|
+
private cellAtPoint;
|
|
812
|
+
/** Mark one cell as the live drop target of a grip drag (null clears all) —
|
|
813
|
+
* the `data-drop-target` stylesheet rule paints the dashed preview ring. */
|
|
814
|
+
private setDropTarget;
|
|
815
|
+
/** The cell whose bottom-left corner the grid's attribution mark floats in — the
|
|
816
|
+
* maximized cell while one covers the grid, else the bottom-left slot's cell. */
|
|
817
|
+
private bottomLeftCell;
|
|
818
|
+
/** Keep the shared attribution mark inside the BOTTOM-LEFT visible cell: its
|
|
819
|
+
* offsets ride that cell's renderer-published `--vela-bottom-gutter` /
|
|
820
|
+
* `--vela-toolbar-gutter`, so collapsed pane strips push the mark up without any
|
|
821
|
+
* bookkeeping here. Re-run after anything that changes which host that is
|
|
822
|
+
* (layout switch, maximize, cell rebuild); a destroyed host drops the mark from
|
|
823
|
+
* the DOM, and this re-mount brings it back. */
|
|
824
|
+
private mountAttributionMark;
|
|
731
825
|
/** Create the cells the current layout wants but don't exist yet (pool-first).
|
|
732
826
|
* A slot's CELL IDENTITY is `order[i]` (declaration order — never the slot's own
|
|
733
827
|
* positional id); slots past the declared list mint an auto identity once. */
|
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 StatuslinePart, b as RangePreset, T as TrackSizes, c as VelaShellOptions, d as SyncOptions, e as SyncKind, f as WorkspaceState } from './statusline-
|
|
3
|
-
export { g as ChartState, P as PanelsState, h as decodeState, i as encodeState, s as sanitizeState } from './statusline-
|
|
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-DSqHsQyN.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-5K7y4Ya2.js';
|
|
3
|
+
export { g as ChartState, P as PanelsState, h as decodeState, i as encodeState, s as sanitizeState } from './statusline-5K7y4Ya2.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-BCz6Dr6a.js';
|
|
6
|
+
import { M as MarketDataFeed } from './DataProvider-CWmp31dA.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[];
|
|
@@ -101,6 +101,19 @@ interface CellDeps {
|
|
|
101
101
|
manifestSettled(): boolean;
|
|
102
102
|
/** Report a pointer-down/focus in this cell (the workspace sets it active). */
|
|
103
103
|
activate(id: string): void;
|
|
104
|
+
/** Whether the grid holds more than one cell — gates the cluster's maximize
|
|
105
|
+
* button and its drag handle (a lone chart has neither use). */
|
|
106
|
+
multiCell(): boolean;
|
|
107
|
+
/** Is this cell the one the workspace currently maximizes over the grid? */
|
|
108
|
+
isMaximized(id: string): boolean;
|
|
109
|
+
/** Maximize this cell over the whole grid, or restore the grid when it already is. */
|
|
110
|
+
toggleMaximize(id: string): void;
|
|
111
|
+
/** Drag-handle hit-test: the OTHER live cell under a viewport point (never `id`). */
|
|
112
|
+
cellDragTarget(id: string, x: number, y: number): string | null;
|
|
113
|
+
/** Live drop-target highlight while a grip drag is underway (null clears). */
|
|
114
|
+
previewDropTarget(id: string | null): void;
|
|
115
|
+
/** Commit a grip drag: the two cells trade slots in the grid. */
|
|
116
|
+
dropCell(id: string, targetId: string): void;
|
|
104
117
|
/** The cell's market changed in place (chrome/retention refresh upstream). */
|
|
105
118
|
onMarketChanged(id: string): void;
|
|
106
119
|
/** The cell's price style changed in place (topbar icon/menu refresh upstream). */
|
|
@@ -151,6 +164,8 @@ declare class ChartCell {
|
|
|
151
164
|
/** Keeps the pre/post-market shading on the symbol's real calendar (see {@link SessionShadingTracker}). */
|
|
152
165
|
private readonly sessionShading;
|
|
153
166
|
private readonly watermark;
|
|
167
|
+
/** Bottom-center hover cluster: drag handle, zoom in/out, maximize/restore, reset view. */
|
|
168
|
+
private readonly cellControls;
|
|
154
169
|
private readonly contextMenu;
|
|
155
170
|
private readonly offMarket;
|
|
156
171
|
/** The cell's durable market state — the seed vocabulary plus the venue mirror the
|
|
@@ -186,6 +201,14 @@ declare class ChartCell {
|
|
|
186
201
|
private indicatorValuesOn;
|
|
187
202
|
private destroyed;
|
|
188
203
|
constructor(id: string, gridHost: HTMLElement, seed: CellBoot, deps: CellDeps);
|
|
204
|
+
/**
|
|
205
|
+
* Project a market identity into the cell state and its display overlays (watermark,
|
|
206
|
+
* statusline), WITHOUT the data-dependent bookkeeping. Runs twice per user pick: once
|
|
207
|
+
* optimistically from the cell setters — the labels reflect the pick immediately, not
|
|
208
|
+
* after the bars load — and again from `market:changed` (the committed pass, and the
|
|
209
|
+
* only pass for host `chart.setMarket` calls). Idempotent, so the double run converges.
|
|
210
|
+
*/
|
|
211
|
+
private projectMarket;
|
|
189
212
|
/**
|
|
190
213
|
* Does this cell's market HAVE sessions (RTH/ETH meaningful)? Derived from the
|
|
191
214
|
* symbol's own metadata (`syminfo.session !== '24x7'`), asynchronously — the
|
|
@@ -236,7 +259,9 @@ declare class ChartCell {
|
|
|
236
259
|
get priceStyle(): string;
|
|
237
260
|
/** Manifest instances + present natives — the topbar indicator count. */
|
|
238
261
|
get indicatorCount(): number;
|
|
239
|
-
/** Switch this cell's market in place (the chart instance survives).
|
|
262
|
+
/** Switch this cell's market in place (the chart instance survives). The projection
|
|
263
|
+
* is OPTIMISTIC — labels and chrome show the pick before the bars load; it follows
|
|
264
|
+
* the setMarket call so the statusline reads the already-blanked chart. */
|
|
240
265
|
setSymbol(symbol: string): void;
|
|
241
266
|
setTimeframe(timeframe: string): void;
|
|
242
267
|
/** Applied live (renderer feature) — no reload. */
|
|
@@ -256,6 +281,13 @@ declare class ChartCell {
|
|
|
256
281
|
* needs, and keep it framed (re-asserted once the deeper history is painted).
|
|
257
282
|
*/
|
|
258
283
|
applyRange(preset: RangePreset): void;
|
|
284
|
+
/** Reset this cell's view: re-enable auto scale and frame the full history —
|
|
285
|
+
* the same action the chart context menu offers. */
|
|
286
|
+
resetView(): void;
|
|
287
|
+
/** Rebuild the view-controls cluster (the maximize gate or state changed). */
|
|
288
|
+
refreshControls(): void;
|
|
289
|
+
/** Mobile flips the per-cell cluster off (the shell's mobile bar replaces it). */
|
|
290
|
+
setControlsSuspended(on: boolean): void;
|
|
259
291
|
/** Make this cell the active one and put keyboard focus on its chart surface. */
|
|
260
292
|
focus(): void;
|
|
261
293
|
/** Download this cell's chart as a PNG (named after its market). */
|
|
@@ -508,6 +540,10 @@ interface WorkspaceEventMap extends Record<string, unknown> {
|
|
|
508
540
|
'layout:changed': {
|
|
509
541
|
layout: string;
|
|
510
542
|
};
|
|
543
|
+
/** A cell was maximized over the whole grid, or the grid restored (`id: null`). */
|
|
544
|
+
'cell:maximized': {
|
|
545
|
+
id: string | null;
|
|
546
|
+
};
|
|
511
547
|
'cell:created': {
|
|
512
548
|
id: string;
|
|
513
549
|
};
|
|
@@ -537,6 +573,9 @@ declare class VelaWorkspace {
|
|
|
537
573
|
* slots beyond the list get auto identities. Grows, never reorders. */
|
|
538
574
|
private order;
|
|
539
575
|
private activeId;
|
|
576
|
+
/** The cell maximized over the whole grid (null = normal grid). TRANSIENT view
|
|
577
|
+
* state — never persisted; any structural change (layout, applyState) restores. */
|
|
578
|
+
private maximizedId;
|
|
540
579
|
private cellBackend;
|
|
541
580
|
/** `layout: false` — the grid is pinned to the one-cell layout, the layout picker
|
|
542
581
|
* and sync switches never render, and `setLayout` no-ops. */
|
|
@@ -704,6 +743,32 @@ declare class VelaWorkspace {
|
|
|
704
743
|
* the pool so the backend stays uniform.
|
|
705
744
|
*/
|
|
706
745
|
setLayout(layout: string | LayoutDefinition): void;
|
|
746
|
+
/** The identity of the cell maximized over the whole grid, or null. */
|
|
747
|
+
get maximizedCell(): string | null;
|
|
748
|
+
/**
|
|
749
|
+
* Maximize one cell over the whole grid, or restore the layout with `null`. Pure
|
|
750
|
+
* presentation: the other cells stay alive underneath — charts, subscriptions and
|
|
751
|
+
* state untouched — so restoring is instant. The maximized cell becomes the active
|
|
752
|
+
* one. Transient view state (also reachable from each cell's bottom-center view
|
|
753
|
+
* cluster): switching layouts or applying a state document restores the grid.
|
|
754
|
+
*/
|
|
755
|
+
maximizeCell(id: string | null): void;
|
|
756
|
+
/** The mobile bar's maximize stop: one press isolates the ACTIVE chart over the
|
|
757
|
+
* grid; while something is already isolated — the chart, or a pane inside it
|
|
758
|
+
* (mobile's double-tap) — the press restores that instead. Every branch re-syncs
|
|
759
|
+
* the stop on its own (`maximizeCell` directly, `panes.maximize` via its
|
|
760
|
+
* synchronous `pane:changed`). */
|
|
761
|
+
private toggleMobileMaximize;
|
|
762
|
+
/** Keep the mobile bar's maximize stop truthful: lit (inverse chip, restore
|
|
763
|
+
* glyph) while the active chart covers the grid OR one of its panes is
|
|
764
|
+
* maximized — the state a double-tap toggles is otherwise invisible on mobile. */
|
|
765
|
+
private syncMobileMaximize;
|
|
766
|
+
/**
|
|
767
|
+
* Trade the SLOTS of two live cells — the grid arrangement changes, the cells
|
|
768
|
+
* themselves (charts, indicators, drawings, the active flag) stay untouched.
|
|
769
|
+
* What each cell's drag handle commits; also callable directly by hosts.
|
|
770
|
+
*/
|
|
771
|
+
swapCells(a: string, b: string): void;
|
|
707
772
|
resize(): void;
|
|
708
773
|
/** Show a toast over the grid — the same surface the shell's own notices use
|
|
709
774
|
* (alerts, script errors) and the one contributions reach via `ctx.toast`. */
|
|
@@ -728,6 +793,35 @@ declare class VelaWorkspace {
|
|
|
728
793
|
* Geometry is keyed by SLOT (`perCell[slot.id]`); the cell living there is
|
|
729
794
|
* `order[i]` — the identity/position decoupling in one line. */
|
|
730
795
|
private applyGrid;
|
|
796
|
+
/** Overlay the maximize presentation on the freshly applied grid: EVERY cell spans
|
|
797
|
+
* the full track grid — the maximized one on top, the siblings invisible beneath
|
|
798
|
+
* it (their charts stay alive — restoring is instant). The siblings must span too:
|
|
799
|
+
* left in their slots they would auto-flow into implicit zero-height rows, whose
|
|
800
|
+
* gaps steal height from the maximized cell and collapse their renderers to 0.
|
|
801
|
+
* The splitter strips and the active ring hide via the `data-maximized` rules. */
|
|
802
|
+
private applyMaximizePresentation;
|
|
803
|
+
/** Rebuild every cell's view cluster (the maximize gate or state changed). */
|
|
804
|
+
private refreshCellControls;
|
|
805
|
+
/** Drop the transient maximize on a structural change (layout switch, state
|
|
806
|
+
* document) — WITH the event, so hosts tracking `cell:maximized` never drift
|
|
807
|
+
* from `maximizedCell`. The caller's own grid re-apply paints the restore. */
|
|
808
|
+
private clearMaximized;
|
|
809
|
+
/** The live cell under a viewport point, excluding `excludeId` and any host a
|
|
810
|
+
* maximize has hidden — the drag handle's hit-test. */
|
|
811
|
+
private cellAtPoint;
|
|
812
|
+
/** Mark one cell as the live drop target of a grip drag (null clears all) —
|
|
813
|
+
* the `data-drop-target` stylesheet rule paints the dashed preview ring. */
|
|
814
|
+
private setDropTarget;
|
|
815
|
+
/** The cell whose bottom-left corner the grid's attribution mark floats in — the
|
|
816
|
+
* maximized cell while one covers the grid, else the bottom-left slot's cell. */
|
|
817
|
+
private bottomLeftCell;
|
|
818
|
+
/** Keep the shared attribution mark inside the BOTTOM-LEFT visible cell: its
|
|
819
|
+
* offsets ride that cell's renderer-published `--vela-bottom-gutter` /
|
|
820
|
+
* `--vela-toolbar-gutter`, so collapsed pane strips push the mark up without any
|
|
821
|
+
* bookkeeping here. Re-run after anything that changes which host that is
|
|
822
|
+
* (layout switch, maximize, cell rebuild); a destroyed host drops the mark from
|
|
823
|
+
* the DOM, and this re-mount brings it back. */
|
|
824
|
+
private mountAttributionMark;
|
|
731
825
|
/** Create the cells the current layout wants but don't exist yet (pool-first).
|
|
732
826
|
* A slot's CELL IDENTITY is `order[i]` (declaration order — never the slot's own
|
|
733
827
|
* positional id); slots past the declared list mint an auto identity once. */
|
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-NMTQXNT4.js';
|
|
2
|
+
import './chunk-FFOP37FQ.js';
|
|
3
|
+
import './chunk-4KZVZ7QQ.js';
|
|
4
|
+
import './chunk-G77Y7LK2.js';
|
|
5
|
+
import './chunk-MHY7MVXH.js';
|
|
6
|
+
import './chunk-KG4YT3TI.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.10",
|
|
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",
|