@luxalgo/vela 0.8.0 → 0.8.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.
Files changed (49) hide show
  1. package/NOTICE +1 -1
  2. package/README.md +16 -8
  3. package/dist/{DataProvider-BrlxntPN.d.cts → DataProvider-COGDs9Xg.d.cts} +1 -1
  4. package/dist/{DataProvider-DwFIoV4r.d.ts → DataProvider-DpOWZD8F.d.ts} +1 -1
  5. package/dist/{chunk-KA77UTRF.js → chunk-27UTYE7T.js} +25 -2
  6. package/dist/{chunk-EZ5FWVLA.js → chunk-DPAA3SRT.js} +94 -13
  7. package/dist/{chunk-BZQM2XO7.js → chunk-HKNO24GD.js} +13 -1
  8. package/dist/{chunk-2IAETM2I.js → chunk-NLDTVFOI.js} +79 -6
  9. package/dist/{chunk-E3GU6AUI.js → chunk-R2JMNIHY.js} +68 -23
  10. package/dist/{chunk-QBPUT5SU.js → chunk-T3DZIR5Y.js} +211 -54
  11. package/dist/{contributions-tjNExo1o.d.ts → contributions-Cgm9RJYP.d.cts} +38 -11
  12. package/dist/{contributions-CtlptxR8.d.cts → contributions-bWgwyiVi.d.ts} +38 -11
  13. package/dist/index.cjs +317 -62
  14. package/dist/index.d.cts +8 -8
  15. package/dist/index.d.ts +8 -8
  16. package/dist/index.js +4 -4
  17. package/dist/{options-BnEPUuVV.d.ts → options-NAUHiQEC.d.cts} +3 -3
  18. package/dist/{options-BnEPUuVV.d.cts → options-NAUHiQEC.d.ts} +3 -3
  19. package/dist/{plugin-BWxJRKzS.d.cts → plugin-CjjzZX2F.d.cts} +4 -4
  20. package/dist/{plugin-e2WUEtiI.d.ts → plugin-CqxWoDKS.d.ts} +4 -4
  21. package/dist/plugin.cjs +20 -6
  22. package/dist/plugin.d.cts +5 -5
  23. package/dist/plugin.d.ts +5 -5
  24. package/dist/plugin.js +2 -2
  25. package/dist/providers/binance.d.cts +2 -2
  26. package/dist/providers/binance.d.ts +2 -2
  27. package/dist/providers/coinbase.d.cts +2 -2
  28. package/dist/providers/coinbase.d.ts +2 -2
  29. package/dist/providers/hyperliquid.d.cts +2 -2
  30. package/dist/providers/hyperliquid.d.ts +2 -2
  31. package/dist/{side-panel-HF0IAzwf.d.cts → side-panel-wMNfgyZb.d.cts} +13 -0
  32. package/dist/{side-panel-HF0IAzwf.d.ts → side-panel-wMNfgyZb.d.ts} +13 -0
  33. package/dist/{statusline-model-zKXtGIjj.d.ts → statusline-model-Dih6FGWP.d.ts} +3 -3
  34. package/dist/{statusline-model-DFY7tuHj.d.cts → statusline-model-Dpfpq54A.d.cts} +3 -3
  35. package/dist/ui.cjs +115 -5
  36. package/dist/ui.d.cts +28 -2
  37. package/dist/ui.d.ts +28 -2
  38. package/dist/ui.js +3 -3
  39. package/dist/vela.global.js +317 -62
  40. package/dist/vela.global.min.js +61 -68
  41. package/dist/widget.cjs +476 -85
  42. package/dist/widget.d.cts +20 -10
  43. package/dist/widget.d.ts +20 -10
  44. package/dist/widget.js +7 -7
  45. package/dist/workspace.cjs +476 -85
  46. package/dist/workspace.d.cts +6 -6
  47. package/dist/workspace.d.ts +6 -6
  48. package/dist/workspace.js +6 -6
  49. package/package.json +3 -3
