@luxalgo/vela 0.6.14 → 0.6.15

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 (49) hide show
  1. package/NOTICE +28 -28
  2. package/README.md +1 -1
  3. package/dist/{DataProvider-DhzstpQb.d.ts → DataProvider-XLdJB86x.d.ts} +1 -1
  4. package/dist/{DataProvider-DlMtrwqM.d.cts → DataProvider-xH2VBcFT.d.cts} +1 -1
  5. package/dist/{chunk-F4M24ANM.js → chunk-32A7KHFM.js} +73 -3
  6. package/dist/{chunk-KG4YT3TI.js → chunk-6DPAYEGO.js} +8 -1
  7. package/dist/{chunk-64TF7JAJ.js → chunk-7C7NWEXH.js} +345 -148
  8. package/dist/{chunk-N2Q5EEFH.js → chunk-J5QIR2Z3.js} +163 -130
  9. package/dist/{chunk-MHY7MVXH.js → chunk-MWDNPGU3.js} +7 -1
  10. package/dist/{chunk-G77Y7LK2.js → chunk-MWS4CUJL.js} +2 -2
  11. package/dist/{contributions-37nni40G.d.ts → contributions-h5BzEiV2.d.ts} +13 -2
  12. package/dist/{contributions-lPojhTxI.d.cts → contributions-x7iamlnd.d.cts} +13 -2
  13. package/dist/index.cjs +174 -127
  14. package/dist/index.d.cts +20 -12
  15. package/dist/index.d.ts +20 -12
  16. package/dist/index.js +4 -4
  17. package/dist/{options-CYS5Wmlx.d.ts → options-bdSAtp7y.d.cts} +5 -0
  18. package/dist/{options-CYS5Wmlx.d.cts → options-bdSAtp7y.d.ts} +5 -0
  19. package/dist/{plugin-Cwikpz1m.d.cts → plugin-2sJcf5mk.d.cts} +11 -8
  20. package/dist/{plugin-DHyaoMjW.d.ts → plugin-BLaNPh55.d.ts} +11 -8
  21. package/dist/plugin.cjs +8 -0
  22. package/dist/plugin.d.cts +5 -5
  23. package/dist/plugin.d.ts +5 -5
  24. package/dist/plugin.js +2 -2
  25. package/dist/providers/binance.d.cts +2 -2
  26. package/dist/providers/binance.d.ts +2 -2
  27. package/dist/providers/coinbase.d.cts +2 -2
  28. package/dist/providers/coinbase.d.ts +2 -2
  29. package/dist/providers/hyperliquid.d.cts +2 -2
  30. package/dist/providers/hyperliquid.d.ts +2 -2
  31. package/dist/{side-panel-CT9ZwIGz.d.cts → side-panel-HF0IAzwf.d.cts} +17 -0
  32. package/dist/{side-panel-CT9ZwIGz.d.ts → side-panel-HF0IAzwf.d.ts} +17 -0
  33. package/dist/{statusline-model-D-q_OOx9.d.ts → statusline-model--tH0VWCy.d.cts} +6 -4
  34. package/dist/{statusline-model-CiJm-riV.d.cts → statusline-model-CLpaO3Dl.d.ts} +6 -4
  35. package/dist/ui.cjs +12 -0
  36. package/dist/ui.d.cts +1 -1
  37. package/dist/ui.d.ts +1 -1
  38. package/dist/ui.js +3 -3
  39. package/dist/vela.global.js +174 -127
  40. package/dist/vela.global.min.js +52 -46
  41. package/dist/widget.cjs +585 -272
  42. package/dist/widget.d.cts +15 -11
  43. package/dist/widget.d.ts +15 -11
  44. package/dist/widget.js +7 -7
  45. package/dist/workspace.cjs +585 -272
  46. package/dist/workspace.d.cts +29 -10
  47. package/dist/workspace.d.ts +29 -10
  48. package/dist/workspace.js +6 -6
  49. package/package.json +1 -1
