@luxalgo/vela 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{DataProvider-DKNDHpNv.d.cts → DataProvider-BBQ3Hr21.d.cts} +1 -1
- package/dist/{DataProvider-Dzd-Erlk.d.ts → DataProvider-DGesjOJT.d.ts} +1 -1
- package/dist/{chunk-OVQKKXLZ.js → chunk-5SE4PL3H.js} +402 -60
- package/dist/{chunk-RHIDOUFL.js → chunk-AIW3EJUE.js} +2 -2
- package/dist/{chunk-GYD2THPV.js → chunk-EP6NDJYK.js} +5 -0
- package/dist/{chunk-KCCZNKH7.js → chunk-FNOMKHEZ.js} +668 -78
- package/dist/{chunk-7UFX5ZIG.js → chunk-S6F6SQ2L.js} +7 -2
- package/dist/{chunk-KM6LHB3Y.js → chunk-ULIX6AE2.js} +6 -1
- package/dist/{contributions-hX3EUyjG.d.ts → contributions-6N0rbrPC.d.ts} +46 -31
- package/dist/{contributions-o1GRKPI_.d.cts → contributions-BlV3kb0O.d.cts} +46 -31
- package/dist/{history-Dzxz-MQj.d.ts → history-BTd52YMA.d.ts} +10 -5
- package/dist/{history-LJkz4-sS.d.cts → history-DX3Zne3a.d.cts} +10 -5
- package/dist/index.cjs +680 -75
- package/dist/index.d.cts +37 -12
- package/dist/index.d.ts +37 -12
- package/dist/index.js +4 -4
- package/dist/{options-Q-576hIi.d.cts → options-DbQholFV.d.cts} +14 -0
- package/dist/{options-Q-576hIi.d.ts → options-DbQholFV.d.ts} +14 -0
- package/dist/{plugin-D94muTV-.d.cts → plugin-O34MbXf-.d.cts} +157 -7
- package/dist/{plugin-aGUD1epn.d.ts → plugin-TN3n-9YN.d.ts} +157 -7
- package/dist/plugin.cjs +5 -0
- package/dist/plugin.d.cts +4 -4
- package/dist/plugin.d.ts +4 -4
- package/dist/plugin.js +2 -2
- package/dist/providers/binance.d.cts +2 -2
- package/dist/providers/binance.d.ts +2 -2
- package/dist/providers/coinbase.d.cts +2 -2
- package/dist/providers/coinbase.d.ts +2 -2
- package/dist/providers/hyperliquid.d.cts +2 -2
- package/dist/providers/hyperliquid.d.ts +2 -2
- package/dist/ui.cjs +10 -0
- package/dist/ui.d.cts +1 -1
- package/dist/ui.d.ts +1 -1
- package/dist/ui.js +3 -3
- package/dist/vela.global.js +680 -75
- package/dist/vela.global.min.js +59 -28
- package/dist/widget.cjs +1081 -134
- package/dist/widget.d.cts +30 -16
- package/dist/widget.d.ts +30 -16
- package/dist/widget.js +9 -9
- package/dist/workspace.cjs +1372 -183
- package/dist/workspace.d.cts +66 -8
- package/dist/workspace.d.ts +66 -8
- package/dist/workspace.js +275 -37
- 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 ContextSelect, b as DataControl, c as DrawingsControl, E as EngineAlert, d as EngineCapabilities, e as EngineContextSnapshot, f as EngineFactory, g as EngineWarning, h as ExecutionHandlers, i as ExecutionMarket, j as ExecutionRequest, k as ExecutionSession, F as FetchSeries, l as IndicatorEventMap, I as IndicatorHandle, m as IndicatorSummary, L as LegendActionDescriptor, n as LegendIndicatorInfo, N as NativeIndicator, o as NativeIndicatorContext, p as NativeIndicatorDescriptor, q as NativeIndicatorInfo, r as NativeIndicatorOutput, P as ParsedSymbol, s as PreparedScript, t as RendererControl, u as RunIndicatorResult, v as SceneInspection, a as ScriptRun, w as ScriptRunCause, x as ScriptRunResult, S as ScriptingEngine, y as SidePanelButton, z as SidePanelDescriptor, A as SidePanelHandle, G as SidePanelHeader, H as StrategyFill, J as StrategyState, K as StrategyTrade, T as TypedEventBus, V as Vela, M as VelaDeps, O as VelaEventMap, Q as VisibleBarRange, U as WidgetActionDescriptor, X as WidgetActionTarget, Y as WidgetAttachment, W as WidgetContext, Z as getNativeIndicator, _ as legendActions, $ as nativeIndicatorDescriptors, a0 as nativeIndicatorTypes, a1 as registerDefaultEngine, a2 as registerLegendAction, a3 as registerNativeIndicator, a4 as registerSidePanel, a5 as registerWidgetAction, a6 as registerWidgetAttachment, a7 as resolveEngines, a8 as sidePanels, a9 as unregisterDefaultEngine, aa as unregisterLegendAction, ab as unregisterNativeIndicator, ac as unregisterSidePanel, ad as unregisterWidgetAction, ae as unregisterWidgetAttachment, af as widgetActions, ag as widgetAttachments } from './contributions-
|
|
3
|
-
import { D as Drawing, S as SerializedDrawing, U as Unsubscribe, L as LineStyle, P as PriceStyle, I as IChartRenderer, R as RendererCapabilities, d as RendererDisplayOptions, e as IndicatorRenderHandle, f as IndicatorStatus, c as VelaTheme, O as OHLCV, g as Pane, h as PaneAction, i as MoveTarget, j as IndicatorModel, k as ScenePatch, l as InputValue, m as SymbolPickerFn, n as LegendActionView, o as InputChangeEvent, T as ThemeName, C as CrosshairEvent, p as ClickEvent, a as VisibleRange, q as DataWindowReadout, r as IDrawingsRendererPort, s as Millis, t as SnapMode, u as DrawingTypeKey, v as ToolbarDefinition, M as MarketConfig } from './options-
|
|
4
|
-
export { A as AddIndicatorOptions, B as Background, w as BoxFontFamily, x as BoxHAlign, y as BoxTextSize, z as BoxVAlign, E as CandleBarColor, F as CandleSeries, G as CandleStyle, H as DataWindowGroup, J as DataWindowOHLC, K as DataWindowRow, Q as DirtyRange, W as DrawingBox, X as DrawingExtend, Y as DrawingIntent, Z as DrawingLabel, _ as DrawingLine, $ as DrawingLinefill, a0 as DrawingMode, a1 as DrawingPoint, a2 as DrawingPolyline, a3 as DrawingStyle, a4 as DrawingTable, a5 as DrawingText, a6 as DrawingXLoc, a7 as DrawingsOption, a8 as Fill, a9 as FillGradientStop, aa as IndicatorMeta, ab as InputSchema, ac as InputType, ad as LabelStyle, ae as LabelYLoc, af as LineLikeKind, ag as LineLikeSeries, ah as LineLikeStyle, ai as MarkerPoint, aj as MarkerSeries, ak as MarketSnapshot, al as MarketSwitch, am as PaneHint, an as PaneKind, ao as PolylinePoint, ap as PriceLine, aq as Projector, ar as ProviderName, as as RendererConstructor, at as Scene, au as SchemaPatch, av as SeriesKind, aw as SeriesPoint, ax as SeriesSpec, ay as SeriesValueDelta, az as SettingsField, aA as SettingsSchema, aB as TableCell, aC as TableMerge, aD as TablePosition, aE as ToolbarGroupConfig, aF as TradeExecution, aG as ValuePatch, b as VelaOptions, V as VisibleRangePreset, aH as buildToolbar, aI as defaultToolbar } from './options-
|
|
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, C as CATEGORICAL,
|
|
1
|
+
import { D as DrawingsDocument, R as Resolved } from './contributions-BlV3kb0O.cjs';
|
|
2
|
+
export { B as BarsChangeReason, C as ContextSelect, b as DataControl, c as DrawingsControl, E as EngineAlert, d as EngineCapabilities, e as EngineContextSnapshot, f as EngineFactory, g as EngineWarning, h as ExecutionHandlers, i as ExecutionMarket, j as ExecutionRequest, k as ExecutionSession, F as FetchSeries, l as IndicatorEventMap, I as IndicatorHandle, m as IndicatorSummary, L as LegendActionDescriptor, n as LegendIndicatorInfo, N as NativeIndicator, o as NativeIndicatorContext, p as NativeIndicatorDescriptor, q as NativeIndicatorInfo, r as NativeIndicatorOutput, P as ParsedSymbol, s as PreparedScript, t as RendererControl, u as RunIndicatorResult, v as SceneInspection, a as ScriptRun, w as ScriptRunCause, x as ScriptRunResult, S as ScriptingEngine, y as SidePanelButton, z as SidePanelDescriptor, A as SidePanelHandle, G as SidePanelHeader, H as StrategyFill, J as StrategyState, K as StrategyTrade, T as TypedEventBus, V as Vela, M as VelaDeps, O as VelaEventMap, Q as VisibleBarRange, U as WidgetActionDescriptor, X as WidgetActionTarget, Y as WidgetAttachment, W as WidgetContext, Z as getNativeIndicator, _ as legendActions, $ as nativeIndicatorDescriptors, a0 as nativeIndicatorTypes, a1 as registerDefaultEngine, a2 as registerLegendAction, a3 as registerNativeIndicator, a4 as registerSidePanel, a5 as registerWidgetAction, a6 as registerWidgetAttachment, a7 as resolveEngines, a8 as sidePanels, a9 as unregisterDefaultEngine, aa as unregisterLegendAction, ab as unregisterNativeIndicator, ac as unregisterSidePanel, ad as unregisterWidgetAction, ae as unregisterWidgetAttachment, af as widgetActions, ag as widgetAttachments } from './contributions-BlV3kb0O.cjs';
|
|
3
|
+
import { D as Drawing, S as SerializedDrawing, U as Unsubscribe, L as LineStyle, P as PriceStyle, I as IChartRenderer, R as RendererCapabilities, d as RendererDisplayOptions, e as IndicatorRenderHandle, f as IndicatorStatus, c as VelaTheme, O as OHLCV, g as Pane, h as PaneAction, i as MoveTarget, j as IndicatorModel, k as ScenePatch, l as InputValue, m as SymbolPickerFn, n as LegendActionView, o as InputChangeEvent, T as ThemeName, C as CrosshairEvent, p as ClickEvent, a as VisibleRange, q as DataWindowReadout, r as IDrawingsRendererPort, s as Millis, t as SnapMode, u as DrawingTypeKey, v as ToolbarDefinition, M as MarketConfig } from './options-DbQholFV.cjs';
|
|
4
|
+
export { A as AddIndicatorOptions, B as Background, w as BoxFontFamily, x as BoxHAlign, y as BoxTextSize, z as BoxVAlign, E as CandleBarColor, F as CandleSeries, G as CandleStyle, H as DataWindowGroup, J as DataWindowOHLC, K as DataWindowRow, Q as DirtyRange, W as DrawingBox, X as DrawingExtend, Y as DrawingIntent, Z as DrawingLabel, _ as DrawingLine, $ as DrawingLinefill, a0 as DrawingMode, a1 as DrawingPoint, a2 as DrawingPolyline, a3 as DrawingStyle, a4 as DrawingTable, a5 as DrawingText, a6 as DrawingXLoc, a7 as DrawingsOption, a8 as Fill, a9 as FillGradientStop, aa as IndicatorMeta, ab as InputSchema, ac as InputType, ad as LabelStyle, ae as LabelYLoc, af as LineLikeKind, ag as LineLikeSeries, ah as LineLikeStyle, ai as MarkerPoint, aj as MarkerSeries, ak as MarketSnapshot, al as MarketSwitch, am as PaneHint, an as PaneKind, ao as PolylinePoint, ap as PriceLine, aq as Projector, ar as ProviderName, as as RendererConstructor, at as Scene, au as SchemaPatch, av as SeriesKind, aw as SeriesPoint, ax as SeriesSpec, ay as SeriesValueDelta, az as SettingsField, aA as SettingsSchema, aB as TableCell, aC as TableMerge, aD as TablePosition, aE as ToolbarGroupConfig, aF as TradeExecution, aG as ValuePatch, b as VelaOptions, V as VisibleRangePreset, aH as buildToolbar, aI as defaultToolbar } from './options-DbQholFV.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-BBQ3Hr21.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, R as RendererLayerArgs, l as RendererLayerDefinition, m as RendererLayerInstance, S as SERIES_LINE, n as SESSION_OFF, o as SESSION_POST, p as SESSION_PRE, q as SLATE, r as SLATE_DEEP, s as SeriesDataEngine, t as SeriesDataEngineHost, u as SettingsRowCondition, v as SettingsRowDescriptor, w as SettingsRowSwatch, x as SettingsRowWhen, y as SettingsSelectOption, T as TRADE_EXIT, z as TRADE_LONG, E as TRADE_SHORT, V as VALID, W as WARNING, F as categoricalColor, G as chartType, J as chartTypes, K as createDrawing, L as deserializeDrawing, O as drawingTypes, P as getDrawingType, Q as registerChartType, U as registerDrawingType, X as registerRendererDefaults, Y as registerRendererLayer, Z as rendererDefaults, _ as rendererLayers, $ as stableSeriesId, a0 as tickerModifierIds, a1 as unregisterChartType, a2 as unregisterRendererDefaults, a3 as unregisterRendererLayer } from './plugin-O34MbXf-.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';
|
|
@@ -543,6 +543,10 @@ declare class NativeRenderer implements IChartRenderer {
|
|
|
543
543
|
* but pinned to the stable surface background, text, and border, so custom plot cosmetics
|
|
544
544
|
* never recolor the toolbar, gutters, or drawing UI chrome. */
|
|
545
545
|
private chromeTheme;
|
|
546
|
+
/** The colors the axis-scale gutters (price + time) paint with: the LIVE chart background
|
|
547
|
+
* (`layout.background`) and its contrast-corrected text, so the scales read as part of the
|
|
548
|
+
* plot. Only the toolbar/dialog chrome stays on the stable app-theme surface. */
|
|
549
|
+
private axisSurface;
|
|
546
550
|
mount(container: HTMLElement, theme: VelaTheme): void;
|
|
547
551
|
/**
|
|
548
552
|
* Create + mount the L0 geometry backend and return its canvas. Picks WebGL2
|
|
@@ -741,6 +745,10 @@ declare class NativeRenderer implements IChartRenderer {
|
|
|
741
745
|
/** One group per indicator (name = indicator title), each with a row per drawable plot. */
|
|
742
746
|
private dataWindowGroups;
|
|
743
747
|
private renderFrame;
|
|
748
|
+
/** Repaint the SDK layers that opted into cursor tracking (their own canvas only). */
|
|
749
|
+
private repaintCursorLayers;
|
|
750
|
+
/** One frame's args for an SDK renderer layer (shared by the data + cursor paint paths). */
|
|
751
|
+
private extLayerArgs;
|
|
744
752
|
/** Paint the below-data (L-1) + geometry (L0) + chrome (L1) layers from the current scene/coords. */
|
|
745
753
|
private paintData;
|
|
746
754
|
/** Build the data→pixel projector user drawings resolve their anchors through. */
|
|
@@ -838,10 +846,12 @@ declare class NativeRenderer implements IChartRenderer {
|
|
|
838
846
|
private collapsedMasterMap;
|
|
839
847
|
/** Reserve `px` of left gutter for the docked drawings toolbar (0 releases it) + re-lay-out the plot. */
|
|
840
848
|
private setToolbarGutter;
|
|
841
|
-
/** Publish the
|
|
842
|
-
*
|
|
843
|
-
*
|
|
844
|
-
|
|
849
|
+
/** Publish the gutters on the mount container as `--vela-toolbar-gutter` (left,
|
|
850
|
+
* drawings toolbar) and `--vela-scale-gutter` (right, the full price-scale width
|
|
851
|
+
* incl. merged own-scale columns), so host overlays sharing that container (a
|
|
852
|
+
* status line, a watermark, a custom legend) can anchor to the plot's edges
|
|
853
|
+
* without reaching into the renderer's DOM. */
|
|
854
|
+
private publishGutters;
|
|
845
855
|
/** The built-in mark, or the host's own when one is set. */
|
|
846
856
|
private buildAttributionEl;
|
|
847
857
|
/** Swap the mark in place — the content kind changed (built-in ↔ host-supplied). */
|
|
@@ -871,6 +881,11 @@ interface DrawingToolbarOptions {
|
|
|
871
881
|
/** Collapse/expand notification — a docked host resizes its gutter reservation to
|
|
872
882
|
* {@link TOOLBAR_COLLAPSED_WIDTH} / the full width (a static bar reflows on its own). */
|
|
873
883
|
onCollapse?: (collapsed: boolean) => void;
|
|
884
|
+
/** When given, a drawings-sync toggle renders below the stay button: enabled, every
|
|
885
|
+
* NEWLY CREATED drawing is copied onto the other linked charts and the set stays
|
|
886
|
+
* linked — edits and removals follow (a multi-chart host's concern — a
|
|
887
|
+
* single-chart bar omits the callback and never shows it). */
|
|
888
|
+
onDrawingsSync?: (on: boolean) => void;
|
|
874
889
|
}
|
|
875
890
|
/**
|
|
876
891
|
* The vertical drawing toolbar (renderer chrome), docked as a flush bar in the left gutter. Each
|
|
@@ -879,8 +894,10 @@ interface DrawingToolbarOptions {
|
|
|
879
894
|
* cursor button returns to select/idle; measure/eraser modes sit at the bottom, and the magnet is a
|
|
880
895
|
* cell whose chevron opens an Off/Weak/Strong menu (its icon toggles the last-used strength on/off).
|
|
881
896
|
* Below the magnet, a stay-in-drawing-mode toggle keeps tools armed after each placement.
|
|
882
|
-
* Hover and active tints are CSS-driven (`:hover` + `[data-active]`) so they never lag.
|
|
883
|
-
*
|
|
897
|
+
* Hover and active tints are CSS-driven (`:hover` + `[data-active]`) so they never lag. Every
|
|
898
|
+
* icon carries a themed tooltip (the chrome default 700ms dwell); a group cell's tip names the
|
|
899
|
+
* tool its icon arms (the last-used one). Pure vanilla DOM on the host (a `pointer-events:auto`
|
|
900
|
+
* island).
|
|
884
901
|
*/
|
|
885
902
|
declare class DrawingToolbar {
|
|
886
903
|
private readonly host;
|
|
@@ -917,6 +934,8 @@ declare class DrawingToolbar {
|
|
|
917
934
|
private eraserActive;
|
|
918
935
|
private stayBtn;
|
|
919
936
|
private stayActive;
|
|
937
|
+
private syncBtn;
|
|
938
|
+
private syncActive;
|
|
920
939
|
private collapseBtn;
|
|
921
940
|
private collapsed;
|
|
922
941
|
private visible;
|
|
@@ -928,6 +947,7 @@ declare class DrawingToolbar {
|
|
|
928
947
|
private readonly width;
|
|
929
948
|
private readonly dock;
|
|
930
949
|
private readonly onCollapse;
|
|
950
|
+
private readonly onDrawingsSync;
|
|
931
951
|
constructor(host: HTMLElement, theme: VelaTheme, onArm: (type: DrawingTypeKey | null) => void, onMagnet?: (mode: SnapMode) => void, onMeasure?: () => void, onEraser?: () => void, onToggleFavorite?: (type: DrawingTypeKey, on: boolean) => void, onStayMode?: (on: boolean) => void, options?: DrawingToolbarOptions);
|
|
932
952
|
/** Live divider/border ink — the option override, else the current theme's border
|
|
933
953
|
* (so a theme swap re-inks the bar without a rebuild option). */
|
|
@@ -986,6 +1006,11 @@ declare class DrawingToolbar {
|
|
|
986
1006
|
/** Reflect stay-in-drawing-mode externally without notifying back. */
|
|
987
1007
|
setStayMode(on: boolean): void;
|
|
988
1008
|
private paintStay;
|
|
1009
|
+
/** Toggle drawings sync on/off and notify the host. */
|
|
1010
|
+
private toggleDrawingsSync;
|
|
1011
|
+
/** Reflect drawings sync externally (e.g. set through the API) without notifying back. */
|
|
1012
|
+
setDrawingsSyncMode(on: boolean): void;
|
|
1013
|
+
private paintDrawingsSync;
|
|
989
1014
|
/** Create the positioned flyout panel anchored to a cell, register it as open, and start the
|
|
990
1015
|
* outside-dismiss. Callers fill it with items. */
|
|
991
1016
|
private beginFlyout;
|
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 ContextSelect, b as DataControl, c as DrawingsControl, E as EngineAlert, d as EngineCapabilities, e as EngineContextSnapshot, f as EngineFactory, g as EngineWarning, h as ExecutionHandlers, i as ExecutionMarket, j as ExecutionRequest, k as ExecutionSession, F as FetchSeries, l as IndicatorEventMap, I as IndicatorHandle, m as IndicatorSummary, L as LegendActionDescriptor, n as LegendIndicatorInfo, N as NativeIndicator, o as NativeIndicatorContext, p as NativeIndicatorDescriptor, q as NativeIndicatorInfo, r as NativeIndicatorOutput, P as ParsedSymbol, s as PreparedScript, t as RendererControl, u as RunIndicatorResult, v as SceneInspection, a as ScriptRun, w as ScriptRunCause, x as ScriptRunResult, S as ScriptingEngine, y as SidePanelButton, z as SidePanelDescriptor, A as SidePanelHandle, G as SidePanelHeader, H as StrategyFill, J as StrategyState, K as StrategyTrade, T as TypedEventBus, V as Vela, M as VelaDeps, O as VelaEventMap, Q as VisibleBarRange, U as WidgetActionDescriptor, X as WidgetActionTarget, Y as WidgetAttachment, W as WidgetContext, Z as getNativeIndicator, _ as legendActions, $ as nativeIndicatorDescriptors, a0 as nativeIndicatorTypes, a1 as registerDefaultEngine, a2 as registerLegendAction, a3 as registerNativeIndicator, a4 as registerSidePanel, a5 as registerWidgetAction, a6 as registerWidgetAttachment, a7 as resolveEngines, a8 as sidePanels, a9 as unregisterDefaultEngine, aa as unregisterLegendAction, ab as unregisterNativeIndicator, ac as unregisterSidePanel, ad as unregisterWidgetAction, ae as unregisterWidgetAttachment, af as widgetActions, ag as widgetAttachments } from './contributions-
|
|
3
|
-
import { D as Drawing, S as SerializedDrawing, U as Unsubscribe, L as LineStyle, P as PriceStyle, I as IChartRenderer, R as RendererCapabilities, d as RendererDisplayOptions, e as IndicatorRenderHandle, f as IndicatorStatus, c as VelaTheme, O as OHLCV, g as Pane, h as PaneAction, i as MoveTarget, j as IndicatorModel, k as ScenePatch, l as InputValue, m as SymbolPickerFn, n as LegendActionView, o as InputChangeEvent, T as ThemeName, C as CrosshairEvent, p as ClickEvent, a as VisibleRange, q as DataWindowReadout, r as IDrawingsRendererPort, s as Millis, t as SnapMode, u as DrawingTypeKey, v as ToolbarDefinition, M as MarketConfig } from './options-
|
|
4
|
-
export { A as AddIndicatorOptions, B as Background, w as BoxFontFamily, x as BoxHAlign, y as BoxTextSize, z as BoxVAlign, E as CandleBarColor, F as CandleSeries, G as CandleStyle, H as DataWindowGroup, J as DataWindowOHLC, K as DataWindowRow, Q as DirtyRange, W as DrawingBox, X as DrawingExtend, Y as DrawingIntent, Z as DrawingLabel, _ as DrawingLine, $ as DrawingLinefill, a0 as DrawingMode, a1 as DrawingPoint, a2 as DrawingPolyline, a3 as DrawingStyle, a4 as DrawingTable, a5 as DrawingText, a6 as DrawingXLoc, a7 as DrawingsOption, a8 as Fill, a9 as FillGradientStop, aa as IndicatorMeta, ab as InputSchema, ac as InputType, ad as LabelStyle, ae as LabelYLoc, af as LineLikeKind, ag as LineLikeSeries, ah as LineLikeStyle, ai as MarkerPoint, aj as MarkerSeries, ak as MarketSnapshot, al as MarketSwitch, am as PaneHint, an as PaneKind, ao as PolylinePoint, ap as PriceLine, aq as Projector, ar as ProviderName, as as RendererConstructor, at as Scene, au as SchemaPatch, av as SeriesKind, aw as SeriesPoint, ax as SeriesSpec, ay as SeriesValueDelta, az as SettingsField, aA as SettingsSchema, aB as TableCell, aC as TableMerge, aD as TablePosition, aE as ToolbarGroupConfig, aF as TradeExecution, aG as ValuePatch, b as VelaOptions, V as VisibleRangePreset, aH as buildToolbar, aI as defaultToolbar } from './options-
|
|
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, C as CATEGORICAL,
|
|
1
|
+
import { D as DrawingsDocument, R as Resolved } from './contributions-6N0rbrPC.js';
|
|
2
|
+
export { B as BarsChangeReason, C as ContextSelect, b as DataControl, c as DrawingsControl, E as EngineAlert, d as EngineCapabilities, e as EngineContextSnapshot, f as EngineFactory, g as EngineWarning, h as ExecutionHandlers, i as ExecutionMarket, j as ExecutionRequest, k as ExecutionSession, F as FetchSeries, l as IndicatorEventMap, I as IndicatorHandle, m as IndicatorSummary, L as LegendActionDescriptor, n as LegendIndicatorInfo, N as NativeIndicator, o as NativeIndicatorContext, p as NativeIndicatorDescriptor, q as NativeIndicatorInfo, r as NativeIndicatorOutput, P as ParsedSymbol, s as PreparedScript, t as RendererControl, u as RunIndicatorResult, v as SceneInspection, a as ScriptRun, w as ScriptRunCause, x as ScriptRunResult, S as ScriptingEngine, y as SidePanelButton, z as SidePanelDescriptor, A as SidePanelHandle, G as SidePanelHeader, H as StrategyFill, J as StrategyState, K as StrategyTrade, T as TypedEventBus, V as Vela, M as VelaDeps, O as VelaEventMap, Q as VisibleBarRange, U as WidgetActionDescriptor, X as WidgetActionTarget, Y as WidgetAttachment, W as WidgetContext, Z as getNativeIndicator, _ as legendActions, $ as nativeIndicatorDescriptors, a0 as nativeIndicatorTypes, a1 as registerDefaultEngine, a2 as registerLegendAction, a3 as registerNativeIndicator, a4 as registerSidePanel, a5 as registerWidgetAction, a6 as registerWidgetAttachment, a7 as resolveEngines, a8 as sidePanels, a9 as unregisterDefaultEngine, aa as unregisterLegendAction, ab as unregisterNativeIndicator, ac as unregisterSidePanel, ad as unregisterWidgetAction, ae as unregisterWidgetAttachment, af as widgetActions, ag as widgetAttachments } from './contributions-6N0rbrPC.js';
|
|
3
|
+
import { D as Drawing, S as SerializedDrawing, U as Unsubscribe, L as LineStyle, P as PriceStyle, I as IChartRenderer, R as RendererCapabilities, d as RendererDisplayOptions, e as IndicatorRenderHandle, f as IndicatorStatus, c as VelaTheme, O as OHLCV, g as Pane, h as PaneAction, i as MoveTarget, j as IndicatorModel, k as ScenePatch, l as InputValue, m as SymbolPickerFn, n as LegendActionView, o as InputChangeEvent, T as ThemeName, C as CrosshairEvent, p as ClickEvent, a as VisibleRange, q as DataWindowReadout, r as IDrawingsRendererPort, s as Millis, t as SnapMode, u as DrawingTypeKey, v as ToolbarDefinition, M as MarketConfig } from './options-DbQholFV.js';
|
|
4
|
+
export { A as AddIndicatorOptions, B as Background, w as BoxFontFamily, x as BoxHAlign, y as BoxTextSize, z as BoxVAlign, E as CandleBarColor, F as CandleSeries, G as CandleStyle, H as DataWindowGroup, J as DataWindowOHLC, K as DataWindowRow, Q as DirtyRange, W as DrawingBox, X as DrawingExtend, Y as DrawingIntent, Z as DrawingLabel, _ as DrawingLine, $ as DrawingLinefill, a0 as DrawingMode, a1 as DrawingPoint, a2 as DrawingPolyline, a3 as DrawingStyle, a4 as DrawingTable, a5 as DrawingText, a6 as DrawingXLoc, a7 as DrawingsOption, a8 as Fill, a9 as FillGradientStop, aa as IndicatorMeta, ab as InputSchema, ac as InputType, ad as LabelStyle, ae as LabelYLoc, af as LineLikeKind, ag as LineLikeSeries, ah as LineLikeStyle, ai as MarkerPoint, aj as MarkerSeries, ak as MarketSnapshot, al as MarketSwitch, am as PaneHint, an as PaneKind, ao as PolylinePoint, ap as PriceLine, aq as Projector, ar as ProviderName, as as RendererConstructor, at as Scene, au as SchemaPatch, av as SeriesKind, aw as SeriesPoint, ax as SeriesSpec, ay as SeriesValueDelta, az as SettingsField, aA as SettingsSchema, aB as TableCell, aC as TableMerge, aD as TablePosition, aE as ToolbarGroupConfig, aF as TradeExecution, aG as ValuePatch, b as VelaOptions, V as VisibleRangePreset, aH as buildToolbar, aI as defaultToolbar } from './options-DbQholFV.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-DGesjOJT.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, R as RendererLayerArgs, l as RendererLayerDefinition, m as RendererLayerInstance, S as SERIES_LINE, n as SESSION_OFF, o as SESSION_POST, p as SESSION_PRE, q as SLATE, r as SLATE_DEEP, s as SeriesDataEngine, t as SeriesDataEngineHost, u as SettingsRowCondition, v as SettingsRowDescriptor, w as SettingsRowSwatch, x as SettingsRowWhen, y as SettingsSelectOption, T as TRADE_EXIT, z as TRADE_LONG, E as TRADE_SHORT, V as VALID, W as WARNING, F as categoricalColor, G as chartType, J as chartTypes, K as createDrawing, L as deserializeDrawing, O as drawingTypes, P as getDrawingType, Q as registerChartType, U as registerDrawingType, X as registerRendererDefaults, Y as registerRendererLayer, Z as rendererDefaults, _ as rendererLayers, $ as stableSeriesId, a0 as tickerModifierIds, a1 as unregisterChartType, a2 as unregisterRendererDefaults, a3 as unregisterRendererLayer } from './plugin-TN3n-9YN.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';
|
|
@@ -543,6 +543,10 @@ declare class NativeRenderer implements IChartRenderer {
|
|
|
543
543
|
* but pinned to the stable surface background, text, and border, so custom plot cosmetics
|
|
544
544
|
* never recolor the toolbar, gutters, or drawing UI chrome. */
|
|
545
545
|
private chromeTheme;
|
|
546
|
+
/** The colors the axis-scale gutters (price + time) paint with: the LIVE chart background
|
|
547
|
+
* (`layout.background`) and its contrast-corrected text, so the scales read as part of the
|
|
548
|
+
* plot. Only the toolbar/dialog chrome stays on the stable app-theme surface. */
|
|
549
|
+
private axisSurface;
|
|
546
550
|
mount(container: HTMLElement, theme: VelaTheme): void;
|
|
547
551
|
/**
|
|
548
552
|
* Create + mount the L0 geometry backend and return its canvas. Picks WebGL2
|
|
@@ -741,6 +745,10 @@ declare class NativeRenderer implements IChartRenderer {
|
|
|
741
745
|
/** One group per indicator (name = indicator title), each with a row per drawable plot. */
|
|
742
746
|
private dataWindowGroups;
|
|
743
747
|
private renderFrame;
|
|
748
|
+
/** Repaint the SDK layers that opted into cursor tracking (their own canvas only). */
|
|
749
|
+
private repaintCursorLayers;
|
|
750
|
+
/** One frame's args for an SDK renderer layer (shared by the data + cursor paint paths). */
|
|
751
|
+
private extLayerArgs;
|
|
744
752
|
/** Paint the below-data (L-1) + geometry (L0) + chrome (L1) layers from the current scene/coords. */
|
|
745
753
|
private paintData;
|
|
746
754
|
/** Build the data→pixel projector user drawings resolve their anchors through. */
|
|
@@ -838,10 +846,12 @@ declare class NativeRenderer implements IChartRenderer {
|
|
|
838
846
|
private collapsedMasterMap;
|
|
839
847
|
/** Reserve `px` of left gutter for the docked drawings toolbar (0 releases it) + re-lay-out the plot. */
|
|
840
848
|
private setToolbarGutter;
|
|
841
|
-
/** Publish the
|
|
842
|
-
*
|
|
843
|
-
*
|
|
844
|
-
|
|
849
|
+
/** Publish the gutters on the mount container as `--vela-toolbar-gutter` (left,
|
|
850
|
+
* drawings toolbar) and `--vela-scale-gutter` (right, the full price-scale width
|
|
851
|
+
* incl. merged own-scale columns), so host overlays sharing that container (a
|
|
852
|
+
* status line, a watermark, a custom legend) can anchor to the plot's edges
|
|
853
|
+
* without reaching into the renderer's DOM. */
|
|
854
|
+
private publishGutters;
|
|
845
855
|
/** The built-in mark, or the host's own when one is set. */
|
|
846
856
|
private buildAttributionEl;
|
|
847
857
|
/** Swap the mark in place — the content kind changed (built-in ↔ host-supplied). */
|
|
@@ -871,6 +881,11 @@ interface DrawingToolbarOptions {
|
|
|
871
881
|
/** Collapse/expand notification — a docked host resizes its gutter reservation to
|
|
872
882
|
* {@link TOOLBAR_COLLAPSED_WIDTH} / the full width (a static bar reflows on its own). */
|
|
873
883
|
onCollapse?: (collapsed: boolean) => void;
|
|
884
|
+
/** When given, a drawings-sync toggle renders below the stay button: enabled, every
|
|
885
|
+
* NEWLY CREATED drawing is copied onto the other linked charts and the set stays
|
|
886
|
+
* linked — edits and removals follow (a multi-chart host's concern — a
|
|
887
|
+
* single-chart bar omits the callback and never shows it). */
|
|
888
|
+
onDrawingsSync?: (on: boolean) => void;
|
|
874
889
|
}
|
|
875
890
|
/**
|
|
876
891
|
* The vertical drawing toolbar (renderer chrome), docked as a flush bar in the left gutter. Each
|
|
@@ -879,8 +894,10 @@ interface DrawingToolbarOptions {
|
|
|
879
894
|
* cursor button returns to select/idle; measure/eraser modes sit at the bottom, and the magnet is a
|
|
880
895
|
* cell whose chevron opens an Off/Weak/Strong menu (its icon toggles the last-used strength on/off).
|
|
881
896
|
* Below the magnet, a stay-in-drawing-mode toggle keeps tools armed after each placement.
|
|
882
|
-
* Hover and active tints are CSS-driven (`:hover` + `[data-active]`) so they never lag.
|
|
883
|
-
*
|
|
897
|
+
* Hover and active tints are CSS-driven (`:hover` + `[data-active]`) so they never lag. Every
|
|
898
|
+
* icon carries a themed tooltip (the chrome default 700ms dwell); a group cell's tip names the
|
|
899
|
+
* tool its icon arms (the last-used one). Pure vanilla DOM on the host (a `pointer-events:auto`
|
|
900
|
+
* island).
|
|
884
901
|
*/
|
|
885
902
|
declare class DrawingToolbar {
|
|
886
903
|
private readonly host;
|
|
@@ -917,6 +934,8 @@ declare class DrawingToolbar {
|
|
|
917
934
|
private eraserActive;
|
|
918
935
|
private stayBtn;
|
|
919
936
|
private stayActive;
|
|
937
|
+
private syncBtn;
|
|
938
|
+
private syncActive;
|
|
920
939
|
private collapseBtn;
|
|
921
940
|
private collapsed;
|
|
922
941
|
private visible;
|
|
@@ -928,6 +947,7 @@ declare class DrawingToolbar {
|
|
|
928
947
|
private readonly width;
|
|
929
948
|
private readonly dock;
|
|
930
949
|
private readonly onCollapse;
|
|
950
|
+
private readonly onDrawingsSync;
|
|
931
951
|
constructor(host: HTMLElement, theme: VelaTheme, onArm: (type: DrawingTypeKey | null) => void, onMagnet?: (mode: SnapMode) => void, onMeasure?: () => void, onEraser?: () => void, onToggleFavorite?: (type: DrawingTypeKey, on: boolean) => void, onStayMode?: (on: boolean) => void, options?: DrawingToolbarOptions);
|
|
932
952
|
/** Live divider/border ink — the option override, else the current theme's border
|
|
933
953
|
* (so a theme swap re-inks the bar without a rebuild option). */
|
|
@@ -986,6 +1006,11 @@ declare class DrawingToolbar {
|
|
|
986
1006
|
/** Reflect stay-in-drawing-mode externally without notifying back. */
|
|
987
1007
|
setStayMode(on: boolean): void;
|
|
988
1008
|
private paintStay;
|
|
1009
|
+
/** Toggle drawings sync on/off and notify the host. */
|
|
1010
|
+
private toggleDrawingsSync;
|
|
1011
|
+
/** Reflect drawings sync externally (e.g. set through the API) without notifying back. */
|
|
1012
|
+
setDrawingsSyncMode(on: boolean): void;
|
|
1013
|
+
private paintDrawingsSync;
|
|
989
1014
|
/** Create the positioned flyout panel anchored to a cell, register it as open, and start the
|
|
990
1015
|
* outside-dismiss. Callers fill it with items. */
|
|
991
1016
|
private beginFlyout;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { stableSeriesId } from './chunk-Q3XQHLIH.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, legendActions, nativeIndicatorDescriptors, nativeIndicatorTypes, registerChartType, registerDefaultEngine, registerDrawingType, registerLegendAction, registerNativeIndicator, registerRendererDefaults, registerRendererLayer, registerSidePanel, registerWidgetAction, registerWidgetAttachment, rendererDefaults, rendererLayers, resolveEngines, sidePanels, tickerModifierIds, unregisterChartType, unregisterDefaultEngine, unregisterLegendAction, unregisterNativeIndicator, unregisterRendererDefaults, unregisterRendererLayer, unregisterSidePanel, unregisterWidgetAction, unregisterWidgetAttachment, widgetActions, widgetAttachments } from './chunk-
|
|
4
|
-
import './chunk-
|
|
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-
|
|
2
|
+
export { BarStore, CachingDataFeed, DARK_THEME, DataControl, DrawingStore, DrawingToolbar, DrawingsControl, LIGHT_THEME, MultiProviderFeed, NativeRenderer, RendererControl, TypedEventBus, Vela, buildToolbar, defaultToolbar, resolveTheme, sharedBarStore, timeframeToMs } from './chunk-FNOMKHEZ.js';
|
|
3
|
+
export { DEFAULT_PANEL_MAX_WIDTH, DEFAULT_PANEL_MIN_WIDTH, DEFAULT_PANEL_WIDTH, Drawing, chartType, chartTypes, clampPanelWidth, createDrawing, deserializeDrawing, drawingTypes, getDrawingType, getNativeIndicator, legendActions, nativeIndicatorDescriptors, nativeIndicatorTypes, registerChartType, registerDefaultEngine, registerDrawingType, registerLegendAction, registerNativeIndicator, registerRendererDefaults, registerRendererLayer, registerSidePanel, registerWidgetAction, registerWidgetAttachment, rendererDefaults, rendererLayers, resolveEngines, sidePanels, tickerModifierIds, unregisterChartType, unregisterDefaultEngine, unregisterLegendAction, unregisterNativeIndicator, unregisterRendererDefaults, unregisterRendererLayer, unregisterSidePanel, unregisterWidgetAction, unregisterWidgetAttachment, widgetActions, widgetAttachments } from './chunk-S6F6SQ2L.js';
|
|
4
|
+
import './chunk-ULIX6AE2.js';
|
|
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-EP6NDJYK.js';
|
|
@@ -885,6 +885,15 @@ type DrawingMode = 'measure' | 'eraser' | null;
|
|
|
885
885
|
type DrawingIntent = {
|
|
886
886
|
kind: 'arm';
|
|
887
887
|
type: DrawingTypeKey | null;
|
|
888
|
+
}
|
|
889
|
+
/** Placement in progress: the ghost's current shape after every anchor click and
|
|
890
|
+
* cursor move; `null` when placement ends (finalized OR cancelled). No store
|
|
891
|
+
* mutation — the core only re-emits it (`drawing:draft`) so a multi-chart host
|
|
892
|
+
* can mirror the ghost live. Optional — a renderer that never emits it simply
|
|
893
|
+
* syncs at completion. */
|
|
894
|
+
| {
|
|
895
|
+
kind: 'draft';
|
|
896
|
+
doc: SerializedDrawing | null;
|
|
888
897
|
} | {
|
|
889
898
|
kind: 'create';
|
|
890
899
|
doc: SerializedDrawing;
|
|
@@ -978,6 +987,11 @@ interface IDrawingsRendererPort {
|
|
|
978
987
|
setMode?(mode: DrawingMode): void;
|
|
979
988
|
/** Open a drawing's settings popup (selecting it too) — the programmatic twin of a click on it. */
|
|
980
989
|
openSettings(id: string): void;
|
|
990
|
+
/** Display another chart's in-progress placement as a GHOST at reduced opacity
|
|
991
|
+
* (`null` clears it) — the drawings-sync twin of `setExternalCrosshair`. Never a
|
|
992
|
+
* store drawing: no selection, no hit-testing, no persistence. Optional — a
|
|
993
|
+
* renderer without it simply never previews remote placements. */
|
|
994
|
+
setExternalGhost?(doc: SerializedDrawing | null): void;
|
|
981
995
|
/**
|
|
982
996
|
* The pane's SERIES stack in z terms, for renderers whose drawings share one draw-order
|
|
983
997
|
* space with the series (`drawingDepth`): the extremes ("bring to front" beats `front`,
|
|
@@ -885,6 +885,15 @@ type DrawingMode = 'measure' | 'eraser' | null;
|
|
|
885
885
|
type DrawingIntent = {
|
|
886
886
|
kind: 'arm';
|
|
887
887
|
type: DrawingTypeKey | null;
|
|
888
|
+
}
|
|
889
|
+
/** Placement in progress: the ghost's current shape after every anchor click and
|
|
890
|
+
* cursor move; `null` when placement ends (finalized OR cancelled). No store
|
|
891
|
+
* mutation — the core only re-emits it (`drawing:draft`) so a multi-chart host
|
|
892
|
+
* can mirror the ghost live. Optional — a renderer that never emits it simply
|
|
893
|
+
* syncs at completion. */
|
|
894
|
+
| {
|
|
895
|
+
kind: 'draft';
|
|
896
|
+
doc: SerializedDrawing | null;
|
|
888
897
|
} | {
|
|
889
898
|
kind: 'create';
|
|
890
899
|
doc: SerializedDrawing;
|
|
@@ -978,6 +987,11 @@ interface IDrawingsRendererPort {
|
|
|
978
987
|
setMode?(mode: DrawingMode): void;
|
|
979
988
|
/** Open a drawing's settings popup (selecting it too) — the programmatic twin of a click on it. */
|
|
980
989
|
openSettings(id: string): void;
|
|
990
|
+
/** Display another chart's in-progress placement as a GHOST at reduced opacity
|
|
991
|
+
* (`null` clears it) — the drawings-sync twin of `setExternalCrosshair`. Never a
|
|
992
|
+
* store drawing: no selection, no hit-testing, no persistence. Optional — a
|
|
993
|
+
* renderer without it simply never previews remote placements. */
|
|
994
|
+
setExternalGhost?(doc: SerializedDrawing | null): void;
|
|
981
995
|
/**
|
|
982
996
|
* The pane's SERIES stack in z terms, for renderers whose drawings share one draw-order
|
|
983
997
|
* space with the series (`drawingDepth`): the extremes ("bring to front" beats `front`,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { u as DrawingTypeKey, a3 as DrawingStyle, S as SerializedDrawing, D as Drawing, av as SeriesKind, O as OHLCV, c as VelaTheme } from './options-
|
|
2
|
-
import { b as DataControl } from './contributions-
|
|
1
|
+
import { u as DrawingTypeKey, a3 as DrawingStyle, S as SerializedDrawing, D as Drawing, av as SeriesKind, O as OHLCV, c as VelaTheme } from './options-DbQholFV.cjs';
|
|
2
|
+
import { b as DataControl } from './contributions-BlV3kb0O.cjs';
|
|
3
3
|
import './side-panel-CT9ZwIGz.cjs';
|
|
4
4
|
import './icons-BZYbJXSV.cjs';
|
|
5
5
|
import './keymap-CGOz5F5f.cjs';
|
|
6
|
-
import './DataProvider-
|
|
6
|
+
import './DataProvider-BBQ3Hr21.cjs';
|
|
7
7
|
|
|
8
8
|
/** What a drawing type contributes to the toolbar + factory (renderer-neutral). */
|
|
9
9
|
interface DrawingTypeMeta {
|
|
@@ -242,12 +242,70 @@ interface ChartTypeDefinition {
|
|
|
242
242
|
*/
|
|
243
243
|
basePainting?: 'candles' | 'none';
|
|
244
244
|
}
|
|
245
|
-
/**
|
|
245
|
+
/**
|
|
246
|
+
* A declarative visibility condition on another row's CURRENT value (stored value,
|
|
247
|
+
* or that row's `defval` while unset). Pure data — the dialog evaluates it live as
|
|
248
|
+
* the user edits, so dependent rows appear/disappear without a rebuild.
|
|
249
|
+
* `anyOf` wins over `equals` when both are given.
|
|
250
|
+
*/
|
|
251
|
+
interface SettingsRowCondition {
|
|
252
|
+
key: string;
|
|
253
|
+
equals?: boolean | string | number;
|
|
254
|
+
anyOf?: readonly (boolean | string | number)[];
|
|
255
|
+
}
|
|
256
|
+
/** A row's visibility gate: one condition, or several AND-ed together. */
|
|
257
|
+
type SettingsRowWhen = SettingsRowCondition | readonly SettingsRowCondition[];
|
|
258
|
+
/**
|
|
259
|
+
* An inline color swatch on a toggle row — the color(s) the toggle governs, edited
|
|
260
|
+
* right on the toggle's row (dimmed while the toggle is off) instead of a
|
|
261
|
+
* conditionally revealed row below. Each swatch stores under its own bag key.
|
|
262
|
+
*/
|
|
263
|
+
interface SettingsRowSwatch {
|
|
264
|
+
key: string;
|
|
265
|
+
/** Names the color for the swatch's tooltip (`'Highlight color'`). */
|
|
266
|
+
label: string;
|
|
267
|
+
defval: string;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* One declarative settings row. To add a NEW kind, see docs/architecture/settings-rows.md.
|
|
271
|
+
*
|
|
272
|
+
* `heading` titles a GROUP of rows: the heading plus everything after it up to the next
|
|
273
|
+
* heading. In a flat `rows` section headings render as inline group titles; inside
|
|
274
|
+
* `instances`/`subsections` they become entries of the pane's group TOC (see
|
|
275
|
+
* {@link ChartTypeSettingsSection}).
|
|
276
|
+
*
|
|
277
|
+
* `header` is an in-pane subgroup title: same visual as a flat heading, but inside a
|
|
278
|
+
* structured pane it stays in the rows column (does NOT become a TOC entry). Use it to
|
|
279
|
+
* cluster rows inside a TOC group (e.g. Colors / Values under Display).
|
|
280
|
+
*
|
|
281
|
+
* Any row may carry `when` — it is shown only while the condition holds.
|
|
282
|
+
*
|
|
283
|
+
* `range` is a min–max pair on one row (two number inputs storing under `minKey` /
|
|
284
|
+
* `maxKey`, both seeded from the shared `defval`). When `placeholder` is given, an
|
|
285
|
+
* input holding the default value renders EMPTY showing the placeholder, and clearing
|
|
286
|
+
* an input stores the default back — so the placeholder names the "unset" state
|
|
287
|
+
* (`'Off'` for a 0-disables filter bound).
|
|
288
|
+
*/
|
|
289
|
+
/**
|
|
290
|
+
* A select option: a bare string (value = label) or a `[value, label]` pair when the
|
|
291
|
+
* stored id differs from the human-readable text (`['bidAskProfile', 'Bid × Ask Profile']`).
|
|
292
|
+
*/
|
|
293
|
+
type SettingsSelectOption = string | readonly [value: string, label: string];
|
|
246
294
|
type SettingsRowDescriptor = {
|
|
295
|
+
kind: 'heading';
|
|
296
|
+
label: string;
|
|
297
|
+
when?: SettingsRowWhen;
|
|
298
|
+
} | {
|
|
299
|
+
kind: 'header';
|
|
300
|
+
label: string;
|
|
301
|
+
when?: SettingsRowWhen;
|
|
302
|
+
} | {
|
|
247
303
|
kind: 'toggle';
|
|
248
304
|
key: string;
|
|
249
305
|
label: string;
|
|
250
306
|
defval: boolean;
|
|
307
|
+
colors?: readonly SettingsRowSwatch[];
|
|
308
|
+
when?: SettingsRowWhen;
|
|
251
309
|
} | {
|
|
252
310
|
kind: 'number';
|
|
253
311
|
key: string;
|
|
@@ -256,25 +314,89 @@ type SettingsRowDescriptor = {
|
|
|
256
314
|
min?: number;
|
|
257
315
|
max?: number;
|
|
258
316
|
step?: number;
|
|
317
|
+
when?: SettingsRowWhen;
|
|
259
318
|
} | {
|
|
260
319
|
kind: 'color';
|
|
261
320
|
key: string;
|
|
262
321
|
label: string;
|
|
263
322
|
defval: string;
|
|
323
|
+
when?: SettingsRowWhen;
|
|
264
324
|
} | {
|
|
265
325
|
kind: 'select';
|
|
266
326
|
key: string;
|
|
267
327
|
label: string;
|
|
268
|
-
options: readonly
|
|
328
|
+
options: readonly SettingsSelectOption[];
|
|
269
329
|
defval: string;
|
|
330
|
+
when?: SettingsRowWhen;
|
|
331
|
+
} | {
|
|
332
|
+
kind: 'range';
|
|
333
|
+
label: string;
|
|
334
|
+
minKey: string;
|
|
335
|
+
maxKey: string;
|
|
336
|
+
defval: number;
|
|
337
|
+
min?: number;
|
|
338
|
+
max?: number;
|
|
339
|
+
step?: number;
|
|
340
|
+
placeholder?: string;
|
|
341
|
+
when?: SettingsRowWhen;
|
|
270
342
|
};
|
|
343
|
+
/**
|
|
344
|
+
* One tab of a section's INSTANCE STRIP — a repeated block of settings (e.g. one of
|
|
345
|
+
* several overlays a style can paint). The dialog shows a tab per PRESENT instance,
|
|
346
|
+
* a dashed `+` that turns on the next absent one, and an `×` on the active removable
|
|
347
|
+
* tab that turns it off. Presence is the boolean at `enableKey` (stored in the same
|
|
348
|
+
* per-type bag as every other value); an instance without `enableKey` is always
|
|
349
|
+
* present and not removable — the base instance.
|
|
350
|
+
*/
|
|
351
|
+
interface ChartTypeSettingsInstance {
|
|
352
|
+
label: string;
|
|
353
|
+
/** Boolean bag key controlling presence; omitted = always present, not removable. */
|
|
354
|
+
enableKey?: string;
|
|
355
|
+
rows: readonly SettingsRowDescriptor[];
|
|
356
|
+
}
|
|
357
|
+
/** An indented sub-entry under the section's rail tab, with its own pane of rows. */
|
|
358
|
+
interface ChartTypeSettingsSubsection {
|
|
359
|
+
title: string;
|
|
360
|
+
rows: readonly SettingsRowDescriptor[];
|
|
361
|
+
/**
|
|
362
|
+
* Boolean bag key that masters this pane. While it is false, every row EXCEPT the
|
|
363
|
+
* one whose `key` matches stays visible but grayed out (not hidden) — so users can
|
|
364
|
+
* still browse and preview settings with the feature off. The matching toggle is
|
|
365
|
+
* typically the first row of the Display group.
|
|
366
|
+
*/
|
|
367
|
+
enableKey?: string;
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* A chart type's settings tab. Two forms:
|
|
371
|
+
*
|
|
372
|
+
* - **Flat**: `rows` only — rendered as one scrollable pane, `heading` rows as inline
|
|
373
|
+
* group titles (the historical form).
|
|
374
|
+
* - **Structured**: `instances` (and optionally `subsections`) — the pane opens with an
|
|
375
|
+
* instance TAB STRIP, and each instance's rows are organized by a GROUP TOC on the
|
|
376
|
+
* left built from its `heading` rows (rows before the first heading always show above
|
|
377
|
+
* the groups; selecting a TOC entry shows only that group's rows). `subsections` add
|
|
378
|
+
* indented rail entries under the section's tab, each a pane with the same TOC
|
|
379
|
+
* treatment. A TOC entry hides itself while every row of its group is hidden by
|
|
380
|
+
* `when` gates.
|
|
381
|
+
*
|
|
382
|
+
* All values — every instance and subsection included — live in the ONE per-type bag
|
|
383
|
+
* (`config.chartTypes[<id>]`), so consumers keep receiving a single flat object.
|
|
384
|
+
*/
|
|
271
385
|
interface ChartTypeSettingsSection {
|
|
272
386
|
/** Section heading in the settings dialog. */
|
|
273
387
|
title: string;
|
|
274
|
-
|
|
388
|
+
/** Flat form. Ignored when `instances` is declared. */
|
|
389
|
+
rows?: readonly SettingsRowDescriptor[];
|
|
390
|
+
/** Structured form: the pane's instance tab strip. */
|
|
391
|
+
instances?: readonly ChartTypeSettingsInstance[];
|
|
392
|
+
/** Indented sub-entries under this section's rail tab. */
|
|
393
|
+
subsections?: readonly ChartTypeSettingsSubsection[];
|
|
275
394
|
/** `'active'` (default): shown only while this chart type is the active price style;
|
|
276
395
|
* `'always'`: shown whenever the type is registered. */
|
|
277
396
|
visibility?: 'always' | 'active';
|
|
397
|
+
/** Rail position: `'end'` (default, after the built-in tabs) or `'after-symbol'`
|
|
398
|
+
* (directly under the Symbol tab). Subsections follow their parent. */
|
|
399
|
+
placement?: 'after-symbol' | 'end';
|
|
278
400
|
}
|
|
279
401
|
/** Register (or replace) a chart type. */
|
|
280
402
|
declare function registerChartType(def: ChartTypeDefinition): void;
|
|
@@ -323,6 +445,23 @@ interface RendererLayerArgs {
|
|
|
323
445
|
priceStyle: string;
|
|
324
446
|
/** Frame clock (ms) for pulses/fades; monotonic within a session. */
|
|
325
447
|
nowMs: number;
|
|
448
|
+
/** Plot-relative pointer position, or null when the pointer is off the plot. Layers
|
|
449
|
+
* that hover-test set `repaintOnCursor` on their definition so pointer moves repaint
|
|
450
|
+
* them (only data-tier frames repaint layers otherwise). */
|
|
451
|
+
cursor: {
|
|
452
|
+
x: number;
|
|
453
|
+
y: number;
|
|
454
|
+
} | null;
|
|
455
|
+
}
|
|
456
|
+
/** How the active style's layer dims/slims the BASE painting under it (see
|
|
457
|
+
* {@link RendererLayerInstance.modulateBase}). Omitted fields keep their defaults. */
|
|
458
|
+
interface BasePaintingModulation {
|
|
459
|
+
/** Candle body width multiplier, (0..1] (1 = full width). */
|
|
460
|
+
candleBodyScale?: number;
|
|
461
|
+
/** Candle body-fill opacity, [0..1] (wick + border keep their own opacity). */
|
|
462
|
+
candleBodyAlpha?: number;
|
|
463
|
+
/** Gridline opacity, [0..1] (fade the grid as a reveal-under layer opens). */
|
|
464
|
+
gridAlpha?: number;
|
|
326
465
|
}
|
|
327
466
|
/** One live layer instance (per mounted renderer). */
|
|
328
467
|
interface RendererLayerInstance {
|
|
@@ -332,6 +471,14 @@ interface RendererLayerInstance {
|
|
|
332
471
|
render(args: RendererLayerArgs): void;
|
|
333
472
|
/** Return true while the layer needs CONTINUOUS frames (a pulse/fade) — keeps the animator alive. */
|
|
334
473
|
animating?(): boolean;
|
|
474
|
+
/**
|
|
475
|
+
* How the base painting (candles, grid) should be dimmed/slimmed under this layer for
|
|
476
|
+
* the CURRENT frame — a gradual counterpart of the chart type's all-or-nothing
|
|
477
|
+
* `basePainting: 'none'`. Called after `render`, only for the layer whose id matches
|
|
478
|
+
* the active price style; returning null (or omitting the method) leaves the base
|
|
479
|
+
* painting untouched. Values are clamped by the renderer.
|
|
480
|
+
*/
|
|
481
|
+
modulateBase?(args: RendererLayerArgs): BasePaintingModulation | null;
|
|
335
482
|
/** The renderer unmounted — release everything (the canvas itself is removed by the renderer). */
|
|
336
483
|
destroy?(): void;
|
|
337
484
|
}
|
|
@@ -342,6 +489,9 @@ interface RendererLayerDefinition {
|
|
|
342
489
|
/** Stacking: `'below-data'` = behind the candles (reveal-under styles); `'above-data'` =
|
|
343
490
|
* over the candles, under the chrome/axes. Default `'above-data'`. */
|
|
344
491
|
placement?: 'below-data' | 'above-data';
|
|
492
|
+
/** Repaint this layer when the pointer moves (hover hit-testing UIs). Off by default:
|
|
493
|
+
* pointer moves normally repaint only the crosshair overlay, not the layers. */
|
|
494
|
+
repaintOnCursor?: boolean;
|
|
345
495
|
/** Instance factory — called once per mounted renderer. */
|
|
346
496
|
create(): RendererLayerInstance;
|
|
347
497
|
}
|
|
@@ -402,4 +552,4 @@ declare const CATEGORICAL: readonly string[];
|
|
|
402
552
|
/** Pick a stable categorical color for a string key (same key ⇒ same color). */
|
|
403
553
|
declare function categoricalColor(key: string): string;
|
|
404
554
|
|
|
405
|
-
export { ACCENT as A, BEARISH as B, CATEGORICAL as C, type DrawingTypeMeta as D,
|
|
555
|
+
export { stableSeriesId as $, ACCENT as A, BEARISH as B, CATEGORICAL as C, type DrawingTypeMeta as D, TRADE_SHORT as E, categoricalColor as F, chartType as G, HIGHLIGHT as H, INFO as I, chartTypes as J, createDrawing as K, deserializeDrawing as L, MARKER as M, NEUTRAL as N, drawingTypes as O, getDrawingType as P, registerChartType as Q, type RendererLayerArgs as R, SERIES_LINE as S, TRADE_EXIT as T, registerDrawingType as U, VALID as V, WARNING as W, registerRendererDefaults as X, registerRendererLayer as Y, rendererDefaults as Z, rendererLayers as _, ACCENT_BRIGHT as a, tickerModifierIds as a0, unregisterChartType as a1, unregisterRendererDefaults as a2, unregisterRendererLayer as a3, BULLISH as b, type BarTransform as c, type BasePaintingModulation as d, CROSSHAIR as e, type ChartTypeDefinition as f, type ChartTypeSettingsInstance as g, type ChartTypeSettingsSection as h, type ChartTypeSettingsSubsection as i, INVALID as j, type IdentifiableKind as k, type RendererLayerDefinition as l, type RendererLayerInstance as m, SESSION_OFF as n, SESSION_POST as o, SESSION_PRE as p, SLATE as q, SLATE_DEEP as r, type SeriesDataEngine as s, type SeriesDataEngineHost as t, type SettingsRowCondition as u, type SettingsRowDescriptor as v, type SettingsRowSwatch as w, type SettingsRowWhen as x, type SettingsSelectOption as y, TRADE_LONG as z };
|