@pipsend/charts 2.3.18 → 2.3.19

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * @license
3
- * Pipsend Charts v2.3.18-dev+202610170141
3
+ * Pipsend Charts v2.3.19-dev+202610211514
4
4
  * Copyright (c) 2026 Pipsend
5
5
  * Licensed under MIT License
6
6
  * Built on TradingView Lightweight Charts™ (Apache 2.0)
@@ -27557,6 +27557,13 @@ class BrushTool extends DrawingToolBase {
27557
27557
  isDrawingModeActive() {
27558
27558
  return this._private__drawingModeActive;
27559
27559
  }
27560
+ /**
27561
+ * A brush armed for its next stroke is not a drawing yet: it stays out of the
27562
+ * undo history, where restoring it would re-arm a brush the app does not hold.
27563
+ */
27564
+ isComplete() {
27565
+ return (this._private__brushOptions.points ?? []).length > 0;
27566
+ }
27560
27567
  _private__onPointerDown(event) {
27561
27568
  // A press over an existing drawing belongs to that drawing: it is how the
27562
27569
  // user grabs or selects one without putting the brush away first.
@@ -30430,7 +30437,22 @@ class DrawingToolsManager {
30430
30437
  _private__applySnapshot(snapshot) {
30431
30438
  this._private__restoring = true;
30432
30439
  try {
30433
- this.restoreAll({ chart: this._private__chart, series: this._private__series }, snapshot, true);
30440
+ // The history only holds placed drawings, so a tool still being drawn
30441
+ // stays: undoing with the brush armed must leave it armed.
30442
+ this._private__applySelection(null);
30443
+ for (const [id, tool] of Array.from(this._private__tools)) {
30444
+ if (!tool.isComplete()) {
30445
+ continue;
30446
+ }
30447
+ tool.remove();
30448
+ this._private__tools.delete(id);
30449
+ this._private__pendingToolIds.delete(id);
30450
+ }
30451
+ // Annotated, or the build renames the keys the tools read
30452
+ const context = { chart: this._private__chart, series: this._private__series };
30453
+ for (const data of snapshot) {
30454
+ this.restoreTool(context, data);
30455
+ }
30434
30456
  this._private__committed = snapshot;
30435
30457
  }
30436
30458
  finally {
@@ -31038,6 +31060,8 @@ class DrawingToolsManager {
31038
31060
  event.preventDefault();
31039
31061
  }
31040
31062
  _private__handlePointerUp(event) {
31063
+ // A brush stroke ends here, and no click follows it to run the check
31064
+ this._private__scheduleCompletionCheck();
31041
31065
  if (!this._private__isDragging || this._private__draggedToolId === null) {
31042
31066
  return;
31043
31067
  }
@@ -31210,7 +31234,7 @@ const customSeriesDefaultOptions = {
31210
31234
  * Returns the current version as a string. For example `'1.0.0'`.
31211
31235
  */
31212
31236
  function version() {
31213
- return "2.3.18-dev+202610170141";
31237
+ return "2.3.19-dev+202610211514";
31214
31238
  }
31215
31239
 
31216
31240
  export { areaSeries as AreaSeries, ArrowTool, barSeries as BarSeries, baselineSeries as BaselineSeries, BrushTool, candlestickSeries as CandlestickSeries, CircleTool, ColorType, CrossLineTool, CrosshairMode, DEFAULT_SESSIONS, DraggablePriceLine, DrawingToolsManager, EXTENDED_FIBONACCI_RATIOS, FibonacciCalculator, FibonacciExtensionTool, FibonacciFanTool, FibonacciTool, GanttTool, histogramSeries as HistogramSeries, HorizontalLineTool, InteractiveLineManager, LastPriceAnimationMode, lineSeries as LineSeries, LineStyle, LineType, MismatchDirection, ParallelChannelTool, PitchforkTool, PolygonTool, PositionCalculator, PositionLine, PositionMarkersManager, PositionTool, PriceLineSource, PriceScaleMode, RectangleTool, RulerCalculator, RulerTool, STANDARD_FIBONACCI_RATIOS, TextTool, TickMarkType, TrackingModeExitMode, TradingSessionsIndicator, TrendLineTool, VerticalLineTool, VolumeProfileIndicator, applyADX, applyATR, applyBollingerBands, applyCCI, applyDonchianChannels, applyEMA, applyHeikinAshi, applyIchimoku, applyKeltnerChannels, applyMACD, applyMFI, applyOBV, applyParabolicSAR, applyPivotPoints, applyRSI, applySMA, applyStochastic, applySuperTrend, applyVWAP, applyVolume, applyWMA, applyWilliamsR, calculateHeikinAshi, calculatePipConfig, coordinateFromTime, createArrowTool, createBrushTool, createChart, createChartEx, createCircleTool, createCrossLineTool, createFibonacciExtensionTool, createFibonacciFanTool, createFibonacciTool, createGanttTool, createHorizontalLineTool, createImageWatermark, createInteractiveLineManager, createOptionsChart, createParallelChannelTool, createPitchforkTool, createPolygonTool, createPositionLine, createPositionMarkers, createPositionTool, createRectangleTool, createRulerTool, createSeriesMarkers, createTextTool, createTextWatermark, createTimeLabels, createTradingLine, createTradingSessionsIndicator, createTrendLineTool, createUpDownMarkers, createVerticalLineTool, createVolumeProfileIndicator, createYieldCurveChart, customSeriesDefaultOptions, defaultHorzScaleBehavior, getPipConfig, hideSeriesPaint, isBusinessDay, isUTCTimestamp, setSeriesVolumes, setVolumeProfileData, timeFromCoordinate, version };