@luxalgo/vela 0.7.6 → 0.7.8

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/index.d.cts CHANGED
@@ -1,9 +1,10 @@
1
- import { D as DrawingsDocument, R as Resolved } from './contributions-D6p1RB38.cjs';
2
- export { B as BarsChangeReason, C as CellStateContext, b as ContextSelect, c as DataControl, d as DrawingsControl, e as EngineAlert, f as EngineCapabilities, g as EngineContextSnapshot, h as EngineFactory, i as EngineWarning, j as ExecutionHandlers, k as ExecutionMarket, l as ExecutionRequest, m as ExecutionSession, E as ExternalIndicatorEntry, F as FetchSeries, n as IndicatorEventMap, I as IndicatorHandle, o as IndicatorSummary, L as LegendActionDescriptor, p as LegendCalloutContent, q as LegendCalloutDescriptor, r as LegendCalloutItem, s as LegendCalloutSpec, t as LegendIndicatorInfo, M as MarksControl, N as NativeIndicator, u as NativeIndicatorContext, v as NativeIndicatorDescriptor, w as NativeIndicatorInfo, x as NativeIndicatorOutput, O as OVERRIDABLE_TOPBAR_IDS, P as ParsedSymbol, y as PreparedScript, z as RendererControl, A as RunIndicatorResult, G as SceneInspection, a as ScriptRun, H as ScriptRunCause, J as ScriptRunResult, S as ScriptingEngine, K as SidePanelButton, Q as SidePanelDescriptor, T as SidePanelHandle, U as SidePanelHeader, X as StatePersistenceHandler, Y as StrategyFill, Z as StrategyState, _ as StrategyTrade, $ as SymbolRankingHook, a0 as TypedEventBus, V as Vela, a1 as VelaDeps, a2 as VelaEventMap, a3 as VisibleBarRange, a4 as WidgetActionDescriptor, a5 as WidgetActionTarget, a6 as WidgetAttachment, W as WidgetContext, a7 as getNativeIndicator, a8 as legendActions, a9 as legendCallouts, aa as nativeIndicatorDescriptors, ab as nativeIndicatorTypes, ac as registerDefaultEngine, ad as registerLegendAction, ae as registerLegendCallout, af as registerNativeIndicator, ag as registerSidePanel, ah as registerStatePersistence, ai as registerSymbolRanking, aj as registerWidgetAction, ak as registerWidgetAttachment, al as resolveEngines, am as sidePanels, an as statePersistenceHandlers, ao as symbolRanking, ap as topbarActionOverride, aq as unregisterDefaultEngine, ar as unregisterLegendAction, as as unregisterLegendCallout, at as unregisterNativeIndicator, au as unregisterSidePanel, av as unregisterStatePersistence, aw as unregisterWidgetAction, ax as unregisterWidgetAttachment, ay as widgetActions, az as widgetAttachments } from './contributions-D6p1RB38.cjs';
1
+ import { D as DrawingsDocument, R as Resolved } from './contributions-DF_Ea07m.cjs';
2
+ export { B as BarsChangeReason, C as CellStateContext, b as ContextSelect, c as DataControl, d as DrawingsControl, e as EngineAlert, f as EngineCapabilities, g as EngineContextSnapshot, h as EngineFactory, i as EngineWarning, j as ExecutionHandlers, k as ExecutionMarket, l as ExecutionRequest, m as ExecutionSession, E as ExternalIndicatorEntry, F as FetchSeries, n as IndicatorEventMap, I as IndicatorHandle, o as IndicatorSummary, L as LegendActionDescriptor, p as LegendCalloutContent, q as LegendCalloutDescriptor, r as LegendCalloutItem, s as LegendCalloutSpec, t as LegendIndicatorInfo, M as MarksControl, N as NativeIndicator, u as NativeIndicatorContext, v as NativeIndicatorDescriptor, w as NativeIndicatorInfo, x as NativeIndicatorOutput, O as OVERRIDABLE_TOPBAR_IDS, P as ParsedSymbol, y as PreparedScript, z as RendererControl, A as RunIndicatorResult, G as SceneInspection, a as ScriptRun, H as ScriptRunCause, J as ScriptRunResult, S as ScriptingEngine, K as SidePanelButton, Q as SidePanelDescriptor, T as SidePanelHandle, U as SidePanelHeader, X as StatePersistenceHandler, Y as StrategyFill, Z as StrategyState, _ as StrategyTrade, $ as SymbolRankingHook, a0 as TypedEventBus, V as Vela, a1 as VelaDeps, a2 as VelaEventMap, a3 as VisibleBarRange, a4 as WidgetActionDescriptor, a5 as WidgetActionTarget, a6 as WidgetAttachment, W as WidgetContext, a7 as getNativeIndicator, a8 as legendActions, a9 as legendCallouts, aa as nativeIndicatorDescriptors, ab as nativeIndicatorTypes, ac as registerDefaultEngine, ad as registerLegendAction, ae as registerLegendCallout, af as registerNativeIndicator, ag as registerSidePanel, ah as registerStatePersistence, ai as registerSymbolRanking, aj as registerWidgetAction, ak as registerWidgetAttachment, al as resolveEngines, am as sidePanels, an as statePersistenceHandlers, ao as symbolRanking, ap as topbarActionOverride, aq as unregisterDefaultEngine, ar as unregisterLegendAction, as as unregisterLegendCallout, at as unregisterNativeIndicator, au as unregisterSidePanel, av as unregisterStatePersistence, aw as unregisterWidgetAction, ax as unregisterWidgetAttachment, ay as widgetActions, az as widgetAttachments } from './contributions-DF_Ea07m.cjs';
3
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, i as Pane, j as PaneAction, k as MoveTarget, l as IndicatorModel, m as ScenePatch, I as InputValue, n as SymbolPickerFn, o as LegendActionView, p as LegendCalloutView, q as InputChangeEvent, T as ThemeName, C as CrosshairEvent, r as ClickEvent, A as AxisLongPressEvent, s as TimelineMark, t as MarkGroup, u as MarkClickEvent, a as VisibleRange, v as DataWindowReadout, w as IDrawingsRendererPort, x as Millis, y as SnapMode, z as DrawingTypeKey, B as ToolbarDefinition, M as MarketConfig } from './options-D1AJKsn_.cjs';
4
4
  export { E as AddIndicatorOptions, F as AnimationConfig, G as Background, H as BoxFontFamily, J as BoxHAlign, K as BoxTextSize, Q as BoxVAlign, X as CandleBarColor, Y as CandleSeries, Z as CandleStyle, _ as DataWindowGroup, $ as DataWindowOHLC, a0 as DataWindowRow, a1 as DirtyRange, a2 as DrawingBox, a3 as DrawingExtend, a4 as DrawingIntent, a5 as DrawingLabel, a6 as DrawingLine, a7 as DrawingLinefill, a8 as DrawingMode, a9 as DrawingPoint, aa as DrawingPolyline, ab as DrawingSeriesBar, ac as DrawingSeriesGateway, ad as DrawingSeriesState, ae as DrawingStyle, af as DrawingTable, ag as DrawingText, ah as DrawingXLoc, ai as DrawingsOption, aj as Fill, ak as FillGradientStop, al as IndicatorMeta, am as InputCondition, an as InputSchema, ao as InputType, ap as InputWhen, aq as IntroAnimation, ar as IntroConfig, as as IntroStyle, at as LabelStyle, au as LabelYLoc, av as LineLikeKind, aw as LineLikeSeries, ax as LineLikeStyle, ay as MarkContent, az as MarkContentSource, aA as MarkGlyph, aB as MarkPanelItem, aC as MarkShape, aD as MarkerPoint, aE as MarkerSeries, aF as MarketSnapshot, aG as MarketSwitch, aH as PaneAxis, aI as PaneAxisBand, aJ as PaneHint, aK as PaneKind, aL as PolylinePoint, aM as PriceLine, aN as Projector, aO as ProviderName, aP as RendererConstructor, aQ as Scene, aR as SchemaPatch, aS as SecondClock, aT as SeriesDisplay, aU as SeriesKind, aV as SeriesPoint, aW as SeriesSpec, aX as SeriesSurface, aY as SeriesValueDelta, aZ as SettingsField, a_ as SettingsSchema, a$ as SettingsVisibilityPolicy, b0 as TableCell, b1 as TableMerge, b2 as TablePosition, b3 as ToolbarGroupConfig, b4 as TradeExecution, b5 as ValuePatch, b as VelaOptions, V as VisibleRangePreset, b6 as buildToolbar, b7 as defaultToolbar, b8 as inputDeltas, b9 as inputVisible, ba as seriesInScale, bb as seriesShownOn } from './options-D1AJKsn_.cjs';
5
+ import { S as SettingsSelectOption } from './plugin-6F04gjQe.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 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, N as NEUTRAL, m as NormalizedSettingsRow, R as RendererLayerArgs, n as RendererLayerDefinition, o as RendererLayerInstance, p as SERIES_LINE, q as SESSION_OFF, r as SESSION_POST, s as SESSION_PRE, t as SLATE, u as SLATE_DEEP, v as SeriesDataEngine, w as SeriesDataEngineHost, x as SettingsInlineControl, y as SettingsRowCondition, z as SettingsRowDescriptor, E as SettingsRowInlineNumber, F as SettingsRowSwatch, G as SettingsRowValueKey, J as SettingsRowWhen, K as SettingsRowWidth, L as SettingsValueRow, T as TRADE_EXIT, O as TRADE_LONG, P as TRADE_SHORT, V as VALID, W as WARNING, Q as categoricalColor, U as chartType, X as chartTypes, Y as createDrawing, Z as deserializeDrawing, _ as drawingTypes, $ as getDrawingType, a0 as normalizeSettingsRow, a1 as registerChartType, a2 as registerDrawingType, a3 as registerRendererDefaults, a4 as registerRendererLayer, a5 as rendererDefaults, a6 as rendererLayers, a7 as settingsRowValueKeys, a8 as stableSeriesId, a9 as tickerModifierIds, aa as unregisterChartType, ab as unregisterRendererDefaults, ac as unregisterRendererLayer } from './plugin-6F04gjQe.cjs';
5
7
  import { M as MarketDataFeed, D as DataProvider, P as ProviderInfo, a as SymbolDescriptor, S as SymbolInfo, b as ProviderCapabilities, B as BarRange } from './DataProvider-CGa4KHRa.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 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, N as NEUTRAL, m as NormalizedSettingsRow, R as RendererLayerArgs, n as RendererLayerDefinition, o as RendererLayerInstance, S as SERIES_LINE, p as SESSION_OFF, q as SESSION_POST, r as SESSION_PRE, s as SLATE, t as SLATE_DEEP, u as SeriesDataEngine, v as SeriesDataEngineHost, w as SettingsInlineControl, x as SettingsRowCondition, y as SettingsRowDescriptor, z as SettingsRowInlineNumber, E as SettingsRowSwatch, F as SettingsRowValueKey, G as SettingsRowWhen, J as SettingsRowWidth, K as SettingsSelectOption, L as SettingsValueRow, T as TRADE_EXIT, O as TRADE_LONG, P as TRADE_SHORT, V as VALID, W as WARNING, Q as categoricalColor, U as chartType, X as chartTypes, Y as createDrawing, Z as deserializeDrawing, _ as drawingTypes, $ as getDrawingType, a0 as normalizeSettingsRow, a1 as registerChartType, a2 as registerDrawingType, a3 as registerRendererDefaults, a4 as registerRendererLayer, a5 as rendererDefaults, a6 as rendererLayers, a7 as settingsRowValueKeys, a8 as stableSeriesId, a9 as tickerModifierIds, aa as unregisterChartType, ab as unregisterRendererDefaults, ac as unregisterRendererLayer } from './plugin-CxWfg6vK.cjs';
