@luxalgo/vela 0.8.5 → 0.9.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-DdqMxKdl.d.cts → DataProvider-B5i0_yY4.d.cts} +1 -1
- package/dist/{DataProvider-BUdlkx9I.d.ts → DataProvider-CPFgSyAm.d.ts} +1 -1
- package/dist/{chunk-QYIO37K7.js → chunk-3H6JO4VL.js} +2405 -1542
- package/dist/{chunk-BN4DNS3O.js → chunk-BLVL7WXF.js} +1156 -468
- package/dist/chunk-O6L27KRB.js +1331 -0
- package/dist/{chunk-WY5H4S4I.js → chunk-PZN4RS4T.js} +91 -36
- package/dist/{chunk-ALTGHKIM.js → chunk-Q7POFYNE.js} +516 -406
- package/dist/{chunk-AUOB7A5Y.js → chunk-WHPQQYH7.js} +29 -13
- package/dist/{contributions-D8xuYc9U.d.cts → contributions-BfBaF6eE.d.ts} +71 -22
- package/dist/{contributions-P9fBBuY1.d.ts → contributions-DupwEkzc.d.cts} +71 -22
- package/dist/index.cjs +4040 -2087
- package/dist/index.d.cts +53 -25
- package/dist/index.d.ts +53 -25
- package/dist/index.js +5 -5
- package/dist/{keymap-CGOz5F5f.d.cts → keymap-C48ughm6.d.ts} +9 -6
- package/dist/{keymap-CGOz5F5f.d.ts → keymap-W0hiajU6.d.cts} +9 -6
- package/dist/locales/ar.cjs +2262 -0
- package/dist/locales/ar.d.cts +5 -0
- package/dist/locales/ar.d.ts +5 -0
- package/dist/locales/ar.js +2260 -0
- package/dist/locales/de.cjs +2262 -0
- package/dist/locales/de.d.cts +5 -0
- package/dist/locales/de.d.ts +5 -0
- package/dist/locales/de.js +2260 -0
- package/dist/locales/en.cjs +2262 -0
- package/dist/locales/en.d.cts +5 -0
- package/dist/locales/en.d.ts +5 -0
- package/dist/locales/en.js +2260 -0
- package/dist/locales/es.cjs +2262 -0
- package/dist/locales/es.d.cts +5 -0
- package/dist/locales/es.d.ts +5 -0
- package/dist/locales/es.js +2260 -0
- package/dist/locales/fr.cjs +2262 -0
- package/dist/locales/fr.d.cts +5 -0
- package/dist/locales/fr.d.ts +5 -0
- package/dist/locales/fr.js +2260 -0
- package/dist/locales/he.cjs +2262 -0
- package/dist/locales/he.d.cts +5 -0
- package/dist/locales/he.d.ts +5 -0
- package/dist/locales/he.js +2260 -0
- package/dist/locales/hi.cjs +2262 -0
- package/dist/locales/hi.d.cts +5 -0
- package/dist/locales/hi.d.ts +5 -0
- package/dist/locales/hi.js +2260 -0
- package/dist/locales/id.cjs +2262 -0
- package/dist/locales/id.d.cts +5 -0
- package/dist/locales/id.d.ts +5 -0
- package/dist/locales/id.js +2260 -0
- package/dist/locales/it.cjs +2262 -0
- package/dist/locales/it.d.cts +5 -0
- package/dist/locales/it.d.ts +5 -0
- package/dist/locales/it.js +2260 -0
- package/dist/locales/ja.cjs +2262 -0
- package/dist/locales/ja.d.cts +5 -0
- package/dist/locales/ja.d.ts +5 -0
- package/dist/locales/ja.js +2260 -0
- package/dist/locales/ko.cjs +2262 -0
- package/dist/locales/ko.d.cts +5 -0
- package/dist/locales/ko.d.ts +5 -0
- package/dist/locales/ko.js +2260 -0
- package/dist/locales/ms.cjs +2262 -0
- package/dist/locales/ms.d.cts +5 -0
- package/dist/locales/ms.d.ts +5 -0
- package/dist/locales/ms.js +2260 -0
- package/dist/locales/pl.cjs +2262 -0
- package/dist/locales/pl.d.cts +5 -0
- package/dist/locales/pl.d.ts +5 -0
- package/dist/locales/pl.js +2260 -0
- package/dist/locales/pt-BR.cjs +2262 -0
- package/dist/locales/pt-BR.d.cts +5 -0
- package/dist/locales/pt-BR.d.ts +5 -0
- package/dist/locales/pt-BR.js +2260 -0
- package/dist/locales/ru.cjs +2262 -0
- package/dist/locales/ru.d.cts +5 -0
- package/dist/locales/ru.d.ts +5 -0
- package/dist/locales/ru.js +2260 -0
- package/dist/locales/th.cjs +2262 -0
- package/dist/locales/th.d.cts +5 -0
- package/dist/locales/th.d.ts +5 -0
- package/dist/locales/th.js +2260 -0
- package/dist/locales/tr.cjs +2262 -0
- package/dist/locales/tr.d.cts +5 -0
- package/dist/locales/tr.d.ts +5 -0
- package/dist/locales/tr.js +2260 -0
- package/dist/locales/vi.cjs +2262 -0
- package/dist/locales/vi.d.cts +5 -0
- package/dist/locales/vi.d.ts +5 -0
- package/dist/locales/vi.js +2260 -0
- package/dist/locales/zh-Hans.cjs +2262 -0
- package/dist/locales/zh-Hans.d.cts +5 -0
- package/dist/locales/zh-Hans.d.ts +5 -0
- package/dist/locales/zh-Hans.js +2260 -0
- package/dist/locales/zh-Hant.cjs +2262 -0
- package/dist/locales/zh-Hant.d.cts +5 -0
- package/dist/locales/zh-Hant.d.ts +5 -0
- package/dist/locales/zh-Hant.js +2260 -0
- package/dist/{options-BI5Tp32b.d.ts → options-B7aL1pbf.d.ts} +74 -9
- package/dist/{options-BI5Tp32b.d.cts → options-I1H2HDWw.d.cts} +74 -9
- package/dist/{plugin-B8F1nor8.d.cts → plugin-BGz-Vsdv.d.cts} +81 -35
- package/dist/{plugin-D5Z-Q6TX.d.ts → plugin-BZHypj8h.d.ts} +81 -35
- package/dist/plugin.cjs +1268 -319
- package/dist/plugin.d.cts +7 -6
- package/dist/plugin.d.ts +7 -6
- package/dist/plugin.js +3 -3
- package/dist/providers/binance.cjs +1 -1
- package/dist/providers/binance.d.cts +3 -2
- package/dist/providers/binance.d.ts +3 -2
- package/dist/providers/binance.js +1 -1
- package/dist/providers/coinbase.cjs +1 -1
- package/dist/providers/coinbase.d.cts +3 -2
- package/dist/providers/coinbase.d.ts +3 -2
- package/dist/providers/coinbase.js +1 -1
- package/dist/providers/hyperliquid.cjs +1 -1
- package/dist/providers/hyperliquid.d.cts +3 -2
- package/dist/providers/hyperliquid.d.ts +3 -2
- package/dist/providers/hyperliquid.js +1 -1
- package/dist/{side-panel-_2UK1gSm.d.ts → side-panel-BEQJqSjR.d.cts} +14 -2
- package/dist/{side-panel-_2UK1gSm.d.cts → side-panel-Ud0SBAnE.d.ts} +14 -2
- package/dist/{statusline-model-CTwtDIca.d.cts → statusline-model-Dfb_GD9u.d.ts} +14 -3
- package/dist/{statusline-model-D9kWC9X5.d.ts → statusline-model-PHt0YhmI.d.cts} +14 -3
- package/dist/types-Bwf63xGI.d.cts +2518 -0
- package/dist/types-Bwf63xGI.d.ts +2518 -0
- package/dist/ui.cjs +1008 -56
- package/dist/ui.d.cts +21 -2
- package/dist/ui.d.ts +21 -2
- package/dist/ui.js +3 -3
- package/dist/vela.global.js +4005 -2054
- package/dist/vela.global.min.js +57 -57
- package/dist/widget.cjs +5384 -2698
- package/dist/widget.d.cts +100 -26
- package/dist/widget.d.ts +100 -26
- package/dist/widget.js +19 -11
- package/dist/workspace.cjs +5373 -2705
- package/dist/workspace.d.cts +63 -15
- package/dist/workspace.d.ts +63 -15
- package/dist/workspace.js +6 -6
- package/package.json +9 -2
- package/dist/chunk-I2U4NZD2.js +0 -340
- /package/dist/{chunk-W5YPYZ2P.js → chunk-3EYCX2L4.js} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { D as DrawingsDocument, d as Resolved, e as ReplayTick, f as DataControl, g as ReplayTickSource } from './contributions-
|
|
2
|
-
export { B as BarsChangeReason, C as CellStateContext, h as CodeUpdateResult, i as ContextMenuPointer, j as ContextSelect, k as DrawingsControl, l as EngineAlert, m as EngineCapabilities, n as EngineContextSnapshot, o as EngineFactory, p as EngineWarning, q as ExecutionHandlers, r as ExecutionMarket, s as ExecutionRequest, t as ExecutionSession, E as ExternalIndicatorEntry, F as FetchSeries, u as IndicatorEventMap, I as IndicatorHandle, v as IndicatorSummary, L as LegendActionDescriptor, w as LegendCalloutContent, x as LegendCalloutDescriptor, y as LegendCalloutItem, z as LegendCalloutSpec, A as LegendIndicatorInfo, M as MarksControl, N as NativeIndicator, G as NativeIndicatorContext, H as NativeIndicatorDescriptor, J as NativeIndicatorInfo, K as NativeIndicatorOutput, O as OVERRIDABLE_TOPBAR_IDS, P as ParsedSymbol, Q as PreparedScript, T as RendererControl, a as ReplayBounds, U as ReplayControl, X as ReplayEndReason, Y as ReplayStartOptions, R as ReplayState, Z as RunIndicatorResult, _ as SceneInspection, c as ScriptRun, $ as ScriptRunCause, a0 as ScriptRunResult, S as ScriptingEngine, a1 as SidePanelButton, a2 as SidePanelDescriptor, a3 as SidePanelHandle, a4 as SidePanelHeader, a5 as StatePersistenceHandler, a6 as StrategyFill, a7 as StrategyState, a8 as StrategyTrade, a9 as SymbolRankingHook, aa as TypedEventBus, V as Vela, ab as VelaDeps, b as VelaEventMap, ac as VisibleBarRange, ad as WidgetActionDescriptor, ae as WidgetActionTarget, af as WidgetAttachment, W as WidgetContext, ag as getNativeIndicator, ah as legendActions, ai as legendCallouts, aj as nativeIndicatorDescriptors, ak as nativeIndicatorTypes, al as registerDefaultEngine, am as registerLegendAction, an as registerLegendCallout, ao as registerNativeIndicator, ap as registerSidePanel, aq as registerStatePersistence, ar as registerSymbolRanking, as as registerWidgetAction, at as registerWidgetAttachment, au as resolveEngines, av as sidePanels, aw as statePersistenceHandlers, ax as symbolRanking, ay as topbarActionOverride, az as unregisterDefaultEngine, aA as unregisterLegendAction, aB as unregisterLegendCallout, aC as unregisterNativeIndicator, aD as unregisterSidePanel, aE as unregisterStatePersistence, aF as unregisterWidgetAction, aG as unregisterWidgetAttachment, aH as widgetActions, aI as widgetAttachments } from './contributions-
|
|
3
|
-
import { D as Drawing, S as SerializedDrawing, U as Unsubscribe, L as LineStyle, P as PriceStyle, e as IChartRenderer, R as RendererCapabilities, f as RendererDisplayOptions, g as IndicatorRenderHandle, h as IndicatorStatus, c as VelaTheme, W as WallClock, O as OHLCV,
|
|
4
|
-
export {
|
|
5
|
-
import {
|
|
6
|
-
export {
|
|
7
|
-
import {
|
|
8
|
-
export { C as
|
|
1
|
+
import { D as DrawingsDocument, d as Resolved, e as ReplayTick, f as DataControl, g as ReplayTickSource } from './contributions-DupwEkzc.cjs';
|
|
2
|
+
export { B as BarsChangeReason, C as CellStateContext, h as CodeUpdateResult, i as ContextMenuPointer, j as ContextSelect, k as DrawingsControl, l as EngineAlert, m as EngineCapabilities, n as EngineContextSnapshot, o as EngineFactory, p as EngineWarning, q as ExecutionHandlers, r as ExecutionMarket, s as ExecutionRequest, t as ExecutionSession, E as ExternalIndicatorEntry, F as FetchSeries, u as IndicatorEventMap, I as IndicatorHandle, v as IndicatorSummary, L as LegendActionDescriptor, w as LegendCalloutContent, x as LegendCalloutDescriptor, y as LegendCalloutItem, z as LegendCalloutSpec, A as LegendIndicatorInfo, M as MarksControl, N as NativeIndicator, G as NativeIndicatorContext, H as NativeIndicatorDescriptor, J as NativeIndicatorInfo, K as NativeIndicatorOutput, O as OVERRIDABLE_TOPBAR_IDS, P as ParsedSymbol, Q as PreparedScript, T as RendererControl, a as ReplayBounds, U as ReplayControl, X as ReplayEndReason, Y as ReplayStartOptions, R as ReplayState, Z as RunIndicatorResult, _ as SceneInspection, c as ScriptRun, $ as ScriptRunCause, a0 as ScriptRunResult, S as ScriptingEngine, a1 as SidePanelButton, a2 as SidePanelDescriptor, a3 as SidePanelHandle, a4 as SidePanelHeader, a5 as StatePersistenceHandler, a6 as StrategyFill, a7 as StrategyState, a8 as StrategyTrade, a9 as SymbolRankingHook, aa as TypedEventBus, V as Vela, ab as VelaDeps, b as VelaEventMap, ac as VisibleBarRange, ad as WidgetActionDescriptor, ae as WidgetActionTarget, af as WidgetAttachment, W as WidgetContext, ag as getNativeIndicator, ah as legendActions, ai as legendCallouts, aj as nativeIndicatorDescriptors, ak as nativeIndicatorTypes, al as registerDefaultEngine, am as registerLegendAction, an as registerLegendCallout, ao as registerNativeIndicator, ap as registerSidePanel, aq as registerStatePersistence, ar as registerSymbolRanking, as as registerWidgetAction, at as registerWidgetAttachment, au as resolveEngines, av as sidePanels, aw as statePersistenceHandlers, ax as symbolRanking, ay as topbarActionOverride, az as unregisterDefaultEngine, aA as unregisterLegendAction, aB as unregisterLegendCallout, aC as unregisterNativeIndicator, aD as unregisterSidePanel, aE as unregisterStatePersistence, aF as unregisterWidgetAction, aG as unregisterWidgetAttachment, aH as widgetActions, aI as widgetAttachments } from './contributions-DupwEkzc.cjs';
|
|
3
|
+
import { D as Drawing, S as SerializedDrawing, U as Unsubscribe, L as LineStyle, P as PriceStyle, e as IChartRenderer, R as RendererCapabilities, f as RendererDisplayOptions, g as IndicatorRenderHandle, h as IndicatorStatus, c as VelaTheme, i as RendererRootAttributes, W as WallClock, O as OHLCV, j as Pane, k as PaneAction, l as MoveTarget, m as IndicatorModel, n as ScenePatch, I as InputValue, o as SymbolPickerFn, p as LegendActionView, q as LegendCalloutView, r as InputChangeEvent, T as ThemeName, C as CrosshairEvent, s as ClickEvent, A as AxisLongPressEvent, t as TimelineMark, u as MarkGroup, v as MarkClickEvent, a as VisibleRange, w as DataWindowReadout, x as IDrawingsRendererPort, y as Millis, z as SnapMode, B as DrawingTypeKey, E as ToolbarDefinition, M as MarketConfig, F as MarketSnapshot } from './options-I1H2HDWw.cjs';
|
|
4
|
+
export { G as AddIndicatorOptions, H as AnimationConfig, J as Background, K as BoxFontFamily, Q as BoxHAlign, X as BoxTextSize, Y as BoxVAlign, Z as CandleBarColor, _ as CandleSeries, $ as CandleStyle, a0 as DataWindowGroup, a1 as DataWindowOHLC, a2 as DataWindowRow, a3 as DirtyRange, a4 as DrawingBox, a5 as DrawingExtend, a6 as DrawingIntent, a7 as DrawingLabel, a8 as DrawingLine, a9 as DrawingLinefill, aa as DrawingMode, ab as DrawingPoint, ac as DrawingPolyline, ad as DrawingSeriesBar, ae as DrawingSeriesGateway, af as DrawingSeriesState, ag as DrawingStyle, ah as DrawingTable, ai as DrawingText, aj as DrawingXLoc, ak as DrawingsOption, al as Fill, am as FillGradientStop, an as IndicatorMeta, ao as InputCondition, ap as InputDisplay, aq as InputSchema, ar as InputType, as as InputWhen, at as IntroAnimation, au as IntroConfig, av as IntroStyle, aw as LabelStyle, ax as LabelYLoc, ay as LineLikeKind, az as LineLikeSeries, aA as LineLikeStyle, aB as MarkContent, aC as MarkContentSource, aD as MarkGlyph, aE as MarkPanelItem, aF as MarkShape, aG as MarkerPoint, aH as MarkerSeries, aI as MarketSwitch, aJ as PaneAxis, aK as PaneAxisBand, aL as PaneHint, aM as PaneKind, aN as PolylinePoint, aO as PriceAxisOptions, aP as PriceAxisTick, aQ as PriceAxisTickContext, aR as PriceAxisTicksFn, aS as PriceLine, aT as Projector, aU as ProviderName, aV as RendererConstructor, aW as Scene, aX as SchemaPatch, aY as SecondClock, aZ as SeriesDisplay, a_ as SeriesKind, a$ as SeriesPoint, b0 as SeriesSpec, b1 as SeriesSurface, b2 as SeriesValueDelta, b3 as SettingsField, b4 as SettingsSchema, b5 as SettingsVisibilityPolicy, b6 as TableCell, b7 as TableMerge, b8 as TablePosition, b9 as ToolbarGroupConfig, ba as TradeExecution, bb as ValuePatch, b as VelaOptions, V as VisibleRangePreset, bc as buildToolbar, bd as defaultToolbar, be as inputDeltas, bf as inputVisible, bg as seriesInScale, bh as seriesShownOn } from './options-I1H2HDWw.cjs';
|
|
5
|
+
import { M as MessageLike, T as Translator } from './types-Bwf63xGI.cjs';
|
|
6
|
+
export { C as ClockFormatContext, d as ClockFormatOptions, e as CompactFormatContext, f as CompactFormatOptions, D as DurationFormatContext, g as DurationFormatOptions, F as FormatContext, h as FormatSurface, c as LocaleChangedEvent, L as LocalePack, b as LocalizationOptions, a as MessageArgs, i as MessageDescriptor, P as PercentFormatContext, j as PercentFormatOptions, k as PriceFormatContext, l as PriceFormatOptions, R as ResolvedFormatters, m as TextDirection, n as TimeStampFormatContext, o as TimeStampFormatOptions, p as TimeTickFormatContext, q as TimeTickFormatOptions, r as TimeTickUnit, V as VelaFormatters, s as VelaMessageCatalog, t as VelaMessageId } from './types-Bwf63xGI.cjs';
|
|
7
|
+
import { S as SettingsSelectOption } from './plugin-BGz-Vsdv.cjs';
|
|
8
|
+
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 CHIP_PLATE, f as CROSSHAIR, g as ChartTypeDefinition, h as ChartTypeSettingsInstance, i as ChartTypeSettingsSection, j as ChartTypeSettingsSubsection, D as DrawingTypeMeta, H as HIGHLIGHT, I as INFO, k as INVALID, l as IdentifiableKind, M as MARKER, m as MessageValues, N as NEUTRAL, n as NormalizedSettingsRow, R as RendererLayerArgs, o as RendererLayerDefinition, p as RendererLayerInstance, q as SERIES_LINE, r as SESSION_OFF, s as SESSION_POST, t as SESSION_PRE, u as SLATE, v as SLATE_DEEP, w as SeriesDataEngine, x as SeriesDataEngineHost, y as SettingsInlineControl, z as SettingsRowCondition, E as SettingsRowDescriptor, F as SettingsRowInlineNumber, G as SettingsRowSwatch, J as SettingsRowValueKey, K as SettingsRowWhen, L as SettingsRowWidth, O as SettingsValueRow, T as TRADE_EXIT, P as TRADE_LONG, Q as TRADE_SHORT, V as VALID, W as WARNING, U as categoricalColor, X as chartType, Y as chartTypes, Z as createDrawing, _ as createTranslator, $ as deserializeDrawing, a0 as drawingTypes, a1 as getDrawingType, a2 as msg, a3 as normalizeSettingsRow, a4 as registerChartType, a5 as registerDrawingType, a6 as registerLocale, a7 as registerRendererDefaults, a8 as registerRendererLayer, a9 as registeredLocales, aa as rendererDefaults, ab as rendererLayers, ac as settingsRowValueKeys, ad as stableSeriesId, ae as tickerModifierIds, af as unregisterChartType, ag as unregisterRendererDefaults, ah as unregisterRendererLayer, ai as withValues } from './plugin-BGz-Vsdv.cjs';
|
|
9
|
+
import { M as MarketDataFeed, D as DataProvider, P as ProviderInfo, a as SymbolDescriptor, S as SymbolInfo, b as ProviderCapabilities, B as BarRange } from './DataProvider-B5i0_yY4.cjs';
|
|
10
|
+
export { C as CONTEXT_MENU_BUILTIN_ORDER, 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-BEQJqSjR.cjs';
|
|
9
11
|
export { i as iconMarkup, r as registerIcon } from './icons-BZYbJXSV.cjs';
|
|
10
|
-
export { a as KeyBindingDescriptor, R as ResolvedBinding } from './keymap-
|
|
12
|
+
export { a as KeyBindingDescriptor, R as ResolvedBinding } from './keymap-W0hiajU6.cjs';
|
|
11
13
|
|
|
12
14
|
/**
|
|
13
15
|
* The single source of truth for a chart's user drawings. Owns identity + paint
|
|
@@ -200,6 +202,8 @@ interface ChartConfig {
|
|
|
200
202
|
log: boolean;
|
|
201
203
|
/** Inverted price axis (high at the bottom). */
|
|
202
204
|
invert: boolean;
|
|
205
|
+
/** Autoscale fits the price bars only; indicators no longer widen the window. */
|
|
206
|
+
priceOnly: boolean;
|
|
203
207
|
borderColor: string;
|
|
204
208
|
labelsVisible: boolean;
|
|
205
209
|
currentPriceLine: boolean;
|
|
@@ -333,31 +337,31 @@ interface ChartConfig {
|
|
|
333
337
|
* heading's id hides its whole group (see `settings-visibility.ts`). */
|
|
334
338
|
type HostSettingsRow = {
|
|
335
339
|
kind: 'heading';
|
|
336
|
-
label:
|
|
340
|
+
label: MessageLike;
|
|
337
341
|
id?: string;
|
|
338
342
|
} | {
|
|
339
343
|
kind: 'toggle';
|
|
340
|
-
label:
|
|
344
|
+
label: MessageLike;
|
|
341
345
|
get: () => boolean;
|
|
342
346
|
set: (v: boolean) => void;
|
|
343
347
|
id?: string;
|
|
344
348
|
} | {
|
|
345
349
|
kind: 'select';
|
|
346
|
-
label:
|
|
350
|
+
label: MessageLike;
|
|
347
351
|
options: readonly SettingsSelectOption[];
|
|
348
352
|
get: () => string;
|
|
349
353
|
set: (v: string) => void;
|
|
350
354
|
id?: string;
|
|
351
355
|
} | {
|
|
352
356
|
kind: 'color';
|
|
353
|
-
label:
|
|
357
|
+
label: MessageLike;
|
|
354
358
|
get: () => string;
|
|
355
359
|
set: (v: string) => void;
|
|
356
360
|
id?: string;
|
|
357
361
|
};
|
|
358
362
|
/** A host-contributed settings tab (see `RendererControl.setSettingsSections`). */
|
|
359
363
|
interface HostSettingsSection {
|
|
360
|
-
title:
|
|
364
|
+
title: MessageLike;
|
|
361
365
|
rows: readonly HostSettingsRow[];
|
|
362
366
|
/** Tab position: own tab after Symbol (default), end of the rail, or rows INSIDE
|
|
363
367
|
* the Symbol tab itself (`'symbol'` — e.g. the widget's watermark toggle). */
|
|
@@ -366,20 +370,16 @@ interface HostSettingsSection {
|
|
|
366
370
|
id?: string;
|
|
367
371
|
}
|
|
368
372
|
|
|
369
|
-
/**
|
|
370
|
-
* The from-scratch "native" renderer (canvas2d backend in P0/P1/P2; hand-rolled
|
|
371
|
-
* WebGL2 added in P3 behind the same backend seam). P0 implements the full
|
|
372
|
-
* `IChartRenderer` surface but only the foundation is live: layered DOM, the
|
|
373
|
-
* shared CoordinateSystem, the invalidation scheduler, pane layout, and
|
|
374
|
-
* pointer/wheel pan-zoom over a placeholder grid. Series/fills/drawings/axes/
|
|
375
|
-
* crosshair/inputs land in P1–P2.
|
|
376
|
-
*/
|
|
377
373
|
declare class NativeRenderer implements IChartRenderer {
|
|
378
374
|
readonly capabilities: RendererCapabilities;
|
|
379
375
|
private theme;
|
|
380
376
|
private surfaceBackground;
|
|
381
377
|
private surfaceTextColor;
|
|
382
378
|
private wrapper;
|
|
379
|
+
/** The chart's translator (null until the chart hands it over: English then). */
|
|
380
|
+
private i18n;
|
|
381
|
+
/** `lang`/`dir` the wrapper carries — null leaves the attribute to the host page. */
|
|
382
|
+
private rootAttrs;
|
|
383
383
|
private plot;
|
|
384
384
|
private toolbarGutter;
|
|
385
385
|
private mountContainer;
|
|
@@ -717,6 +717,21 @@ declare class NativeRenderer implements IChartRenderer {
|
|
|
717
717
|
private watchDpr;
|
|
718
718
|
private readonly onDprChange;
|
|
719
719
|
setTheme(theme: VelaTheme): void;
|
|
720
|
+
/** Adopt the chart's localization (see `IChartRenderer.setLocalization`): the formatters
|
|
721
|
+
* feed the axes, chips and readouts, the root carries `lang`/`dir`, and everything
|
|
722
|
+
* repaints. */
|
|
723
|
+
setLocalization(i18n: Translator, root: RendererRootAttributes): void;
|
|
724
|
+
/** Display text through the chart's translator (English until the chart hands one over). */
|
|
725
|
+
private t;
|
|
726
|
+
/** An indicator's full name as the chart shows it. */
|
|
727
|
+
private modelTitle;
|
|
728
|
+
/** The compact name the legend chip, the settings dialog and the object tree show. */
|
|
729
|
+
private legendTitle;
|
|
730
|
+
/** A series' name as the legend and the data window show it. */
|
|
731
|
+
private seriesTitle;
|
|
732
|
+
/** Re-read the chrome text the renderer owns in the current language. */
|
|
733
|
+
private relabel;
|
|
734
|
+
private applyRootAttributes;
|
|
720
735
|
resize(): void;
|
|
721
736
|
/** Drive the countdown chip from the host's second pulse (`null` → the renderer's own). */
|
|
722
737
|
setWallClock(clock: WallClock | null): void;
|
|
@@ -941,6 +956,8 @@ declare class NativeRenderer implements IChartRenderer {
|
|
|
941
956
|
getDataWindowReadout(): DataWindowReadout;
|
|
942
957
|
private dataWindowPricePane;
|
|
943
958
|
private dataWindowFmt;
|
|
959
|
+
/** A volume in the data window and the volume legend row (`1.20M`: two decimals kept). */
|
|
960
|
+
private formatVolume;
|
|
944
961
|
private dataWindowOHLC;
|
|
945
962
|
/** One group per indicator (name = indicator title), each with a row per plot shown in the data window. */
|
|
946
963
|
private dataWindowGroups;
|
|
@@ -1042,8 +1059,12 @@ declare class NativeRenderer implements IChartRenderer {
|
|
|
1042
1059
|
private restackOverlay;
|
|
1043
1060
|
/** The pane a bespoke-layer native indicator (volume/vpvr) currently lives in (null = not mounted). */
|
|
1044
1061
|
private nativeLayerPane;
|
|
1045
|
-
/**
|
|
1046
|
-
|
|
1062
|
+
/**
|
|
1063
|
+
* Every canvas of the plot's pile comes from here: absolutely placed over the whole plot,
|
|
1064
|
+
* pointer-transparent unless it is the data canvas (which takes the gestures), and pinned
|
|
1065
|
+
* left to right whatever the page's direction (see `pinPlotCanvas`).
|
|
1066
|
+
*/
|
|
1067
|
+
private createPlotCanvas;
|
|
1047
1068
|
/**
|
|
1048
1069
|
* Mount the DEDICATED layer of a native indicator that names its own channel (an
|
|
1049
1070
|
* instance of a multi-instance type painting through a registered layer): a fresh
|
|
@@ -1191,6 +1212,9 @@ interface DrawingToolbarOptions {
|
|
|
1191
1212
|
* linked — edits and removals follow (a multi-chart host's concern — a
|
|
1192
1213
|
* single-chart bar omits the callback and never shows it). */
|
|
1193
1214
|
onDrawingsSync?: (on: boolean) => void;
|
|
1215
|
+
/** The chart's (or the workspace's) translator, read each time the bar renders text.
|
|
1216
|
+
* Absent: English. */
|
|
1217
|
+
i18n?: () => Translator;
|
|
1194
1218
|
}
|
|
1195
1219
|
/**
|
|
1196
1220
|
* The vertical drawing toolbar (renderer chrome), docked as a flush bar in the left gutter. Each
|
|
@@ -1256,7 +1280,11 @@ declare class DrawingToolbar {
|
|
|
1256
1280
|
private readonly dock;
|
|
1257
1281
|
private readonly onCollapse;
|
|
1258
1282
|
private readonly onDrawingsSync;
|
|
1283
|
+
private readonly i18n;
|
|
1259
1284
|
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);
|
|
1285
|
+
private t;
|
|
1286
|
+
/** Re-read every label in the current language (the chart's language changed). */
|
|
1287
|
+
relabel(): void;
|
|
1260
1288
|
/** Live divider/border ink — the option override, else the current theme's border
|
|
1261
1289
|
* (so a theme swap re-inks the bar without a rebuild option). */
|
|
1262
1290
|
private get borderColor();
|
|
@@ -1581,4 +1609,4 @@ declare const DARK_THEME: VelaTheme;
|
|
|
1581
1609
|
declare const LIGHT_THEME: VelaTheme;
|
|
1582
1610
|
declare function resolveTheme(theme?: ThemeName | VelaTheme): VelaTheme;
|
|
1583
1611
|
|
|
1584
|
-
export { AxisLongPressEvent, BarRange, BarStore, CachingDataFeed, type ChartConfig, type ChartStyle, ClickEvent, CrosshairEvent, DARK_THEME, DataControl, DataProvider, DataWindowReadout, Drawing, DrawingStore, DrawingToolbar, type DrawingToolbarOptions, DrawingTypeKey, DrawingsDocument, IChartRenderer, IDrawingsRendererPort, IndicatorModel, IndicatorRenderHandle, InputChangeEvent, InputValue, LIGHT_THEME, LineStyle, MarkClickEvent, MarkGroup, MarketConfig, MarketDataFeed, MarketSnapshot, Millis, MultiProviderFeed, NativeRenderer, OHLCV, Pane, PriceStyle, ProviderCapabilities, ProviderInfo, RendererCapabilities, RendererDisplayOptions, ReplayTick, ReplayTickSource, Resolved, ScenePatch, SerializedDrawing, SettingsSelectOption, SnapMode, SymbolDescriptor, SymbolInfo, ThemeName, TimelineMark, ToolbarDefinition, VelaTheme, VisibleRange, WallClock, barsToTicks, lowerTimeframeTicks, resolveTheme, sharedBarStore, timeframeToMs };
|
|
1612
|
+
export { AxisLongPressEvent, BarRange, BarStore, CachingDataFeed, type ChartConfig, type ChartStyle, ClickEvent, CrosshairEvent, DARK_THEME, DataControl, DataProvider, DataWindowReadout, Drawing, DrawingStore, DrawingToolbar, type DrawingToolbarOptions, DrawingTypeKey, DrawingsDocument, IChartRenderer, IDrawingsRendererPort, IndicatorModel, IndicatorRenderHandle, InputChangeEvent, InputValue, LIGHT_THEME, LineStyle, MarkClickEvent, MarkGroup, MarketConfig, MarketDataFeed, MarketSnapshot, MessageLike, Millis, MultiProviderFeed, NativeRenderer, OHLCV, Pane, PriceStyle, ProviderCapabilities, ProviderInfo, RendererCapabilities, RendererDisplayOptions, ReplayTick, ReplayTickSource, Resolved, ScenePatch, SerializedDrawing, SettingsSelectOption, SnapMode, SymbolDescriptor, SymbolInfo, ThemeName, TimelineMark, ToolbarDefinition, Translator, VelaTheme, VisibleRange, WallClock, barsToTicks, lowerTimeframeTicks, resolveTheme, sharedBarStore, timeframeToMs };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { D as DrawingsDocument, d as Resolved, e as ReplayTick, f as DataControl, g as ReplayTickSource } from './contributions-
|
|
2
|
-
export { B as BarsChangeReason, C as CellStateContext, h as CodeUpdateResult, i as ContextMenuPointer, j as ContextSelect, k as DrawingsControl, l as EngineAlert, m as EngineCapabilities, n as EngineContextSnapshot, o as EngineFactory, p as EngineWarning, q as ExecutionHandlers, r as ExecutionMarket, s as ExecutionRequest, t as ExecutionSession, E as ExternalIndicatorEntry, F as FetchSeries, u as IndicatorEventMap, I as IndicatorHandle, v as IndicatorSummary, L as LegendActionDescriptor, w as LegendCalloutContent, x as LegendCalloutDescriptor, y as LegendCalloutItem, z as LegendCalloutSpec, A as LegendIndicatorInfo, M as MarksControl, N as NativeIndicator, G as NativeIndicatorContext, H as NativeIndicatorDescriptor, J as NativeIndicatorInfo, K as NativeIndicatorOutput, O as OVERRIDABLE_TOPBAR_IDS, P as ParsedSymbol, Q as PreparedScript, T as RendererControl, a as ReplayBounds, U as ReplayControl, X as ReplayEndReason, Y as ReplayStartOptions, R as ReplayState, Z as RunIndicatorResult, _ as SceneInspection, c as ScriptRun, $ as ScriptRunCause, a0 as ScriptRunResult, S as ScriptingEngine, a1 as SidePanelButton, a2 as SidePanelDescriptor, a3 as SidePanelHandle, a4 as SidePanelHeader, a5 as StatePersistenceHandler, a6 as StrategyFill, a7 as StrategyState, a8 as StrategyTrade, a9 as SymbolRankingHook, aa as TypedEventBus, V as Vela, ab as VelaDeps, b as VelaEventMap, ac as VisibleBarRange, ad as WidgetActionDescriptor, ae as WidgetActionTarget, af as WidgetAttachment, W as WidgetContext, ag as getNativeIndicator, ah as legendActions, ai as legendCallouts, aj as nativeIndicatorDescriptors, ak as nativeIndicatorTypes, al as registerDefaultEngine, am as registerLegendAction, an as registerLegendCallout, ao as registerNativeIndicator, ap as registerSidePanel, aq as registerStatePersistence, ar as registerSymbolRanking, as as registerWidgetAction, at as registerWidgetAttachment, au as resolveEngines, av as sidePanels, aw as statePersistenceHandlers, ax as symbolRanking, ay as topbarActionOverride, az as unregisterDefaultEngine, aA as unregisterLegendAction, aB as unregisterLegendCallout, aC as unregisterNativeIndicator, aD as unregisterSidePanel, aE as unregisterStatePersistence, aF as unregisterWidgetAction, aG as unregisterWidgetAttachment, aH as widgetActions, aI as widgetAttachments } from './contributions-
|
|
3
|
-
import { D as Drawing, S as SerializedDrawing, U as Unsubscribe, L as LineStyle, P as PriceStyle, e as IChartRenderer, R as RendererCapabilities, f as RendererDisplayOptions, g as IndicatorRenderHandle, h as IndicatorStatus, c as VelaTheme, W as WallClock, O as OHLCV,
|
|
4
|
-
export {
|
|
5
|
-
import {
|
|
6
|
-
export {
|
|
7
|
-
import {
|
|
8
|
-
export { C as
|
|
1
|
+
import { D as DrawingsDocument, d as Resolved, e as ReplayTick, f as DataControl, g as ReplayTickSource } from './contributions-BfBaF6eE.js';
|
|
2
|
+
export { B as BarsChangeReason, C as CellStateContext, h as CodeUpdateResult, i as ContextMenuPointer, j as ContextSelect, k as DrawingsControl, l as EngineAlert, m as EngineCapabilities, n as EngineContextSnapshot, o as EngineFactory, p as EngineWarning, q as ExecutionHandlers, r as ExecutionMarket, s as ExecutionRequest, t as ExecutionSession, E as ExternalIndicatorEntry, F as FetchSeries, u as IndicatorEventMap, I as IndicatorHandle, v as IndicatorSummary, L as LegendActionDescriptor, w as LegendCalloutContent, x as LegendCalloutDescriptor, y as LegendCalloutItem, z as LegendCalloutSpec, A as LegendIndicatorInfo, M as MarksControl, N as NativeIndicator, G as NativeIndicatorContext, H as NativeIndicatorDescriptor, J as NativeIndicatorInfo, K as NativeIndicatorOutput, O as OVERRIDABLE_TOPBAR_IDS, P as ParsedSymbol, Q as PreparedScript, T as RendererControl, a as ReplayBounds, U as ReplayControl, X as ReplayEndReason, Y as ReplayStartOptions, R as ReplayState, Z as RunIndicatorResult, _ as SceneInspection, c as ScriptRun, $ as ScriptRunCause, a0 as ScriptRunResult, S as ScriptingEngine, a1 as SidePanelButton, a2 as SidePanelDescriptor, a3 as SidePanelHandle, a4 as SidePanelHeader, a5 as StatePersistenceHandler, a6 as StrategyFill, a7 as StrategyState, a8 as StrategyTrade, a9 as SymbolRankingHook, aa as TypedEventBus, V as Vela, ab as VelaDeps, b as VelaEventMap, ac as VisibleBarRange, ad as WidgetActionDescriptor, ae as WidgetActionTarget, af as WidgetAttachment, W as WidgetContext, ag as getNativeIndicator, ah as legendActions, ai as legendCallouts, aj as nativeIndicatorDescriptors, ak as nativeIndicatorTypes, al as registerDefaultEngine, am as registerLegendAction, an as registerLegendCallout, ao as registerNativeIndicator, ap as registerSidePanel, aq as registerStatePersistence, ar as registerSymbolRanking, as as registerWidgetAction, at as registerWidgetAttachment, au as resolveEngines, av as sidePanels, aw as statePersistenceHandlers, ax as symbolRanking, ay as topbarActionOverride, az as unregisterDefaultEngine, aA as unregisterLegendAction, aB as unregisterLegendCallout, aC as unregisterNativeIndicator, aD as unregisterSidePanel, aE as unregisterStatePersistence, aF as unregisterWidgetAction, aG as unregisterWidgetAttachment, aH as widgetActions, aI as widgetAttachments } from './contributions-BfBaF6eE.js';
|
|
3
|
+
import { D as Drawing, S as SerializedDrawing, U as Unsubscribe, L as LineStyle, P as PriceStyle, e as IChartRenderer, R as RendererCapabilities, f as RendererDisplayOptions, g as IndicatorRenderHandle, h as IndicatorStatus, c as VelaTheme, i as RendererRootAttributes, W as WallClock, O as OHLCV, j as Pane, k as PaneAction, l as MoveTarget, m as IndicatorModel, n as ScenePatch, I as InputValue, o as SymbolPickerFn, p as LegendActionView, q as LegendCalloutView, r as InputChangeEvent, T as ThemeName, C as CrosshairEvent, s as ClickEvent, A as AxisLongPressEvent, t as TimelineMark, u as MarkGroup, v as MarkClickEvent, a as VisibleRange, w as DataWindowReadout, x as IDrawingsRendererPort, y as Millis, z as SnapMode, B as DrawingTypeKey, E as ToolbarDefinition, M as MarketConfig, F as MarketSnapshot } from './options-B7aL1pbf.js';
|
|
4
|
+
export { G as AddIndicatorOptions, H as AnimationConfig, J as Background, K as BoxFontFamily, Q as BoxHAlign, X as BoxTextSize, Y as BoxVAlign, Z as CandleBarColor, _ as CandleSeries, $ as CandleStyle, a0 as DataWindowGroup, a1 as DataWindowOHLC, a2 as DataWindowRow, a3 as DirtyRange, a4 as DrawingBox, a5 as DrawingExtend, a6 as DrawingIntent, a7 as DrawingLabel, a8 as DrawingLine, a9 as DrawingLinefill, aa as DrawingMode, ab as DrawingPoint, ac as DrawingPolyline, ad as DrawingSeriesBar, ae as DrawingSeriesGateway, af as DrawingSeriesState, ag as DrawingStyle, ah as DrawingTable, ai as DrawingText, aj as DrawingXLoc, ak as DrawingsOption, al as Fill, am as FillGradientStop, an as IndicatorMeta, ao as InputCondition, ap as InputDisplay, aq as InputSchema, ar as InputType, as as InputWhen, at as IntroAnimation, au as IntroConfig, av as IntroStyle, aw as LabelStyle, ax as LabelYLoc, ay as LineLikeKind, az as LineLikeSeries, aA as LineLikeStyle, aB as MarkContent, aC as MarkContentSource, aD as MarkGlyph, aE as MarkPanelItem, aF as MarkShape, aG as MarkerPoint, aH as MarkerSeries, aI as MarketSwitch, aJ as PaneAxis, aK as PaneAxisBand, aL as PaneHint, aM as PaneKind, aN as PolylinePoint, aO as PriceAxisOptions, aP as PriceAxisTick, aQ as PriceAxisTickContext, aR as PriceAxisTicksFn, aS as PriceLine, aT as Projector, aU as ProviderName, aV as RendererConstructor, aW as Scene, aX as SchemaPatch, aY as SecondClock, aZ as SeriesDisplay, a_ as SeriesKind, a$ as SeriesPoint, b0 as SeriesSpec, b1 as SeriesSurface, b2 as SeriesValueDelta, b3 as SettingsField, b4 as SettingsSchema, b5 as SettingsVisibilityPolicy, b6 as TableCell, b7 as TableMerge, b8 as TablePosition, b9 as ToolbarGroupConfig, ba as TradeExecution, bb as ValuePatch, b as VelaOptions, V as VisibleRangePreset, bc as buildToolbar, bd as defaultToolbar, be as inputDeltas, bf as inputVisible, bg as seriesInScale, bh as seriesShownOn } from './options-B7aL1pbf.js';
|
|
5
|
+
import { M as MessageLike, T as Translator } from './types-Bwf63xGI.js';
|
|
6
|
+
export { C as ClockFormatContext, d as ClockFormatOptions, e as CompactFormatContext, f as CompactFormatOptions, D as DurationFormatContext, g as DurationFormatOptions, F as FormatContext, h as FormatSurface, c as LocaleChangedEvent, L as LocalePack, b as LocalizationOptions, a as MessageArgs, i as MessageDescriptor, P as PercentFormatContext, j as PercentFormatOptions, k as PriceFormatContext, l as PriceFormatOptions, R as ResolvedFormatters, m as TextDirection, n as TimeStampFormatContext, o as TimeStampFormatOptions, p as TimeTickFormatContext, q as TimeTickFormatOptions, r as TimeTickUnit, V as VelaFormatters, s as VelaMessageCatalog, t as VelaMessageId } from './types-Bwf63xGI.js';
|
|
7
|
+
import { S as SettingsSelectOption } from './plugin-BZHypj8h.js';
|
|
8
|
+
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 CHIP_PLATE, f as CROSSHAIR, g as ChartTypeDefinition, h as ChartTypeSettingsInstance, i as ChartTypeSettingsSection, j as ChartTypeSettingsSubsection, D as DrawingTypeMeta, H as HIGHLIGHT, I as INFO, k as INVALID, l as IdentifiableKind, M as MARKER, m as MessageValues, N as NEUTRAL, n as NormalizedSettingsRow, R as RendererLayerArgs, o as RendererLayerDefinition, p as RendererLayerInstance, q as SERIES_LINE, r as SESSION_OFF, s as SESSION_POST, t as SESSION_PRE, u as SLATE, v as SLATE_DEEP, w as SeriesDataEngine, x as SeriesDataEngineHost, y as SettingsInlineControl, z as SettingsRowCondition, E as SettingsRowDescriptor, F as SettingsRowInlineNumber, G as SettingsRowSwatch, J as SettingsRowValueKey, K as SettingsRowWhen, L as SettingsRowWidth, O as SettingsValueRow, T as TRADE_EXIT, P as TRADE_LONG, Q as TRADE_SHORT, V as VALID, W as WARNING, U as categoricalColor, X as chartType, Y as chartTypes, Z as createDrawing, _ as createTranslator, $ as deserializeDrawing, a0 as drawingTypes, a1 as getDrawingType, a2 as msg, a3 as normalizeSettingsRow, a4 as registerChartType, a5 as registerDrawingType, a6 as registerLocale, a7 as registerRendererDefaults, a8 as registerRendererLayer, a9 as registeredLocales, aa as rendererDefaults, ab as rendererLayers, ac as settingsRowValueKeys, ad as stableSeriesId, ae as tickerModifierIds, af as unregisterChartType, ag as unregisterRendererDefaults, ah as unregisterRendererLayer, ai as withValues } from './plugin-BZHypj8h.js';
|
|
9
|
+
import { M as MarketDataFeed, D as DataProvider, P as ProviderInfo, a as SymbolDescriptor, S as SymbolInfo, b as ProviderCapabilities, B as BarRange } from './DataProvider-CPFgSyAm.js';
|
|
10
|
+
export { C as CONTEXT_MENU_BUILTIN_ORDER, 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-Ud0SBAnE.js';
|
|
9
11
|
export { i as iconMarkup, r as registerIcon } from './icons-BZYbJXSV.js';
|
|
10
|
-
export { a as KeyBindingDescriptor, R as ResolvedBinding } from './keymap-
|
|
12
|
+
export { a as KeyBindingDescriptor, R as ResolvedBinding } from './keymap-C48ughm6.js';
|
|
11
13
|
|
|
12
14
|
/**
|
|
13
15
|
* The single source of truth for a chart's user drawings. Owns identity + paint
|
|
@@ -200,6 +202,8 @@ interface ChartConfig {
|
|
|
200
202
|
log: boolean;
|
|
201
203
|
/** Inverted price axis (high at the bottom). */
|
|
202
204
|
invert: boolean;
|
|
205
|
+
/** Autoscale fits the price bars only; indicators no longer widen the window. */
|
|
206
|
+
priceOnly: boolean;
|
|
203
207
|
borderColor: string;
|
|
204
208
|
labelsVisible: boolean;
|
|
205
209
|
currentPriceLine: boolean;
|
|
@@ -333,31 +337,31 @@ interface ChartConfig {
|
|
|
333
337
|
* heading's id hides its whole group (see `settings-visibility.ts`). */
|
|
334
338
|
type HostSettingsRow = {
|
|
335
339
|
kind: 'heading';
|
|
336
|
-
label:
|
|
340
|
+
label: MessageLike;
|
|
337
341
|
id?: string;
|
|
338
342
|
} | {
|
|
339
343
|
kind: 'toggle';
|
|
340
|
-
label:
|
|
344
|
+
label: MessageLike;
|
|
341
345
|
get: () => boolean;
|
|
342
346
|
set: (v: boolean) => void;
|
|
343
347
|
id?: string;
|
|
344
348
|
} | {
|
|
345
349
|
kind: 'select';
|
|
346
|
-
label:
|
|
350
|
+
label: MessageLike;
|
|
347
351
|
options: readonly SettingsSelectOption[];
|
|
348
352
|
get: () => string;
|
|
349
353
|
set: (v: string) => void;
|
|
350
354
|
id?: string;
|
|
351
355
|
} | {
|
|
352
356
|
kind: 'color';
|
|
353
|
-
label:
|
|
357
|
+
label: MessageLike;
|
|
354
358
|
get: () => string;
|
|
355
359
|
set: (v: string) => void;
|
|
356
360
|
id?: string;
|
|
357
361
|
};
|
|
358
362
|
/** A host-contributed settings tab (see `RendererControl.setSettingsSections`). */
|
|
359
363
|
interface HostSettingsSection {
|
|
360
|
-
title:
|
|
364
|
+
title: MessageLike;
|
|
361
365
|
rows: readonly HostSettingsRow[];
|
|
362
366
|
/** Tab position: own tab after Symbol (default), end of the rail, or rows INSIDE
|
|
363
367
|
* the Symbol tab itself (`'symbol'` — e.g. the widget's watermark toggle). */
|
|
@@ -366,20 +370,16 @@ interface HostSettingsSection {
|
|
|
366
370
|
id?: string;
|
|
367
371
|
}
|
|
368
372
|
|
|
369
|
-
/**
|
|
370
|
-
* The from-scratch "native" renderer (canvas2d backend in P0/P1/P2; hand-rolled
|
|
371
|
-
* WebGL2 added in P3 behind the same backend seam). P0 implements the full
|
|
372
|
-
* `IChartRenderer` surface but only the foundation is live: layered DOM, the
|
|
373
|
-
* shared CoordinateSystem, the invalidation scheduler, pane layout, and
|
|
374
|
-
* pointer/wheel pan-zoom over a placeholder grid. Series/fills/drawings/axes/
|
|
375
|
-
* crosshair/inputs land in P1–P2.
|
|
376
|
-
*/
|
|
377
373
|
declare class NativeRenderer implements IChartRenderer {
|
|
378
374
|
readonly capabilities: RendererCapabilities;
|
|
379
375
|
private theme;
|
|
380
376
|
private surfaceBackground;
|
|
381
377
|
private surfaceTextColor;
|
|
382
378
|
private wrapper;
|
|
379
|
+
/** The chart's translator (null until the chart hands it over: English then). */
|
|
380
|
+
private i18n;
|
|
381
|
+
/** `lang`/`dir` the wrapper carries — null leaves the attribute to the host page. */
|
|
382
|
+
private rootAttrs;
|
|
383
383
|
private plot;
|
|
384
384
|
private toolbarGutter;
|
|
385
385
|
private mountContainer;
|
|
@@ -717,6 +717,21 @@ declare class NativeRenderer implements IChartRenderer {
|
|
|
717
717
|
private watchDpr;
|
|
718
718
|
private readonly onDprChange;
|
|
719
719
|
setTheme(theme: VelaTheme): void;
|
|
720
|
+
/** Adopt the chart's localization (see `IChartRenderer.setLocalization`): the formatters
|
|
721
|
+
* feed the axes, chips and readouts, the root carries `lang`/`dir`, and everything
|
|
722
|
+
* repaints. */
|
|
723
|
+
setLocalization(i18n: Translator, root: RendererRootAttributes): void;
|
|
724
|
+
/** Display text through the chart's translator (English until the chart hands one over). */
|
|
725
|
+
private t;
|
|
726
|
+
/** An indicator's full name as the chart shows it. */
|
|
727
|
+
private modelTitle;
|
|
728
|
+
/** The compact name the legend chip, the settings dialog and the object tree show. */
|
|
729
|
+
private legendTitle;
|
|
730
|
+
/** A series' name as the legend and the data window show it. */
|
|
731
|
+
private seriesTitle;
|
|
732
|
+
/** Re-read the chrome text the renderer owns in the current language. */
|
|
733
|
+
private relabel;
|
|
734
|
+
private applyRootAttributes;
|
|
720
735
|
resize(): void;
|
|
721
736
|
/** Drive the countdown chip from the host's second pulse (`null` → the renderer's own). */
|
|
722
737
|
setWallClock(clock: WallClock | null): void;
|
|
@@ -941,6 +956,8 @@ declare class NativeRenderer implements IChartRenderer {
|
|
|
941
956
|
getDataWindowReadout(): DataWindowReadout;
|
|
942
957
|
private dataWindowPricePane;
|
|
943
958
|
private dataWindowFmt;
|
|
959
|
+
/** A volume in the data window and the volume legend row (`1.20M`: two decimals kept). */
|
|
960
|
+
private formatVolume;
|
|
944
961
|
private dataWindowOHLC;
|
|
945
962
|
/** One group per indicator (name = indicator title), each with a row per plot shown in the data window. */
|
|
946
963
|
private dataWindowGroups;
|
|
@@ -1042,8 +1059,12 @@ declare class NativeRenderer implements IChartRenderer {
|
|
|
1042
1059
|
private restackOverlay;
|
|
1043
1060
|
/** The pane a bespoke-layer native indicator (volume/vpvr) currently lives in (null = not mounted). */
|
|
1044
1061
|
private nativeLayerPane;
|
|
1045
|
-
/**
|
|
1046
|
-
|
|
1062
|
+
/**
|
|
1063
|
+
* Every canvas of the plot's pile comes from here: absolutely placed over the whole plot,
|
|
1064
|
+
* pointer-transparent unless it is the data canvas (which takes the gestures), and pinned
|
|
1065
|
+
* left to right whatever the page's direction (see `pinPlotCanvas`).
|
|
1066
|
+
*/
|
|
1067
|
+
private createPlotCanvas;
|
|
1047
1068
|
/**
|
|
1048
1069
|
* Mount the DEDICATED layer of a native indicator that names its own channel (an
|
|
1049
1070
|
* instance of a multi-instance type painting through a registered layer): a fresh
|
|
@@ -1191,6 +1212,9 @@ interface DrawingToolbarOptions {
|
|
|
1191
1212
|
* linked — edits and removals follow (a multi-chart host's concern — a
|
|
1192
1213
|
* single-chart bar omits the callback and never shows it). */
|
|
1193
1214
|
onDrawingsSync?: (on: boolean) => void;
|
|
1215
|
+
/** The chart's (or the workspace's) translator, read each time the bar renders text.
|
|
1216
|
+
* Absent: English. */
|
|
1217
|
+
i18n?: () => Translator;
|
|
1194
1218
|
}
|
|
1195
1219
|
/**
|
|
1196
1220
|
* The vertical drawing toolbar (renderer chrome), docked as a flush bar in the left gutter. Each
|
|
@@ -1256,7 +1280,11 @@ declare class DrawingToolbar {
|
|
|
1256
1280
|
private readonly dock;
|
|
1257
1281
|
private readonly onCollapse;
|
|
1258
1282
|
private readonly onDrawingsSync;
|
|
1283
|
+
private readonly i18n;
|
|
1259
1284
|
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);
|
|
1285
|
+
private t;
|
|
1286
|
+
/** Re-read every label in the current language (the chart's language changed). */
|
|
1287
|
+
relabel(): void;
|
|
1260
1288
|
/** Live divider/border ink — the option override, else the current theme's border
|
|
1261
1289
|
* (so a theme swap re-inks the bar without a rebuild option). */
|
|
1262
1290
|
private get borderColor();
|
|
@@ -1581,4 +1609,4 @@ declare const DARK_THEME: VelaTheme;
|
|
|
1581
1609
|
declare const LIGHT_THEME: VelaTheme;
|
|
1582
1610
|
declare function resolveTheme(theme?: ThemeName | VelaTheme): VelaTheme;
|
|
1583
1611
|
|
|
1584
|
-
export { AxisLongPressEvent, BarRange, BarStore, CachingDataFeed, type ChartConfig, type ChartStyle, ClickEvent, CrosshairEvent, DARK_THEME, DataControl, DataProvider, DataWindowReadout, Drawing, DrawingStore, DrawingToolbar, type DrawingToolbarOptions, DrawingTypeKey, DrawingsDocument, IChartRenderer, IDrawingsRendererPort, IndicatorModel, IndicatorRenderHandle, InputChangeEvent, InputValue, LIGHT_THEME, LineStyle, MarkClickEvent, MarkGroup, MarketConfig, MarketDataFeed, MarketSnapshot, Millis, MultiProviderFeed, NativeRenderer, OHLCV, Pane, PriceStyle, ProviderCapabilities, ProviderInfo, RendererCapabilities, RendererDisplayOptions, ReplayTick, ReplayTickSource, Resolved, ScenePatch, SerializedDrawing, SettingsSelectOption, SnapMode, SymbolDescriptor, SymbolInfo, ThemeName, TimelineMark, ToolbarDefinition, VelaTheme, VisibleRange, WallClock, barsToTicks, lowerTimeframeTicks, resolveTheme, sharedBarStore, timeframeToMs };
|
|
1612
|
+
export { AxisLongPressEvent, BarRange, BarStore, CachingDataFeed, type ChartConfig, type ChartStyle, ClickEvent, CrosshairEvent, DARK_THEME, DataControl, DataProvider, DataWindowReadout, Drawing, DrawingStore, DrawingToolbar, type DrawingToolbarOptions, DrawingTypeKey, DrawingsDocument, IChartRenderer, IDrawingsRendererPort, IndicatorModel, IndicatorRenderHandle, InputChangeEvent, InputValue, LIGHT_THEME, LineStyle, MarkClickEvent, MarkGroup, MarketConfig, MarketDataFeed, MarketSnapshot, MessageLike, Millis, MultiProviderFeed, NativeRenderer, OHLCV, Pane, PriceStyle, ProviderCapabilities, ProviderInfo, RendererCapabilities, RendererDisplayOptions, ReplayTick, ReplayTickSource, Resolved, ScenePatch, SerializedDrawing, SettingsSelectOption, SnapMode, SymbolDescriptor, SymbolInfo, ThemeName, TimelineMark, ToolbarDefinition, Translator, VelaTheme, VisibleRange, WallClock, barsToTicks, lowerTimeframeTicks, resolveTheme, sharedBarStore, timeframeToMs };
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import './chunk-
|
|
2
|
-
export { BarStore, CachingDataFeed, DARK_THEME, DataControl, DrawingStore, DrawingToolbar, DrawingsControl, LIGHT_THEME, MarksControl, MultiProviderFeed, NativeRenderer, RendererControl, ReplayControl, SecondClock, TypedEventBus, Vela, buildToolbar, defaultToolbar, resolveTheme, sharedBarStore, timeframeToMs } from './chunk-
|
|
3
|
-
export { CONTEXT_MENU_BUILTIN_ORDER, DEFAULT_PANEL_MAX_WIDTH, DEFAULT_PANEL_MIN_WIDTH, DEFAULT_PANEL_WIDTH, Drawing, OVERRIDABLE_TOPBAR_IDS, chartType, chartTypes, clampPanelWidth, createDrawing, deserializeDrawing, drawingTypes, getDrawingType, getNativeIndicator, inputDeltas, inputVisible, legendActions, legendCallouts, nativeIndicatorDescriptors, nativeIndicatorTypes, normalizeSettingsRow, registerChartType, registerDefaultEngine, registerDrawingType, registerLegendAction, registerLegendCallout, registerNativeIndicator, registerRendererDefaults, registerRendererLayer, registerSidePanel, registerStatePersistence, registerSymbolRanking, registerWidgetAction, registerWidgetAttachment, rendererDefaults, rendererLayers, resolveEngines, seriesInScale, seriesShownOn, settingsRowValueKeys, sidePanels, stableSeriesId, statePersistenceHandlers, symbolRanking, tickerModifierIds, topbarActionOverride, unregisterChartType, unregisterDefaultEngine, unregisterLegendAction, unregisterLegendCallout, unregisterNativeIndicator, unregisterRendererDefaults, unregisterRendererLayer, unregisterSidePanel, unregisterStatePersistence, unregisterWidgetAction, unregisterWidgetAttachment, widgetActions, widgetAttachments } from './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
export { ACCENT, ACCENT_BRIGHT, BEARISH, BULLISH, CATEGORICAL, CHIP_PLATE, 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-
|
|
1
|
+
import './chunk-3EYCX2L4.js';
|
|
2
|
+
export { BarStore, CachingDataFeed, DARK_THEME, DataControl, DrawingStore, DrawingToolbar, DrawingsControl, LIGHT_THEME, MarksControl, MultiProviderFeed, NativeRenderer, RendererControl, ReplayControl, SecondClock, TypedEventBus, Vela, buildToolbar, defaultToolbar, resolveTheme, sharedBarStore, timeframeToMs } from './chunk-3H6JO4VL.js';
|
|
3
|
+
export { CONTEXT_MENU_BUILTIN_ORDER, DEFAULT_PANEL_MAX_WIDTH, DEFAULT_PANEL_MIN_WIDTH, DEFAULT_PANEL_WIDTH, Drawing, OVERRIDABLE_TOPBAR_IDS, chartType, chartTypes, clampPanelWidth, createDrawing, deserializeDrawing, drawingTypes, getDrawingType, getNativeIndicator, inputDeltas, inputVisible, legendActions, legendCallouts, nativeIndicatorDescriptors, nativeIndicatorTypes, normalizeSettingsRow, registerChartType, registerDefaultEngine, registerDrawingType, registerLegendAction, registerLegendCallout, registerNativeIndicator, registerRendererDefaults, registerRendererLayer, registerSidePanel, registerStatePersistence, registerSymbolRanking, registerWidgetAction, registerWidgetAttachment, rendererDefaults, rendererLayers, resolveEngines, seriesInScale, seriesShownOn, settingsRowValueKeys, sidePanels, stableSeriesId, statePersistenceHandlers, symbolRanking, tickerModifierIds, topbarActionOverride, unregisterChartType, unregisterDefaultEngine, unregisterLegendAction, unregisterLegendCallout, unregisterNativeIndicator, unregisterRendererDefaults, unregisterRendererLayer, unregisterSidePanel, unregisterStatePersistence, unregisterWidgetAction, unregisterWidgetAttachment, widgetActions, widgetAttachments } from './chunk-Q7POFYNE.js';
|
|
4
|
+
import './chunk-PZN4RS4T.js';
|
|
5
|
+
export { ACCENT, ACCENT_BRIGHT, BEARISH, BULLISH, CATEGORICAL, CHIP_PLATE, 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, createTranslator, iconMarkup, msg, registerIcon, registerLocale, registeredLocales, withValues } from './chunk-O6L27KRB.js';
|
|
6
6
|
|
|
7
7
|
// src/core/replayTicks.ts
|
|
8
8
|
function lowerTimeframeTicks(chart, timeframe) {
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
import { M as MessageLike, T as Translator } from './types-Bwf63xGI.js';
|
|
2
|
+
|
|
1
3
|
interface KeyBindingDescriptor {
|
|
2
4
|
/** Stable id, e.g. `'chart.toggle-log-scale'`. Re-registering an id replaces it. */
|
|
3
5
|
id: string;
|
|
4
6
|
/** Default chord(s). Users can `rebind()` without touching the descriptor. */
|
|
5
7
|
keys: string | string[];
|
|
6
|
-
/** Human label for the shortcuts help panel. */
|
|
7
|
-
label:
|
|
8
|
-
/** Help-panel grouping, e.g. `'Chart'`, `'Drawings'`. */
|
|
9
|
-
category?:
|
|
8
|
+
/** Human label for the shortcuts help panel. A message follows the shell's language. */
|
|
9
|
+
label: MessageLike;
|
|
10
|
+
/** Help-panel grouping, e.g. `'Chart'`, `'Drawings'`. A message follows the shell's language. */
|
|
11
|
+
category?: MessageLike;
|
|
10
12
|
/** `'global'` fires in ANY scope; anything else only while it is the top scope. Default `'chart'`. */
|
|
11
13
|
scope?: string;
|
|
12
14
|
/** Extra runtime gate evaluated at match time. */
|
|
@@ -47,8 +49,9 @@ declare class KeymapManager {
|
|
|
47
49
|
unregister(id: string): void;
|
|
48
50
|
/** User-level rebinding: overrides the descriptor's default chords (null resets). */
|
|
49
51
|
rebind(id: string, keys: string | string[] | null): void;
|
|
50
|
-
/** Snapshot for a shortcuts help panel / rebinding UI
|
|
51
|
-
|
|
52
|
+
/** Snapshot for a shortcuts help panel / rebinding UI: labels, categories and key
|
|
53
|
+
* names in `i18n`'s language (English when absent). */
|
|
54
|
+
bindings(i18n?: Translator | null): ResolvedBinding[];
|
|
52
55
|
pushScope(scope: string): () => void;
|
|
53
56
|
/** Pops the TOPMOST occurrence of `scope` (tolerates out-of-order teardown). */
|
|
54
57
|
popScope(scope: string): void;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
import { M as MessageLike, T as Translator } from './types-Bwf63xGI.cjs';
|
|
2
|
+
|
|
1
3
|
interface KeyBindingDescriptor {
|
|
2
4
|
/** Stable id, e.g. `'chart.toggle-log-scale'`. Re-registering an id replaces it. */
|
|
3
5
|
id: string;
|
|
4
6
|
/** Default chord(s). Users can `rebind()` without touching the descriptor. */
|
|
5
7
|
keys: string | string[];
|
|
6
|
-
/** Human label for the shortcuts help panel. */
|
|
7
|
-
label:
|
|
8
|
-
/** Help-panel grouping, e.g. `'Chart'`, `'Drawings'`. */
|
|
9
|
-
category?:
|
|
8
|
+
/** Human label for the shortcuts help panel. A message follows the shell's language. */
|
|
9
|
+
label: MessageLike;
|
|
10
|
+
/** Help-panel grouping, e.g. `'Chart'`, `'Drawings'`. A message follows the shell's language. */
|
|
11
|
+
category?: MessageLike;
|
|
10
12
|
/** `'global'` fires in ANY scope; anything else only while it is the top scope. Default `'chart'`. */
|
|
11
13
|
scope?: string;
|
|
12
14
|
/** Extra runtime gate evaluated at match time. */
|
|
@@ -47,8 +49,9 @@ declare class KeymapManager {
|
|
|
47
49
|
unregister(id: string): void;
|
|
48
50
|
/** User-level rebinding: overrides the descriptor's default chords (null resets). */
|
|
49
51
|
rebind(id: string, keys: string | string[] | null): void;
|
|
50
|
-
/** Snapshot for a shortcuts help panel / rebinding UI
|
|
51
|
-
|
|
52
|
+
/** Snapshot for a shortcuts help panel / rebinding UI: labels, categories and key
|
|
53
|
+
* names in `i18n`'s language (English when absent). */
|
|
54
|
+
bindings(i18n?: Translator | null): ResolvedBinding[];
|
|
52
55
|
pushScope(scope: string): () => void;
|
|
53
56
|
/** Pops the TOPMOST occurrence of `scope` (tolerates out-of-order teardown). */
|
|
54
57
|
popScope(scope: string): void;
|