@luxalgo/vela 0.6.8 → 0.6.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/{DataProvider-BsQM2WNH.d.cts → DataProvider-8Z95Q-RJ.d.cts} +1 -1
  2. package/dist/{DataProvider-BSLlBpB9.d.ts → DataProvider-DExJrfut.d.ts} +1 -1
  3. package/dist/{chunk-2R7BANEM.js → chunk-62SVGONC.js} +2 -2
  4. package/dist/{chunk-SQETIBFU.js → chunk-6WDDVMBJ.js} +502 -139
  5. package/dist/{chunk-L3I2CCYO.js → chunk-EQCHJZOT.js} +49 -2
  6. package/dist/{chunk-OICPLNU7.js → chunk-FCVIG7JG.js} +188 -2
  7. package/dist/{chunk-N7LGMKCE.js → chunk-STHSKXOR.js} +107 -84
  8. package/dist/{chunk-PN5KWFZ4.js → chunk-WFSZBX3R.js} +2 -2
  9. package/dist/{contributions-Vw-Hm58R.d.cts → contributions-C1U2Krwg.d.cts} +99 -7
  10. package/dist/{contributions-DLLdV9jD.d.ts → contributions-D7PVZO2i.d.ts} +99 -7
  11. package/dist/index.cjs +709 -144
  12. package/dist/index.d.cts +12 -7
  13. package/dist/index.d.ts +12 -7
  14. package/dist/index.js +4 -4
  15. package/dist/{options-BaVTMXaO.d.ts → options-FM0peknS.d.cts} +84 -7
  16. package/dist/{options-BaVTMXaO.d.cts → options-FM0peknS.d.ts} +84 -7
  17. package/dist/{plugin-CC7rBrOY.d.ts → plugin-7bkF32Rk.d.ts} +3 -3
  18. package/dist/{plugin-BnJgjLAy.d.cts → plugin-DfVqBz9p.d.cts} +3 -3
  19. package/dist/plugin.cjs +18 -2
  20. package/dist/plugin.d.cts +4 -4
  21. package/dist/plugin.d.ts +4 -4
  22. package/dist/plugin.js +2 -2
  23. package/dist/providers/binance.d.cts +2 -2
  24. package/dist/providers/binance.d.ts +2 -2
  25. package/dist/providers/coinbase.d.cts +2 -2
  26. package/dist/providers/coinbase.d.ts +2 -2
  27. package/dist/providers/hyperliquid.d.cts +2 -2
  28. package/dist/providers/hyperliquid.d.ts +2 -2
  29. package/dist/{statusline-DqzBqy42.d.cts → statusline-DOPiT6I6.d.cts} +5 -3
  30. package/dist/{statusline-CGkB2EOo.d.ts → statusline-zdF4eZLr.d.ts} +5 -3
  31. package/dist/ui.cjs +201 -4
  32. package/dist/ui.d.cts +89 -2
  33. package/dist/ui.d.ts +89 -2
  34. package/dist/ui.js +3 -3
  35. package/dist/vela.global.js +709 -144
  36. package/dist/vela.global.min.js +93 -44
  37. package/dist/widget.cjs +798 -188
  38. package/dist/widget.d.cts +6 -6
  39. package/dist/widget.d.ts +6 -6
  40. package/dist/widget.js +7 -7
  41. package/dist/workspace.cjs +798 -188
  42. package/dist/workspace.d.cts +16 -6
  43. package/dist/workspace.d.ts +16 -6
  44. package/dist/workspace.js +6 -6
  45. package/package.json +1 -1