7
8
  export { D as DEFAULT_PANEL_MAX_WIDTH, a as DEFAULT_PANEL_MIN_WIDTH, b as DEFAULT_PANEL_WIDTH, S as SidePanelOptions, c as clampPanelWidth } from './side-panel-HF0IAzwf.cjs';
8
9
  export { i as iconMarkup, r as registerIcon } from './icons-BZYbJXSV.cjs';
9
10
  export { a as KeyBindingDescriptor, R as ResolvedBinding } from './keymap-CGOz5F5f.cjs';
@@ -138,11 +139,23 @@ interface SessionShadeStyle {
138
139
  postmarketColor: string;
139
140
  extendedColor: string;
140
141
  }
142
+ /**
143
+ * Empty space kept around the data. `top` / `bottom` are the share of each pane's
144
+ * PIXEL height the autoscaled window reserves above the highest / below the lowest
145
+ * visible value (percent); `right` is the whitespace after the newest bar, in bars,
146
+ * that fit, re-frame and scroll-to-latest land on.
147
+ */
148
+ interface ChartMargins {
149
+ top: number;
150
+ bottom: number;
151
+ right: number;
152
+ }
141
153
  interface ChartStyle {
142
154
  /** Per-chart-type settings (plugin SDK sections), keyed by type id then row key. */
143
155
  chartTypes: Record<string, Record<string, unknown>>;
144
156
  /** Axis/label font size in CSS px (the family stays on the theme). */
145
157
  fontSize: number;
158
+ margins: ChartMargins;
146
159
  gridVert: GridLineStyle;
147
160
  gridHorz: GridLineStyle;
148
161
  /** Axis frame lines (the right price-axis border); `null` ⇒ inherit `theme.borderColor`. */
@@ -213,6 +226,9 @@ interface ChartConfig {
213
226
  panes: {
214
227
  separatorColor: string;
215
228
  };
229
+ /** Whitespace around the data (the Canvas tab's Margins group): top/bottom in percent
230
+ * of pane height, right in bars. See {@link ChartMargins}. */
231
+ margins: ChartMargins;
216
232
  /** Strategy trade markers (the `tradeMarkers` feature): the order-fill units on the price pane. */
217
233
  trades: {
218
234
  visible: boolean;
@@ -328,7 +344,7 @@ type HostSettingsRow = {
328
344
  } | {
329
345
  kind: 'select';
330
346
  label: string;
331
- options: readonly string[];
347
+ options: readonly SettingsSelectOption[];
332
348
  get: () => string;
333
349
  set: (v: string) => void;
334
350
  id?: string;
@@ -982,7 +998,7 @@ declare class NativeRenderer implements IChartRenderer {
982
998
  private tradesScaleHints;
983
999
  private fitContent;
984
1000
  /** Re-frame after a series replacement (a symbol/timeframe switch): keep the user's
985
- * zoom (bar spacing), re-anchor the newest bars at the default right offset.
1001
+ * zoom (bar spacing), re-anchor the newest bars at the configured right margin.
986
1002
  * `clampViewport`'s fit-all-bars floor deliberately does NOT apply — a progressive
987
1003
  * head may still be backfilling toward the previous depth, and raising the spacing
988
1004
  * to its temporary bar count would lose the zoom this exists to keep. */
@@ -1376,6 +1392,8 @@ declare class MultiProviderFeed implements MarketDataFeed {
1376
1392
  private liveBars;
1377
1393
  /** Sync-accessible symbol metadata, warmed by load()/symbolInfoFor (the engine reads it synchronously). */
1378
1394
  private readonly symInfoCache;
1395
+ /** Requests in flight, keyed like the cache — every concurrent asker shares one round trip. */
1396
+ private readonly symInfoInflight;
1379
1397
  constructor(store?: BarStore);
1380
1398
  registerProvider(name: string, provider: DataProvider): Promise<void>;
1381
1399
  unregisterProvider(name: string): void;
@@ -1407,6 +1425,19 @@ declare class MultiProviderFeed implements MarketDataFeed {
1407
1425
  ready(): Promise<void>;
1408
1426
  /** Async per-symbol metadata (the facade's `chart.data.symbolInfo`); also warms the sync cache. */
1409
1427
  symbolInfoFor(raw: string): Promise<SymbolInfo | undefined>;
1428
+ /**
1429
+ * One round trip per symbol, shared. A market switch probes this metadata from five
1430
+ * places at once (the bar load's prefetch, the renderer's tick size, the market-status
1431
+ * badge, the session shading, the session toggle) — without the in-flight map each
1432
+ * would open its own request for the same answer, and the last one to land decided how
1433
+ * late the chrome settled.
1434
+ *
1435
+ * Cached for {@link SYMBOL_INFO_TTL_MS}: this metadata is stable within a session
1436
+ * (tick size, session vocabulary, listing prefix), but not immutable — a continuous
1437
+ * futures row rolls its current contract — so the entry expires rather than pinning the
1438
+ * session's first answer forever. A failed probe is NOT remembered: the next asker retries.
1439
+ */
1440
+ private fetchSymbolInfo;
1410
1441
  /**
1411
1442
  * Per-symbol capabilities, resolved through the owning provider's `capabilitiesFor`
1412
1443
  * refinement (an instrument may support more than its provider-wide baseline), falling back to the
@@ -1504,4 +1535,4 @@ declare const DARK_THEME: VelaTheme;
1504
1535
  declare const LIGHT_THEME: VelaTheme;
1505
1536
  declare function resolveTheme(theme?: ThemeName | VelaTheme): VelaTheme;
1506
1537
 
1507
- export { AxisLongPressEvent, BarRange, BarStore, CachingDataFeed, type ChartConfig, type ChartStyle, ClickEvent, CrosshairEvent, DARK_THEME, DataProvider, DataWindowReadout, Drawing, DrawingStore, DrawingToolbar, type DrawingToolbarOptions, DrawingTypeKey, DrawingsDocument, IChartRenderer, IDrawingsRendererPort, IndicatorModel, IndicatorRenderHandle, InputChangeEvent, InputValue, LIGHT_THEME, LineStyle, MarkClickEvent, MarkGroup, MarketConfig, MarketDataFeed, Millis, MultiProviderFeed, NativeRenderer, OHLCV, Pane, PriceStyle, ProviderCapabilities, ProviderInfo, RendererCapabilities, RendererDisplayOptions, Resolved, ScenePatch, SerializedDrawing, SnapMode, SymbolDescriptor, SymbolInfo, ThemeName, TimelineMark, ToolbarDefinition, VelaTheme, VisibleRange, WallClock, resolveTheme, sharedBarStore, timeframeToMs };
1538
+ export { AxisLongPressEvent, BarRange, BarStore, CachingDataFeed, type ChartConfig, type ChartStyle, ClickEvent, CrosshairEvent, DARK_THEME, DataProvider, DataWindowReadout, Drawing, DrawingStore, DrawingToolbar, type DrawingToolbarOptions, DrawingTypeKey, DrawingsDocument, IChartRenderer, IDrawingsRendererPort, IndicatorModel, IndicatorRenderHandle, InputChangeEvent, InputValue, LIGHT_THEME, LineStyle, MarkClickEvent, MarkGroup, MarketConfig, MarketDataFeed, Millis, MultiProviderFeed, NativeRenderer, OHLCV, Pane, PriceStyle, ProviderCapabilities, ProviderInfo, RendererCapabilities, RendererDisplayOptions, Resolved, ScenePatch, SerializedDrawing, SettingsSelectOption, SnapMode, SymbolDescriptor, SymbolInfo, ThemeName, TimelineMark, ToolbarDefinition, VelaTheme, VisibleRange, WallClock, resolveTheme, sharedBarStore, timeframeToMs };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,10 @@
1
- import { D as DrawingsDocument, R as Resolved } from './contributions-C7Wsm_S9.js';
2
- export { B as BarsChangeReason, C as CellStateContext, b as ContextSelect, c as DataControl, d as DrawingsControl, e as EngineAlert, f as EngineCapabilities, g as EngineContextSnapshot, h as EngineFactory, i as EngineWarning, j as ExecutionHandlers, k as ExecutionMarket, l as ExecutionRequest, m as ExecutionSession, E as ExternalIndicatorEntry, F as FetchSeries, n as IndicatorEventMap, I as IndicatorHandle, o as IndicatorSummary, L as LegendActionDescriptor, p as LegendCalloutContent, q as LegendCalloutDescriptor, r as LegendCalloutItem, s as LegendCalloutSpec, t as LegendIndicatorInfo, M as MarksControl, N as NativeIndicator, u as NativeIndicatorContext, v as NativeIndicatorDescriptor, w as NativeIndicatorInfo, x as NativeIndicatorOutput, O as OVERRIDABLE_TOPBAR_IDS, P as ParsedSymbol, y as PreparedScript, z as RendererControl, A as RunIndicatorResult, G as SceneInspection, a as ScriptRun, H as ScriptRunCause, J as ScriptRunResult, S as ScriptingEngine, K as SidePanelButton, Q as SidePanelDescriptor, T as SidePanelHandle, U as SidePanelHeader, X as StatePersistenceHandler, Y as StrategyFill, Z as StrategyState, _ as StrategyTrade, $ as SymbolRankingHook, a0 as TypedEventBus, V as Vela, a1 as VelaDeps, a2 as VelaEventMap, a3 as VisibleBarRange, a4 as WidgetActionDescriptor, a5 as WidgetActionTarget, a6 as WidgetAttachment, W as WidgetContext, a7 as getNativeIndicator, a8 as legendActions, a9 as legendCallouts, aa as nativeIndicatorDescriptors, ab as nativeIndicatorTypes, ac as registerDefaultEngine, ad as registerLegendAction, ae as registerLegendCallout, af as registerNativeIndicator, ag as registerSidePanel, ah as registerStatePersistence, ai as registerSymbolRanking, aj as registerWidgetAction, ak as registerWidgetAttachment, al as resolveEngines, am as sidePanels, an as statePersistenceHandlers, ao as symbolRanking, ap as topbarActionOverride, aq as unregisterDefaultEngine, ar as unregisterLegendAction, as as unregisterLegendCallout, at as unregisterNativeIndicator, au as unregisterSidePanel, av as unregisterStatePersistence, aw as unregisterWidgetAction, ax as unregisterWidgetAttachment, ay as widgetActions, az as widgetAttachments } from './contributions-C7Wsm_S9.js';
1
+ import { D as DrawingsDocument, R as Resolved } from './contributions-nKOSeLy8.js';
2
+ export { B as BarsChangeReason, C as CellStateContext, b as ContextSelect, c as DataControl, d as DrawingsControl, e as EngineAlert, f as EngineCapabilities, g as EngineContextSnapshot, h as EngineFactory, i as EngineWarning, j as ExecutionHandlers, k as ExecutionMarket, l as ExecutionRequest, m as ExecutionSession, E as ExternalIndicatorEntry, F as FetchSeries, n as IndicatorEventMap, I as IndicatorHandle, o as IndicatorSummary, L as LegendActionDescriptor, p as LegendCalloutContent, q as LegendCalloutDescriptor, r as LegendCalloutItem, s as LegendCalloutSpec, t as LegendIndicatorInfo, M as MarksControl, N as NativeIndicator, u as NativeIndicatorContext, v as NativeIndicatorDescriptor, w as NativeIndicatorInfo, x as NativeIndicatorOutput, O as OVERRIDABLE_TOPBAR_IDS, P as ParsedSymbol, y as PreparedScript, z as RendererControl, A as RunIndicatorResult, G as SceneInspection, a as ScriptRun, H as ScriptRunCause, J as ScriptRunResult, S as ScriptingEngine, K as SidePanelButton, Q as SidePanelDescriptor, T as SidePanelHandle, U as SidePanelHeader, X as StatePersistenceHandler, Y as StrategyFill, Z as StrategyState, _ as StrategyTrade, $ as SymbolRankingHook, a0 as TypedEventBus, V as Vela, a1 as VelaDeps, a2 as VelaEventMap, a3 as VisibleBarRange, a4 as WidgetActionDescriptor, a5 as WidgetActionTarget, a6 as WidgetAttachment, W as WidgetContext, a7 as getNativeIndicator, a8 as legendActions, a9 as legendCallouts, aa as nativeIndicatorDescriptors, ab as nativeIndicatorTypes, ac as registerDefaultEngine, ad as registerLegendAction, ae as registerLegendCallout, af as registerNativeIndicator, ag as registerSidePanel, ah as registerStatePersistence, ai as registerSymbolRanking, aj as registerWidgetAction, ak as registerWidgetAttachment, al as resolveEngines, am as sidePanels, an as statePersistenceHandlers, ao as symbolRanking, ap as topbarActionOverride, aq as unregisterDefaultEngine, ar as unregisterLegendAction, as as unregisterLegendCallout, at as unregisterNativeIndicator, au as unregisterSidePanel, av as unregisterStatePersistence, aw as unregisterWidgetAction, ax as unregisterWidgetAttachment, ay as widgetActions, az as widgetAttachments } from './contributions-nKOSeLy8.js';
3
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, i as Pane, j as PaneAction, k as MoveTarget, l as IndicatorModel, m as ScenePatch, I as InputValue, n as SymbolPickerFn, o as LegendActionView, p as LegendCalloutView, q as InputChangeEvent, T as ThemeName, C as CrosshairEvent, r as ClickEvent, A as AxisLongPressEvent, s as TimelineMark, t as MarkGroup, u as MarkClickEvent, a as VisibleRange, v as DataWindowReadout, w as IDrawingsRendererPort, x as Millis, y as SnapMode, z as DrawingTypeKey, B as ToolbarDefinition, M as MarketConfig } from './options-D1AJKsn_.js';
4
4
  export { E as AddIndicatorOptions, F as AnimationConfig, G as Background, H as BoxFontFamily, J as BoxHAlign, K as BoxTextSize, Q as BoxVAlign, X as CandleBarColor, Y as CandleSeries, Z as CandleStyle, _ as DataWindowGroup, $ as DataWindowOHLC, a0 as DataWindowRow, a1 as DirtyRange, a2 as DrawingBox, a3 as DrawingExtend, a4 as DrawingIntent, a5 as DrawingLabel, a6 as DrawingLine, a7 as DrawingLinefill, a8 as DrawingMode, a9 as DrawingPoint, aa as DrawingPolyline, ab as DrawingSeriesBar, ac as DrawingSeriesGateway, ad as DrawingSeriesState, ae as DrawingStyle, af as DrawingTable, ag as DrawingText, ah as DrawingXLoc, ai as DrawingsOption, aj as Fill, ak as FillGradientStop, al as IndicatorMeta, am as InputCondition, an as InputSchema, ao as InputType, ap as InputWhen, aq as IntroAnimation, ar as IntroConfig, as as IntroStyle, at as LabelStyle, au as LabelYLoc, av as LineLikeKind, aw as LineLikeSeries, ax as LineLikeStyle, ay as MarkContent, az as MarkContentSource, aA as MarkGlyph, aB as MarkPanelItem, aC as MarkShape, aD as MarkerPoint, aE as MarkerSeries, aF as MarketSnapshot, aG as MarketSwitch, aH as PaneAxis, aI as PaneAxisBand, aJ as PaneHint, aK as PaneKind, aL as PolylinePoint, aM as PriceLine, aN as Projector, aO as ProviderName, aP as RendererConstructor, aQ as Scene, aR as SchemaPatch, aS as SecondClock, aT as SeriesDisplay, aU as SeriesKind, aV as SeriesPoint, aW as SeriesSpec, aX as SeriesSurface, aY as SeriesValueDelta, aZ as SettingsField, a_ as SettingsSchema, a$ as SettingsVisibilityPolicy, b0 as TableCell, b1 as TableMerge, b2 as TablePosition, b3 as ToolbarGroupConfig, b4 as TradeExecution, b5 as ValuePatch, b as VelaOptions, V as VisibleRangePreset, b6 as buildToolbar, b7 as defaultToolbar, b8 as inputDeltas, b9 as inputVisible, ba as seriesInScale, bb as seriesShownOn } from './options-D1AJKsn_.js';
5
+ import { S as SettingsSelectOption } from './plugin-BLsNipkc.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 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, N as NEUTRAL, m as NormalizedSettingsRow, R as RendererLayerArgs, n as RendererLayerDefinition, o as RendererLayerInstance, p as SERIES_LINE, q as SESSION_OFF, r as SESSION_POST, s as SESSION_PRE, t as SLATE, u as SLATE_DEEP, v as SeriesDataEngine, w as SeriesDataEngineHost, x as SettingsInlineControl, y as SettingsRowCondition, z as SettingsRowDescriptor, E as SettingsRowInlineNumber, F as SettingsRowSwatch, G as SettingsRowValueKey, J as SettingsRowWhen, K as SettingsRowWidth, L as SettingsValueRow, T as TRADE_EXIT, O as TRADE_LONG, P as TRADE_SHORT, V as VALID, W as WARNING, Q as categoricalColor, U as chartType, X as chartTypes, Y as createDrawing, Z as deserializeDrawing, _ as drawingTypes, $ as getDrawingType, a0 as normalizeSettingsRow, a1 as registerChartType, a2 as registerDrawingType, a3 as registerRendererDefaults, a4 as registerRendererLayer, a5 as rendererDefaults, a6 as rendererLayers, a7 as settingsRowValueKeys, a8 as stableSeriesId, a9 as tickerModifierIds, aa as unregisterChartType, ab as unregisterRendererDefaults, ac as unregisterRendererLayer } from './plugin-BLsNipkc.js';
5
7
  import { M as MarketDataFeed, D as DataProvider, P as ProviderInfo, a as SymbolDescriptor, S as SymbolInfo, b as ProviderCapabilities, B as BarRange } from './DataProvider-CmWUtDVL.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 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, N as NEUTRAL, m as NormalizedSettingsRow, R as RendererLayerArgs, n as RendererLayerDefinition, o as RendererLayerInstance, S as SERIES_LINE, p as SESSION_OFF, q as SESSION_POST, r as SESSION_PRE, s as SLATE, t as SLATE_DEEP, u as SeriesDataEngine, v as SeriesDataEngineHost, w as SettingsInlineControl, x as SettingsRowCondition, y as SettingsRowDescriptor, z as SettingsRowInlineNumber, E as SettingsRowSwatch, F as SettingsRowValueKey, G as SettingsRowWhen, J as SettingsRowWidth, K as SettingsSelectOption, L as SettingsValueRow, T as TRADE_EXIT, O as TRADE_LONG, P as TRADE_SHORT, V as VALID, W as WARNING, Q as categoricalColor, U as chartType, X as chartTypes, Y as createDrawing, Z as deserializeDrawing, _ as drawingTypes, $ as getDrawingType, a0 as normalizeSettingsRow, a1 as registerChartType, a2 as registerDrawingType, a3 as registerRendererDefaults, a4 as registerRendererLayer, a5 as rendererDefaults, a6 as rendererLayers, a7 as settingsRowValueKeys, a8 as stableSeriesId, a9 as tickerModifierIds, aa as unregisterChartType, ab as unregisterRendererDefaults, ac as unregisterRendererLayer } from './plugin-SodaQhjQ.js';
7
8
  export { D as DEFAULT_PANEL_MAX_WIDTH, a as DEFAULT_PANEL_MIN_WIDTH, b as DEFAULT_PANEL_WIDTH, S as SidePanelOptions, c as clampPanelWidth } from './side-panel-HF0IAzwf.js';
8
9
  export { i as iconMarkup, r as registerIcon } from './icons-BZYbJXSV.js';
9
10
  export { a as KeyBindingDescriptor, R as ResolvedBinding } from './keymap-CGOz5F5f.js';
@@ -138,11 +139,23 @@ interface SessionShadeStyle {
138
139
  postmarketColor: string;
139
140
  extendedColor: string;
140
141
  }
142
+ /**
143
+ * Empty space kept around the data. `top` / `bottom` are the share of each pane's
144
+ * PIXEL height the autoscaled window reserves above the highest / below the lowest
145
+ * visible value (percent); `right` is the whitespace after the newest bar, in bars,
146
+ * that fit, re-frame and scroll-to-latest land on.
147
+ */
148
+ interface ChartMargins {
149
+ top: number;
150
+ bottom: number;
151
+ right: number;
152
+ }
141
153
  interface ChartStyle {
142
154
  /** Per-chart-type settings (plugin SDK sections), keyed by type id then row key. */
143
155
  chartTypes: Record<string, Record<string, unknown>>;
144
156
  /** Axis/label font size in CSS px (the family stays on the theme). */
145
157
  fontSize: number;
158
+ margins: ChartMargins;
146
159
  gridVert: GridLineStyle;
147
160
  gridHorz: GridLineStyle;
148
161
  /** Axis frame lines (the right price-axis border); `null` ⇒ inherit `theme.borderColor`. */
@@ -213,6 +226,9 @@ interface ChartConfig {
213
226
  panes: {
214
227
  separatorColor: string;
215
228
  };
229
+ /** Whitespace around the data (the Canvas tab's Margins group): top/bottom in percent
230
+ * of pane height, right in bars. See {@link ChartMargins}. */
231
+ margins: ChartMargins;
216
232
  /** Strategy trade markers (the `tradeMarkers` feature): the order-fill units on the price pane. */
217
233
  trades: {
218
234
  visible: boolean;
@@ -328,7 +344,7 @@ type HostSettingsRow = {
328
344
  } | {
329
345
  kind: 'select';
330
346
  label: string;
331
- options: readonly string[];
347
+ options: readonly SettingsSelectOption[];
332
348
  get: () => string;
333
349
  set: (v: string) => void;
334
350
  id?: string;
@@ -982,7 +998,7 @@ declare class NativeRenderer implements IChartRenderer {
982
998
  private tradesScaleHints;
983
999
  private fitContent;
984
1000
  /** Re-frame after a series replacement (a symbol/timeframe switch): keep the user's
985
- * zoom (bar spacing), re-anchor the newest bars at the default right offset.
1001
+ * zoom (bar spacing), re-anchor the newest bars at the configured right margin.
986
1002
  * `clampViewport`'s fit-all-bars floor deliberately does NOT apply — a progressive
987
1003
  * head may still be backfilling toward the previous depth, and raising the spacing
988
1004
  * to its temporary bar count would lose the zoom this exists to keep. */
@@ -1376,6 +1392,8 @@ declare class MultiProviderFeed implements MarketDataFeed {
1376
1392
  private liveBars;
1377
1393
  /** Sync-accessible symbol metadata, warmed by load()/symbolInfoFor (the engine reads it synchronously). */
1378
1394
  private readonly symInfoCache;
1395
+ /** Requests in flight, keyed like the cache — every concurrent asker shares one round trip. */
1396
+ private readonly symInfoInflight;
1379
1397
  constructor(store?: BarStore);
1380
1398
  registerProvider(name: string, provider: DataProvider): Promise<void>;
1381
1399
  unregisterProvider(name: string): void;
@@ -1407,6 +1425,19 @@ declare class MultiProviderFeed implements MarketDataFeed {
1407
1425
  ready(): Promise<void>;
1408
1426
  /** Async per-symbol metadata (the facade's `chart.data.symbolInfo`); also warms the sync cache. */
1409
1427
  symbolInfoFor(raw: string): Promise<SymbolInfo | undefined>;
1428
+ /**
1429
+ * One round trip per symbol, shared. A market switch probes this metadata from five
1430
+ * places at once (the bar load's prefetch, the renderer's tick size, the market-status
1431
+ * badge, the session shading, the session toggle) — without the in-flight map each
1432
+ * would open its own request for the same answer, and the last one to land decided how
1433
+ * late the chrome settled.
1434
+ *
1435
+ * Cached for {@link SYMBOL_INFO_TTL_MS}: this metadata is stable within a session
1436
+ * (tick size, session vocabulary, listing prefix), but not immutable — a continuous
1437
+ * futures row rolls its current contract — so the entry expires rather than pinning the
1438
+ * session's first answer forever. A failed probe is NOT remembered: the next asker retries.
1439
+ */
1440
+ private fetchSymbolInfo;
1410
1441
  /**
1411
1442
  * Per-symbol capabilities, resolved through the owning provider's `capabilitiesFor`
1412
1443
  * refinement (an instrument may support more than its provider-wide baseline), falling back to the
@@ -1504,4 +1535,4 @@ declare const DARK_THEME: VelaTheme;
1504
1535
  declare const LIGHT_THEME: VelaTheme;
1505
1536
  declare function resolveTheme(theme?: ThemeName | VelaTheme): VelaTheme;
1506
1537
 
1507
- export { AxisLongPressEvent, BarRange, BarStore, CachingDataFeed, type ChartConfig, type ChartStyle, ClickEvent, CrosshairEvent, DARK_THEME, DataProvider, DataWindowReadout, Drawing, DrawingStore, DrawingToolbar, type DrawingToolbarOptions, DrawingTypeKey, DrawingsDocument, IChartRenderer, IDrawingsRendererPort, IndicatorModel, IndicatorRenderHandle, InputChangeEvent, InputValue, LIGHT_THEME, LineStyle, MarkClickEvent, MarkGroup, MarketConfig, MarketDataFeed, Millis, MultiProviderFeed, NativeRenderer, OHLCV, Pane, PriceStyle, ProviderCapabilities, ProviderInfo, RendererCapabilities, RendererDisplayOptions, Resolved, ScenePatch, SerializedDrawing, SnapMode, SymbolDescriptor, SymbolInfo, ThemeName, TimelineMark, ToolbarDefinition, VelaTheme, VisibleRange, WallClock, resolveTheme, sharedBarStore, timeframeToMs };
1538
+ export { AxisLongPressEvent, BarRange, BarStore, CachingDataFeed, type ChartConfig, type ChartStyle, ClickEvent, CrosshairEvent, DARK_THEME, DataProvider, DataWindowReadout, Drawing, DrawingStore, DrawingToolbar, type DrawingToolbarOptions, DrawingTypeKey, DrawingsDocument, IChartRenderer, IDrawingsRendererPort, IndicatorModel, IndicatorRenderHandle, InputChangeEvent, InputValue, LIGHT_THEME, LineStyle, MarkClickEvent, MarkGroup, MarketConfig, MarketDataFeed, Millis, MultiProviderFeed, NativeRenderer, OHLCV, Pane, PriceStyle, ProviderCapabilities, ProviderInfo, RendererCapabilities, RendererDisplayOptions, Resolved, ScenePatch, SerializedDrawing, SettingsSelectOption, SnapMode, SymbolDescriptor, SymbolInfo, ThemeName, TimelineMark, ToolbarDefinition, VelaTheme, VisibleRange, WallClock, resolveTheme, sharedBarStore, timeframeToMs };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import './chunk-JU4CWEBF.js';
2
- export { BarStore, CachingDataFeed, DARK_THEME, DataControl, DrawingStore, DrawingToolbar, DrawingsControl, LIGHT_THEME, MarksControl, MultiProviderFeed, NativeRenderer, RendererControl, SecondClock, TypedEventBus, Vela, buildToolbar, defaultToolbar, resolveTheme, sharedBarStore, timeframeToMs } from './chunk-JSVCWYBF.js';
2
+ export { BarStore, CachingDataFeed, DARK_THEME, DataControl, DrawingStore, DrawingToolbar, DrawingsControl, LIGHT_THEME, MarksControl, MultiProviderFeed, NativeRenderer, RendererControl, SecondClock, TypedEventBus, Vela, buildToolbar, defaultToolbar, resolveTheme, sharedBarStore, timeframeToMs } from './chunk-N4ZZYLMP.js';
3
3
  export { 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-BFA32GOU.js';
4
- import './chunk-BKHSQ4YM.js';
4
+ import './chunk-WTWGEB7K.js';
5
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-CAFCLMPF.js';
@@ -1,5 +1,5 @@
1
- import { z as DrawingTypeKey, ae as DrawingStyle, S as SerializedDrawing, D as Drawing, aU as SeriesKind, O as OHLCV, c as VelaTheme } from './options-D1AJKsn_.cjs';
2
- import { c as DataControl } from './contributions-D6p1RB38.cjs';
1
+ import { z as DrawingTypeKey, ae as DrawingStyle, S as SerializedDrawing, D as Drawing, O as OHLCV, aU as SeriesKind, c as VelaTheme } from './options-D1AJKsn_.cjs';
2
+ import { c as DataControl } from './contributions-DF_Ea07m.cjs';
3
3
  import './side-panel-HF0IAzwf.cjs';
4
4
  import './icons-BZYbJXSV.cjs';
5
5
  import './keymap-CGOz5F5f.cjs';
@@ -142,26 +142,6 @@ declare class CoordinateSystem {
142
142
  toBitmap(mediaPx: number): number;
143
143
  }
144
144
 
145
- /** Things that need a stable id within an indicator instance. */
146
- type IdentifiableKind = SeriesKind | 'fill' | 'background' | 'hline' | 'line' | 'box' | 'label' | 'polyline' | 'linefill' | 'table';
147
- /**
148
- * Content-addressed id for a plotted element, stable across re-runs of
149
- * identical source.
150
- *
151
- * Deliberately NOT an engine's own callsite counter: those renumber whenever the
152
- * source is edited (insert a plot near the top and every downstream callsite
153
- * shifts), so keying persistent state on one would silently rebind to the wrong
154
- * element. The ordinal disambiguates multiple plots that share a title within one
155
- * indicator. Every engine MUST mint its series ids through this — it is the
156
- * identity contract value patches are keyed by.
157
- */
158
- declare function stableSeriesId(parts: {
159
- instanceId: string;
160
- kind: IdentifiableKind;
161
- title: string;
162
- ordinal: number;
163
- }): string;
164
-
165
145
  /**
166
146
  * A 1:1, TIME-PRESERVING per-bar transform a price style applies to the chart's bar
167
147
  * stream (Heikin Ashi is the first). The orchestrator applies it at its single outbound
@@ -567,6 +547,26 @@ declare function chartTypes(): ChartTypeDefinition[];
567
547
  /** Ids that act as extended-ticker modifiers (`"SYM;id"`). */
568
548
  declare function tickerModifierIds(): string[];
569
549
 
550
+ /** Things that need a stable id within an indicator instance. */
551
+ type IdentifiableKind = SeriesKind | 'fill' | 'background' | 'hline' | 'line' | 'box' | 'label' | 'polyline' | 'linefill' | 'table';
552
+ /**
553
+ * Content-addressed id for a plotted element, stable across re-runs of
554
+ * identical source.
555
+ *
556
+ * Deliberately NOT an engine's own callsite counter: those renumber whenever the
557
+ * source is edited (insert a plot near the top and every downstream callsite
558
+ * shifts), so keying persistent state on one would silently rebind to the wrong
559
+ * element. The ordinal disambiguates multiple plots that share a title within one
560
+ * indicator. Every engine MUST mint its series ids through this — it is the
561
+ * identity contract value patches are keyed by.
562
+ */
563
+ declare function stableSeriesId(parts: {
564
+ instanceId: string;
565
+ kind: IdentifiableKind;
566
+ title: string;
567
+ ordinal: number;
568
+ }): string;
569
+
570
570
  /**
571
571
  * Register default values for renderer features — every chart built afterwards applies
572
572
  * them once its renderer is mounted, before the first paint. Keys are renderer feature
@@ -722,4 +722,4 @@ declare const CATEGORICAL: readonly string[];
722
722
  /** Pick a stable categorical color for a string key (same key ⇒ same color). */
723
723
  declare function categoricalColor(key: string): string;
724
724
 
725
- export { getDrawingType as $, ACCENT as A, BEARISH as B, CATEGORICAL as C, type DrawingTypeMeta as D, type SettingsRowSwatch as E, type SettingsRowValueKey as F, type SettingsRowWhen as G, HIGHLIGHT as H, INFO as I, type SettingsRowWidth as J, type SettingsSelectOption as K, type SettingsValueRow as L, MARKER as M, NEUTRAL as N, TRADE_LONG as O, TRADE_SHORT as P, categoricalColor as Q, type RendererLayerArgs as R, SERIES_LINE as S, TRADE_EXIT as T, chartType as U, VALID as V, WARNING as W, chartTypes as X, createDrawing as Y, deserializeDrawing as Z, drawingTypes as _, ACCENT_BRIGHT as a, normalizeSettingsRow as a0, registerChartType as a1, registerDrawingType as a2, registerRendererDefaults as a3, registerRendererLayer as a4, rendererDefaults as a5, rendererLayers as a6, settingsRowValueKeys as a7, stableSeriesId as a8, tickerModifierIds as a9, unregisterChartType as aa, unregisterRendererDefaults as ab, unregisterRendererLayer as ac, BULLISH as b, type BarTransform as c, type BasePaintingModulation as d, CHIP_PLATE as e, CROSSHAIR as f, type ChartTypeDefinition as g, type ChartTypeSettingsInstance as h, type ChartTypeSettingsSection as i, type ChartTypeSettingsSubsection as j, INVALID as k, type IdentifiableKind as l, type NormalizedSettingsRow as m, type RendererLayerDefinition as n, type RendererLayerInstance as o, SESSION_OFF as p, SESSION_POST as q, SESSION_PRE as r, SLATE as s, SLATE_DEEP as t, type SeriesDataEngine as u, type SeriesDataEngineHost as v, type SettingsInlineControl as w, type SettingsRowCondition as x, type SettingsRowDescriptor as y, type SettingsRowInlineNumber as z };
725
+ export { getDrawingType as $, ACCENT as A, BEARISH as B, CATEGORICAL as C, type DrawingTypeMeta as D, type SettingsRowInlineNumber as E, type SettingsRowSwatch as F, type SettingsRowValueKey as G, HIGHLIGHT as H, INFO as I, type SettingsRowWhen as J, type SettingsRowWidth as K, type SettingsValueRow as L, MARKER as M, NEUTRAL as N, TRADE_LONG as O, TRADE_SHORT as P, categoricalColor as Q, type RendererLayerArgs as R, type SettingsSelectOption as S, TRADE_EXIT as T, chartType as U, VALID as V, WARNING as W, chartTypes as X, createDrawing as Y, deserializeDrawing as Z, drawingTypes as _, ACCENT_BRIGHT as a, normalizeSettingsRow as a0, registerChartType as a1, registerDrawingType as a2, registerRendererDefaults as a3, registerRendererLayer as a4, rendererDefaults as a5, rendererLayers as a6, settingsRowValueKeys as a7, stableSeriesId as a8, tickerModifierIds as a9, unregisterChartType as aa, unregisterRendererDefaults as ab, unregisterRendererLayer as ac, BULLISH as b, type BarTransform as c, type BasePaintingModulation as d, CHIP_PLATE as e, CROSSHAIR as f, type ChartTypeDefinition as g, type ChartTypeSettingsInstance as h, type ChartTypeSettingsSection as i, type ChartTypeSettingsSubsection as j, INVALID as k, type IdentifiableKind as l, type NormalizedSettingsRow as m, type RendererLayerDefinition as n, type RendererLayerInstance as o, SERIES_LINE as p, SESSION_OFF as q, SESSION_POST as r, SESSION_PRE as s, SLATE as t, SLATE_DEEP as u, type SeriesDataEngine as v, type SeriesDataEngineHost as w, type SettingsInlineControl as x, type SettingsRowCondition as y, type SettingsRowDescriptor as z };
@@ -1,5 +1,5 @@
1
- import { z as DrawingTypeKey, ae as DrawingStyle, S as SerializedDrawing, D as Drawing, aU as SeriesKind, O as OHLCV, c as VelaTheme } from './options-D1AJKsn_.js';
2
- import { c as DataControl } from './contributions-C7Wsm_S9.js';
1
+ import { z as DrawingTypeKey, ae as DrawingStyle, S as SerializedDrawing, D as Drawing, O as OHLCV, aU as SeriesKind, c as VelaTheme } from './options-D1AJKsn_.js';
2
+ import { c as DataControl } from './contributions-nKOSeLy8.js';
3
3
  import './side-panel-HF0IAzwf.js';
4
4
  import './icons-BZYbJXSV.js';
5
5
  import './keymap-CGOz5F5f.js';
@@ -142,26 +142,6 @@ declare class CoordinateSystem {
142
142
  toBitmap(mediaPx: number): number;
143
143
  }
144
144
 
145
- /** Things that need a stable id within an indicator instance. */
146
- type IdentifiableKind = SeriesKind | 'fill' | 'background' | 'hline' | 'line' | 'box' | 'label' | 'polyline' | 'linefill' | 'table';
147
- /**
148
- * Content-addressed id for a plotted element, stable across re-runs of
149
- * identical source.
150
- *
151
- * Deliberately NOT an engine's own callsite counter: those renumber whenever the
152
- * source is edited (insert a plot near the top and every downstream callsite
153
- * shifts), so keying persistent state on one would silently rebind to the wrong
154
- * element. The ordinal disambiguates multiple plots that share a title within one
155
- * indicator. Every engine MUST mint its series ids through this — it is the
156
- * identity contract value patches are keyed by.
157
- */
158
- declare function stableSeriesId(parts: {
159
- instanceId: string;
160
- kind: IdentifiableKind;
161
- title: string;
162
- ordinal: number;
163
- }): string;
164
-
165
145
  /**
166
146
  * A 1:1, TIME-PRESERVING per-bar transform a price style applies to the chart's bar
167
147
  * stream (Heikin Ashi is the first). The orchestrator applies it at its single outbound
@@ -567,6 +547,26 @@ declare function chartTypes(): ChartTypeDefinition[];
567
547
  /** Ids that act as extended-ticker modifiers (`"SYM;id"`). */
568
548
  declare function tickerModifierIds(): string[];
569
549
 
550
+ /** Things that need a stable id within an indicator instance. */
551
+ type IdentifiableKind = SeriesKind | 'fill' | 'background' | 'hline' | 'line' | 'box' | 'label' | 'polyline' | 'linefill' | 'table';
552
+ /**
553
+ * Content-addressed id for a plotted element, stable across re-runs of
554
+ * identical source.
555
+ *
556
+ * Deliberately NOT an engine's own callsite counter: those renumber whenever the
557
+ * source is edited (insert a plot near the top and every downstream callsite
558
+ * shifts), so keying persistent state on one would silently rebind to the wrong
559
+ * element. The ordinal disambiguates multiple plots that share a title within one
560
+ * indicator. Every engine MUST mint its series ids through this — it is the
561
+ * identity contract value patches are keyed by.
562
+ */
563
+ declare function stableSeriesId(parts: {
564
+ instanceId: string;
565
+ kind: IdentifiableKind;
566
+ title: string;
567
+ ordinal: number;
568
+ }): string;
569
+
570
570
  /**
571
571
  * Register default values for renderer features — every chart built afterwards applies
572
572
  * them once its renderer is mounted, before the first paint. Keys are renderer feature
@@ -722,4 +722,4 @@ declare const CATEGORICAL: readonly string[];
722
722
  /** Pick a stable categorical color for a string key (same key ⇒ same color). */
723
723
  declare function categoricalColor(key: string): string;
724
724
 
725
- export { getDrawingType as $, ACCENT as A, BEARISH as B, CATEGORICAL as C, type DrawingTypeMeta as D, type SettingsRowSwatch as E, type SettingsRowValueKey as F, type SettingsRowWhen as G, HIGHLIGHT as H, INFO as I, type SettingsRowWidth as J, type SettingsSelectOption as K, type SettingsValueRow as L, MARKER as M, NEUTRAL as N, TRADE_LONG as O, TRADE_SHORT as P, categoricalColor as Q, type RendererLayerArgs as R, SERIES_LINE as S, TRADE_EXIT as T, chartType as U, VALID as V, WARNING as W, chartTypes as X, createDrawing as Y, deserializeDrawing as Z, drawingTypes as _, ACCENT_BRIGHT as a, normalizeSettingsRow as a0, registerChartType as a1, registerDrawingType as a2, registerRendererDefaults as a3, registerRendererLayer as a4, rendererDefaults as a5, rendererLayers as a6, settingsRowValueKeys as a7, stableSeriesId as a8, tickerModifierIds as a9, unregisterChartType as aa, unregisterRendererDefaults as ab, unregisterRendererLayer as ac, BULLISH as b, type BarTransform as c, type BasePaintingModulation as d, CHIP_PLATE as e, CROSSHAIR as f, type ChartTypeDefinition as g, type ChartTypeSettingsInstance as h, type ChartTypeSettingsSection as i, type ChartTypeSettingsSubsection as j, INVALID as k, type IdentifiableKind as l, type NormalizedSettingsRow as m, type RendererLayerDefinition as n, type RendererLayerInstance as o, SESSION_OFF as p, SESSION_POST as q, SESSION_PRE as r, SLATE as s, SLATE_DEEP as t, type SeriesDataEngine as u, type SeriesDataEngineHost as v, type SettingsInlineControl as w, type SettingsRowCondition as x, type SettingsRowDescriptor as y, type SettingsRowInlineNumber as z };
725
+ export { getDrawingType as $, ACCENT as A, BEARISH as B, CATEGORICAL as C, type DrawingTypeMeta as D, type SettingsRowInlineNumber as E, type SettingsRowSwatch as F, type SettingsRowValueKey as G, HIGHLIGHT as H, INFO as I, type SettingsRowWhen as J, type SettingsRowWidth as K, type SettingsValueRow as L, MARKER as M, NEUTRAL as N, TRADE_LONG as O, TRADE_SHORT as P, categoricalColor as Q, type RendererLayerArgs as R, type SettingsSelectOption as S, TRADE_EXIT as T, chartType as U, VALID as V, WARNING as W, chartTypes as X, createDrawing as Y, deserializeDrawing as Z, drawingTypes as _, ACCENT_BRIGHT as a, normalizeSettingsRow as a0, registerChartType as a1, registerDrawingType as a2, registerRendererDefaults as a3, registerRendererLayer as a4, rendererDefaults as a5, rendererLayers as a6, settingsRowValueKeys as a7, stableSeriesId as a8, tickerModifierIds as a9, unregisterChartType as aa, unregisterRendererDefaults as ab, unregisterRendererLayer as ac, BULLISH as b, type BarTransform as c, type BasePaintingModulation as d, CHIP_PLATE as e, CROSSHAIR as f, type ChartTypeDefinition as g, type ChartTypeSettingsInstance as h, type ChartTypeSettingsSection as i, type ChartTypeSettingsSubsection as j, INVALID as k, type IdentifiableKind as l, type NormalizedSettingsRow as m, type RendererLayerDefinition as n, type RendererLayerInstance as o, SERIES_LINE as p, SESSION_OFF as q, SESSION_POST as r, SESSION_PRE as s, SLATE as t, SLATE_DEEP as u, type SeriesDataEngine as v, type SeriesDataEngineHost as w, type SettingsInlineControl as x, type SettingsRowCondition as y, type SettingsRowDescriptor as z };
package/dist/plugin.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- 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, N as NEUTRAL, m as NormalizedSettingsRow, R as RendererLayerArgs, n as RendererLayerDefinition, o as RendererLayerInstance, S as SERIES_LINE, p as SESSION_OFF, q as SESSION_POST, r as SESSION_PRE, s as SLATE, t as SLATE_DEEP, u as SeriesDataEngine, v as SeriesDataEngineHost, w as SettingsInlineControl, x as SettingsRowCondition, y as SettingsRowDescriptor, z as SettingsRowInlineNumber, E as SettingsRowSwatch, F as SettingsRowValueKey, G as SettingsRowWhen, J as SettingsRowWidth, K as SettingsSelectOption, L as SettingsValueRow, T as TRADE_EXIT, O as TRADE_LONG, P as TRADE_SHORT, V as VALID, W as WARNING, Q as categoricalColor, U as chartType, X as chartTypes, _ as drawingTypes, $ as getDrawingType, a0 as normalizeSettingsRow, a1 as registerChartType, a3 as registerRendererDefaults, a4 as registerRendererLayer, a5 as rendererDefaults, a6 as rendererLayers, a7 as settingsRowValueKeys, a8 as stableSeriesId, a9 as tickerModifierIds, aa as unregisterChartType, ab as unregisterRendererDefaults, ac as unregisterRendererLayer } from './plugin-CxWfg6vK.cjs';
2
- export { B as BarsChangeReason, C as CellStateContext, b as ContextSelect, e as EngineAlert, f as EngineCapabilities, g as EngineContextSnapshot, h as EngineFactory, i as EngineWarning, j as ExecutionHandlers, k as ExecutionMarket, l as ExecutionRequest, m as ExecutionSession, E as ExternalIndicatorEntry, F as FetchSeries, L as LegendActionDescriptor, p as LegendCalloutContent, q as LegendCalloutDescriptor, r as LegendCalloutItem, s as LegendCalloutSpec, t as LegendIndicatorInfo, N as NativeIndicator, u as NativeIndicatorContext, v as NativeIndicatorDescriptor, w as NativeIndicatorInfo, x as NativeIndicatorOutput, O as OVERRIDABLE_TOPBAR_IDS, y as PreparedScript, a as ScriptRun, H as ScriptRunCause, J as ScriptRunResult, S as ScriptingEngine, K as SidePanelButton, Q as SidePanelDescriptor, T as SidePanelHandle, U as SidePanelHeader, X as StatePersistenceHandler, Y as StrategyFill, Z as StrategyState, _ as StrategyTrade, $ as SymbolRankingHook, a3 as VisibleBarRange, a4 as WidgetActionDescriptor, a5 as WidgetActionTarget, a6 as WidgetAttachment, W as WidgetContext, a7 as getNativeIndicator, a8 as legendActions, a9 as legendCallouts, ab as nativeIndicatorTypes, ac as registerDefaultEngine, ad as registerLegendAction, ae as registerLegendCallout, af as registerNativeIndicator, ag as registerSidePanel, ah as registerStatePersistence, ai as registerSymbolRanking, aj as registerWidgetAction, ak as registerWidgetAttachment, al as resolveEngines, am as sidePanels, an as statePersistenceHandlers, ao as symbolRanking, ap as topbarActionOverride, aq as unregisterDefaultEngine, ar as unregisterLegendAction, as as unregisterLegendCallout, at as unregisterNativeIndicator, au as unregisterSidePanel, av as unregisterStatePersistence, aw as unregisterWidgetAction, ax as unregisterWidgetAttachment, ay as widgetActions, az as widgetAttachments } from './contributions-D6p1RB38.cjs';
1
+ 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, N as NEUTRAL, m as NormalizedSettingsRow, R as RendererLayerArgs, n as RendererLayerDefinition, o as RendererLayerInstance, p as SERIES_LINE, q as SESSION_OFF, r as SESSION_POST, s as SESSION_PRE, t as SLATE, u as SLATE_DEEP, v as SeriesDataEngine, w as SeriesDataEngineHost, x as SettingsInlineControl, y as SettingsRowCondition, z as SettingsRowDescriptor, E as SettingsRowInlineNumber, F as SettingsRowSwatch, G as SettingsRowValueKey, J as SettingsRowWhen, K as SettingsRowWidth, S as SettingsSelectOption, L as SettingsValueRow, T as TRADE_EXIT, O as TRADE_LONG, P as TRADE_SHORT, V as VALID, W as WARNING, Q as categoricalColor, U as chartType, X as chartTypes, _ as drawingTypes, $ as getDrawingType, a0 as normalizeSettingsRow, a1 as registerChartType, a3 as registerRendererDefaults, a4 as registerRendererLayer, a5 as rendererDefaults, a6 as rendererLayers, a7 as settingsRowValueKeys, a8 as stableSeriesId, a9 as tickerModifierIds, aa as unregisterChartType, ab as unregisterRendererDefaults, ac as unregisterRendererLayer } from './plugin-6F04gjQe.cjs';
2
+ export { B as BarsChangeReason, C as CellStateContext, b as ContextSelect, e as EngineAlert, f as EngineCapabilities, g as EngineContextSnapshot, h as EngineFactory, i as EngineWarning, j as ExecutionHandlers, k as ExecutionMarket, l as ExecutionRequest, m as ExecutionSession, E as ExternalIndicatorEntry, F as FetchSeries, L as LegendActionDescriptor, p as LegendCalloutContent, q as LegendCalloutDescriptor, r as LegendCalloutItem, s as LegendCalloutSpec, t as LegendIndicatorInfo, N as NativeIndicator, u as NativeIndicatorContext, v as NativeIndicatorDescriptor, w as NativeIndicatorInfo, x as NativeIndicatorOutput, O as OVERRIDABLE_TOPBAR_IDS, y as PreparedScript, a as ScriptRun, H as ScriptRunCause, J as ScriptRunResult, S as ScriptingEngine, K as SidePanelButton, Q as SidePanelDescriptor, T as SidePanelHandle, U as SidePanelHeader, X as StatePersistenceHandler, Y as StrategyFill, Z as StrategyState, _ as StrategyTrade, $ as SymbolRankingHook, a3 as VisibleBarRange, a4 as WidgetActionDescriptor, a5 as WidgetActionTarget, a6 as WidgetAttachment, W as WidgetContext, a7 as getNativeIndicator, a8 as legendActions, a9 as legendCallouts, ab as nativeIndicatorTypes, ac as registerDefaultEngine, ad as registerLegendAction, ae as registerLegendCallout, af as registerNativeIndicator, ag as registerSidePanel, ah as registerStatePersistence, ai as registerSymbolRanking, aj as registerWidgetAction, ak as registerWidgetAttachment, al as resolveEngines, am as sidePanels, an as statePersistenceHandlers, ao as symbolRanking, ap as topbarActionOverride, aq as unregisterDefaultEngine, ar as unregisterLegendAction, as as unregisterLegendCallout, at as unregisterNativeIndicator, au as unregisterSidePanel, av as unregisterStatePersistence, aw as unregisterWidgetAction, ax as unregisterWidgetAttachment, ay as widgetActions, az as widgetAttachments } from './contributions-DF_Ea07m.cjs';
3
3
  export { D as DEFAULT_PANEL_MAX_WIDTH, a as DEFAULT_PANEL_MIN_WIDTH, b as DEFAULT_PANEL_WIDTH, S as SidePanelOptions, c as clampPanelWidth } from './side-panel-HF0IAzwf.cjs';
4
4
  export { G as Background, H as BoxFontFamily, J as BoxHAlign, K as BoxTextSize, Q as BoxVAlign, X as CandleBarColor, Y as CandleSeries, Z as CandleStyle, a1 as DirtyRange, a2 as DrawingBox, a3 as DrawingExtend, a5 as DrawingLabel, a6 as DrawingLine, a7 as DrawingLinefill, aa as DrawingPolyline, af as DrawingTable, z as DrawingTypeKey, ah as DrawingXLoc, aj as Fill, ak as FillGradientStop, al as IndicatorMeta, l as IndicatorModel, am as InputCondition, an as InputSchema, ao as InputType, I as InputValue, ap as InputWhen, at as LabelStyle, au as LabelYLoc, av as LineLikeKind, aw as LineLikeSeries, ax as LineLikeStyle, L as LineStyle, aD as MarkerPoint, aE as MarkerSeries, x as Millis, O as OHLCV, i as Pane, aH as PaneAxis, aI as PaneAxisBand, aJ as PaneHint, aK as PaneKind, aL as PolylinePoint, aM as PriceLine, P as PriceStyle, aQ as Scene, m as ScenePatch, aR as SchemaPatch, aT as SeriesDisplay, aU as SeriesKind, aV as SeriesPoint, aW as SeriesSpec, aX as SeriesSurface, aY as SeriesValueDelta, b0 as TableCell, b1 as TableMerge, b2 as TablePosition, b4 as TradeExecution, b5 as ValuePatch, b8 as inputDeltas, b9 as inputVisible, ba as seriesInScale, bb as seriesShownOn } from './options-D1AJKsn_.cjs';
5
5
  export { i as iconMarkup, r as registerIcon } from './icons-BZYbJXSV.cjs';
package/dist/plugin.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- 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, N as NEUTRAL, m as NormalizedSettingsRow, R as RendererLayerArgs, n as RendererLayerDefinition, o as RendererLayerInstance, S as SERIES_LINE, p as SESSION_OFF, q as SESSION_POST, r as SESSION_PRE, s as SLATE, t as SLATE_DEEP, u as SeriesDataEngine, v as SeriesDataEngineHost, w as SettingsInlineControl, x as SettingsRowCondition, y as SettingsRowDescriptor, z as SettingsRowInlineNumber, E as SettingsRowSwatch, F as SettingsRowValueKey, G as SettingsRowWhen, J as SettingsRowWidth, K as SettingsSelectOption, L as SettingsValueRow, T as TRADE_EXIT, O as TRADE_LONG, P as TRADE_SHORT, V as VALID, W as WARNING, Q as categoricalColor, U as chartType, X as chartTypes, _ as drawingTypes, $ as getDrawingType, a0 as normalizeSettingsRow, a1 as registerChartType, a3 as registerRendererDefaults, a4 as registerRendererLayer, a5 as rendererDefaults, a6 as rendererLayers, a7 as settingsRowValueKeys, a8 as stableSeriesId, a9 as tickerModifierIds, aa as unregisterChartType, ab as unregisterRendererDefaults, ac as unregisterRendererLayer } from './plugin-SodaQhjQ.js';
2
- export { B as BarsChangeReason, C as CellStateContext, b as ContextSelect, e as EngineAlert, f as EngineCapabilities, g as EngineContextSnapshot, h as EngineFactory, i as EngineWarning, j as ExecutionHandlers, k as ExecutionMarket, l as ExecutionRequest, m as ExecutionSession, E as ExternalIndicatorEntry, F as FetchSeries, L as LegendActionDescriptor, p as LegendCalloutContent, q as LegendCalloutDescriptor, r as LegendCalloutItem, s as LegendCalloutSpec, t as LegendIndicatorInfo, N as NativeIndicator, u as NativeIndicatorContext, v as NativeIndicatorDescriptor, w as NativeIndicatorInfo, x as NativeIndicatorOutput, O as OVERRIDABLE_TOPBAR_IDS, y as PreparedScript, a as ScriptRun, H as ScriptRunCause, J as ScriptRunResult, S as ScriptingEngine, K as SidePanelButton, Q as SidePanelDescriptor, T as SidePanelHandle, U as SidePanelHeader, X as StatePersistenceHandler, Y as StrategyFill, Z as StrategyState, _ as StrategyTrade, $ as SymbolRankingHook, a3 as VisibleBarRange, a4 as WidgetActionDescriptor, a5 as WidgetActionTarget, a6 as WidgetAttachment, W as WidgetContext, a7 as getNativeIndicator, a8 as legendActions, a9 as legendCallouts, ab as nativeIndicatorTypes, ac as registerDefaultEngine, ad as registerLegendAction, ae as registerLegendCallout, af as registerNativeIndicator, ag as registerSidePanel, ah as registerStatePersistence, ai as registerSymbolRanking, aj as registerWidgetAction, ak as registerWidgetAttachment, al as resolveEngines, am as sidePanels, an as statePersistenceHandlers, ao as symbolRanking, ap as topbarActionOverride, aq as unregisterDefaultEngine, ar as unregisterLegendAction, as as unregisterLegendCallout, at as unregisterNativeIndicator, au as unregisterSidePanel, av as unregisterStatePersistence, aw as unregisterWidgetAction, ax as unregisterWidgetAttachment, ay as widgetActions, az as widgetAttachments } from './contributions-C7Wsm_S9.js';
1
+ 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, N as NEUTRAL, m as NormalizedSettingsRow, R as RendererLayerArgs, n as RendererLayerDefinition, o as RendererLayerInstance, p as SERIES_LINE, q as SESSION_OFF, r as SESSION_POST, s as SESSION_PRE, t as SLATE, u as SLATE_DEEP, v as SeriesDataEngine, w as SeriesDataEngineHost, x as SettingsInlineControl, y as SettingsRowCondition, z as SettingsRowDescriptor, E as SettingsRowInlineNumber, F as SettingsRowSwatch, G as SettingsRowValueKey, J as SettingsRowWhen, K as SettingsRowWidth, S as SettingsSelectOption, L as SettingsValueRow, T as TRADE_EXIT, O as TRADE_LONG, P as TRADE_SHORT, V as VALID, W as WARNING, Q as categoricalColor, U as chartType, X as chartTypes, _ as drawingTypes, $ as getDrawingType, a0 as normalizeSettingsRow, a1 as registerChartType, a3 as registerRendererDefaults, a4 as registerRendererLayer, a5 as rendererDefaults, a6 as rendererLayers, a7 as settingsRowValueKeys, a8 as stableSeriesId, a9 as tickerModifierIds, aa as unregisterChartType, ab as unregisterRendererDefaults, ac as unregisterRendererLayer } from './plugin-BLsNipkc.js';
2
+ export { B as BarsChangeReason, C as CellStateContext, b as ContextSelect, e as EngineAlert, f as EngineCapabilities, g as EngineContextSnapshot, h as EngineFactory, i as EngineWarning, j as ExecutionHandlers, k as ExecutionMarket, l as ExecutionRequest, m as ExecutionSession, E as ExternalIndicatorEntry, F as FetchSeries, L as LegendActionDescriptor, p as LegendCalloutContent, q as LegendCalloutDescriptor, r as LegendCalloutItem, s as LegendCalloutSpec, t as LegendIndicatorInfo, N as NativeIndicator, u as NativeIndicatorContext, v as NativeIndicatorDescriptor, w as NativeIndicatorInfo, x as NativeIndicatorOutput, O as OVERRIDABLE_TOPBAR_IDS, y as PreparedScript, a as ScriptRun, H as ScriptRunCause, J as ScriptRunResult, S as ScriptingEngine, K as SidePanelButton, Q as SidePanelDescriptor, T as SidePanelHandle, U as SidePanelHeader, X as StatePersistenceHandler, Y as StrategyFill, Z as StrategyState, _ as StrategyTrade, $ as SymbolRankingHook, a3 as VisibleBarRange, a4 as WidgetActionDescriptor, a5 as WidgetActionTarget, a6 as WidgetAttachment, W as WidgetContext, a7 as getNativeIndicator, a8 as legendActions, a9 as legendCallouts, ab as nativeIndicatorTypes, ac as registerDefaultEngine, ad as registerLegendAction, ae as registerLegendCallout, af as registerNativeIndicator, ag as registerSidePanel, ah as registerStatePersistence, ai as registerSymbolRanking, aj as registerWidgetAction, ak as registerWidgetAttachment, al as resolveEngines, am as sidePanels, an as statePersistenceHandlers, ao as symbolRanking, ap as topbarActionOverride, aq as unregisterDefaultEngine, ar as unregisterLegendAction, as as unregisterLegendCallout, at as unregisterNativeIndicator, au as unregisterSidePanel, av as unregisterStatePersistence, aw as unregisterWidgetAction, ax as unregisterWidgetAttachment, ay as widgetActions, az as widgetAttachments } from './contributions-nKOSeLy8.js';
3
3
  export { D as DEFAULT_PANEL_MAX_WIDTH, a as DEFAULT_PANEL_MIN_WIDTH, b as DEFAULT_PANEL_WIDTH, S as SidePanelOptions, c as clampPanelWidth } from './side-panel-HF0IAzwf.js';
4
4
  export { G as Background, H as BoxFontFamily, J as BoxHAlign, K as BoxTextSize, Q as BoxVAlign, X as CandleBarColor, Y as CandleSeries, Z as CandleStyle, a1 as DirtyRange, a2 as DrawingBox, a3 as DrawingExtend, a5 as DrawingLabel, a6 as DrawingLine, a7 as DrawingLinefill, aa as DrawingPolyline, af as DrawingTable, z as DrawingTypeKey, ah as DrawingXLoc, aj as Fill, ak as FillGradientStop, al as IndicatorMeta, l as IndicatorModel, am as InputCondition, an as InputSchema, ao as InputType, I as InputValue, ap as InputWhen, at as LabelStyle, au as LabelYLoc, av as LineLikeKind, aw as LineLikeSeries, ax as LineLikeStyle, L as LineStyle, aD as MarkerPoint, aE as MarkerSeries, x as Millis, O as OHLCV, i as Pane, aH as PaneAxis, aI as PaneAxisBand, aJ as PaneHint, aK as PaneKind, aL as PolylinePoint, aM as PriceLine, P as PriceStyle, aQ as Scene, m as ScenePatch, aR as SchemaPatch, aT as SeriesDisplay, aU as SeriesKind, aV as SeriesPoint, aW as SeriesSpec, aX as SeriesSurface, aY as SeriesValueDelta, b0 as TableCell, b1 as TableMerge, b2 as TablePosition, b4 as TradeExecution, b5 as ValuePatch, b8 as inputDeltas, b9 as inputVisible, ba as seriesInScale, bb as seriesShownOn } from './options-D1AJKsn_.js';
5
5
  export { i as iconMarkup, r as registerIcon } from './icons-BZYbJXSV.js';
@@ -1,5 +1,5 @@
1
1
  import { D as DataProvider } from './DataProvider-CGa4KHRa.cjs';
2
- import { S as ScriptingEngine, V as Vela } from './contributions-D6p1RB38.cjs';
2
+ import { S as ScriptingEngine, V as Vela } from './contributions-DF_Ea07m.cjs';
3
3
  import { W as WallClock, V as VisibleRangePreset } from './options-D1AJKsn_.cjs';
4
4
 
5
5
  /** The linkable dimensions. `crosshair` mirrors the pointer time onto same-group
@@ -245,7 +245,8 @@ interface VelaShellOptions {
245
245
  indicators?: string | IndicatorManifest | IndicatorLoader;
246
246
  /** Topbar timeframe presets (chart timeframe values). */
247
247
  timeframes?: string[];
248
- /** Display timezone (IANA; default 'Etc/UTC') — one zone for the whole shell. */
248
+ /** Display timezone — one choice for the whole shell: an IANA zone (default
249
+ * 'Etc/UTC'), or `'exchange'` to render every chart in its own market's zone. */
249
250
  timezone?: string;
250
251
  /** Chrome toggles (all default true). */
251
252
  statusline?: boolean;
@@ -346,7 +347,10 @@ interface RangePreset {
346
347
  */
347
348
  declare const RANGE_PRESETS: readonly RangePreset[];
348
349
  interface BottombarOptions {
350
+ /** The stored display-timezone choice — an IANA zone or the exchange rule. */
349
351
  timezone: string;
352
+ /** The active chart's market zone, resolving the exchange rule (see {@link Bottombar.setTimezone}). */
353
+ exchangeTimezone?: string;
350
354
  /** The second pulse the clock ticks on. Share one with the charts' countdown chips
351
355
  * (`renderer.setWallClock`) so every time display reads the same second; omitted,
352
356
  * the bar runs its own second-aligned clock. */
@@ -368,9 +372,18 @@ declare class Bottombar {
368
372
  private readonly sessionButtons;
369
373
  private sessionEl;
370
374
  private timezone;
375
+ private exchangeTimezone;
371
376
  private readonly unsubClock;
372
377
  constructor(host: HTMLElement, opts: BottombarOptions);
373
- setTimezone(zone: string): void;
378
+ /**
379
+ * Reflect the stored choice AND the active chart's market zone. The clock and the
380
+ * offset label read the RESOLVED zone, so a workspace on the exchange rule re-labels
381
+ * when the active cell (or its symbol) changes market — the host re-projects on
382
+ * both. Idempotent: unchanged inputs leave the menu alone.
383
+ */
384
+ setTimezone(zone: string, exchangeTimezone?: string): void;
385
+ /** The zone the bar's clock and label render in. */
386
+ private get displayZone();
374
387
  /** Highlight (or clear with null) the active range chip — cleared on manual tf changes. */
375
388
  setActiveRange(id: string | null): void;
376
389
  /**
@@ -1,5 +1,5 @@
1
1
  import { D as DataProvider } from './DataProvider-CmWUtDVL.js';
2
- import { S as ScriptingEngine, V as Vela } from './contributions-C7Wsm_S9.js';
2
+ import { S as ScriptingEngine, V as Vela } from './contributions-nKOSeLy8.js';
3
3
  import { W as WallClock, V as VisibleRangePreset } from './options-D1AJKsn_.js';
4
4
 
5
5
  /** The linkable dimensions. `crosshair` mirrors the pointer time onto same-group
@@ -245,7 +245,8 @@ interface VelaShellOptions {
245
245
  indicators?: string | IndicatorManifest | IndicatorLoader;
246
246
  /** Topbar timeframe presets (chart timeframe values). */
247
247
  timeframes?: string[];
248
- /** Display timezone (IANA; default 'Etc/UTC') — one zone for the whole shell. */
248
+ /** Display timezone — one choice for the whole shell: an IANA zone (default
249
+ * 'Etc/UTC'), or `'exchange'` to render every chart in its own market's zone. */
249
250
  timezone?: string;
250
251
  /** Chrome toggles (all default true). */
251
252
  statusline?: boolean;
@@ -346,7 +347,10 @@ interface RangePreset {
346
347
  */
347
348
  declare const RANGE_PRESETS: readonly RangePreset[];
348
349
  interface BottombarOptions {
350
+ /** The stored display-timezone choice — an IANA zone or the exchange rule. */
349
351
  timezone: string;
352
+ /** The active chart's market zone, resolving the exchange rule (see {@link Bottombar.setTimezone}). */
353
+ exchangeTimezone?: string;
350
354
  /** The second pulse the clock ticks on. Share one with the charts' countdown chips
351
355
  * (`renderer.setWallClock`) so every time display reads the same second; omitted,
352
356
  * the bar runs its own second-aligned clock. */
@@ -368,9 +372,18 @@ declare class Bottombar {
368
372
  private readonly sessionButtons;
369
373
  private sessionEl;
370
374
  private timezone;
375
+ private exchangeTimezone;
371
376
  private readonly unsubClock;
372
377
  constructor(host: HTMLElement, opts: BottombarOptions);
373
- setTimezone(zone: string): void;
378
+ /**
379
+ * Reflect the stored choice AND the active chart's market zone. The clock and the
380
+ * offset label read the RESOLVED zone, so a workspace on the exchange rule re-labels
381
+ * when the active cell (or its symbol) changes market — the host re-projects on
382
+ * both. Idempotent: unchanged inputs leave the menu alone.
383
+ */
384
+ setTimezone(zone: string, exchangeTimezone?: string): void;
385
+ /** The zone the bar's clock and label render in. */
386
+ private get displayZone();
374
387
  /** Highlight (or clear with null) the active range chip — cleared on manual tf changes. */
375
388
  setActiveRange(id: string | null): void;
376
389
  /**
package/dist/ui.cjs CHANGED
@@ -2646,7 +2646,8 @@ function addRecent(hex6) {
2646
2646
  recents.unshift(hex6);
2647
2647
  if (recents.length > 10) recents.length = 10;
2648
2648
  }
2649
- function buildColorPicker(color, theme, onChange) {
2649
+ function buildColorPicker(color, theme, onChange, options = {}) {
2650
+ const commit = options.commit ?? "live";
2650
2651
  const parsed = splitColor(color);
2651
2652
  let curHex = parsed.hex6;
2652
2653
  let curAlpha = parsed.alpha;
@@ -2729,7 +2730,12 @@ function buildColorPicker(color, theme, onChange) {
2729
2730
  const r = track.getBoundingClientRect();
2730
2731
  curAlpha = Math.max(0, Math.min(1, (clientX - r.left) / r.width));
2731
2732
  paintOpacity();
2732
- emit();
2733
+ if (commit === "live") emit();
2734
+ };
2735
+ const endDrag = () => {
2736
+ if (!dragging) return;
2737
+ dragging = false;
2738
+ if (commit === "release") emit();
2733
2739
  };
2734
2740
  track.addEventListener("pointerdown", (e) => {
2735
2741
  e.stopPropagation();
@@ -2740,7 +2746,8 @@ function buildColorPicker(color, theme, onChange) {
2740
2746
  track.addEventListener("pointermove", (e) => {
2741
2747
  if (dragging) onDrag(e.clientX);
2742
2748
  });
2743
- track.addEventListener("pointerup", () => dragging = false);
2749
+ track.addEventListener("pointerup", endDrag);
2750
+ track.addEventListener("pointercancel", endDrag);
2744
2751
  function emit() {
2745
2752
  onChange(combineColor(curHex, curAlpha));
2746
2753
  }
@@ -2763,7 +2770,7 @@ function buildColorPicker(color, theme, onChange) {
2763
2770
  return root;
2764
2771
  }
2765
2772
  function colorField(theme, getVal, onVal, opts) {
2766
- return new ColorField({ theme, getVal, onVal, shape: opts?.shape, id: opts?.id, popover: opts?.popover }).el;
2773
+ return new ColorField({ theme, getVal, onVal, shape: opts?.shape, id: opts?.id, popover: opts?.popover, commit: opts?.commit }).el;
2767
2774
  }
2768
2775
  var ColorField = class {
2769
2776
  constructor(opts) {
@@ -2772,6 +2779,7 @@ var ColorField = class {
2772
2779
  this.getVal = opts.getVal;
2773
2780
  this.onVal = opts.onVal;
2774
2781
  this.popoverOpts = opts.popover;
2782
+ this.commit = opts.commit;
2775
2783
  const trigger = document.createElement("button");
2776
2784
  trigger.type = "button";
2777
2785
  if (opts.id) trigger.id = opts.id;
@@ -2811,10 +2819,15 @@ var ColorField = class {
2811
2819
  boundary: this.popoverOpts?.boundary,
2812
2820
  zIndex: this.popoverOpts?.zIndex,
2813
2821
  className: "vela-color-field-pop",
2814
- content: buildColorPicker(this.getVal(), this.theme, (val) => {
2815
- this.onVal(val);
2816
- this.paint();
2817
- })
2822
+ content: buildColorPicker(
2823
+ this.getVal(),
2824
+ this.theme,
2825
+ (val) => {
2826
+ this.onVal(val);
2827
+ this.paint();
2828
+ },
2829
+ { commit: this.commit }
2830
+ )
2818
2831
  });
2819
2832
  pop.show();
2820
2833
  }
@@ -3405,7 +3418,8 @@ function buildFieldControl(desc) {
3405
3418
  const el2 = colorField(desc.theme, desc.get, desc.onChange, {
3406
3419
  shape: "circle",
3407
3420
  id: desc.id,
3408
- popover: desc.popover
3421
+ popover: desc.popover,
3422
+ commit: desc.commit
3409
3423
  });
3410
3424
  if (desc.title) el2.title = desc.title;
3411
3425
  return { el: el2 };