package/dist/widget.d.cts CHANGED
@@ -1,12 +1,12 @@
1
- import { V as Vela, W as WidgetContext, $ as SidePanelButton } from './contributions-CtlptxR8.cjs';
2
- export { C as CellStateContext, aH as DEFAULT_PANEL_ORDER, E as ExternalIndicatorEntry, O as OVERRIDABLE_TOPBAR_IDS, a0 as SidePanelDescriptor, a1 as SidePanelHandle, a3 as StatePersistenceHandler, a7 as SymbolRankingHook, ab as WidgetActionDescriptor, ac as WidgetActionTarget, ad as WidgetAttachment, an as registerSidePanel, ao as registerStatePersistence, ap as registerSymbolRanking, aq as registerWidgetAction, ar as registerWidgetAttachment, at as sidePanels, au as statePersistenceHandlers, av as symbolRanking, aw as topbarActionOverride, aB as unregisterSidePanel, aC as unregisterStatePersistence, aD as unregisterWidgetAction, aE as unregisterWidgetAttachment, aF as widgetActions, aG as widgetAttachments } from './contributions-CtlptxR8.cjs';
3
- import { b as VelaOptions, d as MarketSession, T as ThemeName, c as VelaTheme, v as DataWindowReadout } from './options-BnEPUuVV.cjs';
4
- import { c as VelaShellOptions, W as WidgetHistory, b as RangePreset, f as WorkspaceState, j as TopbarComposition, a as StatuslinePart, P as PanelsState } from './statusline-model-DFY7tuHj.cjs';
5
- export { B as Bottombar, k as BottombarOptions, C as CellState, g as ChartState, I as IndicatorLoader, l as IndicatorManifest, m as IndicatorManifestEntry, n as RANGE_PRESETS, R as ResolvedIndicator, o as ResolvedTopbarComposition, p as TOPBAR_BUILTIN_IDS, q as TOPBAR_DEFAULT_LEFT, r as TOPBAR_DEFAULT_RIGHT, V as VelaStorage, t as WidgetStorage, h as decodeState, i as encodeState, u as localStorageAdapter, v as pinnedTopbarActionIds, w as resolveIndicators, x as resolveTopbarComposition, s as sanitizeState, y as topbarHas } from './statusline-model-DFY7tuHj.cjs';
1
+ import { V as Vela, W as WidgetContext, a0 as SidePanelButton } from './contributions-Cgm9RJYP.cjs';
2
+ export { C as CellStateContext, aI as DEFAULT_PANEL_ORDER, E as ExternalIndicatorEntry, O as OVERRIDABLE_TOPBAR_IDS, a1 as SidePanelDescriptor, a2 as SidePanelHandle, a4 as StatePersistenceHandler, a8 as SymbolRankingHook, ac as WidgetActionDescriptor, ad as WidgetActionTarget, ae as WidgetAttachment, ao as registerSidePanel, ap as registerStatePersistence, aq as registerSymbolRanking, ar as registerWidgetAction, as as registerWidgetAttachment, au as sidePanels, av as statePersistenceHandlers, aw as symbolRanking, ax as topbarActionOverride, aC as unregisterSidePanel, aD as unregisterStatePersistence, aE as unregisterWidgetAction, aF as unregisterWidgetAttachment, aG as widgetActions, aH as widgetAttachments } from './contributions-Cgm9RJYP.cjs';
3
+ import { b as VelaOptions, d as MarketSession, T as ThemeName, c as VelaTheme, v as DataWindowReadout } from './options-NAUHiQEC.cjs';
4
+ import { c as VelaShellOptions, W as WidgetHistory, b as RangePreset, f as WorkspaceState, j as TopbarComposition, a as StatuslinePart, P as PanelsState } from './statusline-model-Dpfpq54A.cjs';
5
+ export { B as Bottombar, k as BottombarOptions, C as CellState, g as ChartState, I as IndicatorLoader, l as IndicatorManifest, m as IndicatorManifestEntry, n as RANGE_PRESETS, R as ResolvedIndicator, o as ResolvedTopbarComposition, p as TOPBAR_BUILTIN_IDS, q as TOPBAR_DEFAULT_LEFT, r as TOPBAR_DEFAULT_RIGHT, V as VelaStorage, t as WidgetStorage, h as decodeState, i as encodeState, u as localStorageAdapter, v as pinnedTopbarActionIds, w as resolveIndicators, x as resolveTopbarComposition, s as sanitizeState, y as topbarHas } from './statusline-model-Dpfpq54A.cjs';
6
6
  import { K as KeymapManager } from './keymap-CGOz5F5f.cjs';