package/dist/plugin.cjs CHANGED
@@ -173,6 +173,19 @@ function unregisterLegendAction(id) {
173
173
  function legendActions() {
174
174
  return [...legendRegistry.values()].sort((a, b) => (a.order ?? 0) - (b.order ?? 0));
175
175
  }
176
+ var calloutRegistry = /* @__PURE__ */ new Map();
177
+ function registerLegendCallout(desc) {
178
+ calloutRegistry.set(desc.id, desc);
179
+ return () => {
180
+ if (calloutRegistry.get(desc.id) === desc) calloutRegistry.delete(desc.id);
181
+ };
182
+ }
183
+ function unregisterLegendCallout(id) {
184
+ calloutRegistry.delete(id);
185
+ }
186
+ function legendCallouts() {
187
+ return [...calloutRegistry.values()].sort((a, b) => (a.order ?? 0) - (b.order ?? 0));
188
+ }
176
189
  var stateHandlers = /* @__PURE__ */ new Map();
177
190
  function registerStatePersistence(handler) {
178
191
  stateHandlers.set(handler.key, handler);
@@ -272,11 +285,11 @@ registerIcon(
272
285
  );
273
286
  registerIcon(
274
287
  "market-pre",
275
- svg24('<path d="M12 2v8"/><path d="m4.93 10.93 1.41 1.41"/><path d="M2 18h2"/><path d="M20 18h2"/><path d="m19.07 10.93-1.41 1.41"/><path d="M22 22H2"/><path d="m16 6-4 4-4-4"/><path d="M16 18a4 4 0 0 0-8 0"/>')
288
+ svg24('<path d="M12 2v8"/><path d="m4.93 10.93 1.41 1.41"/><path d="M2 18h2"/><path d="M20 18h2"/><path d="m19.07 10.93-1.41 1.41"/><path d="M22 22H2"/><path d="m8 6 4-4 4 4"/><path d="M16 18a4 4 0 0 0-8 0"/>')
276
289
  );
277
290
  registerIcon(
278
291
  "market-post",
279
- svg24('<path d="M12 10V2"/><path d="m4.93 10.93 1.41 1.41"/><path d="M2 18h2"/><path d="M20 18h2"/><path d="m19.07 10.93-1.41 1.41"/><path d="M22 22H2"/><path d="m16 18-4-4-4 4"/><path d="M16 6a4 4 0 0 0-8 0"/>')
292
+ svg24('<path d="M12 10V2"/><path d="m4.93 10.93 1.41 1.41"/><path d="M2 18h2"/><path d="M20 18h2"/><path d="m19.07 10.93-1.41 1.41"/><path d="M22 22H2"/><path d="m16 14-4 4-4-4"/><path d="M16 6a4 4 0 0 0-8 0"/>')
280
293
  );
281
294
  registerIcon("market-closed", svg24('<path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"/>'));
282
295
  registerIcon(
@@ -6036,12 +6049,14 @@ exports.getNativeIndicator = getNativeIndicator;
6036
6049
  exports.iconMarkup = iconMarkup;
6037
6050
  exports.inputVisible = inputVisible;
6038
6051
  exports.legendActions = legendActions;
6052
+ exports.legendCallouts = legendCallouts;
6039
6053
  exports.nativeIndicatorTypes = nativeIndicatorTypes;
6040
6054
  exports.normalizeSettingsRow = normalizeSettingsRow;
6041
6055
  exports.registerChartType = registerChartType;
6042
6056
  exports.registerDefaultEngine = registerDefaultEngine;
6043
6057
  exports.registerIcon = registerIcon;
6044
6058
  exports.registerLegendAction = registerLegendAction;
6059
+ exports.registerLegendCallout = registerLegendCallout;
6045
6060
  exports.registerNativeIndicator = registerNativeIndicator;
6046
6061
  exports.registerRendererDefaults = registerRendererDefaults;
6047
6062
  exports.registerRendererLayer = registerRendererLayer;
@@ -6063,6 +6078,7 @@ exports.topbarActionOverride = topbarActionOverride;
6063
6078
  exports.unregisterChartType = unregisterChartType;
6064
6079
  exports.unregisterDefaultEngine = unregisterDefaultEngine;
6065
6080
  exports.unregisterLegendAction = unregisterLegendAction;
6081
+ exports.unregisterLegendCallout = unregisterLegendCallout;
6066
6082
  exports.unregisterNativeIndicator = unregisterNativeIndicator;
6067
6083
  exports.unregisterRendererDefaults = unregisterRendererDefaults;
6068
6084
  exports.unregisterRendererLayer = unregisterRendererLayer;
package/dist/plugin.d.cts CHANGED
@@ -1,7 +1,7 @@
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 CROSSHAIR, f as ChartTypeDefinition, g as ChartTypeSettingsInstance, h as ChartTypeSettingsSection, i as ChartTypeSettingsSubsection, D as DrawingTypeMeta, H as HIGHLIGHT, I as INFO, j as INVALID, k as IdentifiableKind, M as MARKER, N as NEUTRAL, l as NormalizedSettingsRow, R as RendererLayerArgs, m as RendererLayerDefinition, n as RendererLayerInstance, S as SERIES_LINE, o as SESSION_OFF, p as SESSION_POST, q as SESSION_PRE, r as SLATE, s as SLATE_DEEP, t as SeriesDataEngine, u as SeriesDataEngineHost, v as SettingsInlineControl, w as SettingsRowCondition, x as SettingsRowDescriptor, y as SettingsRowInlineNumber, z as SettingsRowSwatch, E as SettingsRowValueKey, F as SettingsRowWhen, G as SettingsRowWidth, J as SettingsSelectOption, K as SettingsValueRow, T as TRADE_EXIT, L as TRADE_LONG, O as TRADE_SHORT, V as VALID, W as WARNING, P as categoricalColor, Q as chartType, U as chartTypes, Z as drawingTypes, _ as getDrawingType, $ as normalizeSettingsRow, a0 as registerChartType, a2 as registerRendererDefaults, a3 as registerRendererLayer, a4 as rendererDefaults, a5 as rendererLayers, a6 as settingsRowValueKeys, a7 as stableSeriesId, a8 as tickerModifierIds, a9 as unregisterChartType, aa as unregisterRendererDefaults, ab as unregisterRendererLayer } from './plugin-BnJgjLAy.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 LegendIndicatorInfo, N as NativeIndicator, q as NativeIndicatorContext, r as NativeIndicatorDescriptor, s as NativeIndicatorInfo, t as NativeIndicatorOutput, O as OVERRIDABLE_TOPBAR_IDS, u as PreparedScript, a as ScriptRun, y as ScriptRunCause, z as ScriptRunResult, S as ScriptingEngine, A as SidePanelButton, G as SidePanelDescriptor, H as SidePanelHandle, J as SidePanelHeader, K as StatePersistenceHandler, M as StrategyFill, Q as StrategyState, T as StrategyTrade, U as SymbolRankingHook, _ as VisibleBarRange, $ as WidgetActionDescriptor, a0 as WidgetActionTarget, a1 as WidgetAttachment, W as WidgetContext, a2 as getNativeIndicator, a3 as legendActions, a5 as nativeIndicatorTypes, a6 as registerDefaultEngine, a7 as registerLegendAction, a8 as registerNativeIndicator, a9 as registerSidePanel, aa as registerStatePersistence, ab as registerSymbolRanking, ac as registerWidgetAction, ad as registerWidgetAttachment, ae as resolveEngines, af as sidePanels, ag as statePersistenceHandlers, ah as symbolRanking, ai as topbarActionOverride, aj as unregisterDefaultEngine, ak as unregisterLegendAction, al as unregisterNativeIndicator, am as unregisterSidePanel, an as unregisterStatePersistence, ao as unregisterWidgetAction, ap as unregisterWidgetAttachment, aq as widgetActions, ar as widgetAttachments } from './contributions-Vw-Hm58R.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 CROSSHAIR, f as ChartTypeDefinition, g as ChartTypeSettingsInstance, h as ChartTypeSettingsSection, i as ChartTypeSettingsSubsection, D as DrawingTypeMeta, H as HIGHLIGHT, I as INFO, j as INVALID, k as IdentifiableKind, M as MARKER, N as NEUTRAL, l as NormalizedSettingsRow, R as RendererLayerArgs, m as RendererLayerDefinition, n as RendererLayerInstance, S as SERIES_LINE, o as SESSION_OFF, p as SESSION_POST, q as SESSION_PRE, r as SLATE, s as SLATE_DEEP, t as SeriesDataEngine, u as SeriesDataEngineHost, v as SettingsInlineControl, w as SettingsRowCondition, x as SettingsRowDescriptor, y as SettingsRowInlineNumber, z as SettingsRowSwatch, E as SettingsRowValueKey, F as SettingsRowWhen, G as SettingsRowWidth, J as SettingsSelectOption, K as SettingsValueRow, T as TRADE_EXIT, L as TRADE_LONG, O as TRADE_SHORT, V as VALID, W as WARNING, P as categoricalColor, Q as chartType, U as chartTypes, Z as drawingTypes, _ as getDrawingType, $ as normalizeSettingsRow, a0 as registerChartType, a2 as registerRendererDefaults, a3 as registerRendererLayer, a4 as rendererDefaults, a5 as rendererLayers, a6 as settingsRowValueKeys, a7 as stableSeriesId, a8 as tickerModifierIds, a9 as unregisterChartType, aa as unregisterRendererDefaults, ab as unregisterRendererLayer } from './plugin-DfVqBz9p.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, M as SidePanelDescriptor, Q as SidePanelHandle, T as SidePanelHeader, U as StatePersistenceHandler, X as StrategyFill, Y as StrategyState, Z as StrategyTrade, _ as SymbolRankingHook, a2 as VisibleBarRange, a3 as WidgetActionDescriptor, a4 as WidgetActionTarget, a5 as WidgetAttachment, W as WidgetContext, a6 as getNativeIndicator, a7 as legendActions, a8 as legendCallouts, aa as nativeIndicatorTypes, ab as registerDefaultEngine, ac as registerLegendAction, ad as registerLegendCallout, ae as registerNativeIndicator, af as registerSidePanel, ag as registerStatePersistence, ah as registerSymbolRanking, ai as registerWidgetAction, aj as registerWidgetAttachment, ak as resolveEngines, al as sidePanels, am as statePersistenceHandlers, an as symbolRanking, ao as topbarActionOverride, ap as unregisterDefaultEngine, aq as unregisterLegendAction, ar as unregisterLegendCallout, as as unregisterNativeIndicator, at as unregisterSidePanel, au as unregisterStatePersistence, av as unregisterWidgetAction, aw as unregisterWidgetAttachment, ax as widgetActions, ay as widgetAttachments } from './contributions-C1U2Krwg.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-CT9ZwIGz.cjs';
4
- export { B as Background, y as BoxFontFamily, z as BoxHAlign, E as BoxTextSize, F as BoxVAlign, G as CandleBarColor, H as CandleSeries, J as CandleStyle, X as DirtyRange, Y as DrawingBox, Z as DrawingExtend, $ as DrawingLabel, a0 as DrawingLine, a1 as DrawingLinefill, a4 as DrawingPolyline, a6 as DrawingTable, v as DrawingTypeKey, a8 as DrawingXLoc, aa as Fill, ab as FillGradientStop, ac as IndicatorMeta, k as IndicatorModel, ad as InputCondition, ae as InputSchema, af as InputType, m as InputValue, ag as InputWhen, ah as LabelStyle, ai as LabelYLoc, aj as LineLikeKind, ak as LineLikeSeries, al as LineLikeStyle, L as LineStyle, am as MarkerPoint, an as MarkerSeries, t as Millis, O as OHLCV, h as Pane, aq as PaneAxis, ar as PaneAxisBand, as as PaneHint, at as PaneKind, au as PolylinePoint, av as PriceLine, P as PriceStyle, az as Scene, l as ScenePatch, aA as SchemaPatch, aB as SeriesKind, aC as SeriesPoint, aD as SeriesSpec, aE as SeriesValueDelta, aI as TableCell, aJ as TableMerge, aK as TablePosition, aM as TradeExecution, aN as ValuePatch, aQ as inputVisible } from './options-BaVTMXaO.cjs';
4
+ export { B as Background, z as BoxFontFamily, E as BoxHAlign, F as BoxTextSize, G as BoxVAlign, H as CandleBarColor, J as CandleSeries, K as CandleStyle, Y as DirtyRange, Z as DrawingBox, _ as DrawingExtend, a0 as DrawingLabel, a1 as DrawingLine, a2 as DrawingLinefill, a5 as DrawingPolyline, a7 as DrawingTable, w as DrawingTypeKey, a9 as DrawingXLoc, ab as Fill, ac as FillGradientStop, ad as IndicatorMeta, k as IndicatorModel, ae as InputCondition, af as InputSchema, ag as InputType, m as InputValue, ah as InputWhen, ai as LabelStyle, aj as LabelYLoc, ak as LineLikeKind, al as LineLikeSeries, am as LineLikeStyle, L as LineStyle, an as MarkerPoint, ao as MarkerSeries, u as Millis, O as OHLCV, h as Pane, ar as PaneAxis, as as PaneAxisBand, at as PaneHint, au as PaneKind, av as PolylinePoint, aw as PriceLine, P as PriceStyle, aA as Scene, l as ScenePatch, aB as SchemaPatch, aC as SeriesKind, aD as SeriesPoint, aE as SeriesSpec, aF as SeriesValueDelta, aJ as TableCell, aK as TableMerge, aL as TablePosition, aN as TradeExecution, aO as ValuePatch, aR as inputVisible } from './options-FM0peknS.cjs';
5
5
  export { i as iconMarkup, r as registerIcon } from './icons-BZYbJXSV.cjs';
6
6
  export { a as KeyBindingDescriptor, R as ResolvedBinding } from './keymap-CGOz5F5f.cjs';
7
- export { B as BarRange, D as DataProvider, M as MarketDataFeed, b as ProviderCapabilities, P as ProviderInfo, a as SymbolDescriptor, S as SymbolInfo } from './DataProvider-BsQM2WNH.cjs';
7
+ export { B as BarRange, D as DataProvider, M as MarketDataFeed, b as ProviderCapabilities, P as ProviderInfo, a as SymbolDescriptor, S as SymbolInfo } from './DataProvider-8Z95Q-RJ.cjs';
package/dist/plugin.d.ts CHANGED
@@ -1,7 +1,7 @@
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 CROSSHAIR, f as ChartTypeDefinition, g as ChartTypeSettingsInstance, h as ChartTypeSettingsSection, i as ChartTypeSettingsSubsection, D as DrawingTypeMeta, H as HIGHLIGHT, I as INFO, j as INVALID, k as IdentifiableKind, M as MARKER, N as NEUTRAL, l as NormalizedSettingsRow, R as RendererLayerArgs, m as RendererLayerDefinition, n as RendererLayerInstance, S as SERIES_LINE, o as SESSION_OFF, p as SESSION_POST, q as SESSION_PRE, r as SLATE, s as SLATE_DEEP, t as SeriesDataEngine, u as SeriesDataEngineHost, v as SettingsInlineControl, w as SettingsRowCondition, x as SettingsRowDescriptor, y as SettingsRowInlineNumber, z as SettingsRowSwatch, E as SettingsRowValueKey, F as SettingsRowWhen, G as SettingsRowWidth, J as SettingsSelectOption, K as SettingsValueRow, T as TRADE_EXIT, L as TRADE_LONG, O as TRADE_SHORT, V as VALID, W as WARNING, P as categoricalColor, Q as chartType, U as chartTypes, Z as drawingTypes, _ as getDrawingType, $ as normalizeSettingsRow, a0 as registerChartType, a2 as registerRendererDefaults, a3 as registerRendererLayer, a4 as rendererDefaults, a5 as rendererLayers, a6 as settingsRowValueKeys, a7 as stableSeriesId, a8 as tickerModifierIds, a9 as unregisterChartType, aa as unregisterRendererDefaults, ab as unregisterRendererLayer } from './plugin-CC7rBrOY.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 LegendIndicatorInfo, N as NativeIndicator, q as NativeIndicatorContext, r as NativeIndicatorDescriptor, s as NativeIndicatorInfo, t as NativeIndicatorOutput, O as OVERRIDABLE_TOPBAR_IDS, u as PreparedScript, a as ScriptRun, y as ScriptRunCause, z as ScriptRunResult, S as ScriptingEngine, A as SidePanelButton, G as SidePanelDescriptor, H as SidePanelHandle, J as SidePanelHeader, K as StatePersistenceHandler, M as StrategyFill, Q as StrategyState, T as StrategyTrade, U as SymbolRankingHook, _ as VisibleBarRange, $ as WidgetActionDescriptor, a0 as WidgetActionTarget, a1 as WidgetAttachment, W as WidgetContext, a2 as getNativeIndicator, a3 as legendActions, a5 as nativeIndicatorTypes, a6 as registerDefaultEngine, a7 as registerLegendAction, a8 as registerNativeIndicator, a9 as registerSidePanel, aa as registerStatePersistence, ab as registerSymbolRanking, ac as registerWidgetAction, ad as registerWidgetAttachment, ae as resolveEngines, af as sidePanels, ag as statePersistenceHandlers, ah as symbolRanking, ai as topbarActionOverride, aj as unregisterDefaultEngine, ak as unregisterLegendAction, al as unregisterNativeIndicator, am as unregisterSidePanel, an as unregisterStatePersistence, ao as unregisterWidgetAction, ap as unregisterWidgetAttachment, aq as widgetActions, ar as widgetAttachments } from './contributions-DLLdV9jD.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 CROSSHAIR, f as ChartTypeDefinition, g as ChartTypeSettingsInstance, h as ChartTypeSettingsSection, i as ChartTypeSettingsSubsection, D as DrawingTypeMeta, H as HIGHLIGHT, I as INFO, j as INVALID, k as IdentifiableKind, M as MARKER, N as NEUTRAL, l as NormalizedSettingsRow, R as RendererLayerArgs, m as RendererLayerDefinition, n as RendererLayerInstance, S as SERIES_LINE, o as SESSION_OFF, p as SESSION_POST, q as SESSION_PRE, r as SLATE, s as SLATE_DEEP, t as SeriesDataEngine, u as SeriesDataEngineHost, v as SettingsInlineControl, w as SettingsRowCondition, x as SettingsRowDescriptor, y as SettingsRowInlineNumber, z as SettingsRowSwatch, E as SettingsRowValueKey, F as SettingsRowWhen, G as SettingsRowWidth, J as SettingsSelectOption, K as SettingsValueRow, T as TRADE_EXIT, L as TRADE_LONG, O as TRADE_SHORT, V as VALID, W as WARNING, P as categoricalColor, Q as chartType, U as chartTypes, Z as drawingTypes, _ as getDrawingType, $ as normalizeSettingsRow, a0 as registerChartType, a2 as registerRendererDefaults, a3 as registerRendererLayer, a4 as rendererDefaults, a5 as rendererLayers, a6 as settingsRowValueKeys, a7 as stableSeriesId, a8 as tickerModifierIds, a9 as unregisterChartType, aa as unregisterRendererDefaults, ab as unregisterRendererLayer } from './plugin-7bkF32Rk.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, M as SidePanelDescriptor, Q as SidePanelHandle, T as SidePanelHeader, U as StatePersistenceHandler, X as StrategyFill, Y as StrategyState, Z as StrategyTrade, _ as SymbolRankingHook, a2 as VisibleBarRange, a3 as WidgetActionDescriptor, a4 as WidgetActionTarget, a5 as WidgetAttachment, W as WidgetContext, a6 as getNativeIndicator, a7 as legendActions, a8 as legendCallouts, aa as nativeIndicatorTypes, ab as registerDefaultEngine, ac as registerLegendAction, ad as registerLegendCallout, ae as registerNativeIndicator, af as registerSidePanel, ag as registerStatePersistence, ah as registerSymbolRanking, ai as registerWidgetAction, aj as registerWidgetAttachment, ak as resolveEngines, al as sidePanels, am as statePersistenceHandlers, an as symbolRanking, ao as topbarActionOverride, ap as unregisterDefaultEngine, aq as unregisterLegendAction, ar as unregisterLegendCallout, as as unregisterNativeIndicator, at as unregisterSidePanel, au as unregisterStatePersistence, av as unregisterWidgetAction, aw as unregisterWidgetAttachment, ax as widgetActions, ay as widgetAttachments } from './contributions-D7PVZO2i.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-CT9ZwIGz.js';
4
- export { B as Background, y as BoxFontFamily, z as BoxHAlign, E as BoxTextSize, F as BoxVAlign, G as CandleBarColor, H as CandleSeries, J as CandleStyle, X as DirtyRange, Y as DrawingBox, Z as DrawingExtend, $ as DrawingLabel, a0 as DrawingLine, a1 as DrawingLinefill, a4 as DrawingPolyline, a6 as DrawingTable, v as DrawingTypeKey, a8 as DrawingXLoc, aa as Fill, ab as FillGradientStop, ac as IndicatorMeta, k as IndicatorModel, ad as InputCondition, ae as InputSchema, af as InputType, m as InputValue, ag as InputWhen, ah as LabelStyle, ai as LabelYLoc, aj as LineLikeKind, ak as LineLikeSeries, al as LineLikeStyle, L as LineStyle, am as MarkerPoint, an as MarkerSeries, t as Millis, O as OHLCV, h as Pane, aq as PaneAxis, ar as PaneAxisBand, as as PaneHint, at as PaneKind, au as PolylinePoint, av as PriceLine, P as PriceStyle, az as Scene, l as ScenePatch, aA as SchemaPatch, aB as SeriesKind, aC as SeriesPoint, aD as SeriesSpec, aE as SeriesValueDelta, aI as TableCell, aJ as TableMerge, aK as TablePosition, aM as TradeExecution, aN as ValuePatch, aQ as inputVisible } from './options-BaVTMXaO.js';
4
+ export { B as Background, z as BoxFontFamily, E as BoxHAlign, F as BoxTextSize, G as BoxVAlign, H as CandleBarColor, J as CandleSeries, K as CandleStyle, Y as DirtyRange, Z as DrawingBox, _ as DrawingExtend, a0 as DrawingLabel, a1 as DrawingLine, a2 as DrawingLinefill, a5 as DrawingPolyline, a7 as DrawingTable, w as DrawingTypeKey, a9 as DrawingXLoc, ab as Fill, ac as FillGradientStop, ad as IndicatorMeta, k as IndicatorModel, ae as InputCondition, af as InputSchema, ag as InputType, m as InputValue, ah as InputWhen, ai as LabelStyle, aj as LabelYLoc, ak as LineLikeKind, al as LineLikeSeries, am as LineLikeStyle, L as LineStyle, an as MarkerPoint, ao as MarkerSeries, u as Millis, O as OHLCV, h as Pane, ar as PaneAxis, as as PaneAxisBand, at as PaneHint, au as PaneKind, av as PolylinePoint, aw as PriceLine, P as PriceStyle, aA as Scene, l as ScenePatch, aB as SchemaPatch, aC as SeriesKind, aD as SeriesPoint, aE as SeriesSpec, aF as SeriesValueDelta, aJ as TableCell, aK as TableMerge, aL as TablePosition, aN as TradeExecution, aO as ValuePatch, aR as inputVisible } from './options-FM0peknS.js';
5
5
  export { i as iconMarkup, r as registerIcon } from './icons-BZYbJXSV.js';