package/NOTICE CHANGED
@@ -1,28 +1,28 @@
1
- Vela
2
- Copyright (c) 2026 LuxAlgo
3
- https://luxalgo.com/vela
4
-
5
- This product includes the Vela charting library, developed by LuxAlgo.
6
-
7
- ATTRIBUTION REQUIREMENT
8
-
9
- Any product, website, or application that displays charts rendered by this
10
- software must show a visible attribution to the Vela project on every page or
11
- screen where such a chart is displayed.
12
-
13
- The library satisfies this requirement automatically: it renders an attribution
14
- mark (the project logomark linking to the Vela project page) on the chart
15
- itself, enabled by default. You may restyle or reposition this mark to fit your
16
- design.
17
-
18
- You may disable the built-in mark (renderer feature `attribution`) ONLY if you
19
- display an equivalent visible attribution — the name "Vela" together with a
20
- link to the project page above — elsewhere on the same page or screen, in a
21
- place available to your users.
22
-
23
- Removing, hiding, or obscuring the attribution without providing the
24
- equivalent notice described above is not permitted.
25
-
26
- This file constitutes the NOTICE file described in Section 4(d) of the Apache
27
- License, Version 2.0: redistributions of this software, in source or binary
28
- form, must include a readable copy of these attribution notices.
1
+ Vela
2
+ Copyright (c) 2026 LuxAlgo
3
+ https://luxalgo.com/vela
4
+
5
+ This product includes the Vela charting library, developed by LuxAlgo.
6
+
7
+ ATTRIBUTION REQUIREMENT
8
+
9
+ Any product, website, or application that displays charts rendered by this
10
+ software must show a visible attribution to the Vela project on every page or
11
+ screen where such a chart is displayed.
12
+
13
+ The library satisfies this requirement automatically: it renders an attribution
14
+ mark (the project logomark linking to the Vela project page) on the chart
15
+ itself, enabled by default. You may restyle or reposition this mark to fit your
16
+ design.
17
+
18
+ You may disable the built-in mark (renderer feature `attribution`) ONLY if you
19
+ display an equivalent visible attribution — the name "Vela" together with a
20
+ link to the project page above — elsewhere on the same page or screen, in a
21
+ place available to your users.
22
+
23
+ Removing, hiding, or obscuring the attribution without providing the
24
+ equivalent notice described above is not permitted.
25
+
26
+ This file constitutes the NOTICE file described in Section 4(d) of the Apache
27
+ License, Version 2.0: redistributions of this software, in source or binary
28
+ form, must include a readable copy of these attribution notices.
package/README.md CHANGED
@@ -105,7 +105,7 @@ executes is. Vela™ itself stays Apache-2.0 and carries no Pine code:
105
105
  import { PineEngine } from '@luxalgo/vela-pinets';
106
106
 
107
107
  chart.registerEngine('pine', new PineEngine());
