@luxalgo/vela 0.6.6 → 0.6.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/{DataProvider-JJq7M2it.d.ts → DataProvider-BSLlBpB9.d.ts} +10 -0
- package/dist/{DataProvider-DDUYw2qP.d.cts → DataProvider-BsQM2WNH.d.cts} +10 -0
- package/dist/{chunk-OEUGUXL7.js → chunk-L3I2CCYO.js} +49 -1
- package/dist/{chunk-TMXK2SJR.js → chunk-N7LGMKCE.js} +523 -142
- package/dist/{chunk-JQFO2WMU.js → chunk-SQETIBFU.js} +83 -9
- package/dist/chunk-W4EJWLEO.js +12 -0
- package/dist/{contributions-BqCIsbaP.d.ts → contributions-DLLdV9jD.d.ts} +59 -3
- package/dist/{contributions-DNMqrAuw.d.cts → contributions-Vw-Hm58R.d.cts} +59 -3
- package/dist/index.cjs +110 -8
- package/dist/index.d.cts +8 -4
- package/dist/index.d.ts +8 -4
- package/dist/index.js +2 -2
- package/dist/{plugin-CN8U2__Q.d.cts → plugin-BnJgjLAy.d.cts} +2 -2
- package/dist/{plugin-WnvNNJOp.d.ts → plugin-CC7rBrOY.d.ts} +2 -2
- package/dist/plugin.cjs +28 -0
- package/dist/plugin.d.cts +3 -3
- package/dist/plugin.d.ts +3 -3
- package/dist/plugin.js +1 -1
- package/dist/providers/binance.cjs +16 -0
- package/dist/providers/binance.d.cts +4 -1
- package/dist/providers/binance.d.ts +4 -1
- package/dist/providers/binance.js +7 -0
- package/dist/providers/coinbase.cjs +16 -0
- package/dist/providers/coinbase.d.cts +4 -1
- package/dist/providers/coinbase.d.ts +4 -1
- package/dist/providers/coinbase.js +7 -0
- package/dist/providers/hyperliquid.cjs +16 -0
- package/dist/providers/hyperliquid.d.cts +4 -1
- package/dist/providers/hyperliquid.d.ts +4 -1
- package/dist/providers/hyperliquid.js +7 -0
- package/dist/{bottombar-COnL2Sk4.d.ts → statusline-CGkB2EOo.d.ts} +137 -8
- package/dist/{bottombar-DeDXbF_K.d.cts → statusline-DqzBqy42.d.cts} +137 -8
- package/dist/vela.global.js +136 -8
- package/dist/vela.global.min.js +42 -42
- package/dist/widget.cjs +667 -148
- package/dist/widget.d.cts +50 -81
- package/dist/widget.d.ts +50 -81
- package/dist/widget.js +5 -4
- package/dist/workspace.cjs +613 -150
- package/dist/workspace.d.cts +62 -9
- package/dist/workspace.d.ts +62 -9
- package/dist/workspace.js +4 -3
- package/package.json +1 -1
|
@@ -131,6 +131,16 @@ interface DataProvider {
|
|
|
131
131
|
listSymbols?(): Promise<SymbolDescriptor[]>;
|
|
132
132
|
/** Per-symbol metadata for engine `syminfo.*`. Absent ⇒ the engine synthesizes a fallback. */
|
|
133
133
|
getSymbolInfo?(ticker: string): Promise<SymbolInfo | undefined>;
|
|
134
|
+
/**
|
|
135
|
+
* The icon URL for one of THIS provider's symbols — the provider owns the knowledge
|
|
136
|
+
* of where its asset class's icons live (a crypto CDN, a self-hosted store), the
|
|
137
|
+
* shells own the rendering (round badge, colored-initials fallback). Called lazily,
|
|
138
|
+
* per RENDERED row — never per index build — so it must be cheap and synchronous.
|
|
139
|
+
* `undefined` ⇒ no icon (the initials badge shows). Absent ⇒ same. The URL must be
|
|
140
|
+
* CORS-clean (`Access-Control-Allow-Origin`) or drawing it taints the canvas and
|
|
141
|
+
* breaks the PNG export — a load error falls back to initials either way.
|
|
142
|
+
*/
|
|
143
|
+
resolveSymbolIcon?(symbol: SymbolDescriptor): string | undefined;
|
|
134
144
|
/**
|
|
135
145
|
* Open a true live stream for `ticker`/`timeframe`. Each call to `onBar` delivers
|
|
136
146
|
* the forming candle (or a freshly-closed one). Returns an unsubscribe fn. Absent
|
|
@@ -131,6 +131,16 @@ interface DataProvider {
|
|
|
131
131
|
listSymbols?(): Promise<SymbolDescriptor[]>;
|
|
132
132
|
/** Per-symbol metadata for engine `syminfo.*`. Absent ⇒ the engine synthesizes a fallback. */
|
|
133
133
|
getSymbolInfo?(ticker: string): Promise<SymbolInfo | undefined>;
|
|
134
|
+
/**
|
|
135
|
+
* The icon URL for one of THIS provider's symbols — the provider owns the knowledge
|
|
136
|
+
* of where its asset class's icons live (a crypto CDN, a self-hosted store), the
|
|
137
|
+
* shells own the rendering (round badge, colored-initials fallback). Called lazily,
|
|
138
|
+
* per RENDERED row — never per index build — so it must be cheap and synchronous.
|
|
139
|
+
* `undefined` ⇒ no icon (the initials badge shows). Absent ⇒ same. The URL must be
|
|
140
|
+
* CORS-clean (`Access-Control-Allow-Origin`) or drawing it taints the canvas and
|
|
141
|
+
* breaks the PNG export — a load error falls back to initials either way.
|
|
142
|
+
*/
|
|
143
|
+
resolveSymbolIcon?(symbol: SymbolDescriptor): string | undefined;
|
|
134
144
|
/**
|
|
135
145
|
* Open a true live stream for `ticker`/`timeframe`. Each call to `onBar` delivers
|
|
136
146
|
* the forming candle (or a freshly-closed one). Returns an unsubscribe fn. Absent
|
|
@@ -5761,6 +5761,33 @@ function rendererLayers() {
|
|
|
5761
5761
|
return [...registry2.values()];
|
|
5762
5762
|
}
|
|
5763
5763
|
|
|
5764
|
+
// src/widget/topbar-composition.ts
|
|
5765
|
+
var TOPBAR_BUILTIN_IDS = ["symbol", "timeframes", "style", "layout", "indicators", "actions", "undo-redo", "alerts", "panels", "screenshot"];
|
|
5766
|
+
var TOPBAR_DEFAULT_LEFT = ["symbol", "timeframes", "style", "layout", "indicators", "actions", "undo-redo"];
|
|
5767
|
+
var TOPBAR_DEFAULT_RIGHT = ["actions", "alerts", "panels", "screenshot"];
|
|
5768
|
+
function resolveTopbarComposition(opt) {
|
|
5769
|
+
const seen = /* @__PURE__ */ new Set();
|
|
5770
|
+
const take = (list) => {
|
|
5771
|
+
const out = [];
|
|
5772
|
+
const local = /* @__PURE__ */ new Set();
|
|
5773
|
+
for (const id of list) {
|
|
5774
|
+
if (!id || local.has(id) || id !== "actions" && seen.has(id)) continue;
|
|
5775
|
+
local.add(id);
|
|
5776
|
+
seen.add(id);
|
|
5777
|
+
out.push(id);
|
|
5778
|
+
}
|
|
5779
|
+
return out;
|
|
5780
|
+
};
|
|
5781
|
+
return { left: take(opt?.left ?? TOPBAR_DEFAULT_LEFT), right: take(opt?.right ?? TOPBAR_DEFAULT_RIGHT) };
|
|
5782
|
+
}
|
|
5783
|
+
function topbarHas(comp, id) {
|
|
5784
|
+
return comp.left.includes(id) || comp.right.includes(id);
|
|
5785
|
+
}
|
|
5786
|
+
function pinnedTopbarActionIds(comp) {
|
|
5787
|
+
const builtin = new Set(TOPBAR_BUILTIN_IDS);
|
|
5788
|
+
return [...comp.left, ...comp.right].filter((id) => !builtin.has(id));
|
|
5789
|
+
}
|
|
5790
|
+
|
|
5764
5791
|
// src/widget/contributions.ts
|
|
5765
5792
|
var registry3 = /* @__PURE__ */ new Map();
|
|
5766
5793
|
var attachments = /* @__PURE__ */ new Map();
|
|
@@ -5790,7 +5817,18 @@ function unregisterSidePanel(id) {
|
|
|
5790
5817
|
function sidePanels() {
|
|
5791
5818
|
return [...panels.values()].sort((a, b) => (a.order ?? DEFAULT_PANEL_ORDER) - (b.order ?? DEFAULT_PANEL_ORDER));
|
|
5792
5819
|
}
|
|
5820
|
+
var OVERRIDABLE_TOPBAR_IDS = ["indicators", "screenshot"];
|
|
5821
|
+
var overridableSet = new Set(OVERRIDABLE_TOPBAR_IDS);
|
|
5822
|
+
var builtinTopbarSet = new Set(TOPBAR_BUILTIN_IDS);
|
|
5823
|
+
function topbarActionOverride(id) {
|
|
5824
|
+
if (!overridableSet.has(id)) return void 0;
|
|
5825
|
+
return registry3.get(id);
|
|
5826
|
+
}
|
|
5793
5827
|
function registerWidgetAction(desc) {
|
|
5828
|
+
if (builtinTopbarSet.has(desc.id) && !overridableSet.has(desc.id)) {
|
|
5829
|
+
console.warn(`[vela] widget action "${desc.id}": this built-in topbar slot is a stateful control and cannot be overridden \u2014 ignored. Overridable slots: ${OVERRIDABLE_TOPBAR_IDS.join(", ")}.`);
|
|
5830
|
+
return () => void 0;
|
|
5831
|
+
}
|
|
5794
5832
|
registry3.set(desc.id, desc);
|
|
5795
5833
|
return () => {
|
|
5796
5834
|
if (registry3.get(desc.id) === desc) registry3.delete(desc.id);
|
|
@@ -5838,6 +5876,16 @@ function unregisterStatePersistence(key) {
|
|
|
5838
5876
|
function statePersistenceHandlers(scope) {
|
|
5839
5877
|
return [...stateHandlers.values()].filter((h) => h.scope === scope);
|
|
5840
5878
|
}
|
|
5879
|
+
var symbolRankingHook;
|
|
5880
|
+
function registerSymbolRanking(hook) {
|
|
5881
|
+
symbolRankingHook = hook;
|
|
5882
|
+
return () => {
|
|
5883
|
+
if (symbolRankingHook === hook) symbolRankingHook = void 0;
|
|
5884
|
+
};
|
|
5885
|
+
}
|
|
5886
|
+
function symbolRanking() {
|
|
5887
|
+
return symbolRankingHook;
|
|
5888
|
+
}
|
|
5841
5889
|
var defaultEngines = /* @__PURE__ */ new Map();
|
|
5842
5890
|
function registerDefaultEngine(language, make) {
|
|
5843
5891
|
defaultEngines.set(language, make);
|
|
@@ -6065,4 +6113,4 @@ var SidePanel = class {
|
|
|
6065
6113
|
}
|
|
6066
6114
|
};
|
|
6067
6115
|
|
|
6068
|
-
export { AnchoredVwap, ArrowMark, Callout, CalloutBase, Comment, DEDEKIND_CURVATURE_OPTIONS, DEFAULT_DRAWING_COLOR, DEFAULT_PANEL_MAX_WIDTH, DEFAULT_PANEL_MIN_WIDTH, DEFAULT_PANEL_ORDER, DEFAULT_PANEL_WIDTH, DIRECTION_OPTIONS, DedekindTessellation, Drawing, FibRatios, FibSpiral, FixedRangeVolumeProfile, GANN_SQUARE_ARCS, GLYPH_OPTIONS, GannSquare, GlyphStamp, LINE_STYLE_OPTIONS, MACH_NUMBER_OPTIONS, MACH_WAVE_COUNT_OPTIONS, MachFigure, MeasureBox, Note, PatternDrawing, PositionTool, PriceLabel, PriceNote, RadialFib, RegressionChannel, STAMP_SIZE_OPTIONS, SegmentDrawing, SidePanel, Signpost, TEXT_SIZE_OPTIONS, TextLabel, chartType, chartTypes, clampPanelWidth, createDrawing, deserializeDrawing, drawingTypes, foldBaseModulation, formatDuration, getDrawingType, getNativeIndicator, inputVisible, legendActions, legendActionsProviderFor, lineSegmentIntersection, nativeIndicatorDescriptors, nativeIndicatorTypes, normalizeSettingsRow, registerChartType, registerDefaultEngine, registerDrawingType, registerLegendAction, registerNativeIndicator, registerRendererDefaults, registerRendererLayer, registerSidePanel, registerStatePersistence, registerWidgetAction, registerWidgetAttachment, rendererDefaults, rendererLayers, resetDrawingSettings, resolveEngines, settingsRowValueKeys, settingsRowVisible, sidePanels, statePersistenceHandlers, tickerModifierIds, unregisterChartType, unregisterDefaultEngine, unregisterLegendAction, unregisterNativeIndicator, unregisterRendererDefaults, unregisterRendererLayer, unregisterSidePanel, unregisterStatePersistence, unregisterWidgetAction, unregisterWidgetAttachment, widgetActions, widgetAttachments };
|
|
6116
|
+
export { AnchoredVwap, ArrowMark, Callout, CalloutBase, Comment, DEDEKIND_CURVATURE_OPTIONS, DEFAULT_DRAWING_COLOR, DEFAULT_PANEL_MAX_WIDTH, DEFAULT_PANEL_MIN_WIDTH, DEFAULT_PANEL_ORDER, DEFAULT_PANEL_WIDTH, DIRECTION_OPTIONS, DedekindTessellation, Drawing, FibRatios, FibSpiral, FixedRangeVolumeProfile, GANN_SQUARE_ARCS, GLYPH_OPTIONS, GannSquare, GlyphStamp, LINE_STYLE_OPTIONS, MACH_NUMBER_OPTIONS, MACH_WAVE_COUNT_OPTIONS, MachFigure, MeasureBox, Note, OVERRIDABLE_TOPBAR_IDS, PatternDrawing, PositionTool, PriceLabel, PriceNote, RadialFib, RegressionChannel, STAMP_SIZE_OPTIONS, SegmentDrawing, SidePanel, Signpost, TEXT_SIZE_OPTIONS, TOPBAR_BUILTIN_IDS, TOPBAR_DEFAULT_LEFT, TOPBAR_DEFAULT_RIGHT, TextLabel, chartType, chartTypes, clampPanelWidth, createDrawing, deserializeDrawing, drawingTypes, foldBaseModulation, formatDuration, getDrawingType, getNativeIndicator, inputVisible, legendActions, legendActionsProviderFor, lineSegmentIntersection, nativeIndicatorDescriptors, nativeIndicatorTypes, normalizeSettingsRow, pinnedTopbarActionIds, registerChartType, registerDefaultEngine, registerDrawingType, registerLegendAction, registerNativeIndicator, registerRendererDefaults, registerRendererLayer, registerSidePanel, registerStatePersistence, registerSymbolRanking, registerWidgetAction, registerWidgetAttachment, rendererDefaults, rendererLayers, resetDrawingSettings, resolveEngines, resolveTopbarComposition, settingsRowValueKeys, settingsRowVisible, sidePanels, statePersistenceHandlers, symbolRanking, tickerModifierIds, topbarActionOverride, topbarHas, unregisterChartType, unregisterDefaultEngine, unregisterLegendAction, unregisterNativeIndicator, unregisterRendererDefaults, unregisterRendererLayer, unregisterSidePanel, unregisterStatePersistence, unregisterWidgetAction, unregisterWidgetAttachment, widgetActions, widgetAttachments };
|