pinets 0.9.7 → 0.9.9

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.
@@ -41,9 +41,10 @@ export declare class Context {
41
41
  warn(message: string, method?: string): void;
42
42
  lang: any;
43
43
  length: number;
44
- /** References to drawing helpers for streaming rollback */
44
+ /** References to drawing helpers for streaming rollback and plot sync */
45
45
  _drawingHelpers: {
46
46
  rollbackFromBar(barIdx: number): void;
47
+ syncToPlot?(): void;
47
48
  }[];
48
49
  pine: {
49
50
  [key: string]: any;
@@ -6,7 +6,7 @@ export declare class BoxHelper {
6
6
  constructor(context: any);
7
7
  param(source: any, index?: number, name?: string): any;
8
8
  private _ensurePlotsEntry;
9
- private _syncToPlot;
9
+ syncToPlot(): void;
10
10
  private _resolvePoint;
11
11
  private _resolve;
12
12
  /**
@@ -52,5 +52,6 @@ export declare class BoxObject {
52
52
  get_top(): number;
53
53
  get_bottom(): number;
54
54
  delete(): void;
55
+ toPlotData(): any;
55
56
  copy(): BoxObject;
56
57
  }
@@ -6,7 +6,7 @@ export declare class LabelHelper {
6
6
  constructor(context: any);
7
7
  param(source: any, index?: number, name?: string): any;
8
8
  private _ensurePlotsEntry;
9
- private _syncToPlot;
9
+ syncToPlot(): void;
10
10
  /**
11
11
  * Resolve a value that may be a Series, a bound function, or a plain scalar.
12
12
  * Pine Script variables (inputs, chart properties) can be stored as Series
@@ -6,7 +6,7 @@ export declare class LineHelper {
6
6
  constructor(context: any);
7
7
  param(source: any, index?: number, name?: string): any;
8
8
  private _ensurePlotsEntry;
9
- private _syncToPlot;
9
+ syncToPlot(): void;
10
10
  private _resolvePoint;
11
11
  /**
12
12
  * Resolve a value that may be a Series, a bound function, or a plain scalar.
@@ -6,7 +6,7 @@ export declare class LinefillHelper {
6
6
  constructor(context: any);
7
7
  param(source: any, index?: number, name?: string): any;
8
8
  private _ensurePlotsEntry;
9
- private _syncToPlot;
9
+ syncToPlot(): void;
10
10
  /**
11
11
  * Resolve a value that may be a Series, a bound function, or a plain scalar.
12
12
  */
@@ -13,4 +13,5 @@ export declare class LinefillObject {
13
13
  get_line2(): LineObject;
14
14
  set_color(color: any): void;
15
15
  delete(): void;
16
+ toPlotData(): any;
16
17
  }
@@ -1,4 +1,4 @@
1
1
  import { PineMatrixObject } from '../PineMatrixObject';
2
2
  import { Context } from '../../../Context.class';
3
3
  import { PineArrayObject } from '../../array/PineArrayObject';
4
- export declare function mult(context: Context): (id: PineMatrixObject, id2: PineMatrixObject | number | PineArrayObject) => PineMatrixObject;
4
+ export declare function mult(context: Context): (id: PineMatrixObject, id2: PineMatrixObject | number | PineArrayObject) => PineArrayObject | PineMatrixObject;
@@ -5,7 +5,7 @@ export declare class PolylineHelper {
5
5
  constructor(context: any);
6
6
  param(source: any, index?: number, name?: string): any;
7
7
  private _ensurePlotsEntry;
8
- private _syncToPlot;
8
+ syncToPlot(): void;
9
9
  /**
10
10
  * Resolve a value that may be a Series, a bound function, or a plain scalar.
11
11
  */
@@ -16,4 +16,5 @@ export declare class PolylineObject {
16
16
  _createdAtBar: number;
17
17
  constructor(points: ChartPointObject[], curved?: boolean, closed?: boolean, xloc?: string, line_color?: string, fill_color?: string, line_style?: string, line_width?: number, force_overlay?: boolean);
18
18
  delete(): void;
19
+ toPlotData(): any;
19
20
  }
@@ -5,7 +5,7 @@ export declare class TableHelper {
5
5
  constructor(context: any);
6
6
  param(source: any, index?: number, name?: string): any;
7
7
  private _ensurePlotsEntry;
8
- private _syncToPlot;
8
+ syncToPlot(): void;
9
9
  private _resolve;
10
10
  new(...args: any[]): TableObject;
11
11
  any(...args: any[]): TableObject;
@@ -30,6 +30,11 @@ export declare class TableHelper {
30
30
  set_frame_color(table_id: any, frame_color: any): void;
31
31
  set_frame_width(table_id: any, frame_width: any): void;
32
32
  get all(): TableObject[];
33
+ /**
34
+ * Remove all tables created at or after the given bar index.
35
+ * Called during streaming rollback.
36
+ */
37
+ rollbackFromBar(barIdx: number): void;
33
38
  private _setCellProp;
34
39
  private _resolveText;
35
40
  }
@@ -36,6 +36,7 @@ export declare class TableObject {
36
36
  private _helper;
37
37
  constructor(position?: string, columns?: number, rows?: number, bgcolor?: string, frame_color?: string, frame_width?: number, border_color?: string, border_width?: number, force_overlay?: boolean);
38
38
  delete(): void;
39
+ toPlotData(): any;
39
40
  setCell(column: number, row: number, props: Partial<TableCell>): void;
40
41
  getCell(column: number, row: number): TableCell | null;
41
42
  clearCell(column: number, row: number): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinets",
3
- "version": "0.9.7",
3
+ "version": "0.9.9",
4
4
  "description": "Run Pine Script anywhere. PineTS is an open-source transpiler and runtime that brings Pine Script logic to Node.js and the browser with 1:1 syntax compatibility. Reliably write, port, and run indicators or strategies on your own infrastructure.",
5
5
  "keywords": [
6
6
  "Pine Script",