6
6
  export { a as KeyBindingDescriptor, R as ResolvedBinding } from './keymap-CGOz5F5f.js';
7
- export { B as BarRange, D as DataProvider, M as MarketDataFeed, b as ProviderCapabilities, P as ProviderInfo, a as SymbolDescriptor, S as SymbolInfo } from './DataProvider-BSLlBpB9.js';
7
+ export { B as BarRange, D as DataProvider, M as MarketDataFeed, b as ProviderCapabilities, P as ProviderInfo, a as SymbolDescriptor, S as SymbolInfo } from './DataProvider-DExJrfut.js';
package/dist/plugin.js CHANGED
@@ -1,3 +1,3 @@
1
1
  export { stableSeriesId } from './chunk-AOGZBKUE.js';
2
- export { DEFAULT_PANEL_MAX_WIDTH, DEFAULT_PANEL_MIN_WIDTH, DEFAULT_PANEL_WIDTH, OVERRIDABLE_TOPBAR_IDS, chartType, chartTypes, clampPanelWidth, drawingTypes, getDrawingType, getNativeIndicator, inputVisible, legendActions, nativeIndicatorTypes, normalizeSettingsRow, registerChartType, registerDefaultEngine, registerLegendAction, registerNativeIndicator, registerRendererDefaults, registerRendererLayer, registerSidePanel, registerStatePersistence, registerSymbolRanking, registerWidgetAction, registerWidgetAttachment, rendererDefaults, rendererLayers, resolveEngines, settingsRowValueKeys, sidePanels, statePersistenceHandlers, symbolRanking, tickerModifierIds, topbarActionOverride, unregisterChartType, unregisterDefaultEngine, unregisterLegendAction, unregisterNativeIndicator, unregisterRendererDefaults, unregisterRendererLayer, unregisterSidePanel, unregisterStatePersistence, unregisterWidgetAction, unregisterWidgetAttachment, widgetActions, widgetAttachments } from './chunk-L3I2CCYO.js';
3
- export { ACCENT, ACCENT_BRIGHT, BEARISH, BULLISH, CATEGORICAL, CROSSHAIR, HIGHLIGHT, INFO, INVALID, MARKER, NEUTRAL, SERIES_LINE, SESSION_OFF, SESSION_POST, SESSION_PRE, SLATE, SLATE_DEEP, TRADE_EXIT, TRADE_LONG, TRADE_SHORT, VALID, WARNING, categoricalColor, iconMarkup, registerIcon } from './chunk-PN5KWFZ4.js';
2
+ export { DEFAULT_PANEL_MAX_WIDTH, DEFAULT_PANEL_MIN_WIDTH, DEFAULT_PANEL_WIDTH, OVERRIDABLE_TOPBAR_IDS, chartType, chartTypes, clampPanelWidth, drawingTypes, getDrawingType, getNativeIndicator, inputVisible, legendActions, legendCallouts, nativeIndicatorTypes, normalizeSettingsRow, registerChartType, registerDefaultEngine, registerLegendAction, registerLegendCallout, registerNativeIndicator, registerRendererDefaults, registerRendererLayer, registerSidePanel, registerStatePersistence, registerSymbolRanking, registerWidgetAction, registerWidgetAttachment, rendererDefaults, rendererLayers, resolveEngines, settingsRowValueKeys, sidePanels, statePersistenceHandlers, symbolRanking, tickerModifierIds, topbarActionOverride, unregisterChartType, unregisterDefaultEngine, unregisterLegendAction, unregisterLegendCallout, unregisterNativeIndicator, unregisterRendererDefaults, unregisterRendererLayer, unregisterSidePanel, unregisterStatePersistence, unregisterWidgetAction, unregisterWidgetAttachment, widgetActions, widgetAttachments } from './chunk-EQCHJZOT.js';
3
+ export { ACCENT, ACCENT_BRIGHT, BEARISH, BULLISH, CATEGORICAL, CROSSHAIR, HIGHLIGHT, INFO, INVALID, MARKER, NEUTRAL, SERIES_LINE, SESSION_OFF, SESSION_POST, SESSION_PRE, SLATE, SLATE_DEEP, TRADE_EXIT, TRADE_LONG, TRADE_SHORT, VALID, WARNING, categoricalColor, iconMarkup, registerIcon } from './chunk-WFSZBX3R.js';
@@ -1,5 +1,5 @@
1
- import { O as OHLCV, U as Unsubscribe } from '../options-BaVTMXaO.cjs';
2
- import { D as DataProvider, P as ProviderInfo, B as BarRange, S as SymbolInfo, a as SymbolDescriptor } from '../DataProvider-BsQM2WNH.cjs';
1
+ import { O as OHLCV, U as Unsubscribe } from '../options-FM0peknS.cjs';
2
+ import { D as DataProvider, P as ProviderInfo, B as BarRange, S as SymbolInfo, a as SymbolDescriptor } from '../DataProvider-8Z95Q-RJ.cjs';
3
3
 
