@luxalgo/vela 0.6.11 → 0.6.13
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/README.md +110 -46
- package/dist/{DataProvider-BBf-jc6W.d.ts → DataProvider-DhzstpQb.d.ts} +1 -1
- package/dist/{DataProvider-p0TEyhlX.d.cts → DataProvider-DlMtrwqM.d.cts} +1 -1
- package/dist/{chunk-MTLJKZDZ.js → chunk-F4M24ANM.js} +122 -1
- package/dist/{chunk-IO3NYSQV.js → chunk-G52XAKZY.js} +184 -25
- package/dist/{chunk-73PEA4MU.js → chunk-JKGA36ZM.js} +635 -49
- package/dist/{contributions-Bbe2R-mQ.d.ts → contributions-37nni40G.d.ts} +6 -4
- package/dist/{contributions-CO01zWve.d.cts → contributions-lPojhTxI.d.cts} +6 -4
- package/dist/index.cjs +744 -37
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +2 -2
- package/dist/{options-yp7sA96q.d.cts → options-CYS5Wmlx.d.cts} +71 -2
- package/dist/{options-yp7sA96q.d.ts → options-CYS5Wmlx.d.ts} +71 -2
- package/dist/{plugin-CkkH8QnX.d.cts → plugin-Cwikpz1m.d.cts} +10 -3
- package/dist/{plugin-DwxjM3Ni.d.ts → plugin-DHyaoMjW.d.ts} +10 -3
- package/dist/plugin.cjs +110 -0
- package/dist/plugin.d.cts +4 -4
- package/dist/plugin.d.ts +4 -4
- package/dist/plugin.js +1 -1
- package/dist/providers/binance.d.cts +2 -2
- package/dist/providers/binance.d.ts +2 -2
- package/dist/providers/coinbase.d.cts +2 -2
- package/dist/providers/coinbase.d.ts +2 -2
- package/dist/providers/hyperliquid.d.cts +2 -2
- package/dist/providers/hyperliquid.d.ts +2 -2
- package/dist/{statusline-CHPDuKNp.d.ts → statusline-model-CiJm-riV.d.cts} +7 -85
- package/dist/{statusline-DTHZUFqK.d.cts → statusline-model-D-q_OOx9.d.ts} +7 -85
- package/dist/ui.d.cts +1 -1
- package/dist/ui.d.ts +1 -1
- package/dist/vela.global.js +744 -37
- package/dist/vela.global.min.js +52 -52
- package/dist/widget.cjs +927 -61
- package/dist/widget.d.cts +118 -7
- package/dist/widget.d.ts +118 -7
- package/dist/widget.js +4 -4
- package/dist/workspace.cjs +927 -61
- package/dist/workspace.d.cts +5 -5
- package/dist/workspace.d.ts +5 -5
- package/dist/workspace.js +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,56 +1,105 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
-
|
|
1
|
+
<!-- markdownlint-disable no-inline-html first-line-h1 -->
|
|
2
|
+
|
|
3
|
+
<div align="center">
|
|
4
|
+
|
|
5
|
+
<img src=".github/banner.png" alt="Vela™ — fast, extensible financial charts for the web" width="100%">
|
|
6
|
+
|
|
7
|
+
<p><strong>Fast, extensible financial charts for the web.</strong><br>
|
|
8
|
+
Headless core · native WebGL2 renderer · batteries-included workspace · plugin SDK</p>
|
|
9
|
+
|
|
10
|
+
[![npm version][npm-version-img]][npm-link]
|
|
11
|
+
[![Downloads][npm-downloads-img]][npm-link]
|
|
12
|
+
[![License][license-img]][license-link]
|
|
13
|
+
|
|
14
|
+
<p>
|
|
15
|
+
<a href="https://luxalgo.com/vela">Homepage</a> ·
|
|
16
|
+
<a href="#quick-start">Quick start</a> ·
|
|
17
|
+
<a href="docs/index.md">Documentation</a> ·
|
|
18
|
+
<a href="#extending-plugin-sdk">Plugin SDK</a> ·
|
|
19
|
+
<a href="CHANGELOG.md">Changelog</a> ·
|
|
20
|
+
<a href="#license-and-attribution">License</a>
|
|
21
|
+
</p>
|
|
22
|
+
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<!-- markdownlint-enable no-inline-html -->
|
|
26
|
+
|
|
27
|
+
Vela™ renders interactive financial charts with its own native renderer (WebGL2, with a
|
|
28
|
+
canvas2d fallback) and keeps the chart itself headless: drive it entirely from code, or
|
|
29
|
+
drop in the workspace for a complete chart app in one call. Every layer (data providers,
|
|
30
|
+
scripting engines, renderers) plugs in behind a public port and can be swapped without
|
|
31
|
+
touching the rest.
|
|
32
|
+
|
|
33
|
+
## What's in the box
|
|
34
|
+
|
|
35
|
+
- **`@luxalgo/vela`**: the headless chart. Data model, engines, drawings, providers,
|
|
36
|
+
native renderer.
|
|
37
|
+
- **`@luxalgo/vela/workspace`**: the full chart app. One chart or a grid of them under
|
|
38
|
+
one shared topbar (symbol / timeframe / style / indicators), status line, symbol
|
|
39
|
+
watermark, bottom bar (ranges, clock, timezone), object tree, keyboard-first UX
|
|
40
|
+
(type a letter for symbol search, a digit for timeframe entry, `?` for the shortcuts
|
|
41
|
+
panel), named cells, sync groups, and one persisted state document.
|
|
42
|
+
- **`@luxalgo/vela/ui`**: the component kit the app is built on. Design tokens, overlay
|
|
43
|
+
chrome ([Zag.js](https://zagjs.com) menu/dialog/drawer/tooltip), form primitives, and
|
|
44
|
+
the `KeymapManager`.
|
|
45
|
+
- **`@luxalgo/vela/plugin`**: the extension SDK. Chart types, renderer layers, native
|
|
46
|
+
indicators.
|
|
47
|
+
- **`@luxalgo/vela/providers/*`**: data providers (Binance, Coinbase, Hyperliquid),
|
|
48
|
+
ready to register. Or supply your own bars and stay fully offline.
|
|
49
|
+
|
|
50
|
+
## Installing
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
npm install @luxalgo/vela
|
|
54
|
+
```
|
|
17
55
|
|
|
18
56
|
## Quick start
|
|
19
57
|
|
|
58
|
+
The fastest path is the workspace, a complete chart app in one call:
|
|
59
|
+
|
|
20
60
|
```ts
|
|
21
|
-
import { VelaWorkspace } from 'vela/workspace';
|
|
22
|
-
import { BinanceProvider } from 'vela/providers/binance';
|
|
61
|
+
import { VelaWorkspace } from '@luxalgo/vela/workspace';
|
|
62
|
+
import { BinanceProvider } from '@luxalgo/vela/providers/binance';
|
|
23
63
|
|
|
24
64
|
const chart = new VelaWorkspace('#chart', {
|
|
25
65
|
layout: false, // one chart; '2h' | '4' | '8' | … for a multi-chart grid
|
|
26
|
-
symbol: 'BTCUSDT',
|
|
66
|
+
symbol: 'BTCUSDT',
|
|
27
67
|
timeframe: '60',
|
|
28
68
|
live: true,
|
|
29
69
|
theme: 'dark',
|
|
30
70
|
providers: { binance: () => new BinanceProvider() },
|
|
31
|
-
persist: true, // restore
|
|
32
|
-
// config, drawings and indicators — from localStorage
|
|
71
|
+
persist: true, // restore market, style, timezone, drawings and indicators from localStorage
|
|
33
72
|
});
|
|
34
73
|
```
|
|
35
74
|
|
|
36
75
|
Prefer full control? Use the headless core directly:
|
|
37
76
|
|
|
38
77
|
```ts
|
|
39
|
-
import { Vela } from 'vela';
|
|
40
|
-
import { BinanceProvider } from 'vela/providers/binance';
|
|
78
|
+
import { Vela } from '@luxalgo/vela';
|
|
79
|
+
import { BinanceProvider } from '@luxalgo/vela/providers/binance';
|
|
41
80
|
|
|
42
81
|
const chart = new Vela('#chart', { symbol: 'binance:BTCUSDT', timeframe: '60', live: true });
|
|
43
82
|
chart.data.registerProvider('binance', new BinanceProvider());
|
|
44
83
|
await chart.ready();
|
|
45
84
|
```
|
|
46
85
|
|
|
86
|
+
No provider, no network? Pass your own bars via the `data` option. See the
|
|
87
|
+
[quickstart](docs/user/quickstart.md).
|
|
88
|
+
|
|
89
|
+
### Browser bundle
|
|
90
|
+
|
|
91
|
+
The package also ships self-contained browser builds for script-tag usage:
|
|
92
|
+
`dist/vela.global.js` (readable, development) and `dist/vela.global.min.js` (minified,
|
|
93
|
+
production). Either file attaches the library's public API, including the bundled
|
|
94
|
+
providers, to `window.Vela`.
|
|
95
|
+
|
|
47
96
|
## Indicators
|
|
48
97
|
|
|
49
|
-
Vela runs indicator scripts through pluggable engines and **ships none
|
|
98
|
+
Vela™ runs indicator scripts through pluggable engines and **ships none**. Install the
|
|
50
99
|
addon for the language you want, or write one against the public `ScriptingEngine` port.
|
|
51
100
|
Pine Script lives in [`@luxalgo/vela-pinets`](https://github.com/LuxAlgo/Vela-pinets)
|
|
52
101
|
(`npm i @luxalgo/vela-pinets pinets`), which is **AGPL-3.0** because the PineTS runtime it
|
|
53
|
-
executes is
|
|
102
|
+
executes is. Vela™ itself stays Apache-2.0 and carries no Pine code:
|
|
54
103
|
|
|
55
104
|
```ts
|
|
56
105
|
import { PineEngine } from '@luxalgo/vela-pinets';
|
|
@@ -61,14 +110,14 @@ indicator("EMA 20", overlay=true)
|
|
|
61
110
|
plot(ta.ema(close, 20), color=color.orange, linewidth=2)`);
|
|
62
111
|
```
|
|
63
112
|
|
|
64
|
-
Host tooling can execute-and-inject safely
|
|
65
|
-
errors, no dead legend rows) and read a running script's state
|
|
66
|
-
value
|
|
113
|
+
Host tooling can execute-and-inject safely with `chart.runIndicator(source)` (structured
|
|
114
|
+
errors, no dead legend rows) and read a running script's state, including its **return
|
|
115
|
+
value**, via `handle.context()` (read-only snapshots, worker-safe). See the
|
|
67
116
|
[API reference](docs/user/api-reference.md#reading-a-scripts-execution-context), and
|
|
68
117
|
[Scripting engines](docs/user/scripting-engines.md) for the addon and for writing your own.
|
|
69
118
|
|
|
70
|
-
The
|
|
71
|
-
loader (`() => Promise<manifest>`):
|
|
119
|
+
The workspace takes an **indicator manifest**: inline JSON, a URL returning it, or an
|
|
120
|
+
async loader (`() => Promise<manifest>`):
|
|
72
121
|
|
|
73
122
|
```ts
|
|
74
123
|
new VelaWorkspace('#chart', {
|
|
@@ -78,16 +127,12 @@ new VelaWorkspace('#chart', {
|
|
|
78
127
|
});
|
|
79
128
|
```
|
|
80
129
|
|
|
81
|
-
## Keyboard
|
|
82
|
-
|
|
83
|
-
Type a **letter** → symbol search. Type a **digit** → timeframe entry (`15`, `4h`, `D`, `3M`…).
|
|
84
|
-
`mod+alt+S` (Ctrl+Alt+S, ⌥⌘S on macOS) → screenshot. `?` → the shortcuts panel. Bindings are declarative
|
|
85
|
-
(`chart.keymap.register({...})`) — plugins register theirs the same way.
|
|
86
|
-
|
|
87
130
|
## Extending (plugin SDK)
|
|
88
131
|
|
|
132
|
+
Custom chart types and canvas layers register through the public SDK, no fork needed:
|
|
133
|
+
|
|
89
134
|
```ts
|
|
90
|
-
import { registerChartType, registerRendererLayer } from 'vela/plugin';
|
|
135
|
+
import { registerChartType, registerRendererLayer } from '@luxalgo/vela/plugin';
|
|
91
136
|
|
|
92
137
|
// A new price style: bar transform + optional per-bar data engine + ticker modifier.
|
|
93
138
|
registerChartType({
|
|
@@ -104,13 +149,13 @@ registerRendererLayer({
|
|
|
104
149
|
});
|
|
105
150
|
```
|
|
106
151
|
|
|
107
|
-
A registered chart type automatically appears in the
|
|
108
|
-
type's `dataEngine` pushes to its layer's channel with zero extra wiring. See
|
|
152
|
+
A registered chart type automatically appears in the workspace's style dropdown, and a
|
|
153
|
+
chart type's `dataEngine` pushes to its layer's channel with zero extra wiring. See
|
|
109
154
|
[docs/contributing/plugin-sdk.md](docs/contributing/plugin-sdk.md).
|
|
110
155
|
|
|
111
156
|
## Documentation
|
|
112
157
|
|
|
113
|
-
Full documentation lives in [docs/](docs/index.md)
|
|
158
|
+
Full documentation lives in [docs/](docs/index.md): user guides ([quickstart](docs/user/quickstart.md),
|
|
114
159
|
[the workspace](docs/user/workspace.md), [options](docs/user/options.md), [API reference](docs/user/api-reference.md)),
|
|
115
160
|
[architecture](docs/architecture/overview.md), and [contributing](docs/contributing/setup.md) guides
|
|
116
161
|
including the [plugin SDK](docs/contributing/plugin-sdk.md).
|
|
@@ -124,13 +169,32 @@ npm test # vitest
|
|
|
124
169
|
npm run build # tsup → dist/
|
|
125
170
|
```
|
|
126
171
|
|
|
127
|
-
## License
|
|
172
|
+
## License and attribution
|
|
173
|
+
|
|
174
|
+
Vela™ is licensed under the **Apache License, Version 2.0** (see [LICENSE](LICENSE)).
|
|
175
|
+
The [NOTICE](NOTICE) file adds an **attribution requirement**, and redistributions must
|
|
176
|
+
include it per Apache-2.0 §4(d):
|
|
177
|
+
|
|
178
|
+
- Every chart renders a small **Vela™ attribution watermark** — the project logomark,
|
|
179
|
+
linking to the [project page][homepage] — enabled by default. You may restyle or
|
|
180
|
+
reposition it to fit your design.
|
|
181
|
+
- You may turn the watermark off (`chart.renderer.set('attribution', false)`) **only if**
|
|
182
|
+
an equivalent visible attribution is shown elsewhere on the same page or screen, where
|
|
183
|
+
your users can see it: the name "Vela™" linking to the project page.
|
|
184
|
+
- Removing, hiding, or obscuring the attribution without providing that equivalent
|
|
185
|
+
notice is not permitted.
|
|
128
186
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
(`chart.renderer.set('attribution', false)`) only if an equivalent visible attribution —
|
|
132
|
-
"Vela" linking to the project page — is shown elsewhere on the same page. This is the
|
|
133
|
-
same licensing model as other popular charting libraries.
|
|
187
|
+
This is the same licensing model used by other popular charting libraries, and we're
|
|
188
|
+
grateful when the watermark stays in a visible spot.
|
|
134
189
|
|
|
135
190
|
No scripting engine ships with this package; the Pine Script addon
|
|
136
191
|
(`@luxalgo/vela-pinets`) is AGPL-3.0 and licensed separately (see *Indicators*).
|
|
192
|
+
|
|
193
|
+
[homepage]: https://luxalgo.com/vela
|
|
194
|
+
|
|
195
|
+
[npm-version-img]: https://img.shields.io/npm/v/%40luxalgo%2Fvela.svg
|
|
196
|
+
[npm-downloads-img]: https://img.shields.io/npm/dm/%40luxalgo%2Fvela.svg
|
|
197
|
+
[npm-link]: https://www.npmjs.com/package/@luxalgo/vela
|
|
198
|
+
|
|
199
|
+
[license-img]: https://img.shields.io/badge/license-Apache--2.0-blue.svg
|
|
200
|
+
[license-link]: LICENSE
|
|
@@ -4969,6 +4969,111 @@ function roundFloat(n) {
|
|
|
4969
4969
|
return Math.round(n * 1e8) / 1e8;
|
|
4970
4970
|
}
|
|
4971
4971
|
|
|
4972
|
+
// src/core/drawings/types/Magnifier.ts
|
|
4973
|
+
var MAGNIFIER_TIMEFRAME_OPTIONS = [
|
|
4974
|
+
{ value: "auto", label: "Auto", ms: 0 },
|
|
4975
|
+
{ value: "1", label: "1m", ms: 6e4 },
|
|
4976
|
+
{ value: "5", label: "5m", ms: 3e5 },
|
|
4977
|
+
{ value: "15", label: "15m", ms: 9e5 },
|
|
4978
|
+
{ value: "30", label: "30m", ms: 18e5 },
|
|
4979
|
+
{ value: "60", label: "1h", ms: 36e5 },
|
|
4980
|
+
{ value: "240", label: "4h", ms: 144e5 },
|
|
4981
|
+
{ value: "D", label: "1D", ms: 864e5 }
|
|
4982
|
+
];
|
|
4983
|
+
function magnifierTimeframeLabel(value) {
|
|
4984
|
+
const opt = MAGNIFIER_TIMEFRAME_OPTIONS.find((o) => o.value === value);
|
|
4985
|
+
if (opt) return opt.label;
|
|
4986
|
+
const n = Number(value);
|
|
4987
|
+
if (Number.isFinite(n) && n > 0) {
|
|
4988
|
+
if (n % 1440 === 0) return `${n / 1440}D`;
|
|
4989
|
+
if (n % 60 === 0) return `${n / 60}h`;
|
|
4990
|
+
return `${n}m`;
|
|
4991
|
+
}
|
|
4992
|
+
return value;
|
|
4993
|
+
}
|
|
4994
|
+
function defaultMagnifierStyle() {
|
|
4995
|
+
return { timeframe: "auto", upColor: "", downColor: "" };
|
|
4996
|
+
}
|
|
4997
|
+
var Magnifier = class extends Drawing {
|
|
4998
|
+
constructor(init) {
|
|
4999
|
+
super(init);
|
|
5000
|
+
this.type = "magnifier";
|
|
5001
|
+
/** Pixel rect of the timeframe chip as painted last frame, caret included — the chip is
|
|
5002
|
+
* an interactive dropdown trigger, so the interaction layer needs the exact rect the
|
|
5003
|
+
* painter measured. Renderer-transient: never serialized, null while unpainted. */
|
|
5004
|
+
this.chipRect = null;
|
|
5005
|
+
if (!this.magnifier) this.magnifier = defaultMagnifierStyle();
|
|
5006
|
+
}
|
|
5007
|
+
anchorSchema() {
|
|
5008
|
+
return { min: 2, max: 2, slots: [{ role: "c1", free: "both" }, { role: "c2", free: "both" }] };
|
|
5009
|
+
}
|
|
5010
|
+
placementMode() {
|
|
5011
|
+
return "drag";
|
|
5012
|
+
}
|
|
5013
|
+
/** The pixel rectangle between the two corner anchors (painter + hit-test share it). */
|
|
5014
|
+
rect(proj) {
|
|
5015
|
+
const a = this.anchors[0];
|
|
5016
|
+
const b = this.anchors[1];
|
|
5017
|
+
if (!a || !b) return null;
|
|
5018
|
+
const ya = proj.yOf(a.price, this.paneId);
|
|
5019
|
+
const yb = proj.yOf(b.price, this.paneId);
|
|
5020
|
+
if (ya == null || yb == null) return null;
|
|
5021
|
+
return { x1: proj.xOf(a.time), y1: ya, x2: proj.xOf(b.time), y2: yb };
|
|
5022
|
+
}
|
|
5023
|
+
hitTest(px, py, proj, tol) {
|
|
5024
|
+
const r = this.rect(proj);
|
|
5025
|
+
if (!r) return false;
|
|
5026
|
+
if (pointInBox(px, py, r.x1, r.y1, r.x2, r.y2)) return true;
|
|
5027
|
+
const edges = [
|
|
5028
|
+
[r.x1, r.y1, r.x2, r.y1],
|
|
5029
|
+
[r.x2, r.y1, r.x2, r.y2],
|
|
5030
|
+
[r.x2, r.y2, r.x1, r.y2],
|
|
5031
|
+
[r.x1, r.y2, r.x1, r.y1]
|
|
5032
|
+
];
|
|
5033
|
+
return edges.some((e) => distToSegment(px, py, e[0], e[1], e[2], e[3]) <= tol);
|
|
5034
|
+
}
|
|
5035
|
+
handlePoints(proj) {
|
|
5036
|
+
const r = this.rect(proj);
|
|
5037
|
+
return r ? [[r.x1, r.y1], [r.x2, r.y2]] : [];
|
|
5038
|
+
}
|
|
5039
|
+
hitHandle(px, py, proj, tol) {
|
|
5040
|
+
return handleAt(px, py, this.handlePoints(proj), tol + 3);
|
|
5041
|
+
}
|
|
5042
|
+
bounds(proj) {
|
|
5043
|
+
const r = this.rect(proj);
|
|
5044
|
+
if (!r) return null;
|
|
5045
|
+
return { x: Math.min(r.x1, r.x2), y: Math.min(r.y1, r.y2), w: Math.abs(r.x2 - r.x1), h: Math.abs(r.y2 - r.y1) };
|
|
5046
|
+
}
|
|
5047
|
+
priceRange() {
|
|
5048
|
+
const a = this.anchors[0];
|
|
5049
|
+
const b = this.anchors[1];
|
|
5050
|
+
if (!a || !b) return null;
|
|
5051
|
+
return { min: Math.min(a.price, b.price), max: Math.max(a.price, b.price) };
|
|
5052
|
+
}
|
|
5053
|
+
schema() {
|
|
5054
|
+
return {
|
|
5055
|
+
fields: [
|
|
5056
|
+
{
|
|
5057
|
+
path: "magnifier.timeframe",
|
|
5058
|
+
label: "Timeframe",
|
|
5059
|
+
kind: "select",
|
|
5060
|
+
options: MAGNIFIER_TIMEFRAME_OPTIONS,
|
|
5061
|
+
group: "behavior"
|
|
5062
|
+
},
|
|
5063
|
+
...LINE_FIELDS.map((f) => ({ ...f, label: f.label.replace("Line", "Border") })),
|
|
5064
|
+
{ path: "magnifier.upColor", label: "Up candles", kind: "color", group: "fill" },
|
|
5065
|
+
{ path: "magnifier.downColor", label: "Down candles", kind: "color", group: "fill" }
|
|
5066
|
+
]
|
|
5067
|
+
};
|
|
5068
|
+
}
|
|
5069
|
+
writeProps() {
|
|
5070
|
+
return { ...this.magnifier };
|
|
5071
|
+
}
|
|
5072
|
+
readProps(props) {
|
|
5073
|
+
this.magnifier = { ...defaultMagnifierStyle(), ...props };
|
|
5074
|
+
}
|
|
5075
|
+
};
|
|
5076
|
+
|
|
4972
5077
|
// src/core/drawings/registry.ts
|
|
4973
5078
|
var REGISTRY2 = /* @__PURE__ */ new Map();
|
|
4974
5079
|
function registerDrawingType(meta) {
|
|
@@ -5628,6 +5733,22 @@ registerDrawingType({
|
|
|
5628
5733
|
defaultStyle: { lineColor: DEFAULT_DRAWING_COLOR, lineWidth: 1, lineStyle: "solid" },
|
|
5629
5734
|
create: (init) => new PositionTool(init)
|
|
5630
5735
|
});
|
|
5736
|
+
var MAGNIFIER_ICON = svg24(
|
|
5737
|
+
'<circle cx="10.5" cy="10.5" r="6.5"/><path d="m15.3 15.3 5.2 5.2"/><path d="M8 12.5v-3M10.5 13.5v-5.5M13 12v-2"/>'
|
|
5738
|
+
);
|
|
5739
|
+
registerDrawingType({
|
|
5740
|
+
type: "magnifier",
|
|
5741
|
+
group: "measure",
|
|
5742
|
+
label: "Magnifier",
|
|
5743
|
+
icon: MAGNIFIER_ICON,
|
|
5744
|
+
// An empty border color means the THEME's contrast ink (white on dark, black on
|
|
5745
|
+
// light), resolved at paint time so it follows theme switches; a user pick wins.
|
|
5746
|
+
defaultStyle: { lineColor: "", lineWidth: 1, lineStyle: "solid" },
|
|
5747
|
+
coversSeries: true,
|
|
5748
|
+
// the inset's backdrop must sit over the base candles it replaces
|
|
5749
|
+
placementHint: "Drag an area on the chart to view it at a lower timeframe",
|
|
5750
|
+
create: (init) => new Magnifier(init)
|
|
5751
|
+
});
|
|
5631
5752
|
var VWAP_ICON = svg24('<line x1="5" y1="3" x2="5" y2="21"/><path d="M5 16c4 0 5-9 8-9s3 5 8 3"/>');
|
|
5632
5753
|
registerDrawingType({
|
|
5633
5754
|
type: "anchoredvwap",
|
|
@@ -6168,4 +6289,4 @@ var SidePanel = class {
|
|
|
6168
6289
|
}
|
|
6169
6290
|
};
|
|
6170
6291
|
|
|
6171
|
-
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, inputDeltas, inputVisible, legendActions, legendActionsProviderFor, legendCallouts, legendCalloutsProviderFor, lineSegmentIntersection, nativeIndicatorDescriptors, nativeIndicatorTypes, normalizeSettingsRow, pinnedTopbarActionIds, registerChartType, registerDefaultEngine, registerDrawingType, registerLegendAction, registerLegendCallout, registerNativeIndicator, registerRendererDefaults, registerRendererLayer, registerSidePanel, registerStatePersistence, registerSymbolRanking, registerWidgetAction, registerWidgetAttachment, rendererDefaults, rendererLayers, resetDrawingSettings, resolveEngines, resolveTopbarComposition, settingsRowValueKeys, settingsRowVisible, sidePanels, statePersistenceHandlers, symbolRanking, tickerModifierIds, topbarActionOverride, topbarHas, unregisterChartType, unregisterDefaultEngine, unregisterLegendAction, unregisterLegendCallout, unregisterNativeIndicator, unregisterRendererDefaults, unregisterRendererLayer, unregisterSidePanel, unregisterStatePersistence, unregisterWidgetAction, unregisterWidgetAttachment, widgetActions, widgetAttachments };
|
|
6292
|
+
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, MAGNIFIER_TIMEFRAME_OPTIONS, MachFigure, Magnifier, 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, inputDeltas, inputVisible, legendActions, legendActionsProviderFor, legendCallouts, legendCalloutsProviderFor, lineSegmentIntersection, magnifierTimeframeLabel, nativeIndicatorDescriptors, nativeIndicatorTypes, normalizeSettingsRow, pinnedTopbarActionIds, registerChartType, registerDefaultEngine, registerDrawingType, registerLegendAction, registerLegendCallout, registerNativeIndicator, registerRendererDefaults, registerRendererLayer, registerSidePanel, registerStatePersistence, registerSymbolRanking, registerWidgetAction, registerWidgetAttachment, rendererDefaults, rendererLayers, resetDrawingSettings, resolveEngines, resolveTopbarComposition, settingsRowValueKeys, settingsRowVisible, sidePanels, statePersistenceHandlers, symbolRanking, tickerModifierIds, topbarActionOverride, topbarHas, unregisterChartType, unregisterDefaultEngine, unregisterLegendAction, unregisterLegendCallout, unregisterNativeIndicator, unregisterRendererDefaults, unregisterRendererLayer, unregisterSidePanel, unregisterStatePersistence, unregisterWidgetAction, unregisterWidgetAttachment, widgetActions, widgetAttachments };
|