108
- chart.addIndicator(`//@version=5
108
+ chart.addIndicator(`//@version=6
109
109
  indicator("EMA 20", overlay=true)
110
110
  plot(ta.ema(close, 20), color=color.orange, linewidth=2)`);
111
111
  ```
@@ -1,4 +1,4 @@
1
- import { M as MarketConfig, O as OHLCV, U as Unsubscribe } from './options-CYS5Wmlx.js';
1
+ import { M as MarketConfig, O as OHLCV, U as Unsubscribe } from './options-bdSAtp7y.js';
2
2
 
3
3
  /**
4
4
  * Symbol metadata an engine may need (e.g. Pine `syminfo.*`). Free-form beyond
@@ -1,4 +1,4 @@
1
- import { M as MarketConfig, O as OHLCV, U as Unsubscribe } from './options-CYS5Wmlx.cjs';
1
+ import { M as MarketConfig, O as OHLCV, U as Unsubscribe } from './options-bdSAtp7y.cjs';
2
2
 
3
3
  /**
4
4
  * Symbol metadata an engine may need (e.g. Pine `syminfo.*`). Free-form beyond
@@ -1,4 +1,4 @@
1
- import { svg24, NEUTRAL, BEARISH, WARNING, BULLISH, INFO, ACCENT_BRIGHT, VALID, INVALID, MARKER, ACCENT, injectStyles, iconEl } from './chunk-KG4YT3TI.js';
1
+ import { svg24, NEUTRAL, BEARISH, WARNING, BULLISH, INFO, ACCENT_BRIGHT, VALID, INVALID, MARKER, ACCENT, injectStyles, iconEl } from './chunk-6DPAYEGO.js';
2
2
 
3
3
  // src/core/native-indicators/NativeIndicator.ts
4
4
  var REGISTRY = /* @__PURE__ */ new Map();
@@ -6124,6 +6124,22 @@ var CSS = `
6124
6124
  }
6125
6125
  .vela-panel-close .vela-icon { width: 16px; height: 16px; }
6126
6126
  .vela-panel-close:hover { background: var(--vela-hover); color: var(--vela-fg-bright); }
6127
+ /* The pin: same footprint as the close button it sits beside; filled + bright once pinned. */
6128
+ .vela-panel-pin {
6129
+ all: unset;
6130
+ cursor: pointer;
6131
+ width: 26px;
6132
+ height: 26px;
6133
+ flex: none;
6134
+ display: inline-flex;
6135
+ align-items: center;
6136
+ justify-content: center;
6137
+ border-radius: 4px;
6138
+ color: var(--vela-fg-muted);
6139
+ }
6140
+ .vela-panel-pin .vela-icon { width: 15px; height: 15px; }
6141
+ .vela-panel-pin:hover { background: var(--vela-hover); color: var(--vela-fg-bright); }
6142
+ .vela-panel-pin[data-on='1'] { color: var(--vela-fg-bright); }
6127
6143
  .vela-panel-body { flex: 1; overflow: auto; padding: 8px; }
6128
6144
  .vela-panel-body::-webkit-scrollbar { width: 8px; }
6129
6145
  .vela-panel-body::-webkit-scrollbar-thumb { background: var(--vela-scroll); border-radius: 4px; border: 2px solid transparent; background-clip: padding-box; }
@@ -6148,8 +6164,23 @@ var CSS = `
6148
6164
  width: 1px;
6149
6165
  background: transparent;
6150
6166
  }
6167
+ /* The same hover ink as the workspace grid splitters and the canvas pane separators, so
6168
+ every draggable seam in the shell reads as one family. */
6151
6169
  .vela-panel-resizer:hover::after,
6152
- .vela-panel-resizer[data-dragging]::after { background: var(--vela-accent); }
6170
+ .vela-panel-resizer[data-dragging]::after { background: var(--vela-separator-hover-line); }
6171
+ /* An OVERLAY panel floats over the chart's right edge instead of taking a column: the
6172
+ chart keeps its width and layout (the dock host is position:relative \u2014 the anchoring the
6173
+ mobile rule below relies on too). Same z-order as that mobile overlay, above the chart's
6174
+ own DOM overlays; the shadow separates it from the plot it covers. */
6175
+ .vela-panel[data-overlay] {
6176
+ position: absolute;
6177
+ top: 0;
6178
+ right: 0;
6179
+ bottom: 0;
6180
+ max-width: 100%;
6181
+ z-index: 25;
6182
+ box-shadow: var(--vela-shadow);
6183
+ }
6153
6184
  /* Mobile: a 280px column would crush a phone-width chart \u2014 the panel overlays the
6154
6185
  chart area instead (its flex parent is position:relative), full-bleed, closed by
6155
6186
  the same header \u2715. Width dragging is a pointer affordance; off on mobile. */