4
4
  /**
5
5
  * Binance market-data provider, built from scratch on the public REST + WebSocket
@@ -1,5 +1,5 @@
1
- import { O as OHLCV, U as Unsubscribe } from '../options-BaVTMXaO.js';
2
- import { D as DataProvider, P as ProviderInfo, B as BarRange, S as SymbolInfo, a as SymbolDescriptor } from '../DataProvider-BSLlBpB9.js';
1
+ import { O as OHLCV, U as Unsubscribe } from '../options-FM0peknS.js';
2
+ import { D as DataProvider, P as ProviderInfo, B as BarRange, S as SymbolInfo, a as SymbolDescriptor } from '../DataProvider-DExJrfut.js';
3
3
 
4
4
  /**
5
5
  * Binance market-data provider, built from scratch on the public REST + WebSocket
@@ -1,5 +1,5 @@
1
- import { O as OHLCV, U as Unsubscribe } from '../options-BaVTMXaO.cjs';
2
- import { D as DataProvider, P as ProviderInfo, B as BarRange, S as SymbolInfo, a as SymbolDescriptor } from '../DataProvider-BsQM2WNH.cjs';
1
+ import { O as OHLCV, U as Unsubscribe } from '../options-FM0peknS.cjs';
2
+ import { D as DataProvider, P as ProviderInfo, B as BarRange, S as SymbolInfo, a as SymbolDescriptor } from '../DataProvider-8Z95Q-RJ.cjs';
3
3
 
4
4
  /**
5
5
  * Coinbase market-data provider, built from scratch on the public Exchange REST + WebSocket APIs
@@ -1,5 +1,5 @@
1
- import { O as OHLCV, U as Unsubscribe } from '../options-BaVTMXaO.js';
2
- import { D as DataProvider, P as ProviderInfo, B as BarRange, S as SymbolInfo, a as SymbolDescriptor } from '../DataProvider-BSLlBpB9.js';
1
+ import { O as OHLCV, U as Unsubscribe } from '../options-FM0peknS.js';
2
+ import { D as DataProvider, P as ProviderInfo, B as BarRange, S as SymbolInfo, a as SymbolDescriptor } from '../DataProvider-DExJrfut.js';
3
3
 
4
4
  /**
5
5
  * Coinbase market-data provider, built from scratch on the public Exchange REST + WebSocket APIs
@@ -1,5 +1,5 @@
1
- import { O as OHLCV, U as Unsubscribe } from '../options-BaVTMXaO.cjs';
2
- import { D as DataProvider, P as ProviderInfo, B as BarRange, S as SymbolInfo, a as SymbolDescriptor } from '../DataProvider-BsQM2WNH.cjs';
1
+ import { O as OHLCV, U as Unsubscribe } from '../options-FM0peknS.cjs';
2
+ import { D as DataProvider, P as ProviderInfo, B as BarRange, S as SymbolInfo, a as SymbolDescriptor } from '../DataProvider-8Z95Q-RJ.cjs';
3
3
 
4
4
  /**
5
5
  * Hyperliquid market-data provider, built from scratch on the public info API — no
@@ -1,5 +1,5 @@
1
- import { O as OHLCV, U as Unsubscribe } from '../options-BaVTMXaO.js';
2
- import { D as DataProvider, P as ProviderInfo, B as BarRange, S as SymbolInfo, a as SymbolDescriptor } from '../DataProvider-BSLlBpB9.js';
1
+ import { O as OHLCV, U as Unsubscribe } from '../options-FM0peknS.js';
2
+ import { D as DataProvider, P as ProviderInfo, B as BarRange, S as SymbolInfo, a as SymbolDescriptor } from '../DataProvider-DExJrfut.js';
3
3
 
4
4
  /**
5
5
  * Hyperliquid market-data provider, built from scratch on the public info API — no
@@ -1,6 +1,6 @@
1
- import { D as DataProvider } from './DataProvider-BsQM2WNH.cjs';
2
- import { S as ScriptingEngine, V as Vela } from './contributions-Vw-Hm58R.cjs';
3
- import { V as VisibleRangePreset } from './options-BaVTMXaO.cjs';
1
+ import { D as DataProvider } from './DataProvider-8Z95Q-RJ.cjs';
2
+ import { S as ScriptingEngine, V as Vela } from './contributions-C1U2Krwg.cjs';
3
+ import { V as VisibleRangePreset } from './options-FM0peknS.cjs';
4
4
 
5
5
  /** The linkable dimensions. `crosshair` mirrors the pointer time onto same-group
6
6
  * cells as GHOST crosshairs (renderers without the optional `setExternalCrosshair`
@@ -383,6 +383,8 @@ declare class Statusline {
383
383
  private readonly changeEl;
384
384
  private readonly symbolEl;
385
385
  private readonly marketEl;
386
+ /** The badge itself — a kit callout bubble (the same element as {@link marketEl}). */
387
+ private readonly marketBubble;
386
388
  private marketTip;