7
- import { a as SymbolDescriptor } from './DataProvider-BrlxntPN.cjs';
8
- import { d as SidePanel } from './side-panel-HF0IAzwf.cjs';
9
- export { D as DEFAULT_PANEL_MAX_WIDTH, a as DEFAULT_PANEL_MIN_WIDTH, b as DEFAULT_PANEL_WIDTH, S as SidePanelOptions, c as clampPanelWidth } from './side-panel-HF0IAzwf.cjs';
7
+ import { a as SymbolDescriptor } from './DataProvider-COGDs9Xg.cjs';
8
+ import { d as SidePanel } from './side-panel-wMNfgyZb.cjs';
9
+ export { D as DEFAULT_PANEL_MAX_WIDTH, a as DEFAULT_PANEL_MIN_WIDTH, b as DEFAULT_PANEL_WIDTH, S as SidePanelOptions, c as clampPanelWidth } from './side-panel-wMNfgyZb.cjs';
10
10
 
11
11
  interface VelaWidgetOptions extends VelaOptions, VelaShellOptions {
12
12
  /** @deprecated No longer supported — the option is ignored (a console warning
@@ -264,6 +264,10 @@ declare class Statusline {
264
264
  private readonly valuesRow;
265
265
  /** The ladder rung currently applied — see {@link fit}. */
266
266
  private layout;
267
+ /** The readout {@link widthKey} the applied rung was fitted to. */
268
+ private fitKey;
269
+ /** Web fonts landing after the last fit change every width without a resize. */
270
+ private readonly onFontsLoaded;
267
271
  constructor(host: HTMLElement, symbol: string,
268
272
  /** The avatar's icon URL for a raw symbol — the shell routes it to the owning
269
273
  * provider's `resolveSymbolIcon`. Absent ⇒ the initials badge. */
@@ -330,6 +334,12 @@ declare class Statusline {
330
334
  destroy(): void;
331
335
  private detach;
332
336
  private render;
337
+ /** Everything the readout's width depends on, at every rung: its shape, and each
338
+ * value's sign, digit count and decimals (the digits themselves are tabular — see
339
+ * the CSS; the grouping commas follow from the digit count). `toFixed` carries all
340
+ * three at a fraction of the locale formatter's cost — this runs per pointer move.
341
+ * The parts, the host's size and the fonts re-fit through their own paths. */
342
+ private widthKey;
333
343
  /** Write the value readout for the current bar at the current ladder level. */
334
344
  private renderValues;
335
345
  }
@@ -526,8 +536,8 @@ declare class PanelDock {
526
536
  /**
527
537
  * (Re)build the CONTRIBUTED panels from the registry — call once after the built-ins, and
528
538
  * again on `refreshActions()` so a late registration appears. Contributed panels that are
529
- * gone from the registry are dropped; the ones still there are rebuilt, so a replaced
530
- * descriptor takes effect.
539
+ * gone from the registry are dropped and a REPLACED descriptor is rebuilt; a panel whose
540
+ * descriptor is unchanged stays mounted as it is, so its content and state survive.
531
541
  */
532
542
  refresh(): void;
533
543
  /** Bind (or rebind) every docked panel to a chart instance. */
package/dist/widget.d.ts CHANGED
@@ -1,12 +1,12 @@
1
- import { V as Vela, W as WidgetContext, $ as SidePanelButton } from './contributions-tjNExo1o.js';
2
- export { C as CellStateContext, aH as DEFAULT_PANEL_ORDER, E as ExternalIndicatorEntry, O as OVERRIDABLE_TOPBAR_IDS, a0 as SidePanelDescriptor, a1 as SidePanelHandle, a3 as StatePersistenceHandler, a7 as SymbolRankingHook, ab as WidgetActionDescriptor, ac as WidgetActionTarget, ad as WidgetAttachment, an as registerSidePanel, ao as registerStatePersistence, ap as registerSymbolRanking, aq as registerWidgetAction, ar as registerWidgetAttachment, at as sidePanels, au as statePersistenceHandlers, av as symbolRanking, aw as topbarActionOverride, aB as unregisterSidePanel, aC as unregisterStatePersistence, aD as unregisterWidgetAction, aE as unregisterWidgetAttachment, aF as widgetActions, aG as widgetAttachments } from './contributions-tjNExo1o.js';
3
- import { b as VelaOptions, d as MarketSession, T as ThemeName, c as VelaTheme, v as DataWindowReadout } from './options-BnEPUuVV.js';
4
- import { c as VelaShellOptions, W as WidgetHistory, b as RangePreset, f as WorkspaceState, j as TopbarComposition, a as StatuslinePart, P as PanelsState } from './statusline-model-zKXtGIjj.js';
5
- export { B as Bottombar, k as BottombarOptions, C as CellState, g as ChartState, I as IndicatorLoader, l as IndicatorManifest, m as IndicatorManifestEntry, n as RANGE_PRESETS, R as ResolvedIndicator, o as ResolvedTopbarComposition, p as TOPBAR_BUILTIN_IDS, q as TOPBAR_DEFAULT_LEFT, r as TOPBAR_DEFAULT_RIGHT, V as VelaStorage, t as WidgetStorage, h as decodeState, i as encodeState, u as localStorageAdapter, v as pinnedTopbarActionIds, w as resolveIndicators, x as resolveTopbarComposition, s as sanitizeState, y as topbarHas } from './statusline-model-zKXtGIjj.js';
1
+ import { V as Vela, W as WidgetContext, a0 as SidePanelButton } from './contributions-bWgwyiVi.js';
2
+ export { C as CellStateContext, aI as DEFAULT_PANEL_ORDER, E as ExternalIndicatorEntry, O as OVERRIDABLE_TOPBAR_IDS, a1 as SidePanelDescriptor, a2 as SidePanelHandle, a4 as StatePersistenceHandler, a8 as SymbolRankingHook, ac as WidgetActionDescriptor, ad as WidgetActionTarget, ae as WidgetAttachment, ao as registerSidePanel, ap as registerStatePersistence, aq as registerSymbolRanking, ar as registerWidgetAction, as as registerWidgetAttachment, au as sidePanels, av as statePersistenceHandlers, aw as symbolRanking, ax as topbarActionOverride, aC as unregisterSidePanel, aD as unregisterStatePersistence, aE as unregisterWidgetAction, aF as unregisterWidgetAttachment, aG as widgetActions, aH as widgetAttachments } from './contributions-bWgwyiVi.js';
3
+ import { b as VelaOptions, d as MarketSession, T as ThemeName, c as VelaTheme, v as DataWindowReadout } from './options-NAUHiQEC.js';
4
+ import { c as VelaShellOptions, W as WidgetHistory, b as RangePreset, f as WorkspaceState, j as TopbarComposition, a as StatuslinePart, P as PanelsState } from './statusline-model-Dih6FGWP.js';
5
+ export { B as Bottombar, k as BottombarOptions, C as CellState, g as ChartState, I as IndicatorLoader, l as IndicatorManifest, m as IndicatorManifestEntry, n as RANGE_PRESETS, R as ResolvedIndicator, o as ResolvedTopbarComposition, p as TOPBAR_BUILTIN_IDS, q as TOPBAR_DEFAULT_LEFT, r as TOPBAR_DEFAULT_RIGHT, V as VelaStorage, t as WidgetStorage, h as decodeState, i as encodeState, u as localStorageAdapter, v as pinnedTopbarActionIds, w as resolveIndicators, x as resolveTopbarComposition, s as sanitizeState, y as topbarHas } from './statusline-model-Dih6FGWP.js';
6
6
  import { K as KeymapManager } from './keymap-CGOz5F5f.js';
7
- import { a as SymbolDescriptor } from './DataProvider-DwFIoV4r.js';
8
- import { d as SidePanel } from './side-panel-HF0IAzwf.js';
9
- export { D as DEFAULT_PANEL_MAX_WIDTH, a as DEFAULT_PANEL_MIN_WIDTH, b as DEFAULT_PANEL_WIDTH, S as SidePanelOptions, c as clampPanelWidth } from './side-panel-HF0IAzwf.js';
7
+ import { a as SymbolDescriptor } from './DataProvider-DpOWZD8F.js';
8
+ import { d as SidePanel } from './side-panel-wMNfgyZb.js';
9
+ export { D as DEFAULT_PANEL_MAX_WIDTH, a as DEFAULT_PANEL_MIN_WIDTH, b as DEFAULT_PANEL_WIDTH, S as SidePanelOptions, c as clampPanelWidth } from './side-panel-wMNfgyZb.js';
10
10
 
11
11
  interface VelaWidgetOptions extends VelaOptions, VelaShellOptions {
12
12
  /** @deprecated No longer supported — the option is ignored (a console warning
@@ -264,6 +264,10 @@ declare class Statusline {
264
264
  private readonly valuesRow;
265
265
  /** The ladder rung currently applied — see {@link fit}. */
266
266
  private layout;
267
+ /** The readout {@link widthKey} the applied rung was fitted to. */
268
+ private fitKey;
269
+ /** Web fonts landing after the last fit change every width without a resize. */
270
+ private readonly onFontsLoaded;
267
271
  constructor(host: HTMLElement, symbol: string,
268
272
  /** The avatar's icon URL for a raw symbol — the shell routes it to the owning
269
273
  * provider's `resolveSymbolIcon`. Absent ⇒ the initials badge. */
@@ -330,6 +334,12 @@ declare class Statusline {
330
334
  destroy(): void;
331
335
  private detach;
332
336
  private render;
337
+ /** Everything the readout's width depends on, at every rung: its shape, and each
338
+ * value's sign, digit count and decimals (the digits themselves are tabular — see
339
+ * the CSS; the grouping commas follow from the digit count). `toFixed` carries all
340
+ * three at a fraction of the locale formatter's cost — this runs per pointer move.
341
+ * The parts, the host's size and the fonts re-fit through their own paths. */
342
+ private widthKey;
333
343
  /** Write the value readout for the current bar at the current ladder level. */
334
344
  private renderValues;
335
345
  }
@@ -526,8 +536,8 @@ declare class PanelDock {
526
536
  /**
527
537
  * (Re)build the CONTRIBUTED panels from the registry — call once after the built-ins, and
528
538
  * again on `refreshActions()` so a late registration appears. Contributed panels that are
529
- * gone from the registry are dropped; the ones still there are rebuilt, so a replaced
530
- * descriptor takes effect.
539
+ * gone from the registry are dropped and a REPLACED descriptor is rebuilt; a panel whose
540
+ * descriptor is unchanged stays mounted as it is, so its content and state survive.
531
541
  */
532
542
  refresh(): void;
533
543
  /** Bind (or rebind) every docked panel to a chart instance. */
package/dist/widget.js CHANGED
@@ -1,10 +1,10 @@
1
- import { VelaWorkspace } from './chunk-E3GU6AUI.js';
2
- export { Bottombar, ChartContextMenu, DataWindow, IndicatorPicker, ObjectTree, PanelDock, RANGE_PRESETS, ShortcutsHelp, Statusline, SymbolPicker, TimeframeQuick, Topbar, Watermark, dataWindowSections, decimalsFor, decodeState, encodeState, filterSymbols, fmtChange, fmtPrice, localStorageAdapter, parseTimeframe, priceStyleLabel, resolveIndicators, sanitizeState, timeframeLabel, timeframeMs } from './chunk-E3GU6AUI.js';
3
- export { TIMEZONES, normalizeTimezone, tzButtonLabel, tzMenuLabel, tzOffset } from './chunk-QBPUT5SU.js';
4
- export { DEFAULT_PANEL_MAX_WIDTH, DEFAULT_PANEL_MIN_WIDTH, DEFAULT_PANEL_ORDER, DEFAULT_PANEL_WIDTH, OVERRIDABLE_TOPBAR_IDS, SidePanel, TOPBAR_BUILTIN_IDS, TOPBAR_DEFAULT_LEFT, TOPBAR_DEFAULT_RIGHT, clampPanelWidth, pinnedTopbarActionIds, registerSidePanel, registerStatePersistence, registerSymbolRanking, registerWidgetAction, registerWidgetAttachment, resolveTopbarComposition, sidePanels, statePersistenceHandlers, symbolRanking, topbarActionOverride, topbarHas, unregisterSidePanel, unregisterStatePersistence, unregisterWidgetAction, unregisterWidgetAttachment, widgetActions, widgetAttachments } from './chunk-EZ5FWVLA.js';
5
- import './chunk-KA77UTRF.js';
6
- import './chunk-2IAETM2I.js';
7
- import './chunk-BZQM2XO7.js';
1
+ import { VelaWorkspace } from './chunk-R2JMNIHY.js';
2
+ export { Bottombar, ChartContextMenu, DataWindow, IndicatorPicker, ObjectTree, PanelDock, RANGE_PRESETS, ShortcutsHelp, Statusline, SymbolPicker, TimeframeQuick, Topbar, Watermark, dataWindowSections, decimalsFor, decodeState, encodeState, filterSymbols, fmtChange, fmtPrice, localStorageAdapter, parseTimeframe, priceStyleLabel, resolveIndicators, sanitizeState, timeframeLabel, timeframeMs } from './chunk-R2JMNIHY.js';
3
+ export { TIMEZONES, normalizeTimezone, tzButtonLabel, tzMenuLabel, tzOffset } from './chunk-T3DZIR5Y.js';
4
+ export { DEFAULT_PANEL_MAX_WIDTH, DEFAULT_PANEL_MIN_WIDTH, DEFAULT_PANEL_ORDER, DEFAULT_PANEL_WIDTH, OVERRIDABLE_TOPBAR_IDS, SidePanel, TOPBAR_BUILTIN_IDS, TOPBAR_DEFAULT_LEFT, TOPBAR_DEFAULT_RIGHT, clampPanelWidth, pinnedTopbarActionIds, registerSidePanel, registerStatePersistence, registerSymbolRanking, registerWidgetAction, registerWidgetAttachment, resolveTopbarComposition, sidePanels, statePersistenceHandlers, symbolRanking, topbarActionOverride, topbarHas, unregisterSidePanel, unregisterStatePersistence, unregisterWidgetAction, unregisterWidgetAttachment, widgetActions, widgetAttachments } from './chunk-DPAA3SRT.js';
5
+ import './chunk-27UTYE7T.js';
6
+ import './chunk-NLDTVFOI.js';
7
+ import './chunk-HKNO24GD.js';
8
8
  import './chunk-W4EJWLEO.js';
9
9
 
10
10
  // src/widget/VelaWidget.ts