@@ -6180,6 +6211,10 @@ var SidePanel = class {
6180
6211
  /** Notified when the USER settles a new width (drag release, or double-click reset) — never on
6181
6212
  * a programmatic {@link setWidth}, so restoring a persisted width raises no change. */
6182
6213
  this.onWidthChange = null;
6214
+ /** Notified when the USER pins or unpins a floating panel (`overlay` is the NEW placement) —
6215
+ * never on a programmatic {@link setOverlay}, for the same reason as widths. */
6216
+ this.onPlacementChange = null;
6217
+ this.pin = null;
6183
6218
  const doc = host.ownerDocument;
6184
6219
  injectStyles(STYLE_ID, CSS, doc);
6185
6220
  this.minWidth = opts.resizable ? opts.minWidth ?? DEFAULT_PANEL_MIN_WIDTH : 1;
@@ -6189,6 +6224,9 @@ var SidePanel = class {
6189
6224
  this.el = doc.createElement("div");
6190
6225
  this.el.className = `vela-panel ${modifier}`;
6191
6226
  this.el.hidden = true;
6227
+ this.floatable = opts.overlay === true;
6228
+ this.overlayOn = this.floatable;
6229
+ if (this.overlayOn) this.el.dataset.overlay = "1";
6192
6230
  this.el.style.setProperty("--vela-panel-w", `${this.widthPx}px`);
6193
6231
  const header = doc.createElement("div");
6194
6232
  header.className = "vela-panel-header";
@@ -6202,7 +6240,16 @@ var SidePanel = class {
6202
6240
  close.appendChild(iconEl("close", doc));
6203
6241
  close.title = "Close";
6204
6242
  close.addEventListener("click", () => this.toggle(false));
6205
- header.append(this.heading, this.slot, close);
6243
+ if (this.floatable) {
6244
+ this.pin = doc.createElement("button");
6245
+ this.pin.className = "vela-panel-pin";
6246
+ this.pin.addEventListener("click", () => {
6247
+ this.setOverlay(!this.overlayOn);
6248
+ this.onPlacementChange?.(this.overlayOn);
6249
+ });
6250
+ this.refreshPin();
6251
+ }
6252
+ header.append(this.heading, this.slot, ...this.pin ? [this.pin] : [], close);
6206
6253
  this.body = doc.createElement("div");
6207
6254
  this.body.className = "vela-panel-body";
6208
6255
  this.el.append(header, this.body);
@@ -6244,6 +6291,29 @@ var SidePanel = class {
6244
6291
  this.widthPx = next;
6245
6292
  this.el.style.setProperty("--vela-panel-w", `${next}px`);
6246
6293
  }
6294
+ /** Whether the panel floats over the chart right now (false for every docked panel). */
6295
+ get overlay() {
6296
+ return this.overlayOn;
6297
+ }
6298
+ /** Float or dock the panel. Only a panel declared `overlay` can float — on any other this is
6299
+ * a no-op. Silent — {@link onPlacementChange} reports the user's pin clicks only. */
6300
+ setOverlay(overlay) {
6301
+ if (!this.floatable || overlay === this.overlayOn) return;
6302
+ this.overlayOn = overlay;
6303
+ if (overlay) this.el.dataset.overlay = "1";
6304
+ else delete this.el.dataset.overlay;
6305
+ this.refreshPin();
6306
+ }
6307
+ refreshPin() {
6308
+ if (!this.pin) return;
6309
+ const pinned = !this.overlayOn;
6310
+ const doc = this.pin.ownerDocument;
6311
+ this.pin.replaceChildren(iconEl(pinned ? "pin-filled" : "pin", doc));
6312
+ this.pin.dataset.on = pinned ? "1" : "0";
6313
+ this.pin.title = pinned ? "Unpin \u2014 float over the chart" : "Pin beside the chart";
6314
+ this.pin.setAttribute("aria-label", this.pin.title);
6315
+ this.pin.setAttribute("aria-pressed", pinned ? "true" : "false");
6316
+ }
6247
6317
  destroy() {
6248
6318
  this.el.remove();
6249
6319
  }
@@ -17,6 +17,7 @@ var SERIES_LINE = "#3b82f6";
17
17
  var CROSSHAIR = "#9aa0ad";
18
18
  var SLATE_DEEP = "#1e293b";
19
19
  var SLATE = "#475569";
20
+ var CHIP_PLATE = "#595959";
20
21
  var TRADE_LONG = ACCENT;
21
22
  var TRADE_SHORT = BEARISH;
22
23
  var TRADE_EXIT = "#d500f9";
@@ -104,6 +105,10 @@ registerIcon(
104
105
  "market-post",
105
106
  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"/>')
106
107
  );
108
+ registerIcon(
109
+ "market-extended",
110
+ svg24('<path d="M22 22H2"/><path d="M12 3a5 5 0 0 0 7.5 7.5A7.5 7.5 0 1 1 12 3Z"/>')
111
+ );
107
112
  registerIcon("market-closed", svg24('<path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"/>'));
108
113
  registerIcon(
109
114
  "market-holiday",
@@ -117,6 +122,8 @@ registerIcon("chevrons-right", S('<path d="m4 3.5 4.5 4.5L4 12.5"/><path d="m8.5
117
122
  registerIcon("chevrons-left", S('<path d="M12 3.5 7.5 8l4.5 4.5"/><path d="M7.5 3.5 3 8l4.5 4.5"/>'));
118
123
  registerIcon("check", S('<path d="m2.8 8.4 3.4 3.4 7-7.6"/>'));
119
124
  registerIcon("close", S('<path d="m3.8 3.8 8.4 8.4M12.2 3.8l-8.4 8.4"/>'));
125
+ registerIcon("pin", S('<path d="M5.6 2.5h4.8M6.4 2.5v3.6L4.4 8.4v.9h7.2v-.9L9.6 6.1V2.5M8 9.3v4.2"/>'));
126
+ registerIcon("pin-filled", S('<path d="M5.6 2.5h4.8M6.4 2.5v3.6L4.4 8.4v.9h7.2v-.9L9.6 6.1V2.5M8 9.3v4.2"/><path d="M6.4 2.5h3.2v3.6l2 2.3v.9H4.4v-.9l2-2.3z" fill="currentColor" stroke="none"/>'));
120
127
  registerIcon("eye", S('<path d="M1.5 8s2.5-5.4 6.5-5.4S14.5 8 14.5 8 12 13.4 8 13.4 1.5 8 1.5 8z"/><circle cx="8" cy="8" r="1.8"/>'));
121
128
  registerIcon("eye-off", S('<path d="M1.5 8s2.5-5.4 6.5-5.4S14.5 8 14.5 8 12 13.4 8 13.4 1.5 8 1.5 8z" opacity="0.45"/><path d="m3 13 10-10"/>'));
122
129
  registerIcon("lock", S('<rect x="3.2" y="7" width="9.6" height="6.6" rx="1.2"/><path d="M5.6 7V5.2a2.4 2.4 0 0 1 4.8 0V7"/>'));
@@ -261,4 +268,4 @@ function iconEl(id, doc = document) {
261
268
  return span;
262
269
  }
263
270
 
264
- export { ACCENT, ACCENT_BRIGHT, BEARISH, BULLISH, CATEGORICAL, CROSSHAIR, FIELD_FOCUS_CSS, FIELD_FOCUS_RING, 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, icon, iconAt, iconEl, iconMarkup, injectStyles, isDarkColor, mix, overlayScrollbarCss, registerIcon, svg16, svg24, svg24Solid, withAlpha };
271
+ export { ACCENT, ACCENT_BRIGHT, BEARISH, BULLISH, CATEGORICAL, CHIP_PLATE, CROSSHAIR, FIELD_FOCUS_CSS, FIELD_FOCUS_RING, 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, icon, iconAt, iconEl, iconMarkup, injectStyles, isDarkColor, mix, overlayScrollbarCss, registerIcon, svg16, svg24, svg24Solid, withAlpha };