387
389
  private avatarEl;
388
390
  private metaEl;
@@ -1,6 +1,6 @@
1
- import { D as DataProvider } from './DataProvider-BSLlBpB9.js';
2
- import { S as ScriptingEngine, V as Vela } from './contributions-DLLdV9jD.js';
3
- import { V as VisibleRangePreset } from './options-BaVTMXaO.js';
1
+ import { D as DataProvider } from './DataProvider-DExJrfut.js';
2
+ import { S as ScriptingEngine, V as Vela } from './contributions-D7PVZO2i.js';
3
+ import { V as VisibleRangePreset } from './options-FM0peknS.js';
4
4
 
5
5
  /** The linkable dimensions. `crosshair` mirrors the pointer time onto same-group
6
6
  * cells as GHOST crosshairs (renderers without the optional `setExternalCrosshair`
@@ -383,6 +383,8 @@ declare class Statusline {
383
383
  private readonly changeEl;
384
384
  private readonly symbolEl;
385
385
  private readonly marketEl;
386
+ /** The badge itself — a kit callout bubble (the same element as {@link marketEl}). */
387
+ private readonly marketBubble;
386
388
  private marketTip;
387
389
  private avatarEl;
388
390
  private metaEl;
package/dist/ui.cjs CHANGED
@@ -219,6 +219,12 @@ function registerIcon(id, svg) {
219
219
  function iconMarkup(id) {
220
220
  return registry.get(id) ?? null;
221
221
  }
222
+ function icon(id) {
223
+ return registry.get(id) ?? "";
224
+ }
225
+ function iconAt(id, px) {
226
+ return icon(id).replace("<svg ", `<svg width="${px}" height="${px}" `);
227
+ }
222
228
  function svg16(body, extra = "") {
223
229
  return `<svg viewBox="0 0 16 16" width="1em" height="1em" ${extra ? extra + " " : ""}fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round">${body}</svg>`;
224
230
  }
@@ -273,11 +279,11 @@ registerIcon(
273
279
  );
274
280
  registerIcon(
275
281
  "market-pre",
276
- svg24('<path d="M12 2v8"/><path d="m4.93 10.93 1.41 1.41"/><path d="M2 18h2"/><path d="M20 18h2"/><path d="m19.07 10.93-1.41 1.41"/><path d="M22 22H2"/><path d="m16 6-4 4-4-4"/><path d="M16 18a4 4 0 0 0-8 0"/>')
282
+ svg24('<path d="M12 2v8"/><path d="m4.93 10.93 1.41 1.41"/><path d="M2 18h2"/><path d="M20 18h2"/><path d="m19.07 10.93-1.41 1.41"/><path d="M22 22H2"/><path d="m8 6 4-4 4 4"/><path d="M16 18a4 4 0 0 0-8 0"/>')
277
283
  );
278
284
  registerIcon(
279
285
  "market-post",
280
- svg24('<path d="M12 10V2"/><path d="m4.93 10.93 1.41 1.41"/><path d="M2 18h2"/><path d="M20 18h2"/><path d="m19.07 10.93-1.41 1.41"/><path d="M22 22H2"/><path d="m16 18-4-4-4 4"/><path d="M16 6a4 4 0 0 0-8 0"/>')
286
+ svg24('<path d="M12 10V2"/><path d="m4.93 10.93 1.41 1.41"/><path d="M2 18h2"/><path d="M20 18h2"/><path d="m19.07 10.93-1.41 1.41"/><path d="M22 22H2"/><path d="m16 14-4 4-4-4"/><path d="M16 6a4 4 0 0 0-8 0"/>')
281
287
  );
282
288
  registerIcon("market-closed", svg24('<path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"/>'));
283
289
  registerIcon(
@@ -2358,12 +2364,12 @@ var NumberInput = class {
2358
2364
  buildSteppers(doc, applyDir) {
2359
2365
  const steps = doc.createElement("div");
2360
2366
  steps.className = "vela-num-step";
2361
- const mk = (dir, icon, label) => {
2367
+ const mk = (dir, icon2, label) => {
2362
2368
  const b = doc.createElement("button");
2363
2369
  b.type = "button";
2364
2370
  b.tabIndex = -1;
2365
2371
  b.setAttribute("aria-label", label);
2366
- b.appendChild(iconEl(icon, doc));
2372
+ b.appendChild(iconEl(icon2, doc));
2367
2373
  let timer = 0;
2368
2374
  const apply = () => applyDir(dir);
2369
2375
  const stop = () => {
@@ -3396,6 +3402,192 @@ function buildFieldControl(desc) {
3396
3402
  return { el };
3397
3403
  }
3398
3404
 
3405
+ // src/ui/components/callout-bubble/controller.ts
3406
+ function closesPanel(item) {
3407
+ return item.close !== false;
3408
+ }
3409
+ function calloutPanelRows(items) {
3410
+ const rows = [];
3411
+ for (const item of items) {
3412
+ if (item.type === "text") {
3413
+ rows.push({ type: "text", text: item.text });
3414
+ continue;
3415
+ }
3416
+ const last = rows[rows.length - 1];
3417
+ if (last && last.type === "buttons") last.buttons.push(item);
3418
+ else rows.push({ type: "buttons", buttons: [item] });
3419
+ }
3420
+ return rows;
3421
+ }
3422
+
3423
+ // src/ui/components/callout-bubble/styles.ts
3424
+ var CALLOUT_STYLE_ID = "vela-ui-callout-bubble";
3425
+ var CALLOUT_CSS = `
3426
+ .vela-callout {
3427
+ display: inline-grid;
3428
+ place-items: center;
3429
+ border-radius: 50%;
3430
+ flex: none;
3431
+ line-height: 0;
3432
+ box-sizing: border-box;
3433
+ cursor: default;
3434
+ user-select: none;
3435
+ -webkit-user-select: none;
3436
+ }
3437
+ .vela-callout[role='button'] { cursor: pointer; }
3438
+ .vela-callout svg { display: block; }
3439
+ /* The deployed panel \u2014 carries the kit's elevated-card look itself (the popover
3440
+ shell is bare positioning chrome). */
3441
+ .vela-callout-panel {
3442
+ display: flex;
3443
+ flex-direction: column;
3444
+ gap: 8px;
3445
+ padding: 10px 12px;
3446
+ max-width: 280px;
3447
+ box-sizing: border-box;
3448
+ background: var(--vela-surface-elev);
3449
+ border: 1px solid var(--vela-border-strong);
3450
+ border-radius: 6px;
3451
+ box-shadow: var(--vela-shadow);
3452
+ color: var(--vela-fg);
3453
+ font: var(--vela-font-size-md) var(--vela-font);
3454
+ }
3455
+ .vela-callout-title { font-weight: 600; color: var(--vela-fg-bright); }
3456
+ .vela-callout-text { color: var(--vela-fg-muted); line-height: 1.45; white-space: pre-line; }
3457
+ .vela-callout-actions { display: flex; flex-wrap: wrap; gap: 8px; }
3458
+ .vela-callout-btn {
3459
+ cursor: pointer;
3460
+ height: 26px;
3461
+ padding: 0 10px;
3462
+ border-radius: 5px;
3463
+ border: 1px solid var(--vela-border);
3464
+ background: transparent;
3465
+ color: var(--vela-fg);
3466
+ font-size: var(--vela-font-size-md);
3467
+ font-family: inherit;
3468
+ transition: background var(--vela-dur-fast) ease, color var(--vela-dur-fast) ease, opacity var(--vela-dur-fast) ease, border-color var(--vela-dur-fast) ease;
3469
+ }
3470
+ .vela-callout-btn:hover { background: var(--vela-hover); color: var(--vela-fg-bright); border-color: var(--vela-fg-muted); }
3471
+ .vela-callout-btn-primary { border-color: var(--vela-selected-bg); background: var(--vela-selected-bg); color: var(--vela-selected-fg); }
3472
+ .vela-callout-btn-primary:hover { background: var(--vela-selected-bg); color: var(--vela-selected-fg); opacity: 0.85; border-color: var(--vela-selected-bg); }
3473
+ `;
3474
+
3475
+ // src/ui/components/callout-bubble/view.ts
3476
+ var CalloutBubble = class {
3477
+ constructor(opts) {
3478
+ this.pop = null;
3479
+ this.spec = { icon: opts.icon, background: opts.background, label: opts.label };
3480
+ if (opts.color !== void 0) this.spec.color = opts.color;
3481
+ if (opts.panel !== void 0) this.spec.panel = opts.panel;
3482
+ this.size = opts.size ?? 16;
3483
+ this.host = opts.host;
3484
+ this.theme = opts.theme;
3485
+ this.boundary = opts.boundary;
3486
+ const doc = (opts.host ?? document.body).ownerDocument;
3487
+ injectStyles(CALLOUT_STYLE_ID, CALLOUT_CSS, doc);
3488
+ this.el = doc.createElement("span");
3489
+ this.el.className = "vela-callout";
3490
+ this.el.style.width = `${this.size}px`;
3491
+ this.el.style.height = `${this.size}px`;
3492
+ this.el.addEventListener("click", (e) => {
3493
+ if (!this.spec.panel) return;
3494
+ e.stopPropagation();
3495
+ this.toggle();
3496
+ });
3497
+ this.el.addEventListener("dblclick", (e) => {
3498
+ if (this.spec.panel) e.stopPropagation();
3499
+ });
3500
+ this.el.addEventListener("keydown", (e) => {
3501
+ if (!this.spec.panel || e.key !== "Enter" && e.key !== " ") return;
3502
+ e.preventDefault();
3503
+ this.toggle();
3504
+ });
3505
+ this.dress();
3506
+ }
3507
+ /** Re-dress the bubble (a status change: new icon, tint, label, panel). */
3508
+ set(spec) {
3509
+ this.spec = { ...this.spec, ...spec };
3510
+ if ("panel" in spec) this.pop?.hide();
3511
+ this.dress();
3512
+ }
3513
+ /** Whether the deployed panel is currently open. */
3514
+ get open() {
3515
+ return this.pop?.open ?? false;
3516
+ }
3517
+ destroy() {
3518
+ this.pop?.destroy();
3519
+ this.pop = null;
3520
+ this.el.remove();
3521
+ }
3522
+ dress() {
3523
+ const clickable = this.spec.panel !== void 0;
3524
+ this.el.style.background = this.spec.background;
3525
+ this.el.style.color = this.spec.color ?? "";
3526
+ this.el.innerHTML = iconAt(this.spec.icon, this.size - 4);
3527
+ this.el.setAttribute("aria-label", this.spec.label);
3528
+ if (clickable) {
3529
+ this.el.setAttribute("role", "button");
3530
+ this.el.tabIndex = 0;
3531
+ } else {
3532
+ this.el.removeAttribute("role");
3533
+ this.el.removeAttribute("tabindex");
3534
+ }
3535
+ }
3536
+ toggle() {
3537
+ if (this.pop?.open) {
3538
+ this.pop.hide();
3539
+ return;
3540
+ }
3541
+ const panel = this.spec.panel;
3542
+ if (!panel) return;
3543
+ this.pop?.destroy();
3544
+ this.pop = new Popover({
3545
+ trigger: this.el,
3546
+ gap: 6,
3547
+ content: (body) => this.buildPanel(body, panel),
3548
+ ...this.host ? { host: this.host } : {},
3549
+ ...this.theme ? { theme: this.theme() } : {},
3550
+ ...this.boundary ? { boundary: this.boundary } : {}
3551
+ });
3552
+ this.pop.show();
3553
+ }
3554
+ buildPanel(body, panel) {
3555
+ const doc = body.ownerDocument;
3556
+ const root = doc.createElement("div");
3557
+ root.className = "vela-callout-panel";
3558
+ if (panel.title) {
3559
+ const title = doc.createElement("div");
3560
+ title.className = "vela-callout-title";
3561
+ title.textContent = panel.title;
3562
+ root.appendChild(title);
3563
+ }
3564
+ for (const row of calloutPanelRows(panel.items)) {
3565
+ if (row.type === "text") {
3566
+ const text = doc.createElement("div");
3567
+ text.className = "vela-callout-text";
3568
+ text.textContent = row.text;
3569
+ root.appendChild(text);
3570
+ continue;
3571
+ }
3572
+ const actions = doc.createElement("div");
3573
+ actions.className = "vela-callout-actions";
3574
+ for (const item of row.buttons) {
3575
+ const btn = doc.createElement("button");
3576
+ btn.type = "button";
3577
+ btn.className = "vela-callout-btn" + (item.primary ? " vela-callout-btn-primary" : "");
3578
+ btn.textContent = item.label;
3579
+ btn.addEventListener("click", () => {
3580
+ item.run();
3581
+ if (closesPanel(item)) this.pop?.hide();
3582
+ });
3583
+ actions.appendChild(btn);
3584
+ }
3585
+ root.appendChild(actions);
3586
+ }
3587
+ body.appendChild(root);
3588
+ }
3589
+ };
3590
+
3399
3591
  Object.defineProperty(exports, "normalizeProps", {
3400
3592
  enumerable: true,
3401
3593
  get: function () { return vanilla.normalizeProps; }
@@ -3404,6 +3596,9 @@ Object.defineProperty(exports, "spreadProps", {
3404
3596
  enumerable: true,
3405
3597
  get: function () { return vanilla.spreadProps; }
3406
3598
  });
3599
+ exports.CALLOUT_CSS = CALLOUT_CSS;
3600
+ exports.CALLOUT_STYLE_ID = CALLOUT_STYLE_ID;
3601
+ exports.CalloutBubble = CalloutBubble;
3407
3602
  exports.ColorField = ColorField;
3408
3603
  exports.Dialog = Dialog;
3409
3604
  exports.Drawer = Drawer;
@@ -3427,10 +3622,12 @@ exports.blendOver = blendOver;
3427
3622
  exports.buildColorPicker = buildColorPicker;
3428
3623
  exports.buildFieldControl = buildFieldControl;
3429
3624
  exports.buildPalette = buildPalette;
3625
+ exports.calloutPanelRows = calloutPanelRows;
3430
3626
  exports.clampNumber = clampNumber;
3431
3627
  exports.closeColorPopover = closeColorPopover;
3432
3628
  exports.closeOpenPopovers = closeOpenPopovers;
3433
3629
  exports.closeWidthPopover = closeWidthPopover;
3630
+ exports.closesPanel = closesPanel;
3434
3631
  exports.colorField = colorField;
3435
3632
  exports.colorPickerController = colorPickerController;
3436
3633
  exports.combineColor = combineColor;
package/dist/ui.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { c as VelaTheme } from './options-BaVTMXaO.cjs';
1
+ import { c as VelaTheme } from './options-FM0peknS.cjs';
2
2
  import { MachineSchema, Service, Machine } from '@zag-js/core';
3
3
  export { a as KeyBindingDescriptor, K as KeymapManager, b as KeymapOptions, R as ResolvedBinding } from './keymap-CGOz5F5f.cjs';
4
4
  import * as tooltip from '@zag-js/tooltip';
@@ -883,4 +883,91 @@ declare class GlyphSelect<T extends string | number = string | number> {
883
883
  declare function widthField(theme: VelaTheme, getVal: () => number, onVal: (v: number) => void): HTMLElement;
884
884
  declare function closeWidthPopover(): void;
885
885
 
886
- export { ColorField, type ColorFieldOpts, type ColorFieldShape, type ColorPickerController, type ColorPickerControllerOptions, Dialog, type DialogApi, type DialogControllerOptions, type DialogOptions, type DialogService, Drawer, type DrawerApi, type DrawerControllerOptions, type DrawerOptions, type DrawerService, FIELD_FOCUS_CSS, FIELD_FOCUS_RING, FIELD_GAP_PX, type FieldControlDesc, type FieldControlHandle, type FieldGridOptions, type FieldGridVariant, type FieldInlineItem, type FieldLabelSize, type FieldRowOptions, type FieldSectionOptions, type FieldToggleOpts, type GlyphOption, GlyphSelect, type GlyphSelectController, type GlyphSelectControllerOptions, type GlyphSelectOptions, type MachineHandle, Menu, type MenuApi, type MenuControllerOptions, type MenuItemDescriptor, type MenuOptions, type MenuService, type NumberCommit, NumberInput, type NumberInputController, type NumberInputControllerOptions, type NumberInputOptions, type NumberSize, type PlaceArgs, type PlaceResult, Popover, type PopoverAlign, type PopoverBoundary, type PopoverController, type PopoverControllerOptions, type PopoverOptions, type PopoverPosition, type Rect, Select, type SelectController, type SelectControllerOptions, type SelectListPopoverOpts, type SelectOption, type SelectOptions, type SelectSize, Switch, type SwitchController, type SwitchControllerOptions, type SwitchOptions, type SwitchSize, type SwitchTone, TextArea, type TextAreaController, type TextAreaControllerOptions, type TextAreaOptions, type TextAreaSize, TextField, type TextFieldController, type TextFieldControllerOptions, type TextFieldOptions, type TextFieldSize, Tooltip, type TooltipApi, type TooltipControllerOptions, type TooltipOptions, type TooltipService, WIDTH_FIELD_OPTIONS, applyPlotOverlayTokens, applyThemeTokens, blendOver, buildColorPicker, buildFieldControl, buildPalette, clampNumber, closeColorPopover, closeOpenPopovers, closeWidthPopover, colorField, colorPickerController, combineColor, decorateSelectScroll, dialogController, drawerController, ensureUIHost, eventDismissedPopover, fieldGrid, fieldGridColumns, fieldRow, fieldSection, fieldSeparator, fillSelectList, glyphSelectController, hslHex, iconEl, injectStyles, insetRect, intersectRects, isPopoverOpen, lineWidthGlyph, menuController, nextUid, numberInputController, openPopoverTrigger, openSelectList, overlayScrollbarCss, placePopover, popoverController, runMachine, selectController, snapToStep, splitColor, switchController, textAreaController, textFieldController, toggleSelectList, tooltipController, transparencyChecker, viewportRect, widthField, widthFieldOptions, withAlpha };
886
+ /** One block of a deployed callout panel plain text, or a button running a caller action. */
887
+ type CalloutPanelItem = {
888
+ type: 'text';
889
+ text: string;
890
+ } | {
891
+ type: 'button';
892
+ label: string;
893
+ /** Emphasized (selection-colored) button — the panel's main action. */
894
+ primary?: boolean;
895
+ /** Close the panel after `run` (default true — an action answers the panel). */
896
+ close?: boolean;
897
+ run(): void;
898
+ };
899
+ /** The deployed panel: an optional heading over ordered text/button blocks. */
900
+ interface CalloutPanel {
901
+ title?: string;
902
+ items: CalloutPanelItem[];
903
+ }
904
+ /** What dresses the bubble itself (the panel is what the click deploys). */
905
+ interface CalloutBubbleSpec {
906
+ /** Icon id in the icon registry (`registerIcon`), centered in the bubble. */
907
+ icon: string;
908
+ /** Bubble fill — any CSS color, token expressions included. */
909
+ background: string;
910
+ /** Icon ink (default: `currentColor` inherited from the slot). */
911
+ color?: string;
912
+ /** Accessible name. Callers typically show the same text in their own tooltip. */
913
+ label: string;
914
+ /** Deployed panel — presence makes the bubble clickable. */
915
+ panel?: CalloutPanel;
916
+ }
917
+ /** Whether activating a panel button also closes the panel (defaults to yes). */
918
+ declare function closesPanel(item: Extract<CalloutPanelItem, {
919
+ type: 'button';
920
+ }>): boolean;
921
+ /** A panel row as the view lays it out: one text block, or a run of adjacent buttons. */
922
+ type CalloutPanelRow = {
923
+ type: 'text';
924
+ text: string;
925
+ } | {
926
+ type: 'buttons';
927
+ buttons: Array<Extract<CalloutPanelItem, {
928
+ type: 'button';
929
+ }>>;
930
+ };
931
+ /**
932
+ * Group a panel's ordered items into layout rows: consecutive buttons share one row
933
+ * (the common "text above, actions below" shape falls out naturally), text blocks
934
+ * stand alone. Pure — unit-tested apart from the DOM.
935
+ */
936
+ declare function calloutPanelRows(items: CalloutPanelItem[]): CalloutPanelRow[];
937
+
938
+ interface CalloutBubbleOptions extends CalloutBubbleSpec {
939
+ /** Bubble diameter in px (default 16; the icon renders 4px smaller). */
940
+ size?: number;
941
+ /** Where the deployed panel portals (default: the document body). Pass the chart
942
+ * or widget root so the panel lives inside the host's DOM. */
943
+ host?: HTMLElement;
944
+ /** Live theme, for a panel deployed OUTSIDE a `.vela-ui` token host (renderer
945
+ * chrome on a bare chart passes its theme getter; widget chrome may omit it). */
946
+ theme?: () => VelaTheme;
947
+ /** Panel clamp — `'viewport'` (default) flips the panel above the bubble when the
948
+ * bottom screen edge is too close for it to deploy below. */
949
+ boundary?: PopoverBoundary;
950
+ }
951
+ declare class CalloutBubble {
952
+ readonly el: HTMLElement;
953
+ private spec;
954
+ private readonly size;
955
+ private readonly host;
956
+ private readonly theme;
957
+ private readonly boundary;
958
+ private pop;
959
+ constructor(opts: CalloutBubbleOptions);
960
+ /** Re-dress the bubble (a status change: new icon, tint, label, panel). */
961
+ set(spec: Partial<CalloutBubbleSpec>): void;
962
+ /** Whether the deployed panel is currently open. */
963
+ get open(): boolean;
964
+ destroy(): void;
965
+ private dress;
966
+ private toggle;
967
+ private buildPanel;
968
+ }
969
+
970
+ declare const CALLOUT_STYLE_ID = "vela-ui-callout-bubble";
971
+ declare const CALLOUT_CSS = "\n.vela-callout {\n display: inline-grid;\n place-items: center;\n border-radius: 50%;\n flex: none;\n line-height: 0;\n box-sizing: border-box;\n cursor: default;\n user-select: none;\n -webkit-user-select: none;\n}\n.vela-callout[role='button'] { cursor: pointer; }\n.vela-callout svg { display: block; }\n/* The deployed panel \u2014 carries the kit's elevated-card look itself (the popover\n shell is bare positioning chrome). */\n.vela-callout-panel {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 10px 12px;\n max-width: 280px;\n box-sizing: border-box;\n background: var(--vela-surface-elev);\n border: 1px solid var(--vela-border-strong);\n border-radius: 6px;\n box-shadow: var(--vela-shadow);\n color: var(--vela-fg);\n font: var(--vela-font-size-md) var(--vela-font);\n}\n.vela-callout-title { font-weight: 600; color: var(--vela-fg-bright); }\n.vela-callout-text { color: var(--vela-fg-muted); line-height: 1.45; white-space: pre-line; }\n.vela-callout-actions { display: flex; flex-wrap: wrap; gap: 8px; }\n.vela-callout-btn {\n cursor: pointer;\n height: 26px;\n padding: 0 10px;\n border-radius: 5px;\n border: 1px solid var(--vela-border);\n background: transparent;\n color: var(--vela-fg);\n font-size: var(--vela-font-size-md);\n font-family: inherit;\n transition: background var(--vela-dur-fast) ease, color var(--vela-dur-fast) ease, opacity var(--vela-dur-fast) ease, border-color var(--vela-dur-fast) ease;\n}\n.vela-callout-btn:hover { background: var(--vela-hover); color: var(--vela-fg-bright); border-color: var(--vela-fg-muted); }\n.vela-callout-btn-primary { border-color: var(--vela-selected-bg); background: var(--vela-selected-bg); color: var(--vela-selected-fg); }\n.vela-callout-btn-primary:hover { background: var(--vela-selected-bg); color: var(--vela-selected-fg); opacity: 0.85; border-color: var(--vela-selected-bg); }\n";
972
+
973
+ export { CALLOUT_CSS, CALLOUT_STYLE_ID, CalloutBubble, type CalloutBubbleOptions, type CalloutBubbleSpec, type CalloutPanel, type CalloutPanelItem, type CalloutPanelRow, ColorField, type ColorFieldOpts, type ColorFieldShape, type ColorPickerController, type ColorPickerControllerOptions, Dialog, type DialogApi, type DialogControllerOptions, type DialogOptions, type DialogService, Drawer, type DrawerApi, type DrawerControllerOptions, type DrawerOptions, type DrawerService, FIELD_FOCUS_CSS, FIELD_FOCUS_RING, FIELD_GAP_PX, type FieldControlDesc, type FieldControlHandle, type FieldGridOptions, type FieldGridVariant, type FieldInlineItem, type FieldLabelSize, type FieldRowOptions, type FieldSectionOptions, type FieldToggleOpts, type GlyphOption, GlyphSelect, type GlyphSelectController, type GlyphSelectControllerOptions, type GlyphSelectOptions, type MachineHandle, Menu, type MenuApi, type MenuControllerOptions, type MenuItemDescriptor, type MenuOptions, type MenuService, type NumberCommit, NumberInput, type NumberInputController, type NumberInputControllerOptions, type NumberInputOptions, type NumberSize, type PlaceArgs, type PlaceResult, Popover, type PopoverAlign, type PopoverBoundary, type PopoverController, type PopoverControllerOptions, type PopoverOptions, type PopoverPosition, type Rect, Select, type SelectController, type SelectControllerOptions, type SelectListPopoverOpts, type SelectOption, type SelectOptions, type SelectSize, Switch, type SwitchController, type SwitchControllerOptions, type SwitchOptions, type SwitchSize, type SwitchTone, TextArea, type TextAreaController, type TextAreaControllerOptions, type TextAreaOptions, type TextAreaSize, TextField, type TextFieldController, type TextFieldControllerOptions, type TextFieldOptions, type TextFieldSize, Tooltip, type TooltipApi, type TooltipControllerOptions, type TooltipOptions, type TooltipService, WIDTH_FIELD_OPTIONS, applyPlotOverlayTokens, applyThemeTokens, blendOver, buildColorPicker, buildFieldControl, buildPalette, calloutPanelRows, clampNumber, closeColorPopover, closeOpenPopovers, closeWidthPopover, closesPanel, colorField, colorPickerController, combineColor, decorateSelectScroll, dialogController, drawerController, ensureUIHost, eventDismissedPopover, fieldGrid, fieldGridColumns, fieldRow, fieldSection, fieldSeparator, fillSelectList, glyphSelectController, hslHex, iconEl, injectStyles, insetRect, intersectRects, isPopoverOpen, lineWidthGlyph, menuController, nextUid, numberInputController, openPopoverTrigger, openSelectList, overlayScrollbarCss, placePopover, popoverController, runMachine, selectController, snapToStep, splitColor, switchController, textAreaController, textFieldController, toggleSelectList, tooltipController, transparencyChecker, viewportRect, widthField, widthFieldOptions, withAlpha };