@luxalgo/vela 0.6.4 → 0.6.6
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/README.md +16 -16
- package/dist/{DataProvider-DrN7ZIou.d.cts → DataProvider-DDUYw2qP.d.cts} +1 -1
- package/dist/{DataProvider-BmHkcwvJ.d.ts → DataProvider-JJq7M2it.d.ts} +1 -1
- package/dist/{history-CvOtsjT5.d.ts → bottombar-COnL2Sk4.d.ts} +110 -127
- package/dist/{history-BmyjaVir.d.cts → bottombar-DeDXbF_K.d.cts} +110 -127
- package/dist/{chunk-6FA4TDUF.js → chunk-JQFO2WMU.js} +2666 -2333
- package/dist/{chunk-BEJ57HP4.js → chunk-OEUGUXL7.js} +14 -1
- package/dist/{chunk-3QX6QOCX.js → chunk-TMXK2SJR.js} +5852 -3340
- package/dist/{contributions-2bEmCF9S.d.cts → contributions-BqCIsbaP.d.ts} +108 -4
- package/dist/{contributions-DatoAzMx.d.ts → contributions-DNMqrAuw.d.cts} +108 -4
- package/dist/index.cjs +2681 -2332
- package/dist/index.d.cts +65 -14
- package/dist/index.d.ts +65 -14
- package/dist/index.js +2 -2
- package/dist/{options-YdiaaVjt.d.cts → options-BaVTMXaO.d.cts} +48 -2
- package/dist/{options-YdiaaVjt.d.ts → options-BaVTMXaO.d.ts} +48 -2
- package/dist/{plugin-CkiStRaI.d.cts → plugin-CN8U2__Q.d.cts} +11 -5
- package/dist/{plugin-BeCMF1VQ.d.ts → plugin-WnvNNJOp.d.ts} +11 -5
- package/dist/plugin.cjs +16 -0
- package/dist/plugin.d.cts +4 -4
- package/dist/plugin.d.ts +4 -4
- package/dist/plugin.js +1 -1
- 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.d.cts +1 -1
- package/dist/ui.d.ts +1 -1
- package/dist/vela.global.js +2661 -2312
- package/dist/vela.global.min.js +48 -48
- package/dist/widget.cjs +35658 -34074
- package/dist/widget.d.cts +39 -271
- package/dist/widget.d.ts +39 -271
- package/dist/widget.js +60 -1313
- package/dist/workspace.cjs +1584 -960
- package/dist/workspace.d.cts +111 -15
- package/dist/workspace.d.ts +111 -15
- package/dist/workspace.js +6 -2281
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { D as DrawingsDocument, R as Resolved } from './contributions-
|
|
2
|
-
export { B as BarsChangeReason, C as
|
|
3
|
-
import { D as Drawing, S as SerializedDrawing, U as Unsubscribe, L as LineStyle, P as PriceStyle, I as IChartRenderer, R as RendererCapabilities, e as RendererDisplayOptions, f as IndicatorRenderHandle, g as IndicatorStatus, c as VelaTheme, O as OHLCV, h as Pane, i as PaneAction, j as MoveTarget, k as IndicatorModel, l as ScenePatch, m as InputValue, n as SymbolPickerFn, o as LegendActionView, p as InputChangeEvent, T as ThemeName, C as CrosshairEvent, q as ClickEvent, A as AxisLongPressEvent, a as VisibleRange, r as DataWindowReadout, s as IDrawingsRendererPort, t as Millis, u as SnapMode, v as DrawingTypeKey, w as ToolbarDefinition, M as MarketConfig } from './options-
|
|
4
|
-
export { x as AddIndicatorOptions, B as Background, y as BoxFontFamily, z as BoxHAlign, E as BoxTextSize, F as BoxVAlign, G as CandleBarColor, H as CandleSeries, J as CandleStyle, K as DataWindowGroup, Q as DataWindowOHLC, W as DataWindowRow, X as DirtyRange, Y as DrawingBox, Z as DrawingExtend, _ as DrawingIntent, $ as DrawingLabel, a0 as DrawingLine, a1 as DrawingLinefill, a2 as DrawingMode, a3 as DrawingPoint, a4 as DrawingPolyline, a5 as DrawingStyle, a6 as DrawingTable, a7 as DrawingText, a8 as DrawingXLoc, a9 as DrawingsOption, aa as Fill, ab as FillGradientStop, ac as IndicatorMeta, ad as InputCondition, ae as InputSchema, af as InputType, ag as InputWhen, ah as LabelStyle, ai as LabelYLoc, aj as LineLikeKind, ak as LineLikeSeries, al as LineLikeStyle, am as MarkerPoint, an as MarkerSeries, ao as MarketSnapshot, ap as MarketSwitch, aq as
|
|
5
|
-
import { M as MarketDataFeed, D as DataProvider, P as ProviderInfo, a as SymbolDescriptor, S as SymbolInfo, b as ProviderCapabilities, B as BarRange } from './DataProvider-
|
|
6
|
-
export { A as ACCENT, a as ACCENT_BRIGHT, B as BEARISH, b as BULLISH, c as BarTransform, d as BasePaintingModulation, C as CATEGORICAL, e as CROSSHAIR, f as ChartTypeDefinition, g as ChartTypeSettingsInstance, h as ChartTypeSettingsSection, i as ChartTypeSettingsSubsection, D as DrawingTypeMeta, H as HIGHLIGHT, I as INFO, j as INVALID, k as IdentifiableKind, M as MARKER, N as NEUTRAL, l as NormalizedSettingsRow, R as RendererLayerArgs, m as RendererLayerDefinition, n as RendererLayerInstance, S as SERIES_LINE, o as SESSION_OFF, p as SESSION_POST, q as SESSION_PRE, r as SLATE, s as SLATE_DEEP, t as SeriesDataEngine, u as SeriesDataEngineHost, v as SettingsInlineControl, w as SettingsRowCondition, x as SettingsRowDescriptor, y as SettingsRowInlineNumber, z as SettingsRowSwatch, E as SettingsRowValueKey, F as SettingsRowWhen, G as SettingsRowWidth, J as SettingsSelectOption, K as SettingsValueRow, T as TRADE_EXIT, L as TRADE_LONG, O as TRADE_SHORT, V as VALID, W as WARNING, P as categoricalColor, Q as chartType, U as chartTypes, X as createDrawing, Y as deserializeDrawing, Z as drawingTypes, _ as getDrawingType, $ as normalizeSettingsRow, a0 as registerChartType, a1 as registerDrawingType, a2 as registerRendererDefaults, a3 as registerRendererLayer, a4 as rendererDefaults, a5 as rendererLayers, a6 as settingsRowValueKeys, a7 as stableSeriesId, a8 as tickerModifierIds, a9 as unregisterChartType, aa as unregisterRendererDefaults, ab as unregisterRendererLayer } from './plugin-
|
|
1
|
+
import { D as DrawingsDocument, R as Resolved } from './contributions-DNMqrAuw.cjs';
|
|
2
|
+
export { B as BarsChangeReason, C as CellStateContext, b as ContextSelect, c as DataControl, d as DrawingsControl, e as EngineAlert, f as EngineCapabilities, g as EngineContextSnapshot, h as EngineFactory, i as EngineWarning, j as ExecutionHandlers, k as ExecutionMarket, l as ExecutionRequest, m as ExecutionSession, E as ExternalIndicatorEntry, F as FetchSeries, n as IndicatorEventMap, I as IndicatorHandle, o as IndicatorSummary, L as LegendActionDescriptor, p as LegendIndicatorInfo, N as NativeIndicator, q as NativeIndicatorContext, r as NativeIndicatorDescriptor, s as NativeIndicatorInfo, t as NativeIndicatorOutput, P as ParsedSymbol, u as PreparedScript, v as RendererControl, w as RunIndicatorResult, x as SceneInspection, a as ScriptRun, y as ScriptRunCause, z as ScriptRunResult, S as ScriptingEngine, A as SidePanelButton, G as SidePanelDescriptor, H as SidePanelHandle, J as SidePanelHeader, K as StatePersistenceHandler, M as StrategyFill, O as StrategyState, Q as StrategyTrade, T as TypedEventBus, V as Vela, U as VelaDeps, X as VelaEventMap, Y as VisibleBarRange, Z as WidgetActionDescriptor, _ as WidgetActionTarget, $ as WidgetAttachment, W as WidgetContext, a0 as getNativeIndicator, a1 as legendActions, a2 as nativeIndicatorDescriptors, a3 as nativeIndicatorTypes, a4 as registerDefaultEngine, a5 as registerLegendAction, a6 as registerNativeIndicator, a7 as registerSidePanel, a8 as registerStatePersistence, a9 as registerWidgetAction, aa as registerWidgetAttachment, ab as resolveEngines, ac as sidePanels, ad as statePersistenceHandlers, ae as unregisterDefaultEngine, af as unregisterLegendAction, ag as unregisterNativeIndicator, ah as unregisterSidePanel, ai as unregisterStatePersistence, aj as unregisterWidgetAction, ak as unregisterWidgetAttachment, al as widgetActions, am as widgetAttachments } from './contributions-DNMqrAuw.cjs';
|
|
3
|
+
import { D as Drawing, S as SerializedDrawing, U as Unsubscribe, L as LineStyle, P as PriceStyle, I as IChartRenderer, R as RendererCapabilities, e as RendererDisplayOptions, f as IndicatorRenderHandle, g as IndicatorStatus, c as VelaTheme, O as OHLCV, h as Pane, i as PaneAction, j as MoveTarget, k as IndicatorModel, l as ScenePatch, m as InputValue, n as SymbolPickerFn, o as LegendActionView, p as InputChangeEvent, T as ThemeName, C as CrosshairEvent, q as ClickEvent, A as AxisLongPressEvent, a as VisibleRange, r as DataWindowReadout, s as IDrawingsRendererPort, t as Millis, u as SnapMode, v as DrawingTypeKey, w as ToolbarDefinition, M as MarketConfig } from './options-BaVTMXaO.cjs';
|
|
4
|
+
export { x as AddIndicatorOptions, B as Background, y as BoxFontFamily, z as BoxHAlign, E as BoxTextSize, F as BoxVAlign, G as CandleBarColor, H as CandleSeries, J as CandleStyle, K as DataWindowGroup, Q as DataWindowOHLC, W as DataWindowRow, X as DirtyRange, Y as DrawingBox, Z as DrawingExtend, _ as DrawingIntent, $ as DrawingLabel, a0 as DrawingLine, a1 as DrawingLinefill, a2 as DrawingMode, a3 as DrawingPoint, a4 as DrawingPolyline, a5 as DrawingStyle, a6 as DrawingTable, a7 as DrawingText, a8 as DrawingXLoc, a9 as DrawingsOption, aa as Fill, ab as FillGradientStop, ac as IndicatorMeta, ad as InputCondition, ae as InputSchema, af as InputType, ag as InputWhen, ah as LabelStyle, ai as LabelYLoc, aj as LineLikeKind, ak as LineLikeSeries, al as LineLikeStyle, am as MarkerPoint, an as MarkerSeries, ao as MarketSnapshot, ap as MarketSwitch, aq as PaneAxis, ar as PaneAxisBand, as as PaneHint, at as PaneKind, au as PolylinePoint, av as PriceLine, aw as Projector, ax as ProviderName, ay as RendererConstructor, az as Scene, aA as SchemaPatch, aB as SeriesKind, aC as SeriesPoint, aD as SeriesSpec, aE as SeriesValueDelta, aF as SettingsField, aG as SettingsSchema, aH as SettingsVisibilityPolicy, aI as TableCell, aJ as TableMerge, aK as TablePosition, aL as ToolbarGroupConfig, aM as TradeExecution, aN as ValuePatch, b as VelaOptions, V as VisibleRangePreset, aO as buildToolbar, aP as defaultToolbar, aQ as inputVisible } from './options-BaVTMXaO.cjs';
|
|
5
|
+
import { M as MarketDataFeed, D as DataProvider, P as ProviderInfo, a as SymbolDescriptor, S as SymbolInfo, b as ProviderCapabilities, B as BarRange } from './DataProvider-DDUYw2qP.cjs';
|
|
6
|
+
export { A as ACCENT, a as ACCENT_BRIGHT, B as BEARISH, b as BULLISH, c as BarTransform, d as BasePaintingModulation, C as CATEGORICAL, e as CROSSHAIR, f as ChartTypeDefinition, g as ChartTypeSettingsInstance, h as ChartTypeSettingsSection, i as ChartTypeSettingsSubsection, D as DrawingTypeMeta, H as HIGHLIGHT, I as INFO, j as INVALID, k as IdentifiableKind, M as MARKER, N as NEUTRAL, l as NormalizedSettingsRow, R as RendererLayerArgs, m as RendererLayerDefinition, n as RendererLayerInstance, S as SERIES_LINE, o as SESSION_OFF, p as SESSION_POST, q as SESSION_PRE, r as SLATE, s as SLATE_DEEP, t as SeriesDataEngine, u as SeriesDataEngineHost, v as SettingsInlineControl, w as SettingsRowCondition, x as SettingsRowDescriptor, y as SettingsRowInlineNumber, z as SettingsRowSwatch, E as SettingsRowValueKey, F as SettingsRowWhen, G as SettingsRowWidth, J as SettingsSelectOption, K as SettingsValueRow, T as TRADE_EXIT, L as TRADE_LONG, O as TRADE_SHORT, V as VALID, W as WARNING, P as categoricalColor, Q as chartType, U as chartTypes, X as createDrawing, Y as deserializeDrawing, Z as drawingTypes, _ as getDrawingType, $ as normalizeSettingsRow, a0 as registerChartType, a1 as registerDrawingType, a2 as registerRendererDefaults, a3 as registerRendererLayer, a4 as rendererDefaults, a5 as rendererLayers, a6 as settingsRowValueKeys, a7 as stableSeriesId, a8 as tickerModifierIds, a9 as unregisterChartType, aa as unregisterRendererDefaults, ab as unregisterRendererLayer } from './plugin-CN8U2__Q.cjs';
|
|
7
7
|
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-CT9ZwIGz.cjs';
|
|
8
8
|
export { i as iconMarkup, r as registerIcon } from './icons-BZYbJXSV.cjs';
|
|
9
9
|
export { a as KeyBindingDescriptor, R as ResolvedBinding } from './keymap-CGOz5F5f.cjs';
|
|
@@ -284,26 +284,32 @@ interface ChartConfig {
|
|
|
284
284
|
*/
|
|
285
285
|
/** A host-contributed settings row: callback-based (the host owns the state).
|
|
286
286
|
* `heading` opens a titled group inside the tab (an in-pane section title);
|
|
287
|
-
* `color` is a swatch opening the themed picker (any CSS color, alpha included).
|
|
287
|
+
* `color` is a swatch opening the themed picker (any CSS color, alpha included).
|
|
288
|
+
* `id` is the row's stable visibility id (defaults to the label's slug) — hiding a
|
|
289
|
+
* heading's id hides its whole group (see `settings-visibility.ts`). */
|
|
288
290
|
type HostSettingsRow = {
|
|
289
291
|
kind: 'heading';
|
|
290
292
|
label: string;
|
|
293
|
+
id?: string;
|
|
291
294
|
} | {
|
|
292
295
|
kind: 'toggle';
|
|
293
296
|
label: string;
|
|
294
297
|
get: () => boolean;
|
|
295
298
|
set: (v: boolean) => void;
|
|
299
|
+
id?: string;
|
|
296
300
|
} | {
|
|
297
301
|
kind: 'select';
|
|
298
302
|
label: string;
|
|
299
303
|
options: readonly string[];
|
|
300
304
|
get: () => string;
|
|
301
305
|
set: (v: string) => void;
|
|
306
|
+
id?: string;
|
|
302
307
|
} | {
|
|
303
308
|
kind: 'color';
|
|
304
309
|
label: string;
|
|
305
310
|
get: () => string;
|
|
306
311
|
set: (v: string) => void;
|
|
312
|
+
id?: string;
|
|
307
313
|
};
|
|
308
314
|
/** A host-contributed settings tab (see `RendererControl.setSettingsSections`). */
|
|
309
315
|
interface HostSettingsSection {
|
|
@@ -312,6 +318,8 @@ interface HostSettingsSection {
|
|
|
312
318
|
/** Tab position: own tab after Symbol (default), end of the rail, or rows INSIDE
|
|
313
319
|
* the Symbol tab itself (`'symbol'` — e.g. the widget's watermark toggle). */
|
|
314
320
|
placement?: 'after-symbol' | 'end' | 'symbol';
|
|
321
|
+
/** Stable visibility id (defaults to the title's slug). Row ids scope under it. */
|
|
322
|
+
id?: string;
|
|
315
323
|
}
|
|
316
324
|
|
|
317
325
|
/**
|
|
@@ -331,6 +339,7 @@ declare class NativeRenderer implements IChartRenderer {
|
|
|
331
339
|
private plot;
|
|
332
340
|
private toolbarGutter;
|
|
333
341
|
private mountContainer;
|
|
342
|
+
private backdropCanvas;
|
|
334
343
|
private dataCanvas;
|
|
335
344
|
private volumeCanvas;
|
|
336
345
|
private vpvrCanvas;
|
|
@@ -339,9 +348,12 @@ declare class NativeRenderer implements IChartRenderer {
|
|
|
339
348
|
private cursorCanvas;
|
|
340
349
|
private overlayRoot;
|
|
341
350
|
private userDrawings;
|
|
351
|
+
private readonly backdropRenderer;
|
|
342
352
|
private readonly volumeRenderer;
|
|
343
353
|
/** SDK renderer layers instantiated at mount ({@link registerRendererLayer}). */
|
|
344
354
|
private extLayers;
|
|
355
|
+
/** Last applied layer-canvas order (ids below + above the data canvas) — re-slotted only on change. */
|
|
356
|
+
private layerOrderSig;
|
|
345
357
|
private attributionEl;
|
|
346
358
|
private attributionEnabled;
|
|
347
359
|
/** Host-supplied mark shown INSTEAD of the built-in one (`attribution: '<html>'`). */
|
|
@@ -426,6 +438,9 @@ declare class NativeRenderer implements IChartRenderer {
|
|
|
426
438
|
private readonly paneActionCbs;
|
|
427
439
|
private hoverLogical;
|
|
428
440
|
private settingsDialog;
|
|
441
|
+
/** The host's visibility policy (setting ids hidden from the dialog) — instance
|
|
442
|
+
* state, never part of the persisted config. */
|
|
443
|
+
private hiddenSettings;
|
|
429
444
|
/** Where modal dialogs mount — a HOST override (multi-chart shells pass their root
|
|
430
445
|
* so dialogs center globally instead of clipping inside one cell). Null = the plot. */
|
|
431
446
|
private dialogHost;
|
|
@@ -674,6 +689,10 @@ declare class NativeRenderer implements IChartRenderer {
|
|
|
674
689
|
* whenever the latest bars are off-screen (touch has no cursor proximity). */
|
|
675
690
|
setLayoutMode(mode: 'mobile' | 'desktop'): void;
|
|
676
691
|
setSettingsSections(sections: HostSettingsSection[]): void;
|
|
692
|
+
setSettingsVisibility(policy: {
|
|
693
|
+
hidden?: readonly string[];
|
|
694
|
+
}): void;
|
|
695
|
+
listSettingsIds(): string[];
|
|
677
696
|
onChartTypeSettingsChange(cb: (typeId: string, values: Record<string, unknown>) => void): Unsubscribe;
|
|
678
697
|
onConfigChanged(cb: () => void): Unsubscribe;
|
|
679
698
|
onThemeSelect(cb: (theme: ThemeName) => void): Unsubscribe;
|
|
@@ -800,6 +819,8 @@ declare class NativeRenderer implements IChartRenderer {
|
|
|
800
819
|
private renderFrame;
|
|
801
820
|
/** Repaint the SDK layers that opted into cursor tracking (their own canvas only). */
|
|
802
821
|
private repaintCursorLayers;
|
|
822
|
+
/** Blank one SDK layer canvas (a collapsed host pane suppresses the layer's painting). */
|
|
823
|
+
private clearLayerCanvas;
|
|
803
824
|
/** One frame's args for an SDK renderer layer (shared by the data + cursor paint paths). */
|
|
804
825
|
private extLayerArgs;
|
|
805
826
|
/** Paint the below-data (L-1) + geometry (L0) + chrome (L1) layers from the current scene/coords. */
|
|
@@ -857,10 +878,33 @@ declare class NativeRenderer implements IChartRenderer {
|
|
|
857
878
|
private paneMasterTitle;
|
|
858
879
|
/** The pane a bespoke-layer native indicator (volume/vpvr) currently lives in (null = not mounted). */
|
|
859
880
|
private nativeLayerPane;
|
|
881
|
+
/** The mounted native indicator that OWNS an SDK layer — the one whose type equals the
|
|
882
|
+
* layer id (the id doubles as the data channel, so the pairing is the SDK's own
|
|
883
|
+
* contract). Null for chart-type channels and while the owner is hidden (a hidden
|
|
884
|
+
* indicator leaves the scene; its cleared data channel paints nothing anyway). */
|
|
885
|
+
private layerOwner;
|
|
886
|
+
/** The pane an SDK layer paints on: its owner's pane, else the price pane. */
|
|
887
|
+
private layerPane;
|
|
888
|
+
/** The SDK layer canvases split around the data canvas, each side back-to-front:
|
|
889
|
+
* owned layers by their owner's z key against the candles' (an indicator restacked
|
|
890
|
+
* below the candles takes its layer canvas along), unowned by declared placement. */
|
|
891
|
+
private orderedLayerCanvases;
|
|
892
|
+
/** The full canvas pile in paint order (backdrop + layers + data/volume/vpvr) — what
|
|
893
|
+
* the DOM stacking and the screenshot compositor must both follow. */
|
|
894
|
+
private canvasPile;
|
|
895
|
+
/** Re-slot the SDK layer canvases in the plot when the computed order changed (a z
|
|
896
|
+
* write, a restored config, an indicator mount/remove/restack). Runs at the top of
|
|
897
|
+
* every data frame; a no-op when the signature is unchanged. Re-inserting an
|
|
898
|
+
* absolutely-positioned, pointer-transparent canvas repaints nothing by itself. */
|
|
899
|
+
private syncLayerCanvasOrder;
|
|
860
900
|
/** True when an active volume layer is this study pane's ONLY content — so its scale should
|
|
861
901
|
* come from volume, not the empty {0,1} placeholder. (In the price pane, or alongside a real
|
|
862
902
|
* series, volume stays a bottom overlay and the master scale wins.) */
|
|
863
903
|
private volumeOwnsPane;
|
|
904
|
+
/** True when this study pane's master content is only SDK-layer natives (series-less
|
|
905
|
+
* models whose type names a mounted layer) — its scale then follows the visible bars
|
|
906
|
+
* (see the call site). Any real master series takes over the scale as usual. */
|
|
907
|
+
private layerNativesOwnPane;
|
|
864
908
|
/** Per-pane scale state for a host UI (e.g. a price-axis context menu): the pane's pixel
|
|
865
909
|
* band (`top`/`height`, so a click y maps to a pane) plus its current axis `mode`/`log`.
|
|
866
910
|
* Top-to-bottom order. Every pane is independent — the price pane from the scene setting,
|
|
@@ -1115,8 +1159,12 @@ declare class BarStore {
|
|
|
1115
1159
|
/** Earliest bar-open time fetched for a series — what the cache actually covers. */
|
|
1116
1160
|
private readonly coveredFrom;
|
|
1117
1161
|
private currentSymbol?;
|
|
1118
|
-
/** Symbols protected from the current-symbol purge (multi-chart cells)
|
|
1162
|
+
/** Symbols protected from the current-symbol purge (multi-chart cells) — the UNION
|
|
1163
|
+
* of every owner's declaration. Empty = legacy single-chart behavior. */
|
|
1119
1164
|
private retained;
|
|
1165
|
+
/** Per-owner declarations behind {@link retained} — several shells on one page must
|
|
1166
|
+
* not clobber (or, on destroy, evict) each other's protected symbols. */
|
|
1167
|
+
private readonly retainedByOwner;
|
|
1120
1168
|
get(key: string): OHLCV[] | undefined;
|
|
1121
1169
|
/**
|
|
1122
1170
|
* Record that the series is covered back to `from`. Tracks the EARLIEST such
|
|
@@ -1141,13 +1189,16 @@ declare class BarStore {
|
|
|
1141
1189
|
* Declare the set of symbols a multi-chart workspace is displaying (CANONICAL
|
|
1142
1190
|
* tickers, post-registry resolution — `chart.data.resolve(sym).ticker`). These
|
|
1143
1191
|
* survive every {@link retainSymbol} purge, so cells loading different symbols
|
|
1144
|
-
* stop evicting each other's history. Replaces the previous set
|
|
1145
|
-
*
|
|
1146
|
-
*
|
|
1147
|
-
*
|
|
1148
|
-
*
|
|
1192
|
+
* stop evicting each other's history. Replaces the previous set FOR THAT OWNER
|
|
1193
|
+
* (pass the shell instance as `owner`; several shells on one page keep separate
|
|
1194
|
+
* declarations, the effective set is their union) and purges anything now outside
|
|
1195
|
+
* the union ∪ {currentSymbol} immediately. An empty set releases the owner's
|
|
1196
|
+
* declaration — with no owners left, the legacy single-chart policy is back.
|
|
1197
|
+
* Note: SECONDARY symbols a script fetches (`request.security` cross-symbol) are
|
|
1198
|
+
* not in this set and still drop on cross-cell loads — correctness is unaffected
|
|
1199
|
+
* (they re-fetch on demand).
|
|
1149
1200
|
*/
|
|
1150
|
-
retain(symbols: ReadonlySet<string
|
|
1201
|
+
retain(symbols: ReadonlySet<string>, owner?: unknown): void;
|
|
1151
1202
|
/** Drop every series whose symbol is neither `current` nor retained. */
|
|
1152
1203
|
private purgeOutside;
|
|
1153
1204
|
clear(): void;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { D as DrawingsDocument, R as Resolved } from './contributions-
|
|
2
|
-
export { B as BarsChangeReason, C as
|
|
3
|
-
import { D as Drawing, S as SerializedDrawing, U as Unsubscribe, L as LineStyle, P as PriceStyle, I as IChartRenderer, R as RendererCapabilities, e as RendererDisplayOptions, f as IndicatorRenderHandle, g as IndicatorStatus, c as VelaTheme, O as OHLCV, h as Pane, i as PaneAction, j as MoveTarget, k as IndicatorModel, l as ScenePatch, m as InputValue, n as SymbolPickerFn, o as LegendActionView, p as InputChangeEvent, T as ThemeName, C as CrosshairEvent, q as ClickEvent, A as AxisLongPressEvent, a as VisibleRange, r as DataWindowReadout, s as IDrawingsRendererPort, t as Millis, u as SnapMode, v as DrawingTypeKey, w as ToolbarDefinition, M as MarketConfig } from './options-
|
|
4
|
-
export { x as AddIndicatorOptions, B as Background, y as BoxFontFamily, z as BoxHAlign, E as BoxTextSize, F as BoxVAlign, G as CandleBarColor, H as CandleSeries, J as CandleStyle, K as DataWindowGroup, Q as DataWindowOHLC, W as DataWindowRow, X as DirtyRange, Y as DrawingBox, Z as DrawingExtend, _ as DrawingIntent, $ as DrawingLabel, a0 as DrawingLine, a1 as DrawingLinefill, a2 as DrawingMode, a3 as DrawingPoint, a4 as DrawingPolyline, a5 as DrawingStyle, a6 as DrawingTable, a7 as DrawingText, a8 as DrawingXLoc, a9 as DrawingsOption, aa as Fill, ab as FillGradientStop, ac as IndicatorMeta, ad as InputCondition, ae as InputSchema, af as InputType, ag as InputWhen, ah as LabelStyle, ai as LabelYLoc, aj as LineLikeKind, ak as LineLikeSeries, al as LineLikeStyle, am as MarkerPoint, an as MarkerSeries, ao as MarketSnapshot, ap as MarketSwitch, aq as
|
|
5
|
-
import { M as MarketDataFeed, D as DataProvider, P as ProviderInfo, a as SymbolDescriptor, S as SymbolInfo, b as ProviderCapabilities, B as BarRange } from './DataProvider-
|
|
6
|
-
export { A as ACCENT, a as ACCENT_BRIGHT, B as BEARISH, b as BULLISH, c as BarTransform, d as BasePaintingModulation, C as CATEGORICAL, e as CROSSHAIR, f as ChartTypeDefinition, g as ChartTypeSettingsInstance, h as ChartTypeSettingsSection, i as ChartTypeSettingsSubsection, D as DrawingTypeMeta, H as HIGHLIGHT, I as INFO, j as INVALID, k as IdentifiableKind, M as MARKER, N as NEUTRAL, l as NormalizedSettingsRow, R as RendererLayerArgs, m as RendererLayerDefinition, n as RendererLayerInstance, S as SERIES_LINE, o as SESSION_OFF, p as SESSION_POST, q as SESSION_PRE, r as SLATE, s as SLATE_DEEP, t as SeriesDataEngine, u as SeriesDataEngineHost, v as SettingsInlineControl, w as SettingsRowCondition, x as SettingsRowDescriptor, y as SettingsRowInlineNumber, z as SettingsRowSwatch, E as SettingsRowValueKey, F as SettingsRowWhen, G as SettingsRowWidth, J as SettingsSelectOption, K as SettingsValueRow, T as TRADE_EXIT, L as TRADE_LONG, O as TRADE_SHORT, V as VALID, W as WARNING, P as categoricalColor, Q as chartType, U as chartTypes, X as createDrawing, Y as deserializeDrawing, Z as drawingTypes, _ as getDrawingType, $ as normalizeSettingsRow, a0 as registerChartType, a1 as registerDrawingType, a2 as registerRendererDefaults, a3 as registerRendererLayer, a4 as rendererDefaults, a5 as rendererLayers, a6 as settingsRowValueKeys, a7 as stableSeriesId, a8 as tickerModifierIds, a9 as unregisterChartType, aa as unregisterRendererDefaults, ab as unregisterRendererLayer } from './plugin-
|
|
1
|
+
import { D as DrawingsDocument, R as Resolved } from './contributions-BqCIsbaP.js';
|
|
2
|
+
export { B as BarsChangeReason, C as CellStateContext, b as ContextSelect, c as DataControl, d as DrawingsControl, e as EngineAlert, f as EngineCapabilities, g as EngineContextSnapshot, h as EngineFactory, i as EngineWarning, j as ExecutionHandlers, k as ExecutionMarket, l as ExecutionRequest, m as ExecutionSession, E as ExternalIndicatorEntry, F as FetchSeries, n as IndicatorEventMap, I as IndicatorHandle, o as IndicatorSummary, L as LegendActionDescriptor, p as LegendIndicatorInfo, N as NativeIndicator, q as NativeIndicatorContext, r as NativeIndicatorDescriptor, s as NativeIndicatorInfo, t as NativeIndicatorOutput, P as ParsedSymbol, u as PreparedScript, v as RendererControl, w as RunIndicatorResult, x as SceneInspection, a as ScriptRun, y as ScriptRunCause, z as ScriptRunResult, S as ScriptingEngine, A as SidePanelButton, G as SidePanelDescriptor, H as SidePanelHandle, J as SidePanelHeader, K as StatePersistenceHandler, M as StrategyFill, O as StrategyState, Q as StrategyTrade, T as TypedEventBus, V as Vela, U as VelaDeps, X as VelaEventMap, Y as VisibleBarRange, Z as WidgetActionDescriptor, _ as WidgetActionTarget, $ as WidgetAttachment, W as WidgetContext, a0 as getNativeIndicator, a1 as legendActions, a2 as nativeIndicatorDescriptors, a3 as nativeIndicatorTypes, a4 as registerDefaultEngine, a5 as registerLegendAction, a6 as registerNativeIndicator, a7 as registerSidePanel, a8 as registerStatePersistence, a9 as registerWidgetAction, aa as registerWidgetAttachment, ab as resolveEngines, ac as sidePanels, ad as statePersistenceHandlers, ae as unregisterDefaultEngine, af as unregisterLegendAction, ag as unregisterNativeIndicator, ah as unregisterSidePanel, ai as unregisterStatePersistence, aj as unregisterWidgetAction, ak as unregisterWidgetAttachment, al as widgetActions, am as widgetAttachments } from './contributions-BqCIsbaP.js';
|
|
3
|
+
import { D as Drawing, S as SerializedDrawing, U as Unsubscribe, L as LineStyle, P as PriceStyle, I as IChartRenderer, R as RendererCapabilities, e as RendererDisplayOptions, f as IndicatorRenderHandle, g as IndicatorStatus, c as VelaTheme, O as OHLCV, h as Pane, i as PaneAction, j as MoveTarget, k as IndicatorModel, l as ScenePatch, m as InputValue, n as SymbolPickerFn, o as LegendActionView, p as InputChangeEvent, T as ThemeName, C as CrosshairEvent, q as ClickEvent, A as AxisLongPressEvent, a as VisibleRange, r as DataWindowReadout, s as IDrawingsRendererPort, t as Millis, u as SnapMode, v as DrawingTypeKey, w as ToolbarDefinition, M as MarketConfig } from './options-BaVTMXaO.js';
|
|
4
|
+
export { x as AddIndicatorOptions, B as Background, y as BoxFontFamily, z as BoxHAlign, E as BoxTextSize, F as BoxVAlign, G as CandleBarColor, H as CandleSeries, J as CandleStyle, K as DataWindowGroup, Q as DataWindowOHLC, W as DataWindowRow, X as DirtyRange, Y as DrawingBox, Z as DrawingExtend, _ as DrawingIntent, $ as DrawingLabel, a0 as DrawingLine, a1 as DrawingLinefill, a2 as DrawingMode, a3 as DrawingPoint, a4 as DrawingPolyline, a5 as DrawingStyle, a6 as DrawingTable, a7 as DrawingText, a8 as DrawingXLoc, a9 as DrawingsOption, aa as Fill, ab as FillGradientStop, ac as IndicatorMeta, ad as InputCondition, ae as InputSchema, af as InputType, ag as InputWhen, ah as LabelStyle, ai as LabelYLoc, aj as LineLikeKind, ak as LineLikeSeries, al as LineLikeStyle, am as MarkerPoint, an as MarkerSeries, ao as MarketSnapshot, ap as MarketSwitch, aq as PaneAxis, ar as PaneAxisBand, as as PaneHint, at as PaneKind, au as PolylinePoint, av as PriceLine, aw as Projector, ax as ProviderName, ay as RendererConstructor, az as Scene, aA as SchemaPatch, aB as SeriesKind, aC as SeriesPoint, aD as SeriesSpec, aE as SeriesValueDelta, aF as SettingsField, aG as SettingsSchema, aH as SettingsVisibilityPolicy, aI as TableCell, aJ as TableMerge, aK as TablePosition, aL as ToolbarGroupConfig, aM as TradeExecution, aN as ValuePatch, b as VelaOptions, V as VisibleRangePreset, aO as buildToolbar, aP as defaultToolbar, aQ as inputVisible } from './options-BaVTMXaO.js';
|
|
5
|
+
import { M as MarketDataFeed, D as DataProvider, P as ProviderInfo, a as SymbolDescriptor, S as SymbolInfo, b as ProviderCapabilities, B as BarRange } from './DataProvider-JJq7M2it.js';
|
|
6
|
+
export { A as ACCENT, a as ACCENT_BRIGHT, B as BEARISH, b as BULLISH, c as BarTransform, d as BasePaintingModulation, C as CATEGORICAL, e as CROSSHAIR, f as ChartTypeDefinition, g as ChartTypeSettingsInstance, h as ChartTypeSettingsSection, i as ChartTypeSettingsSubsection, D as DrawingTypeMeta, H as HIGHLIGHT, I as INFO, j as INVALID, k as IdentifiableKind, M as MARKER, N as NEUTRAL, l as NormalizedSettingsRow, R as RendererLayerArgs, m as RendererLayerDefinition, n as RendererLayerInstance, S as SERIES_LINE, o as SESSION_OFF, p as SESSION_POST, q as SESSION_PRE, r as SLATE, s as SLATE_DEEP, t as SeriesDataEngine, u as SeriesDataEngineHost, v as SettingsInlineControl, w as SettingsRowCondition, x as SettingsRowDescriptor, y as SettingsRowInlineNumber, z as SettingsRowSwatch, E as SettingsRowValueKey, F as SettingsRowWhen, G as SettingsRowWidth, J as SettingsSelectOption, K as SettingsValueRow, T as TRADE_EXIT, L as TRADE_LONG, O as TRADE_SHORT, V as VALID, W as WARNING, P as categoricalColor, Q as chartType, U as chartTypes, X as createDrawing, Y as deserializeDrawing, Z as drawingTypes, _ as getDrawingType, $ as normalizeSettingsRow, a0 as registerChartType, a1 as registerDrawingType, a2 as registerRendererDefaults, a3 as registerRendererLayer, a4 as rendererDefaults, a5 as rendererLayers, a6 as settingsRowValueKeys, a7 as stableSeriesId, a8 as tickerModifierIds, a9 as unregisterChartType, aa as unregisterRendererDefaults, ab as unregisterRendererLayer } from './plugin-WnvNNJOp.js';
|
|
7
7
|
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-CT9ZwIGz.js';
|
|
8
8
|
export { i as iconMarkup, r as registerIcon } from './icons-BZYbJXSV.js';
|
|
9
9
|
export { a as KeyBindingDescriptor, R as ResolvedBinding } from './keymap-CGOz5F5f.js';
|
|
@@ -284,26 +284,32 @@ interface ChartConfig {
|
|
|
284
284
|
*/
|
|
285
285
|
/** A host-contributed settings row: callback-based (the host owns the state).
|
|
286
286
|
* `heading` opens a titled group inside the tab (an in-pane section title);
|
|
287
|
-
* `color` is a swatch opening the themed picker (any CSS color, alpha included).
|
|
287
|
+
* `color` is a swatch opening the themed picker (any CSS color, alpha included).
|
|
288
|
+
* `id` is the row's stable visibility id (defaults to the label's slug) — hiding a
|
|
289
|
+
* heading's id hides its whole group (see `settings-visibility.ts`). */
|
|
288
290
|
type HostSettingsRow = {
|
|
289
291
|
kind: 'heading';
|
|
290
292
|
label: string;
|
|
293
|
+
id?: string;
|
|
291
294
|
} | {
|
|
292
295
|
kind: 'toggle';
|
|
293
296
|
label: string;
|
|
294
297
|
get: () => boolean;
|
|
295
298
|
set: (v: boolean) => void;
|
|
299
|
+
id?: string;
|
|
296
300
|
} | {
|
|
297
301
|
kind: 'select';
|
|
298
302
|
label: string;
|
|
299
303
|
options: readonly string[];
|
|
300
304
|
get: () => string;
|
|
301
305
|
set: (v: string) => void;
|
|
306
|
+
id?: string;
|
|
302
307
|
} | {
|
|
303
308
|
kind: 'color';
|
|
304
309
|
label: string;
|
|
305
310
|
get: () => string;
|
|
306
311
|
set: (v: string) => void;
|
|
312
|
+
id?: string;
|
|
307
313
|
};
|
|
308
314
|
/** A host-contributed settings tab (see `RendererControl.setSettingsSections`). */
|
|
309
315
|
interface HostSettingsSection {
|
|
@@ -312,6 +318,8 @@ interface HostSettingsSection {
|
|
|
312
318
|
/** Tab position: own tab after Symbol (default), end of the rail, or rows INSIDE
|
|
313
319
|
* the Symbol tab itself (`'symbol'` — e.g. the widget's watermark toggle). */
|
|
314
320
|
placement?: 'after-symbol' | 'end' | 'symbol';
|
|
321
|
+
/** Stable visibility id (defaults to the title's slug). Row ids scope under it. */
|
|
322
|
+
id?: string;
|
|
315
323
|
}
|
|
316
324
|
|
|
317
325
|
/**
|
|
@@ -331,6 +339,7 @@ declare class NativeRenderer implements IChartRenderer {
|
|
|
331
339
|
private plot;
|
|
332
340
|
private toolbarGutter;
|
|
333
341
|
private mountContainer;
|
|
342
|
+
private backdropCanvas;
|
|
334
343
|
private dataCanvas;
|
|
335
344
|
private volumeCanvas;
|
|
336
345
|
private vpvrCanvas;
|
|
@@ -339,9 +348,12 @@ declare class NativeRenderer implements IChartRenderer {
|
|
|
339
348
|
private cursorCanvas;
|
|
340
349
|
private overlayRoot;
|
|
341
350
|
private userDrawings;
|
|
351
|
+
private readonly backdropRenderer;
|
|
342
352
|
private readonly volumeRenderer;
|
|
343
353
|
/** SDK renderer layers instantiated at mount ({@link registerRendererLayer}). */
|
|
344
354
|
private extLayers;
|
|
355
|
+
/** Last applied layer-canvas order (ids below + above the data canvas) — re-slotted only on change. */
|
|
356
|
+
private layerOrderSig;
|
|
345
357
|
private attributionEl;
|
|
346
358
|
private attributionEnabled;
|
|
347
359
|
/** Host-supplied mark shown INSTEAD of the built-in one (`attribution: '<html>'`). */
|
|
@@ -426,6 +438,9 @@ declare class NativeRenderer implements IChartRenderer {
|
|
|
426
438
|
private readonly paneActionCbs;
|
|
427
439
|
private hoverLogical;
|
|
428
440
|
private settingsDialog;
|
|
441
|
+
/** The host's visibility policy (setting ids hidden from the dialog) — instance
|
|
442
|
+
* state, never part of the persisted config. */
|
|
443
|
+
private hiddenSettings;
|
|
429
444
|
/** Where modal dialogs mount — a HOST override (multi-chart shells pass their root
|
|
430
445
|
* so dialogs center globally instead of clipping inside one cell). Null = the plot. */
|
|
431
446
|
private dialogHost;
|
|
@@ -674,6 +689,10 @@ declare class NativeRenderer implements IChartRenderer {
|
|
|
674
689
|
* whenever the latest bars are off-screen (touch has no cursor proximity). */
|
|
675
690
|
setLayoutMode(mode: 'mobile' | 'desktop'): void;
|
|
676
691
|
setSettingsSections(sections: HostSettingsSection[]): void;
|
|
692
|
+
setSettingsVisibility(policy: {
|
|
693
|
+
hidden?: readonly string[];
|
|
694
|
+
}): void;
|
|
695
|
+
listSettingsIds(): string[];
|
|
677
696
|
onChartTypeSettingsChange(cb: (typeId: string, values: Record<string, unknown>) => void): Unsubscribe;
|
|
678
697
|
onConfigChanged(cb: () => void): Unsubscribe;
|
|
679
698
|
onThemeSelect(cb: (theme: ThemeName) => void): Unsubscribe;
|
|
@@ -800,6 +819,8 @@ declare class NativeRenderer implements IChartRenderer {
|
|
|
800
819
|
private renderFrame;
|
|
801
820
|
/** Repaint the SDK layers that opted into cursor tracking (their own canvas only). */
|
|
802
821
|
private repaintCursorLayers;
|
|
822
|
+
/** Blank one SDK layer canvas (a collapsed host pane suppresses the layer's painting). */
|
|
823
|
+
private clearLayerCanvas;
|
|
803
824
|
/** One frame's args for an SDK renderer layer (shared by the data + cursor paint paths). */
|
|
804
825
|
private extLayerArgs;
|
|
805
826
|
/** Paint the below-data (L-1) + geometry (L0) + chrome (L1) layers from the current scene/coords. */
|
|
@@ -857,10 +878,33 @@ declare class NativeRenderer implements IChartRenderer {
|
|
|
857
878
|
private paneMasterTitle;
|
|
858
879
|
/** The pane a bespoke-layer native indicator (volume/vpvr) currently lives in (null = not mounted). */
|
|
859
880
|
private nativeLayerPane;
|
|
881
|
+
/** The mounted native indicator that OWNS an SDK layer — the one whose type equals the
|
|
882
|
+
* layer id (the id doubles as the data channel, so the pairing is the SDK's own
|
|
883
|
+
* contract). Null for chart-type channels and while the owner is hidden (a hidden
|
|
884
|
+
* indicator leaves the scene; its cleared data channel paints nothing anyway). */
|
|
885
|
+
private layerOwner;
|
|
886
|
+
/** The pane an SDK layer paints on: its owner's pane, else the price pane. */
|
|
887
|
+
private layerPane;
|
|
888
|
+
/** The SDK layer canvases split around the data canvas, each side back-to-front:
|
|
889
|
+
* owned layers by their owner's z key against the candles' (an indicator restacked
|
|
890
|
+
* below the candles takes its layer canvas along), unowned by declared placement. */
|
|
891
|
+
private orderedLayerCanvases;
|
|
892
|
+
/** The full canvas pile in paint order (backdrop + layers + data/volume/vpvr) — what
|
|
893
|
+
* the DOM stacking and the screenshot compositor must both follow. */
|
|
894
|
+
private canvasPile;
|
|
895
|
+
/** Re-slot the SDK layer canvases in the plot when the computed order changed (a z
|
|
896
|
+
* write, a restored config, an indicator mount/remove/restack). Runs at the top of
|
|
897
|
+
* every data frame; a no-op when the signature is unchanged. Re-inserting an
|
|
898
|
+
* absolutely-positioned, pointer-transparent canvas repaints nothing by itself. */
|
|
899
|
+
private syncLayerCanvasOrder;
|
|
860
900
|
/** True when an active volume layer is this study pane's ONLY content — so its scale should
|
|
861
901
|
* come from volume, not the empty {0,1} placeholder. (In the price pane, or alongside a real
|
|
862
902
|
* series, volume stays a bottom overlay and the master scale wins.) */
|
|
863
903
|
private volumeOwnsPane;
|
|
904
|
+
/** True when this study pane's master content is only SDK-layer natives (series-less
|
|
905
|
+
* models whose type names a mounted layer) — its scale then follows the visible bars
|
|
906
|
+
* (see the call site). Any real master series takes over the scale as usual. */
|
|
907
|
+
private layerNativesOwnPane;
|
|
864
908
|
/** Per-pane scale state for a host UI (e.g. a price-axis context menu): the pane's pixel
|
|
865
909
|
* band (`top`/`height`, so a click y maps to a pane) plus its current axis `mode`/`log`.
|
|
866
910
|
* Top-to-bottom order. Every pane is independent — the price pane from the scene setting,
|
|
@@ -1115,8 +1159,12 @@ declare class BarStore {
|
|
|
1115
1159
|
/** Earliest bar-open time fetched for a series — what the cache actually covers. */
|
|
1116
1160
|
private readonly coveredFrom;
|
|
1117
1161
|
private currentSymbol?;
|
|
1118
|
-
/** Symbols protected from the current-symbol purge (multi-chart cells)
|
|
1162
|
+
/** Symbols protected from the current-symbol purge (multi-chart cells) — the UNION
|
|
1163
|
+
* of every owner's declaration. Empty = legacy single-chart behavior. */
|
|
1119
1164
|
private retained;
|
|
1165
|
+
/** Per-owner declarations behind {@link retained} — several shells on one page must
|
|
1166
|
+
* not clobber (or, on destroy, evict) each other's protected symbols. */
|
|
1167
|
+
private readonly retainedByOwner;
|
|
1120
1168
|
get(key: string): OHLCV[] | undefined;
|
|
1121
1169
|
/**
|
|
1122
1170
|
* Record that the series is covered back to `from`. Tracks the EARLIEST such
|
|
@@ -1141,13 +1189,16 @@ declare class BarStore {
|
|
|
1141
1189
|
* Declare the set of symbols a multi-chart workspace is displaying (CANONICAL
|
|
1142
1190
|
* tickers, post-registry resolution — `chart.data.resolve(sym).ticker`). These
|
|
1143
1191
|
* survive every {@link retainSymbol} purge, so cells loading different symbols
|
|
1144
|
-
* stop evicting each other's history. Replaces the previous set
|
|
1145
|
-
*
|
|
1146
|
-
*
|
|
1147
|
-
*
|
|
1148
|
-
*
|
|
1192
|
+
* stop evicting each other's history. Replaces the previous set FOR THAT OWNER
|
|
1193
|
+
* (pass the shell instance as `owner`; several shells on one page keep separate
|
|
1194
|
+
* declarations, the effective set is their union) and purges anything now outside
|
|
1195
|
+
* the union ∪ {currentSymbol} immediately. An empty set releases the owner's
|
|
1196
|
+
* declaration — with no owners left, the legacy single-chart policy is back.
|
|
1197
|
+
* Note: SECONDARY symbols a script fetches (`request.security` cross-symbol) are
|
|
1198
|
+
* not in this set and still drop on cross-cell loads — correctness is unaffected
|
|
1199
|
+
* (they re-fetch on demand).
|
|
1149
1200
|
*/
|
|
1150
|
-
retain(symbols: ReadonlySet<string
|
|
1201
|
+
retain(symbols: ReadonlySet<string>, owner?: unknown): void;
|
|
1151
1202
|
/** Drop every series whose symbol is neither `current` nor retained. */
|
|
1152
1203
|
private purgeOutside;
|
|
1153
1204
|
clear(): void;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { stableSeriesId } from './chunk-AOGZBKUE.js';
|
|
2
|
-
export { BarStore, CachingDataFeed, DARK_THEME, DataControl, DrawingStore, DrawingToolbar, DrawingsControl, LIGHT_THEME, MultiProviderFeed, NativeRenderer, RendererControl, TypedEventBus, Vela, buildToolbar, defaultToolbar, resolveTheme, sharedBarStore, timeframeToMs } from './chunk-
|
|
3
|
-
export { DEFAULT_PANEL_MAX_WIDTH, DEFAULT_PANEL_MIN_WIDTH, DEFAULT_PANEL_WIDTH, Drawing, chartType, chartTypes, clampPanelWidth, createDrawing, deserializeDrawing, drawingTypes, getDrawingType, getNativeIndicator, inputVisible, legendActions, nativeIndicatorDescriptors, nativeIndicatorTypes, normalizeSettingsRow, registerChartType, registerDefaultEngine, registerDrawingType, registerLegendAction, registerNativeIndicator, registerRendererDefaults, registerRendererLayer, registerSidePanel, registerWidgetAction, registerWidgetAttachment, rendererDefaults, rendererLayers, resolveEngines, settingsRowValueKeys, sidePanels, tickerModifierIds, unregisterChartType, unregisterDefaultEngine, unregisterLegendAction, unregisterNativeIndicator, unregisterRendererDefaults, unregisterRendererLayer, unregisterSidePanel, unregisterWidgetAction, unregisterWidgetAttachment, widgetActions, widgetAttachments } from './chunk-
|
|
2
|
+
export { BarStore, CachingDataFeed, DARK_THEME, DataControl, DrawingStore, DrawingToolbar, DrawingsControl, LIGHT_THEME, MultiProviderFeed, NativeRenderer, RendererControl, TypedEventBus, Vela, buildToolbar, defaultToolbar, resolveTheme, sharedBarStore, timeframeToMs } from './chunk-JQFO2WMU.js';
|
|
3
|
+
export { DEFAULT_PANEL_MAX_WIDTH, DEFAULT_PANEL_MIN_WIDTH, DEFAULT_PANEL_WIDTH, Drawing, chartType, chartTypes, clampPanelWidth, createDrawing, deserializeDrawing, drawingTypes, getDrawingType, getNativeIndicator, inputVisible, legendActions, nativeIndicatorDescriptors, nativeIndicatorTypes, normalizeSettingsRow, registerChartType, registerDefaultEngine, registerDrawingType, registerLegendAction, registerNativeIndicator, registerRendererDefaults, registerRendererLayer, registerSidePanel, registerStatePersistence, registerWidgetAction, registerWidgetAttachment, rendererDefaults, rendererLayers, resolveEngines, settingsRowValueKeys, sidePanels, statePersistenceHandlers, tickerModifierIds, unregisterChartType, unregisterDefaultEngine, unregisterLegendAction, unregisterNativeIndicator, unregisterRendererDefaults, unregisterRendererLayer, unregisterSidePanel, unregisterStatePersistence, unregisterWidgetAction, unregisterWidgetAttachment, widgetActions, widgetAttachments } from './chunk-OEUGUXL7.js';
|
|
4
4
|
import './chunk-OICPLNU7.js';
|
|
5
5
|
export { ACCENT, ACCENT_BRIGHT, BEARISH, BULLISH, CATEGORICAL, CROSSHAIR, HIGHLIGHT, INFO, INVALID, MARKER, NEUTRAL, SERIES_LINE, SESSION_OFF, SESSION_POST, SESSION_PRE, SLATE, SLATE_DEEP, TRADE_EXIT, TRADE_LONG, TRADE_SHORT, VALID, WARNING, categoricalColor, iconMarkup, registerIcon } from './chunk-PN5KWFZ4.js';
|
|
@@ -434,6 +434,17 @@ interface IndicatorMeta {
|
|
|
434
434
|
}
|
|
435
435
|
/** Where an indicator's plots are placed. */
|
|
436
436
|
type PaneHint = 'price' | 'new';
|
|
437
|
+
/** One label of a categorical pane axis: `frac` is the label's center as a fraction of
|
|
438
|
+
* the pane's height (0 = top, 1 = bottom). */
|
|
439
|
+
interface PaneAxisBand {
|
|
440
|
+
frac: number;
|
|
441
|
+
label: string;
|
|
442
|
+
}
|
|
443
|
+
/** A pane's value-axis override (see {@link IndicatorModel.paneAxis}): `'none'` = a
|
|
444
|
+
* blank axis; band labels = a categorical axis, one label per content band/row. */
|
|
445
|
+
type PaneAxis = 'none' | {
|
|
446
|
+
bands: PaneAxisBand[];
|
|
447
|
+
};
|
|
437
448
|
/**
|
|
438
449
|
* Everything one `addIndicator()` produces — the unit the orchestrator mounts
|
|
439
450
|
* on the renderer. Renderer-neutral.
|
|
@@ -458,6 +469,17 @@ interface IndicatorModel {
|
|
|
458
469
|
native?: {
|
|
459
470
|
type: string;
|
|
460
471
|
};
|
|
472
|
+
/**
|
|
473
|
+
* Value-axis override for the pane this indicator OWNS — declared by content that is
|
|
474
|
+
* not value-mapped (e.g. a bespoke renderer layer painting in pixel bands), where a
|
|
475
|
+
* derived price scale would label meaningless numbers. `'none'` leaves the axis blank;
|
|
476
|
+
* band labels place text at fractions of the pane's height (a categorical axis — one
|
|
477
|
+
* label per band/row, e.g. `frac: 0.25` centers a label in the top quarter). Either way
|
|
478
|
+
* the renderer draws no price ticks, no horizontal gridlines, and no crosshair value
|
|
479
|
+
* chip in that pane. Only honored while such indicators are the pane's sole content —
|
|
480
|
+
* any real series merged into the pane takes the scale (and its labels) back over.
|
|
481
|
+
*/
|
|
482
|
+
paneAxis?: PaneAxis;
|
|
461
483
|
/** Resolved pane id, filled in by the orchestrator after routing. */
|
|
462
484
|
paneId?: string;
|
|
463
485
|
/**
|
|
@@ -1417,11 +1439,22 @@ interface IChartRenderer {
|
|
|
1417
1439
|
/** A chart type's SDK settings changed (dialog edit / applyConfig) — the core forwards
|
|
1418
1440
|
* them to the type's data engine. */
|
|
1419
1441
|
onChartTypeSettingsChange?(cb: (typeId: string, values: Record<string, unknown>) => void): Unsubscribe;
|
|
1420
|
-
/** Host-app settings tabs (callback rows) shown by the renderer's settings dialog.
|
|
1442
|
+
/** Host-app settings tabs (callback rows) shown by the renderer's settings dialog.
|
|
1443
|
+
* `id` names a section for the visibility policy (defaults to the title's slug). */
|
|
1421
1444
|
setSettingsSections?(sections: ReadonlyArray<{
|
|
1422
1445
|
title: string;
|
|
1423
1446
|
rows: readonly unknown[];
|
|
1447
|
+
id?: string;
|
|
1424
1448
|
}>): void;
|
|
1449
|
+
/** Settings-dialog visibility policy: `hidden` lists setting ids to hide (a tab, a
|
|
1450
|
+
* group, or a row — subtree semantics). Presentation-only: hidden values keep
|
|
1451
|
+
* being stored and applied. Optional — a renderer without a settings dialog omits it. */
|
|
1452
|
+
setSettingsVisibility?(policy: {
|
|
1453
|
+
hidden?: readonly string[];
|
|
1454
|
+
}): void;
|
|
1455
|
+
/** Every addressable setting id of this chart (built-ins, chart-type sections,
|
|
1456
|
+
* host sections) — the discovery surface for the visibility policy. */
|
|
1457
|
+
listSettingsIds?(): string[];
|
|
1425
1458
|
/**
|
|
1426
1459
|
* The host shell's chrome size class. `'mobile'` asks the renderer's own chrome
|
|
1427
1460
|
* (dialogs, toolbars, buttons) for its touch-first presentation — fullscreen
|
|
@@ -1562,6 +1595,19 @@ interface VelaOptions extends MarketConfig {
|
|
|
1562
1595
|
* price pane, on their own scale (they never affect the price autoscale). Added
|
|
1563
1596
|
* automatically on chart creation (native renderer) — pass `false` to opt out. */
|
|
1564
1597
|
volume?: boolean;
|
|
1598
|
+
/** Settings-dialog visibility policy. Default: everything visible. `hidden` lists
|
|
1599
|
+
* setting ids to hide — a tab (`'canvas'`), a group (`'canvas.grid'`), or a single
|
|
1600
|
+
* row (`'canvas.grid.vertical'`); an id hides its whole subtree, and a tab with
|
|
1601
|
+
* nothing left disappears from the rail. Hiding is presentation-only: hidden
|
|
1602
|
+
* values keep being stored and applied. Enumerate the addressable ids of a live
|
|
1603
|
+
* chart with `chart.renderer.listSettingsIds()`; the catalog is documented in
|
|
1604
|
+
* docs/user/options.md. */
|
|
1605
|
+
settings?: SettingsVisibilityPolicy;
|
|
1606
|
+
}
|
|
1607
|
+
/** Settings-dialog visibility policy (see `VelaOptions.settings`). */
|
|
1608
|
+
interface SettingsVisibilityPolicy {
|
|
1609
|
+
/** Setting ids to hide — a tab, a group, or a row; an id hides its subtree. */
|
|
1610
|
+
hidden?: readonly string[];
|
|
1565
1611
|
}
|
|
1566
1612
|
/** Per-feature native-renderer animation toggles. */
|
|
1567
1613
|
interface AnimationConfig {
|
|
@@ -1637,4 +1683,4 @@ interface AddIndicatorOptions {
|
|
|
1637
1683
|
title?: string;
|
|
1638
1684
|
}
|
|
1639
1685
|
|
|
1640
|
-
export { type DrawingLabel as $, type AxisLongPressEvent as A, type Background as B, type CrosshairEvent as C, Drawing as D, type BoxTextSize as E, type BoxVAlign as F, type CandleBarColor as G, type CandleSeries as H, type IChartRenderer as I, type CandleStyle as J, type DataWindowGroup as K, type LineStyle as L, type MarketConfig as M, type NativeBackend as N, type OHLCV as O, type PriceStyle as P, type DataWindowOHLC as Q, type RendererCapabilities as R, type SerializedDrawing as S, type ThemeName as T, type Unsubscribe as U, type VisibleRangePreset as V, type DataWindowRow as W, type DirtyRange as X, type DrawingBox as Y, type DrawingExtend as Z, type DrawingIntent as _, type VisibleRange as a, type DrawingLine as a0, type DrawingLinefill as a1, type DrawingMode as a2, type DrawingPoint as a3, type DrawingPolyline as a4, type DrawingStyle as a5, type DrawingTable as a6, type DrawingText as a7, type DrawingXLoc as a8, type DrawingsOption as a9, type
|
|
1686
|
+
export { type DrawingLabel as $, type AxisLongPressEvent as A, type Background as B, type CrosshairEvent as C, Drawing as D, type BoxTextSize as E, type BoxVAlign as F, type CandleBarColor as G, type CandleSeries as H, type IChartRenderer as I, type CandleStyle as J, type DataWindowGroup as K, type LineStyle as L, type MarketConfig as M, type NativeBackend as N, type OHLCV as O, type PriceStyle as P, type DataWindowOHLC as Q, type RendererCapabilities as R, type SerializedDrawing as S, type ThemeName as T, type Unsubscribe as U, type VisibleRangePreset as V, type DataWindowRow as W, type DirtyRange as X, type DrawingBox as Y, type DrawingExtend as Z, type DrawingIntent as _, type VisibleRange as a, type DrawingLine as a0, type DrawingLinefill as a1, type DrawingMode as a2, type DrawingPoint as a3, type DrawingPolyline as a4, type DrawingStyle as a5, type DrawingTable as a6, type DrawingText as a7, type DrawingXLoc as a8, type DrawingsOption as a9, type SchemaPatch as aA, type SeriesKind as aB, type SeriesPoint as aC, type SeriesSpec as aD, type SeriesValueDelta as aE, type SettingsField as aF, type SettingsSchema as aG, type SettingsVisibilityPolicy as aH, type TableCell as aI, type TableMerge as aJ, type TablePosition as aK, type ToolbarGroupConfig as aL, type TradeExecution as aM, type ValuePatch as aN, buildToolbar as aO, defaultToolbar as aP, inputVisible as aQ, type PaneInfo as aR, type Fill as aa, type FillGradientStop as ab, type IndicatorMeta as ac, type InputCondition as ad, type InputSchema as ae, type InputType as af, type InputWhen as ag, type LabelStyle as ah, type LabelYLoc as ai, type LineLikeKind as aj, type LineLikeSeries as ak, type LineLikeStyle as al, type MarkerPoint as am, type MarkerSeries as an, type MarketSnapshot as ao, type MarketSwitch as ap, type PaneAxis as aq, type PaneAxisBand as ar, type PaneHint as as, type PaneKind as at, type PolylinePoint as au, type PriceLine as av, type Projector as aw, type ProviderName as ax, type RendererConstructor as ay, type Scene as az, type VelaOptions as b, type VelaTheme as c, type MarketSession as d, type RendererDisplayOptions as e, type IndicatorRenderHandle as f, type IndicatorStatus as g, type Pane as h, type PaneAction as i, type MoveTarget as j, type IndicatorModel as k, type ScenePatch as l, type InputValue as m, type SymbolPickerFn as n, type LegendActionView as o, type InputChangeEvent as p, type ClickEvent as q, type DataWindowReadout as r, type IDrawingsRendererPort as s, type Millis as t, type SnapMode as u, type DrawingTypeKey as v, type ToolbarDefinition as w, type AddIndicatorOptions as x, type BoxFontFamily as y, type BoxHAlign as z };
|
|
@@ -434,6 +434,17 @@ interface IndicatorMeta {
|
|
|
434
434
|
}
|
|
435
435
|
/** Where an indicator's plots are placed. */
|
|
436
436
|
type PaneHint = 'price' | 'new';
|
|
437
|
+
/** One label of a categorical pane axis: `frac` is the label's center as a fraction of
|
|
438
|
+
* the pane's height (0 = top, 1 = bottom). */
|
|
439
|
+
interface PaneAxisBand {
|
|
440
|
+
frac: number;
|
|
441
|
+
label: string;
|
|
442
|
+
}
|
|
443
|
+
/** A pane's value-axis override (see {@link IndicatorModel.paneAxis}): `'none'` = a
|
|
444
|
+
* blank axis; band labels = a categorical axis, one label per content band/row. */
|
|
445
|
+
type PaneAxis = 'none' | {
|
|
446
|
+
bands: PaneAxisBand[];
|
|
447
|
+
};
|
|
437
448
|
/**
|
|
438
449
|
* Everything one `addIndicator()` produces — the unit the orchestrator mounts
|
|
439
450
|
* on the renderer. Renderer-neutral.
|
|
@@ -458,6 +469,17 @@ interface IndicatorModel {
|
|
|
458
469
|
native?: {
|
|
459
470
|
type: string;
|
|
460
471
|
};
|
|
472
|
+
/**
|
|
473
|
+
* Value-axis override for the pane this indicator OWNS — declared by content that is
|
|
474
|
+
* not value-mapped (e.g. a bespoke renderer layer painting in pixel bands), where a
|
|
475
|
+
* derived price scale would label meaningless numbers. `'none'` leaves the axis blank;
|
|
476
|
+
* band labels place text at fractions of the pane's height (a categorical axis — one
|
|
477
|
+
* label per band/row, e.g. `frac: 0.25` centers a label in the top quarter). Either way
|
|
478
|
+
* the renderer draws no price ticks, no horizontal gridlines, and no crosshair value
|
|
479
|
+
* chip in that pane. Only honored while such indicators are the pane's sole content —
|
|
480
|
+
* any real series merged into the pane takes the scale (and its labels) back over.
|
|
481
|
+
*/
|
|
482
|
+
paneAxis?: PaneAxis;
|
|
461
483
|
/** Resolved pane id, filled in by the orchestrator after routing. */
|
|
462
484
|
paneId?: string;
|
|
463
485
|
/**
|
|
@@ -1417,11 +1439,22 @@ interface IChartRenderer {
|
|
|
1417
1439
|
/** A chart type's SDK settings changed (dialog edit / applyConfig) — the core forwards
|
|
1418
1440
|
* them to the type's data engine. */
|
|
1419
1441
|
onChartTypeSettingsChange?(cb: (typeId: string, values: Record<string, unknown>) => void): Unsubscribe;
|
|
1420
|
-
/** Host-app settings tabs (callback rows) shown by the renderer's settings dialog.
|
|
1442
|
+
/** Host-app settings tabs (callback rows) shown by the renderer's settings dialog.
|
|
1443
|
+
* `id` names a section for the visibility policy (defaults to the title's slug). */
|
|
1421
1444
|
setSettingsSections?(sections: ReadonlyArray<{
|
|
1422
1445
|
title: string;
|
|
1423
1446
|
rows: readonly unknown[];
|
|
1447
|
+
id?: string;
|
|
1424
1448
|
}>): void;
|
|
1449
|
+
/** Settings-dialog visibility policy: `hidden` lists setting ids to hide (a tab, a
|
|
1450
|
+
* group, or a row — subtree semantics). Presentation-only: hidden values keep
|
|
1451
|
+
* being stored and applied. Optional — a renderer without a settings dialog omits it. */
|
|
1452
|
+
setSettingsVisibility?(policy: {
|
|
1453
|
+
hidden?: readonly string[];
|
|
1454
|
+
}): void;
|
|
1455
|
+
/** Every addressable setting id of this chart (built-ins, chart-type sections,
|
|
1456
|
+
* host sections) — the discovery surface for the visibility policy. */
|
|
1457
|
+
listSettingsIds?(): string[];
|
|
1425
1458
|
/**
|
|
1426
1459
|
* The host shell's chrome size class. `'mobile'` asks the renderer's own chrome
|
|
1427
1460
|
* (dialogs, toolbars, buttons) for its touch-first presentation — fullscreen
|
|
@@ -1562,6 +1595,19 @@ interface VelaOptions extends MarketConfig {
|
|
|
1562
1595
|
* price pane, on their own scale (they never affect the price autoscale). Added
|
|
1563
1596
|
* automatically on chart creation (native renderer) — pass `false` to opt out. */
|
|
1564
1597
|
volume?: boolean;
|
|
1598
|
+
/** Settings-dialog visibility policy. Default: everything visible. `hidden` lists
|
|
1599
|
+
* setting ids to hide — a tab (`'canvas'`), a group (`'canvas.grid'`), or a single
|
|
1600
|
+
* row (`'canvas.grid.vertical'`); an id hides its whole subtree, and a tab with
|
|
1601
|
+
* nothing left disappears from the rail. Hiding is presentation-only: hidden
|
|
1602
|
+
* values keep being stored and applied. Enumerate the addressable ids of a live
|
|
1603
|
+
* chart with `chart.renderer.listSettingsIds()`; the catalog is documented in
|
|
1604
|
+
* docs/user/options.md. */
|
|
1605
|
+
settings?: SettingsVisibilityPolicy;
|
|
1606
|
+
}
|
|
1607
|
+
/** Settings-dialog visibility policy (see `VelaOptions.settings`). */
|
|
1608
|
+
interface SettingsVisibilityPolicy {
|
|
1609
|
+
/** Setting ids to hide — a tab, a group, or a row; an id hides its subtree. */
|
|
1610
|
+
hidden?: readonly string[];
|
|
1565
1611
|
}
|
|
1566
1612
|
/** Per-feature native-renderer animation toggles. */
|
|
1567
1613
|
interface AnimationConfig {
|
|
@@ -1637,4 +1683,4 @@ interface AddIndicatorOptions {
|
|
|
1637
1683
|
title?: string;
|
|
1638
1684
|
}
|
|
1639
1685
|
|
|
1640
|
-
export { type DrawingLabel as $, type AxisLongPressEvent as A, type Background as B, type CrosshairEvent as C, Drawing as D, type BoxTextSize as E, type BoxVAlign as F, type CandleBarColor as G, type CandleSeries as H, type IChartRenderer as I, type CandleStyle as J, type DataWindowGroup as K, type LineStyle as L, type MarketConfig as M, type NativeBackend as N, type OHLCV as O, type PriceStyle as P, type DataWindowOHLC as Q, type RendererCapabilities as R, type SerializedDrawing as S, type ThemeName as T, type Unsubscribe as U, type VisibleRangePreset as V, type DataWindowRow as W, type DirtyRange as X, type DrawingBox as Y, type DrawingExtend as Z, type DrawingIntent as _, type VisibleRange as a, type DrawingLine as a0, type DrawingLinefill as a1, type DrawingMode as a2, type DrawingPoint as a3, type DrawingPolyline as a4, type DrawingStyle as a5, type DrawingTable as a6, type DrawingText as a7, type DrawingXLoc as a8, type DrawingsOption as a9, type
|
|
1686
|
+
export { type DrawingLabel as $, type AxisLongPressEvent as A, type Background as B, type CrosshairEvent as C, Drawing as D, type BoxTextSize as E, type BoxVAlign as F, type CandleBarColor as G, type CandleSeries as H, type IChartRenderer as I, type CandleStyle as J, type DataWindowGroup as K, type LineStyle as L, type MarketConfig as M, type NativeBackend as N, type OHLCV as O, type PriceStyle as P, type DataWindowOHLC as Q, type RendererCapabilities as R, type SerializedDrawing as S, type ThemeName as T, type Unsubscribe as U, type VisibleRangePreset as V, type DataWindowRow as W, type DirtyRange as X, type DrawingBox as Y, type DrawingExtend as Z, type DrawingIntent as _, type VisibleRange as a, type DrawingLine as a0, type DrawingLinefill as a1, type DrawingMode as a2, type DrawingPoint as a3, type DrawingPolyline as a4, type DrawingStyle as a5, type DrawingTable as a6, type DrawingText as a7, type DrawingXLoc as a8, type DrawingsOption as a9, type SchemaPatch as aA, type SeriesKind as aB, type SeriesPoint as aC, type SeriesSpec as aD, type SeriesValueDelta as aE, type SettingsField as aF, type SettingsSchema as aG, type SettingsVisibilityPolicy as aH, type TableCell as aI, type TableMerge as aJ, type TablePosition as aK, type ToolbarGroupConfig as aL, type TradeExecution as aM, type ValuePatch as aN, buildToolbar as aO, defaultToolbar as aP, inputVisible as aQ, type PaneInfo as aR, type Fill as aa, type FillGradientStop as ab, type IndicatorMeta as ac, type InputCondition as ad, type InputSchema as ae, type InputType as af, type InputWhen as ag, type LabelStyle as ah, type LabelYLoc as ai, type LineLikeKind as aj, type LineLikeSeries as ak, type LineLikeStyle as al, type MarkerPoint as am, type MarkerSeries as an, type MarketSnapshot as ao, type MarketSwitch as ap, type PaneAxis as aq, type PaneAxisBand as ar, type PaneHint as as, type PaneKind as at, type PolylinePoint as au, type PriceLine as av, type Projector as aw, type ProviderName as ax, type RendererConstructor as ay, type Scene as az, type VelaOptions as b, type VelaTheme as c, type MarketSession as d, type RendererDisplayOptions as e, type IndicatorRenderHandle as f, type IndicatorStatus as g, type Pane as h, type PaneAction as i, type MoveTarget as j, type IndicatorModel as k, type ScenePatch as l, type InputValue as m, type SymbolPickerFn as n, type LegendActionView as o, type InputChangeEvent as p, type ClickEvent as q, type DataWindowReadout as r, type IDrawingsRendererPort as s, type Millis as t, type SnapMode as u, type DrawingTypeKey as v, type ToolbarDefinition as w, type AddIndicatorOptions as x, type BoxFontFamily as y, type BoxHAlign as z };
|