lightweight-charts-drawing 0.2.4 → 0.3.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,45 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.0 (02/10/2026)
4
+
5
+ ### Added
6
+
7
+ - `fibLevelAt(d, pts, cursor, w, coords)` (`src/core/scene/fib.ts`): the fib
8
+ retracement / trend-based extension level line under the cursor (within
9
+ 6 px): its index in the level list, y, x-range and level text x. For hosts
10
+ that edit a level's text on the chart. Not exported from the package entry.
11
+
12
+ ### Changed
13
+
14
+ - Anchored VWAP: an unset `fillBackground` draws the band #1 fill (TradingView
15
+ factory: on, transparency 95). Before, only `fillBackground: true` drew it.
16
+ - Triangle pattern, head and shoulders: an unset `transparency` is the factory
17
+ 85 (was 80), and transparency 100 draws no fill (was a 0.15 opacity
18
+ fallback).
19
+
20
+ ### Fixed
21
+
22
+ - `VERSION` matches the package version (it stayed at 0.2.4 in 0.2.5).
23
+
24
+ ## 0.2.5 (01/10/2026)
25
+
26
+ ### Added
27
+
28
+ - Volume profiles (fixed range, anchored): `DrawingStyle.vp`
29
+ (`VolumeProfileStyle`) with the study settings: rows layout (number of
30
+ rows / ticks per row) and row size, volume (Up/Down, Total, Delta), value
31
+ area volume, extend right (fixed range), histogram visibility, row values,
32
+ width (% of the box), placement, up / down and value area colours, VAH /
33
+ VAL / POC lines, developing POC and VA lines, histogram box colour.
34
+ Defaults: `volumeProfileDefaults(kind)`, merged settings:
35
+ `volumeProfileStyle(kind, style)`.
36
+
37
+ ### Changed
38
+
39
+ - Pitchfan: each level is drawn with its own width and line style.
40
+ - Info line: `extendLeft` / `extendRight` continue the line to the pane edges.
41
+ - Highlighter: drawn at its width (no 12 px minimum).
42
+
3
43
  ## 0.2.4 (01/10/2026)
4
44
 
5
45
  ### Added
@@ -144,7 +184,7 @@ runtime (`src/runtime`). Breaking: the 0.1 API is removed.
144
184
 
145
185
  - The volume-based tools need bars with a volume: pass them with the
146
186
  `bars` option (series data usually has none).
147
- - Checks behind this release (in `docs/port-opentrader/`): the renderers
187
+ - Checks behind this release: the renderers
148
188
  match OpenTrader's on 430 golden fixtures, the canvas renderer matches the
149
189
  SVG output on 774 fixtures (0.05 % of drawn pixels differ, text
150
190
  anti-aliasing), and all 86 tools pass a real-mouse survey (place, select,
package/dist/index.d.ts CHANGED
@@ -624,6 +624,10 @@ export declare type DrawingStyle = {
624
624
  vwapUpper?: RegressionLine[];
625
625
  vwapLower?: RegressionLine[];
626
626
  vwapPriceLabel?: boolean;
627
+ /** Fixed range / anchored volume profile settings (the reference VbP
628
+ * study: Inputs + Style tab). Unset = the kind's factory settings
629
+ * (`volumeProfileDefaults` in specs). */
630
+ vp?: VolumeProfileStyle;
627
631
  };
628
632
 
629
633
  /** Draws `items` on `ctx` (current transform = CSS pixels). */
@@ -1359,7 +1363,50 @@ declare type UnitVisibility = {
1359
1363
  to: number;
1360
1364
  };
1361
1365
 
1362
- export declare const VERSION = "0.2.4";
1366
+ export declare const VERSION = "0.3.0";
1367
+
1368
+ /** Volume profile tools: the reference VbPFixed / VbPAnchored study
1369
+ * defaults (24 rows, Up/Down, 70% value area, histogram 30% of the box,
1370
+ * POC 2 px on, VAH / VAL 2 px off, developing plots 1 px off) with the
1371
+ * dark-theme colours of its themed colour list (cold gray 200 lines and
1372
+ * values, sky blue 400 at 50 / 75 % up, berry pink 400 at 50 / 75 % down,
1373
+ * sky blue 500 developing VA, sky blue 400 at 5 % box). Fixed range draws
1374
+ * from the left edge, anchored from the right. */
1375
+ export declare function volumeProfileDefaults(kind: DrawingKind): VolumeProfileStyle;
1376
+
1377
+ /** Volume profile tool settings (reference VbPFixed / VbPAnchored study).
1378
+ * Inputs: rows layout (number of rows or ticks per row) and row size,
1379
+ * volume (Up/Down, Total, Delta), value area volume (%), extend right
1380
+ * (fixed range only). Style: the histogram (visible, values, width % of
1381
+ * the box, placement, up / down and value area up / down colours), the
1382
+ * VAH / VAL / POC lines, the developing POC and VA plots and the
1383
+ * histogram box colour. */
1384
+ export declare type VolumeProfileStyle = {
1385
+ rowsLayout: "rows" | "ticks";
1386
+ rows: number;
1387
+ volume: "upDown" | "total" | "delta";
1388
+ vaVolume: number;
1389
+ extendRight: boolean;
1390
+ visible: boolean;
1391
+ showValues: boolean;
1392
+ valuesColor: string;
1393
+ percentWidth: number;
1394
+ placement: "left" | "right";
1395
+ upColor: string;
1396
+ downColor: string;
1397
+ vaUpColor: string;
1398
+ vaDownColor: string;
1399
+ vah: RegressionLine;
1400
+ val: RegressionLine;
1401
+ poc: RegressionLine;
1402
+ developingPoc: RegressionLine;
1403
+ developingVah: RegressionLine;
1404
+ developingVal: RegressionLine;
1405
+ boxColor: string;
1406
+ };
1407
+
1408
+ /** The drawing's volume profile settings over the factory ones. */
1409
+ export declare function volumeProfileStyle(kind: DrawingKind, s: DrawingStyle): VolumeProfileStyle;
1363
1410
 
1364
1411
  declare type WithId<T> = T & {
1365
1412
  id: string;