@luxalgo/vela 0.7.8 → 0.8.0

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 (46) hide show
  1. package/NOTICE +28 -28
  2. package/dist/{DataProvider-CGa4KHRa.d.cts → DataProvider-BrlxntPN.d.cts} +1 -1
  3. package/dist/{DataProvider-CmWUtDVL.d.ts → DataProvider-DwFIoV4r.d.ts} +1 -1
  4. package/dist/{chunk-WTWGEB7K.js → chunk-2IAETM2I.js} +260 -2
  5. package/dist/{chunk-CAFCLMPF.js → chunk-BZQM2XO7.js} +1 -0
  6. package/dist/{chunk-M6GP7DAX.js → chunk-E3GU6AUI.js} +459 -37
  7. package/dist/{chunk-BFA32GOU.js → chunk-EZ5FWVLA.js} +5 -2
  8. package/dist/{chunk-PVGWNF7V.js → chunk-KA77UTRF.js} +2 -2
  9. package/dist/{chunk-N4ZZYLMP.js → chunk-QBPUT5SU.js} +686 -251
  10. package/dist/{contributions-DF_Ea07m.d.cts → contributions-CtlptxR8.d.cts} +187 -5
  11. package/dist/{contributions-nKOSeLy8.d.ts → contributions-tjNExo1o.d.ts} +187 -5
  12. package/dist/index.cjs +966 -247
  13. package/dist/index.d.cts +24 -8
  14. package/dist/index.d.ts +24 -8
  15. package/dist/index.js +28 -4
  16. package/dist/{options-D1AJKsn_.d.ts → options-BnEPUuVV.d.cts} +1 -1
  17. package/dist/{options-D1AJKsn_.d.cts → options-BnEPUuVV.d.ts} +1 -1
  18. package/dist/{plugin-6F04gjQe.d.cts → plugin-BWxJRKzS.d.cts} +10 -4
  19. package/dist/{plugin-BLsNipkc.d.ts → plugin-e2WUEtiI.d.ts} +10 -4
  20. package/dist/plugin.cjs +1 -0
  21. package/dist/plugin.d.cts +4 -4
  22. package/dist/plugin.d.ts +4 -4
  23. package/dist/plugin.js +2 -2
  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/{statusline-model-DAFyqVmR.d.ts → statusline-model-DFY7tuHj.d.cts} +5 -3
  31. package/dist/{statusline-model-BoWJ3cWQ.d.cts → statusline-model-zKXtGIjj.d.ts} +5 -3
  32. package/dist/ui.cjs +263 -0
  33. package/dist/ui.d.cts +75 -2
  34. package/dist/ui.d.ts +75 -2
  35. package/dist/ui.js +3 -3
  36. package/dist/vela.global.js +968 -249
  37. package/dist/vela.global.min.js +73 -71
  38. package/dist/widget.cjs +1411 -292
  39. package/dist/widget.d.cts +26 -7
  40. package/dist/widget.d.ts +26 -7
  41. package/dist/widget.js +7 -7
  42. package/dist/workspace.cjs +1414 -292
  43. package/dist/workspace.d.cts +124 -6
  44. package/dist/workspace.d.ts +124 -6
  45. package/dist/workspace.js +6 -6
  46. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
- import { O as OHLCV, V as VisibleRangePreset, a as VisibleRange, b as VelaOptions, I as InputValue, c as VelaTheme, N as NativeBackend, d as MarketSession } from './options-D1AJKsn_.cjs';
2
- import { S as SyncSetting, V as VelaStorage, C as CellState, W as WidgetHistory, R as ResolvedIndicator, a as StatuslinePart, b as RangePreset, T as TrackSizes, c as VelaShellOptions, d as SyncOptions, e as SyncKind, f as WorkspaceState } from './statusline-model-BoWJ3cWQ.cjs';
3
- export { g as ChartState, P as PanelsState, h as decodeState, i as encodeState, s as sanitizeState } from './statusline-model-BoWJ3cWQ.cjs';
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';
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-DF_Ea07m.cjs';
6
- import { M as MarketDataFeed } from './DataProvider-CGa4KHRa.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';
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[];
@@ -215,6 +215,7 @@ declare class ChartCell {
215
215
  * verbatim, so a document never loses a plugin's state in the plugin's absence. */
216
216
  private extState;
217
217
  private watermarkOn;
218
+ private replayWatermarkOn;
218
219
  /** Indicator titles (this cell's in-chart legend rows) shown. */
219
220
  private indicatorTitlesOn;
220
221
  /** Plot values beside this cell's legend titles shown. */
@@ -276,6 +277,8 @@ declare class ChartCell {
276
277
  private pushSettingsSections;
277
278
  /** Show/hide this cell's symbol watermark (persisted per cell). */
278
279
  setWatermarkVisible(visible: boolean): void;
280
+ /** Show/hide the "Replay" line under this cell's watermark while it replays (persisted per cell). */
281
+ setReplayWatermarkVisible(visible: boolean): void;
279
282
  /** Show/hide this cell's indicator titles — the in-chart legend rows (persisted per cell). */
280
283
  setIndicatorTitlesVisible(visible: boolean): void;
281
284
  /** Show/hide the plot values beside this cell's legend titles (persisted per cell). */
@@ -448,6 +451,113 @@ declare class ChartCell {
448
451
  destroy(): void;
449
452
  }
450
453
 
454
+ /** The workspace replay's events — the chart `replay:*` events, reported for the ACTIVE cell. */
455
+ interface WorkspaceReplayEventMap extends Record<string, unknown> {
456
+ 'replay:start': VelaEventMap['replay:start'];
457
+ 'replay:step': VelaEventMap['replay:step'];
458
+ 'replay:tick': VelaEventMap['replay:tick'];
459
+ 'replay:play': VelaEventMap['replay:play'];
460
+ 'replay:pause': undefined;
461
+ 'replay:end': VelaEventMap['replay:end'];
462
+ }
463
+ /** Options for {@link WorkspaceReplay.start}. */
464
+ interface WorkspaceReplayStartOptions {
465
+ /** Epoch ms, read on `cell`'s chart as `chart.replay.start({ from })` reads it: that chart
466
+ * keeps every bar opened at or before it. The close of its last kept bar becomes the
467
+ * shared replay time, and every other chart keeps the bars closed by then. */
468
+ from: number;
469
+ /** The cell `from` is read on (default: the active cell). */
470
+ cell?: string;
471
+ }
472
+ /** What the controller reads from its workspace. */
473
+ interface WorkspaceReplayHost {
474
+ cells(): ReadonlyArray<{
475
+ readonly id: string;
476
+ readonly chart: Vela;
477
+ }>;
478
+ activeId(): string | null;
479
+ onCells(handler: (e: {
480
+ kind: 'created' | 'destroyed' | 'active';
481
+ id: string;
482
+ }) => void): () => void;
483
+ }
484
+ /**
485
+ * The workspace's bar-replay control surface (`workspace.replay`, `ctx.replay` for
486
+ * contributions): the same verbs as `chart.replay`, applied to every cell on a shared
487
+ * clock. A step moves the clock to the next bar close on ANY chart, and each chart reveals
488
+ * the bars closed by then — so the finest timeframe sets the pace and a coarser chart
489
+ * shows its bar when it completes. Cells added while replaying join at the shared time; a
490
+ * cell switching symbol rejoins once its new bars load; a timeframe switch keeps the
491
+ * cell's place. The replay ends on every chart together: `stop()`, or any chart reaching
492
+ * its last bar. In a multi-chart layout bars are revealed whole (tick replay needs a
493
+ * single-chart layout).
494
+ */
495
+ declare class WorkspaceReplay {
496
+ private readonly host;
497
+ private readonly bus;
498
+ /** The running session: the shared replay time (every chart shows the bars closed by it). */
499
+ private session;
500
+ private playing;
501
+ private intervalMs;
502
+ private timer;
503
+ /** Cells whose replay a symbol switch ended — restarted at the shared time once their bars land. */
504
+ private readonly rejoining;
505
+ private readonly cellSubs;
506
+ private readonly offHost;
507
+ /** Inside a group step: chart events are the controller's own doing. */
508
+ private stepping;
509
+ /** Inside `finish`: the charts' `replay:end` events are the controller's own doing. */
510
+ private stopping;
511
+ /** Driving a chart's own timer: its play/pause events are not the user's. */
512
+ private muted;
513
+ /** A chart finished during a group step — the session ends right after it. */
514
+ private finishedDuringStep;
515
+ constructor(host: WorkspaceReplayHost);
516
+ /**
517
+ * Enter replay on every cell (or seek, when already replaying) — paused. Resolves once
518
+ * every chart shows its rewound history (a chart whose history does not reach that far
519
+ * loads older bars first). A chart with nothing to replay after the shared time stays
520
+ * as it is.
521
+ */
522
+ start(opts: WorkspaceReplayStartOptions): Promise<void>;
523
+ /** Reveal the next bar(s): the clock moves to the next bar close on any chart. Returns false when nothing is left. */
524
+ step(): boolean;
525
+ /** Reveal the next update — in a single-chart layout, the chart's `stepUpdate()` (tick replay); otherwise {@link step}. */
526
+ stepUpdate(): boolean;
527
+ /** Advance one update every `intervalMs` (default: the last pace, initially 1000). Calling it again while playing changes the pace. */
528
+ play(intervalMs?: number): this;
529
+ pause(): this;
530
+ /** Leave replay on every chart: full history back, live updates resumed. */
531
+ stop(): this;
532
+ /** `active`/`playing`/`intervalMs` for the whole workspace; the cursor fields read the ACTIVE cell's chart. */
533
+ get state(): ReplayState;
534
+ /** The active cell's replayable history (`chart.replay.bounds`). */
535
+ get bounds(): ReplayBounds | null;
536
+ on<K extends keyof WorkspaceReplayEventMap>(event: K, handler: (payload: WorkspaceReplayEventMap[K]) => void): () => void;
537
+ destroy(): void;
538
+ /** The one chart of a single-chart layout — it replays on its own, tick replay included. */
539
+ private solo;
540
+ private activeChart;
541
+ /** Rewind one chart to the shared time: every bar that closed by `clock`, none after. */
542
+ private startCell;
543
+ /** Move the clock to the next bar close on any chart; each chart reveals what closed by then. */
544
+ private stepGroup;
545
+ /** Put the timers in the state `playing` asks for: a single chart runs its own (it paces
546
+ * ticks), several run on the controller's clock. */
547
+ private syncPlayback;
548
+ private schedule;
549
+ private clearTimer;
550
+ /** End the session on every chart (idempotent). */
551
+ private finish;
552
+ private watch;
553
+ private onCellCreated;
554
+ private onCellDestroyed;
555
+ }
556
+ /** When a bar opened at `open` closes on `timeframe` — calendar months for month-based ones. */
557
+ declare function barClose(open: number, timeframe: string | undefined): number;
558
+ /** The latest open whose bar has closed by `time` on `timeframe` (the inverse of {@link barClose}). */
559
+ declare function lastOpenClosedBy(time: number, timeframe: string | undefined): number;
560
+
451
561
  /** The extended context a workspace hands to contributed actions/attachments. */
452
562
  interface WorkspaceWidgetContext extends WidgetContext {
453
563
  /** Every live cell (layout order) — id + LIVE chart + its market. A LIVE getter
@@ -461,6 +571,9 @@ interface WorkspaceWidgetContext extends WidgetContext {
461
571
  /** LIVE getter — follows every active-cell switch. */
462
572
  activeCellId: string;
463
573
  setActiveCell(id: string): void;
574
+ /** Bar replay across every cell on one clock (`workspace.replay`) — drive this rather
575
+ * than one cell's `chart.replay`, so every chart replays together. */
576
+ replay: WorkspaceReplay;
464
577
  }
465
578
 
466
579
  /** One registered workspace layout. */
@@ -621,7 +734,10 @@ declare class VelaWorkspace {
621
734
  readonly root: HTMLElement;
622
735
  /** The shortcut system — one manager for the whole workspace, routed to the active cell. */
623
736
  readonly keymap: KeymapManager;
737
+ /** Bar replay across every cell on one clock (see {@link WorkspaceReplay}). */
738
+ readonly replay: WorkspaceReplay;
624
739
  private readonly gridEl;
740
+ private readonly stripsEl;
625
741
  private readonly events;
626
742
  private readonly feed;
627
743
  private readonly cellsById;
@@ -1038,6 +1154,8 @@ declare class VelaWorkspace {
1038
1154
  private openTimeframeDrawer;
1039
1155
  private openDrawingsDrawer;
1040
1156
  private openMoreDrawer;
1157
+ /** The contributed topbar actions the mobile menu lists, from one cluster. */
1158
+ private drawerActions;
1041
1159
  private openTimezoneDrawer;
1042
1160
  private openPriceScaleDrawer;
1043
1161
  /** The aggregated alerts bell — entries carry their cell; selecting one activates it. */
@@ -1077,4 +1195,4 @@ declare function resizeTracks(weights: readonly number[], index: number, deltaPx
1077
1195
  */
1078
1196
  declare function trackOffsets(weights: readonly number[], sizePx: number, gapPx: number): number[];
1079
1197
 
1080
- 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 };
1198
+ 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, WorkspaceReplay, type WorkspaceReplayEventMap, type WorkspaceReplayHost, type WorkspaceReplayStartOptions, type WorkspaceScriptRun, WorkspaceState, type WorkspaceStorage, type WorkspaceWidgetContext, activeAfterLayout, barClose, ensureLayout, evenTracks, gridStyles, lastOpenClosedBy, layoutDefinition, layoutForGrid, layoutShape, layouts, memoryStorageAdapter, rangesWithin, registerBuiltinLayouts, registerLayout, resizeTracks, syncTargets, trackOffsets, unregisterLayout };
@@ -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-D1AJKsn_.js';
2
- import { S as SyncSetting, V as VelaStorage, C as CellState, W as WidgetHistory, R as ResolvedIndicator, a as StatuslinePart, b as RangePreset, T as TrackSizes, c as VelaShellOptions, d as SyncOptions, e as SyncKind, f as WorkspaceState } from './statusline-model-DAFyqVmR.js';
3
- export { g as ChartState, P as PanelsState, h as decodeState, i as encodeState, s as sanitizeState } from './statusline-model-DAFyqVmR.js';
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';
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-nKOSeLy8.js';
6
- import { M as MarketDataFeed } from './DataProvider-CmWUtDVL.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';
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[];
@@ -215,6 +215,7 @@ declare class ChartCell {
215
215
  * verbatim, so a document never loses a plugin's state in the plugin's absence. */
216
216
  private extState;
217
217
  private watermarkOn;
218
+ private replayWatermarkOn;
218
219
  /** Indicator titles (this cell's in-chart legend rows) shown. */
219
220
  private indicatorTitlesOn;
220
221
  /** Plot values beside this cell's legend titles shown. */
@@ -276,6 +277,8 @@ declare class ChartCell {
276
277
  private pushSettingsSections;
277
278
  /** Show/hide this cell's symbol watermark (persisted per cell). */
278
279
  setWatermarkVisible(visible: boolean): void;
280
+ /** Show/hide the "Replay" line under this cell's watermark while it replays (persisted per cell). */
281
+ setReplayWatermarkVisible(visible: boolean): void;
279
282
  /** Show/hide this cell's indicator titles — the in-chart legend rows (persisted per cell). */
280
283
  setIndicatorTitlesVisible(visible: boolean): void;
281
284
  /** Show/hide the plot values beside this cell's legend titles (persisted per cell). */
@@ -448,6 +451,113 @@ declare class ChartCell {
448
451
  destroy(): void;
449
452
  }
450
453
 
454
+ /** The workspace replay's events — the chart `replay:*` events, reported for the ACTIVE cell. */
455
+ interface WorkspaceReplayEventMap extends Record<string, unknown> {
456
+ 'replay:start': VelaEventMap['replay:start'];
457
+ 'replay:step': VelaEventMap['replay:step'];
458
+ 'replay:tick': VelaEventMap['replay:tick'];
459
+ 'replay:play': VelaEventMap['replay:play'];
460
+ 'replay:pause': undefined;
461
+ 'replay:end': VelaEventMap['replay:end'];
462
+ }
463
+ /** Options for {@link WorkspaceReplay.start}. */
464
+ interface WorkspaceReplayStartOptions {
465
+ /** Epoch ms, read on `cell`'s chart as `chart.replay.start({ from })` reads it: that chart
466
+ * keeps every bar opened at or before it. The close of its last kept bar becomes the
467
+ * shared replay time, and every other chart keeps the bars closed by then. */
468
+ from: number;
469
+ /** The cell `from` is read on (default: the active cell). */
470
+ cell?: string;
471
+ }
472
+ /** What the controller reads from its workspace. */
473
+ interface WorkspaceReplayHost {
474
+ cells(): ReadonlyArray<{
475
+ readonly id: string;
476
+ readonly chart: Vela;
477
+ }>;
478
+ activeId(): string | null;
479
+ onCells(handler: (e: {
480
+ kind: 'created' | 'destroyed' | 'active';
481
+ id: string;
482
+ }) => void): () => void;
483
+ }
484
+ /**
485
+ * The workspace's bar-replay control surface (`workspace.replay`, `ctx.replay` for
486
+ * contributions): the same verbs as `chart.replay`, applied to every cell on a shared
487
+ * clock. A step moves the clock to the next bar close on ANY chart, and each chart reveals
488
+ * the bars closed by then — so the finest timeframe sets the pace and a coarser chart
489
+ * shows its bar when it completes. Cells added while replaying join at the shared time; a
490
+ * cell switching symbol rejoins once its new bars load; a timeframe switch keeps the
491
+ * cell's place. The replay ends on every chart together: `stop()`, or any chart reaching
492
+ * its last bar. In a multi-chart layout bars are revealed whole (tick replay needs a
493
+ * single-chart layout).
494
+ */
495
+ declare class WorkspaceReplay {
496
+ private readonly host;
497
+ private readonly bus;
498
+ /** The running session: the shared replay time (every chart shows the bars closed by it). */
499
+ private session;
500
+ private playing;
501
+ private intervalMs;
502
+ private timer;
503
+ /** Cells whose replay a symbol switch ended — restarted at the shared time once their bars land. */
504
+ private readonly rejoining;
505
+ private readonly cellSubs;
506
+ private readonly offHost;
507
+ /** Inside a group step: chart events are the controller's own doing. */
508
+ private stepping;
509
+ /** Inside `finish`: the charts' `replay:end` events are the controller's own doing. */
510
+ private stopping;
511
+ /** Driving a chart's own timer: its play/pause events are not the user's. */
512
+ private muted;
513
+ /** A chart finished during a group step — the session ends right after it. */
514
+ private finishedDuringStep;
515
+ constructor(host: WorkspaceReplayHost);
516
+ /**
517
+ * Enter replay on every cell (or seek, when already replaying) — paused. Resolves once
518
+ * every chart shows its rewound history (a chart whose history does not reach that far
519
+ * loads older bars first). A chart with nothing to replay after the shared time stays
520
+ * as it is.
521
+ */
522
+ start(opts: WorkspaceReplayStartOptions): Promise<void>;
523
+ /** Reveal the next bar(s): the clock moves to the next bar close on any chart. Returns false when nothing is left. */
524
+ step(): boolean;
525
+ /** Reveal the next update — in a single-chart layout, the chart's `stepUpdate()` (tick replay); otherwise {@link step}. */
526
+ stepUpdate(): boolean;
527
+ /** Advance one update every `intervalMs` (default: the last pace, initially 1000). Calling it again while playing changes the pace. */
528
+ play(intervalMs?: number): this;
529
+ pause(): this;
530
+ /** Leave replay on every chart: full history back, live updates resumed. */
531
+ stop(): this;
532
+ /** `active`/`playing`/`intervalMs` for the whole workspace; the cursor fields read the ACTIVE cell's chart. */
533
+ get state(): ReplayState;
534
+ /** The active cell's replayable history (`chart.replay.bounds`). */
535
+ get bounds(): ReplayBounds | null;
536
+ on<K extends keyof WorkspaceReplayEventMap>(event: K, handler: (payload: WorkspaceReplayEventMap[K]) => void): () => void;
537
+ destroy(): void;
538
+ /** The one chart of a single-chart layout — it replays on its own, tick replay included. */
539
+ private solo;
540
+ private activeChart;
541
+ /** Rewind one chart to the shared time: every bar that closed by `clock`, none after. */
542
+ private startCell;
543
+ /** Move the clock to the next bar close on any chart; each chart reveals what closed by then. */
544
+ private stepGroup;
545
+ /** Put the timers in the state `playing` asks for: a single chart runs its own (it paces
546
+ * ticks), several run on the controller's clock. */
547
+ private syncPlayback;
548
+ private schedule;
549
+ private clearTimer;
550
+ /** End the session on every chart (idempotent). */
551
+ private finish;
552
+ private watch;
553
+ private onCellCreated;
554
+ private onCellDestroyed;
555
+ }
556
+ /** When a bar opened at `open` closes on `timeframe` — calendar months for month-based ones. */
557
+ declare function barClose(open: number, timeframe: string | undefined): number;
558
+ /** The latest open whose bar has closed by `time` on `timeframe` (the inverse of {@link barClose}). */
559
+ declare function lastOpenClosedBy(time: number, timeframe: string | undefined): number;
560
+
451
561
  /** The extended context a workspace hands to contributed actions/attachments. */
452
562
  interface WorkspaceWidgetContext extends WidgetContext {
453
563
  /** Every live cell (layout order) — id + LIVE chart + its market. A LIVE getter
@@ -461,6 +571,9 @@ interface WorkspaceWidgetContext extends WidgetContext {
461
571
  /** LIVE getter — follows every active-cell switch. */
462
572
  activeCellId: string;
463
573
  setActiveCell(id: string): void;
574
+ /** Bar replay across every cell on one clock (`workspace.replay`) — drive this rather
575
+ * than one cell's `chart.replay`, so every chart replays together. */
576
+ replay: WorkspaceReplay;
464
577
  }
465
578
 
466
579
  /** One registered workspace layout. */
@@ -621,7 +734,10 @@ declare class VelaWorkspace {
621
734
  readonly root: HTMLElement;
622
735
  /** The shortcut system — one manager for the whole workspace, routed to the active cell. */
623
736
  readonly keymap: KeymapManager;
737
+ /** Bar replay across every cell on one clock (see {@link WorkspaceReplay}). */
738
+ readonly replay: WorkspaceReplay;
624
739
  private readonly gridEl;
740
+ private readonly stripsEl;
625
741
  private readonly events;
626
742
  private readonly feed;
627
743
  private readonly cellsById;
@@ -1038,6 +1154,8 @@ declare class VelaWorkspace {
1038
1154
  private openTimeframeDrawer;
1039
1155
  private openDrawingsDrawer;
1040
1156
  private openMoreDrawer;
1157
+ /** The contributed topbar actions the mobile menu lists, from one cluster. */
1158
+ private drawerActions;
1041
1159
  private openTimezoneDrawer;
1042
1160
  private openPriceScaleDrawer;
1043
1161
  /** The aggregated alerts bell — entries carry their cell; selecting one activates it. */
@@ -1077,4 +1195,4 @@ declare function resizeTracks(weights: readonly number[], index: number, deltaPx
1077
1195
  */
1078
1196
  declare function trackOffsets(weights: readonly number[], sizePx: number, gapPx: number): number[];
1079
1197
 
1080
- 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 };
1198
+ 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, WorkspaceReplay, type WorkspaceReplayEventMap, type WorkspaceReplayHost, type WorkspaceReplayStartOptions, type WorkspaceScriptRun, WorkspaceState, type WorkspaceStorage, type WorkspaceWidgetContext, activeAfterLayout, barClose, ensureLayout, evenTracks, gridStyles, lastOpenClosedBy, layoutDefinition, layoutForGrid, layoutShape, layouts, memoryStorageAdapter, rangesWithin, registerBuiltinLayouts, registerLayout, resizeTracks, syncTargets, trackOffsets, unregisterLayout };
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-M6GP7DAX.js';
2
- import './chunk-N4ZZYLMP.js';
3
- import './chunk-BFA32GOU.js';
4
- import './chunk-PVGWNF7V.js';
5
- import './chunk-WTWGEB7K.js';
6
- import './chunk-CAFCLMPF.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-E3GU6AUI.js';
2
+ import './chunk-QBPUT5SU.js';
3
+ import './chunk-EZ5FWVLA.js';
4
+ import './chunk-KA77UTRF.js';
5
+ import './chunk-2IAETM2I.js';
6
+ import './chunk-BZQM2XO7.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.7.8",
3
+ "version": "0.8.0",
4
4
  "description": "Open-source charting library with a native high-performance renderer, drawing tools, pluggable chart types and pluggable scripting engines.",
5
5
  "keywords": [
6
6
  "charting library",