oakscriptjs 0.24.0 → 0.25.1

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 (300) hide show
  1. package/README.md +25 -1
  2. package/bin/oakscript.mjs +10 -3
  3. package/dist/cjs/box/index.d.ts +348 -289
  4. package/dist/cjs/box/index.d.ts.map +1 -1
  5. package/dist/cjs/box/index.js.map +2 -2
  6. package/dist/cjs/check/node.d.ts.map +1 -1
  7. package/dist/cjs/check/node.js +1 -0
  8. package/dist/cjs/check/node.js.map +2 -2
  9. package/dist/cjs/check/preview.d.ts +31 -0
  10. package/dist/cjs/check/preview.d.ts.map +1 -0
  11. package/dist/cjs/check/preview.js +303 -0
  12. package/dist/cjs/check/preview.js.map +7 -0
  13. package/dist/cjs/color/index.d.ts +11 -11
  14. package/dist/cjs/color/index.js.map +1 -1
  15. package/dist/cjs/color/parse.d.ts +2 -0
  16. package/dist/cjs/color/parse.d.ts.map +1 -1
  17. package/dist/cjs/color/parse.js +6 -0
  18. package/dist/cjs/color/parse.js.map +2 -2
  19. package/dist/cjs/compare/index.d.ts +76 -12
  20. package/dist/cjs/compare/index.d.ts.map +1 -1
  21. package/dist/cjs/compare/index.js.map +2 -2
  22. package/dist/cjs/drawing/registry.d.ts +28 -5
  23. package/dist/cjs/drawing/registry.d.ts.map +1 -1
  24. package/dist/cjs/drawing/registry.js +14 -0
  25. package/dist/cjs/drawing/registry.js.map +2 -2
  26. package/dist/cjs/index.d.ts +1 -1
  27. package/dist/cjs/index.js +1 -1
  28. package/dist/cjs/index.js.map +1 -1
  29. package/dist/cjs/label/index.d.ts +265 -187
  30. package/dist/cjs/label/index.d.ts.map +1 -1
  31. package/dist/cjs/label/index.js +1 -1
  32. package/dist/cjs/label/index.js.map +2 -2
  33. package/dist/cjs/line/index.d.ts +247 -207
  34. package/dist/cjs/line/index.d.ts.map +1 -1
  35. package/dist/cjs/line/index.js.map +2 -2
  36. package/dist/cjs/linefill/index.d.ts +61 -89
  37. package/dist/cjs/linefill/index.d.ts.map +1 -1
  38. package/dist/cjs/linefill/index.js.map +2 -2
  39. package/dist/cjs/math/index.d.ts +49 -40
  40. package/dist/cjs/math/index.d.ts.map +1 -1
  41. package/dist/cjs/math/index.js.map +2 -2
  42. package/dist/cjs/polyline/index.d.ts +57 -78
  43. package/dist/cjs/polyline/index.d.ts.map +1 -1
  44. package/dist/cjs/polyline/index.js.map +2 -2
  45. package/dist/cjs/runtime/input-active.d.ts +2 -2
  46. package/dist/cjs/runtime/input-active.js.map +1 -1
  47. package/dist/cjs/runtime/series.d.ts +241 -161
  48. package/dist/cjs/runtime/series.d.ts.map +1 -1
  49. package/dist/cjs/runtime/series.js +223 -127
  50. package/dist/cjs/runtime/series.js.map +2 -2
  51. package/dist/cjs/script/api/alert.d.ts +37 -0
  52. package/dist/cjs/script/api/alert.d.ts.map +1 -0
  53. package/dist/cjs/script/api/alert.js +17 -0
  54. package/dist/cjs/script/api/alert.js.map +7 -0
  55. package/dist/cjs/script/api/calc.d.ts +232 -0
  56. package/dist/cjs/script/api/calc.d.ts.map +1 -0
  57. package/dist/cjs/script/api/calc.js +17 -0
  58. package/dist/cjs/script/api/calc.js.map +7 -0
  59. package/dist/cjs/script/api/color.d.ts +213 -0
  60. package/dist/cjs/script/api/color.d.ts.map +1 -0
  61. package/dist/cjs/script/api/color.js +17 -0
  62. package/dist/cjs/script/api/color.js.map +7 -0
  63. package/dist/cjs/script/api/context.d.ts +764 -0
  64. package/dist/cjs/script/api/context.d.ts.map +1 -0
  65. package/dist/cjs/script/api/context.js +17 -0
  66. package/dist/cjs/script/api/context.js.map +7 -0
  67. package/dist/cjs/script/api/log.d.ts +58 -0
  68. package/dist/cjs/script/api/log.d.ts.map +1 -0
  69. package/dist/cjs/script/api/log.js +17 -0
  70. package/dist/cjs/script/api/log.js.map +7 -0
  71. package/dist/cjs/script/api/strategy.d.ts +391 -0
  72. package/dist/cjs/script/api/strategy.d.ts.map +1 -0
  73. package/dist/cjs/script/api/strategy.js +17 -0
  74. package/dist/cjs/script/api/strategy.js.map +7 -0
  75. package/dist/cjs/script/api/ta.d.ts +1012 -0
  76. package/dist/cjs/script/api/ta.d.ts.map +1 -0
  77. package/dist/cjs/script/api/ta.js +17 -0
  78. package/dist/cjs/script/api/ta.js.map +7 -0
  79. package/dist/cjs/script/api/table.d.ts +479 -0
  80. package/dist/cjs/script/api/table.d.ts.map +1 -0
  81. package/dist/cjs/script/api/table.js +17 -0
  82. package/dist/cjs/script/api/table.js.map +7 -0
  83. package/dist/cjs/script/constants.d.ts +228 -83
  84. package/dist/cjs/script/constants.d.ts.map +1 -1
  85. package/dist/cjs/script/constants.js +87 -0
  86. package/dist/cjs/script/constants.js.map +2 -2
  87. package/dist/cjs/script/define.d.ts +94 -0
  88. package/dist/cjs/script/define.d.ts.map +1 -0
  89. package/dist/cjs/script/define.js +127 -0
  90. package/dist/cjs/script/define.js.map +7 -0
  91. package/dist/cjs/script/drawing-args.d.ts.map +1 -1
  92. package/dist/cjs/script/drawing-args.js +1 -1
  93. package/dist/cjs/script/drawing-args.js.map +2 -2
  94. package/dist/cjs/script/formula.d.ts +53 -0
  95. package/dist/cjs/script/formula.d.ts.map +1 -0
  96. package/dist/cjs/script/formula.js +402 -0
  97. package/dist/cjs/script/formula.js.map +7 -0
  98. package/dist/cjs/script/globals.d.ts +10 -0
  99. package/dist/cjs/script/globals.d.ts.map +1 -1
  100. package/dist/cjs/script/globals.js.map +1 -1
  101. package/dist/cjs/script/index.d.ts +1067 -1006
  102. package/dist/cjs/script/index.d.ts.map +1 -1
  103. package/dist/cjs/script/index.js +530 -60
  104. package/dist/cjs/script/index.js.map +3 -3
  105. package/dist/cjs/script/json.d.ts +117 -0
  106. package/dist/cjs/script/json.d.ts.map +1 -0
  107. package/dist/cjs/script/json.js +321 -0
  108. package/dist/cjs/script/json.js.map +7 -0
  109. package/dist/cjs/str/index.d.ts +50 -75
  110. package/dist/cjs/str/index.d.ts.map +1 -1
  111. package/dist/cjs/str/index.js +2 -2
  112. package/dist/cjs/str/index.js.map +2 -2
  113. package/dist/cjs/strategy/index.d.ts +102 -1
  114. package/dist/cjs/strategy/index.d.ts.map +1 -1
  115. package/dist/cjs/strategy/index.js.map +2 -2
  116. package/dist/cjs/table/index.d.ts +330 -49
  117. package/dist/cjs/table/index.d.ts.map +1 -1
  118. package/dist/cjs/table/index.js +55 -27
  119. package/dist/cjs/table/index.js.map +2 -2
  120. package/dist/cjs/text/index.d.ts +12 -14
  121. package/dist/cjs/text/index.d.ts.map +1 -1
  122. package/dist/cjs/text/index.js.map +2 -2
  123. package/dist/cjs/types/index.d.ts +15 -8
  124. package/dist/cjs/types/index.d.ts.map +1 -1
  125. package/dist/cjs/types/index.js +12 -3
  126. package/dist/cjs/types/index.js.map +2 -2
  127. package/dist/esm/box/index.d.ts +348 -289
  128. package/dist/esm/box/index.d.ts.map +1 -1
  129. package/dist/esm/box/index.js +276 -276
  130. package/dist/esm/box/index.js.map +1 -1
  131. package/dist/esm/check/node.d.ts.map +1 -1
  132. package/dist/esm/check/node.js +1 -0
  133. package/dist/esm/check/node.js.map +1 -1
  134. package/dist/esm/check/preview.d.ts +31 -0
  135. package/dist/esm/check/preview.d.ts.map +1 -0
  136. package/dist/esm/check/preview.js +296 -0
  137. package/dist/esm/check/preview.js.map +1 -0
  138. package/dist/esm/color/index.d.ts +11 -11
  139. package/dist/esm/color/index.js +11 -11
  140. package/dist/esm/color/parse.d.ts +2 -0
  141. package/dist/esm/color/parse.d.ts.map +1 -1
  142. package/dist/esm/color/parse.js +7 -0
  143. package/dist/esm/color/parse.js.map +1 -1
  144. package/dist/esm/compare/index.d.ts +76 -12
  145. package/dist/esm/compare/index.d.ts.map +1 -1
  146. package/dist/esm/compare/index.js +76 -12
  147. package/dist/esm/compare/index.js.map +1 -1
  148. package/dist/esm/drawing/registry.d.ts +28 -5
  149. package/dist/esm/drawing/registry.d.ts.map +1 -1
  150. package/dist/esm/drawing/registry.js +39 -3
  151. package/dist/esm/drawing/registry.js.map +1 -1
  152. package/dist/esm/index.d.ts +1 -1
  153. package/dist/esm/index.js +1 -1
  154. package/dist/esm/label/index.d.ts +265 -187
  155. package/dist/esm/label/index.d.ts.map +1 -1
  156. package/dist/esm/label/index.js +207 -177
  157. package/dist/esm/label/index.js.map +1 -1
  158. package/dist/esm/line/index.d.ts +247 -207
  159. package/dist/esm/line/index.d.ts.map +1 -1
  160. package/dist/esm/line/index.js +202 -194
  161. package/dist/esm/line/index.js.map +1 -1
  162. package/dist/esm/linefill/index.d.ts +61 -89
  163. package/dist/esm/linefill/index.d.ts.map +1 -1
  164. package/dist/esm/linefill/index.js +61 -89
  165. package/dist/esm/linefill/index.js.map +1 -1
  166. package/dist/esm/math/index.d.ts +49 -40
  167. package/dist/esm/math/index.d.ts.map +1 -1
  168. package/dist/esm/math/index.js +22 -9
  169. package/dist/esm/math/index.js.map +1 -1
  170. package/dist/esm/polyline/index.d.ts +57 -78
  171. package/dist/esm/polyline/index.d.ts.map +1 -1
  172. package/dist/esm/polyline/index.js +57 -78
  173. package/dist/esm/polyline/index.js.map +1 -1
  174. package/dist/esm/runtime/input-active.d.ts +2 -2
  175. package/dist/esm/runtime/input-active.js +2 -2
  176. package/dist/esm/runtime/series.d.ts +241 -161
  177. package/dist/esm/runtime/series.d.ts.map +1 -1
  178. package/dist/esm/runtime/series.js +241 -161
  179. package/dist/esm/runtime/series.js.map +1 -1
  180. package/dist/esm/script/api/alert.d.ts +37 -0
  181. package/dist/esm/script/api/alert.d.ts.map +1 -0
  182. package/dist/esm/script/api/alert.js +7 -0
  183. package/dist/esm/script/api/alert.js.map +1 -0
  184. package/dist/esm/script/api/calc.d.ts +232 -0
  185. package/dist/esm/script/api/calc.d.ts.map +1 -0
  186. package/dist/esm/script/api/calc.js +6 -0
  187. package/dist/esm/script/api/calc.js.map +1 -0
  188. package/dist/esm/script/api/color.d.ts +213 -0
  189. package/dist/esm/script/api/color.d.ts.map +1 -0
  190. package/dist/esm/script/api/color.js +6 -0
  191. package/dist/esm/script/api/color.js.map +1 -0
  192. package/dist/esm/script/api/context.d.ts +764 -0
  193. package/dist/esm/script/api/context.d.ts.map +1 -0
  194. package/dist/esm/script/api/context.js +7 -0
  195. package/dist/esm/script/api/context.js.map +1 -0
  196. package/dist/esm/script/api/log.d.ts +58 -0
  197. package/dist/esm/script/api/log.d.ts.map +1 -0
  198. package/dist/esm/script/api/log.js +6 -0
  199. package/dist/esm/script/api/log.js.map +1 -0
  200. package/dist/esm/script/api/strategy.d.ts +391 -0
  201. package/dist/esm/script/api/strategy.d.ts.map +1 -0
  202. package/dist/esm/script/api/strategy.js +7 -0
  203. package/dist/esm/script/api/strategy.js.map +1 -0
  204. package/dist/esm/script/api/ta.d.ts +1012 -0
  205. package/dist/esm/script/api/ta.d.ts.map +1 -0
  206. package/dist/esm/script/api/ta.js +6 -0
  207. package/dist/esm/script/api/ta.js.map +1 -0
  208. package/dist/esm/script/api/table.d.ts +479 -0
  209. package/dist/esm/script/api/table.d.ts.map +1 -0
  210. package/dist/esm/script/api/table.js +7 -0
  211. package/dist/esm/script/api/table.js.map +1 -0
  212. package/dist/esm/script/constants.d.ts +228 -83
  213. package/dist/esm/script/constants.d.ts.map +1 -1
  214. package/dist/esm/script/constants.js +110 -24
  215. package/dist/esm/script/constants.js.map +1 -1
  216. package/dist/esm/script/define.d.ts +94 -0
  217. package/dist/esm/script/define.d.ts.map +1 -0
  218. package/dist/esm/script/define.js +136 -0
  219. package/dist/esm/script/define.js.map +1 -0
  220. package/dist/esm/script/drawing-args.d.ts.map +1 -1
  221. package/dist/esm/script/drawing-args.js +2 -1
  222. package/dist/esm/script/drawing-args.js.map +1 -1
  223. package/dist/esm/script/formula.d.ts +53 -0
  224. package/dist/esm/script/formula.d.ts.map +1 -0
  225. package/dist/esm/script/formula.js +408 -0
  226. package/dist/esm/script/formula.js.map +1 -0
  227. package/dist/esm/script/globals.d.ts +10 -0
  228. package/dist/esm/script/globals.d.ts.map +1 -1
  229. package/dist/esm/script/globals.js.map +1 -1
  230. package/dist/esm/script/index.d.ts +1067 -1006
  231. package/dist/esm/script/index.d.ts.map +1 -1
  232. package/dist/esm/script/index.js +1096 -151
  233. package/dist/esm/script/index.js.map +1 -1
  234. package/dist/esm/script/json.d.ts +117 -0
  235. package/dist/esm/script/json.d.ts.map +1 -0
  236. package/dist/esm/script/json.js +375 -0
  237. package/dist/esm/script/json.js.map +1 -0
  238. package/dist/esm/str/index.d.ts +50 -75
  239. package/dist/esm/str/index.d.ts.map +1 -1
  240. package/dist/esm/str/index.js +51 -76
  241. package/dist/esm/str/index.js.map +1 -1
  242. package/dist/esm/strategy/index.d.ts +102 -1
  243. package/dist/esm/strategy/index.d.ts.map +1 -1
  244. package/dist/esm/strategy/index.js +1 -1
  245. package/dist/esm/strategy/index.js.map +1 -1
  246. package/dist/esm/table/index.d.ts +330 -49
  247. package/dist/esm/table/index.d.ts.map +1 -1
  248. package/dist/esm/table/index.js +372 -61
  249. package/dist/esm/table/index.js.map +1 -1
  250. package/dist/esm/text/index.d.ts +12 -14
  251. package/dist/esm/text/index.d.ts.map +1 -1
  252. package/dist/esm/text/index.js +12 -14
  253. package/dist/esm/text/index.js.map +1 -1
  254. package/dist/esm/types/index.d.ts +15 -8
  255. package/dist/esm/types/index.d.ts.map +1 -1
  256. package/dist/esm/types/index.js +15 -8
  257. package/dist/esm/types/index.js.map +1 -1
  258. package/docs/first-indicator.md +152 -0
  259. package/docs/guide.md +1185 -0
  260. package/docs/inventory.md +772 -0
  261. package/docs/no-code.md +207 -0
  262. package/docs/recipes.md +202 -0
  263. package/package.json +2 -1
  264. package/skills/oakscript/SKILL.md +8 -0
  265. package/skills/oakscript/reference/errors.md +3 -2
  266. package/src/box/index.ts +348 -289
  267. package/src/check/node.ts +1 -0
  268. package/src/check/preview.ts +307 -0
  269. package/src/color/index.ts +11 -11
  270. package/src/color/parse.ts +7 -0
  271. package/src/compare/index.ts +76 -12
  272. package/src/drawing/registry.ts +44 -5
  273. package/src/index.ts +1 -1
  274. package/src/label/index.ts +267 -189
  275. package/src/line/index.ts +248 -208
  276. package/src/linefill/index.ts +61 -89
  277. package/src/math/index.ts +51 -42
  278. package/src/polyline/index.ts +57 -78
  279. package/src/runtime/input-active.ts +2 -2
  280. package/src/runtime/series.ts +243 -163
  281. package/src/script/api/alert.ts +43 -0
  282. package/src/script/api/calc.ts +250 -0
  283. package/src/script/api/color.ts +245 -0
  284. package/src/script/api/context.ts +944 -0
  285. package/src/script/api/log.ts +60 -0
  286. package/src/script/api/strategy.ts +410 -0
  287. package/src/script/api/ta.ts +1115 -0
  288. package/src/script/api/table.ts +538 -0
  289. package/src/script/constants.ts +229 -25
  290. package/src/script/define.ts +221 -0
  291. package/src/script/drawing-args.ts +2 -1
  292. package/src/script/formula.ts +438 -0
  293. package/src/script/globals.ts +10 -0
  294. package/src/script/index.ts +1519 -239
  295. package/src/script/json.ts +457 -0
  296. package/src/str/index.ts +51 -76
  297. package/src/strategy/index.ts +102 -1
  298. package/src/table/index.ts +388 -62
  299. package/src/text/index.ts +12 -14
  300. package/src/types/index.ts +15 -8
@@ -27,13 +27,28 @@ function freePosition(position, force_overlay, keep) {
27
27
  }
28
28
  }
29
29
  /**
30
- * Creates a new table (PineScript `table.new`). A live table at the same position with the same `force_overlay` is
31
- * deleted, as PineScript keeps one table per position and pane (#176, #182).
32
- *
30
+ * Creates a table fixed at a place of the pane (it does not scroll with the bars) and returns its handle; fill its
31
+ * cells with `table.cell()`. A pane holds one table per position: a live table at the same position (with the same
32
+ * `force_overlay`) is deleted. The arguments after `rows` can also be given by name in an object.
33
+ * @param position - Where the table sits: `position.top_left`, `position.top_center`, `position.top_right`,
34
+ * `position.middle_left`, `position.middle_center`, `position.middle_right`, `position.bottom_left`,
35
+ * `position.bottom_center` or `position.bottom_right`.
36
+ * @param columns - Number of columns.
37
+ * @param rows - Number of rows.
38
+ * @param bgcolor - Background colour of the whole table. Default: none (transparent).
39
+ * @param frame_color - Colour of the outer frame. Default: none.
40
+ * @param frame_width - Width of the outer frame in pixels. Default: 0 (no frame).
41
+ * @param border_color - Colour of the lines between the cells. Default: none.
42
+ * @param border_width - Width of the lines between the cells in pixels. Default: 0 (no lines).
43
+ * @param force_overlay - When true, the table is drawn on the price pane even if the script has its own pane.
44
+ * Default: false.
45
+ * @returns The new table.
33
46
  * @example
34
- * ```typescript
35
- * const t = table.new(position.top_right, 2, 3, '#131722', '#787B86', 1);
36
- * table.cell(t, 0, 0, 'RSI', 0, 0, '#FFFFFF');
47
+ * ```js
48
+ * const t = table.new(position.top_right, 2, 1, { bgcolor: color.new(color.black, 20), border_width: 1 });
49
+ * eachBar((c) => {
50
+ * if (c.i === c.n - 1) table.cell(t, 0, 0, "Close", { text_color: color.white });
51
+ * });
37
52
  * ```
38
53
  */
39
54
  export function new_table(position, columns, rows, bgcolor, frame_color, frame_width, border_color, border_width, force_overlay) {
@@ -68,7 +83,34 @@ function cellOf(caller, id, column, row) {
68
83
  return cell;
69
84
  }
70
85
  /**
71
- * Defines a cell (PineScript `table.cell`): its text and properties. Omitted properties get their default.
86
+ * Writes a cell of a table: its text and look. The properties not given get their default, so calling it again
87
+ * replaces the whole cell; use `table.cell_set_*()` to change one property. A column or row outside the table is an
88
+ * error; on a deleted table it does nothing. The arguments after `row` can also be given by name in an object.
89
+ * @param table_id - The table (from `table.new()`).
90
+ * @param column - Column of the cell, from 0 (left).
91
+ * @param row - Row of the cell, from 0 (top).
92
+ * @param text - Text of the cell; `\n` starts a new line. Default: "".
93
+ * @param width - Width of the cell in percent of the pane's width; 0 fits the text. Default: 0.
94
+ * @param height - Height of the cell in percent of the pane's height; 0 fits the text. Default: 0.
95
+ * @param text_color - Text colour. Default: dark gray (#363A45).
96
+ * @param text_halign - Horizontal alignment of the text: `text.align_left`, `text.align_center` or
97
+ * `text.align_right`. Default: `text.align_center`.
98
+ * @param text_valign - Vertical alignment of the text: `text.align_top`, `text.align_center` or
99
+ * `text.align_bottom`. Default: `text.align_center`.
100
+ * @param text_size - `size.tiny`, `size.small`, `size.normal`, `size.large`, `size.huge`, `size.auto`, or a size in
101
+ * points. Default: `size.auto`.
102
+ * @param bgcolor - Background colour of the cell. Default: none (the table's background shows).
103
+ * @param tooltip - Text shown when the pointer is over the cell. Default: none.
104
+ * @param text_font_family - `font.family_default` or `font.family_monospace`. Default: `font.family_default`.
105
+ * @param text_formatting - `text.format_bold`, `text.format_italic`, their sum, or `text.format_none`.
106
+ * Default: `text.format_none`.
107
+ * @example
108
+ * ```js
109
+ * const t = table.new(position.bottom_right, 2, 1);
110
+ * eachBar((c) => {
111
+ * if (c.i === c.n - 1) table.cell(t, 1, 0, str.tostring(c.close, "#.##"), { bgcolor: color.teal, text_color: color.white });
112
+ * });
113
+ * ```
72
114
  */
73
115
  export function cell(table_id, column, row, text, width, height, text_color, text_halign, text_valign, text_size, bgcolor, tooltip, text_font_family, text_formatting) {
74
116
  if (isDeleted(table_id))
@@ -88,38 +130,208 @@ export function cell(table_id, column, row, text, width, height, text_color, tex
88
130
  text_formatting,
89
131
  });
90
132
  }
91
- function setCell(name, field) {
92
- return (table_id, column, row, value) => {
93
- if (isDeleted(table_id))
94
- return;
95
- cellOf(`table.${name}()`, table_id, column, row)[field] = value;
96
- };
97
- }
98
- /** Sets the text of a cell. */
99
- export const cell_set_text = setCell('cell_set_text', 'text');
100
- /** Sets the width of a cell (% of the chart width; 0 fits the text). */
101
- export const cell_set_width = setCell('cell_set_width', 'width');
102
- /** Sets the height of a cell (% of the chart height; 0 fits the text). */
103
- export const cell_set_height = setCell('cell_set_height', 'height');
104
- /** Sets the text colour of a cell. */
105
- export const cell_set_text_color = setCell('cell_set_text_color', 'text_color');
106
- /** Sets the horizontal text alignment of a cell. */
107
- export const cell_set_text_halign = setCell('cell_set_text_halign', 'text_halign');
108
- /** Sets the vertical text alignment of a cell. */
109
- export const cell_set_text_valign = setCell('cell_set_text_valign', 'text_valign');
110
- /** Sets the text size of a cell. */
111
- export const cell_set_text_size = setCell('cell_set_text_size', 'text_size');
112
- /** Sets the background colour of a cell. */
113
- export const cell_set_bgcolor = setCell('cell_set_bgcolor', 'bgcolor');
114
- /** Sets the tooltip of a cell. */
115
- export const cell_set_tooltip = setCell('cell_set_tooltip', 'tooltip');
116
- /** Sets the font family of a cell. */
117
- export const cell_set_text_font_family = setCell('cell_set_text_font_family', 'text_font_family');
118
- /** Sets the text formatting of a cell (`text.format_*` flags). */
119
- export const cell_set_text_formatting = setCell('cell_set_text_formatting', 'text_formatting');
120
- /**
121
- * Merges the cells from start_column / start_row to end_column / end_row (PineScript `table.merge_cells`). The
122
- * merged cell shows the content of the start cell.
133
+ /** Sets one property of a cell (the cell is created when it was not defined); nothing on a deleted table. */
134
+ function setCell(name, field, table_id, column, row, value) {
135
+ if (isDeleted(table_id))
136
+ return;
137
+ cellOf(`table.${name}()`, table_id, column, row)[field] = value;
138
+ }
139
+ /**
140
+ * Changes the text of a cell and keeps its other properties. A cell that was not written yet is created.
141
+ * A column or row outside the table is an error; on a deleted table it does nothing.
142
+ * @param table_id - The table.
143
+ * @param column - Column of the cell, from 0.
144
+ * @param row - Row of the cell, from 0.
145
+ * @param value - New text; `\n` starts a new line.
146
+ * @example
147
+ * ```js
148
+ * const t = table.new(position.top_right, 1, 1);
149
+ * eachBar((c) => {
150
+ * if (c.i === c.n - 1) table.cell_set_text(t, 0, 0, "Close " + str.tostring(c.close, "#.##"));
151
+ * });
152
+ * ```
153
+ */
154
+ export function cell_set_text(table_id, column, row, value) {
155
+ setCell('cell_set_text', 'text', table_id, column, row, value);
156
+ }
157
+ /**
158
+ * Changes the width of a cell. A cell that was not written yet is created.
159
+ * @param table_id - The table.
160
+ * @param column - Column of the cell, from 0.
161
+ * @param row - Row of the cell, from 0.
162
+ * @param value - Width in percent of the pane's width; 0 fits the text.
163
+ * @example
164
+ * ```js
165
+ * const t = table.new(position.top_right, 1, 1);
166
+ * table.cell(t, 0, 0, "Trend");
167
+ * table.cell_set_width(t, 0, 0, 10);
168
+ * ```
169
+ */
170
+ export function cell_set_width(table_id, column, row, value) {
171
+ setCell('cell_set_width', 'width', table_id, column, row, value);
172
+ }
173
+ /**
174
+ * Changes the height of a cell. A cell that was not written yet is created.
175
+ * @param table_id - The table.
176
+ * @param column - Column of the cell, from 0.
177
+ * @param row - Row of the cell, from 0.
178
+ * @param value - Height in percent of the pane's height; 0 fits the text.
179
+ * @example
180
+ * ```js
181
+ * const t = table.new(position.top_right, 1, 1);
182
+ * table.cell(t, 0, 0, "Trend");
183
+ * table.cell_set_height(t, 0, 0, 5);
184
+ * ```
185
+ */
186
+ export function cell_set_height(table_id, column, row, value) {
187
+ setCell('cell_set_height', 'height', table_id, column, row, value);
188
+ }
189
+ /**
190
+ * Changes the text colour of a cell. A cell that was not written yet is created.
191
+ * @param table_id - The table.
192
+ * @param column - Column of the cell, from 0.
193
+ * @param row - Row of the cell, from 0.
194
+ * @param value - New text colour (`color.red`, `"#FF0000"`...).
195
+ * @example
196
+ * ```js
197
+ * const t = table.new(position.top_right, 1, 1);
198
+ * eachBar((c) => {
199
+ * if (c.i === c.n - 1) table.cell_set_text_color(t, 0, 0, c.close > c.open ? color.green : color.red);
200
+ * });
201
+ * ```
202
+ */
203
+ export function cell_set_text_color(table_id, column, row, value) {
204
+ setCell('cell_set_text_color', 'text_color', table_id, column, row, value);
205
+ }
206
+ /**
207
+ * Changes the horizontal alignment of the text of a cell. A cell that was not written yet is created.
208
+ * @param table_id - The table.
209
+ * @param column - Column of the cell, from 0.
210
+ * @param row - Row of the cell, from 0.
211
+ * @param value - `text.align_left`, `text.align_center` or `text.align_right`.
212
+ * @example
213
+ * ```js
214
+ * const t = table.new(position.top_right, 1, 1);
215
+ * table.cell(t, 0, 0, "Volume", { width: 15 });
216
+ * table.cell_set_text_halign(t, 0, 0, text.align_left);
217
+ * ```
218
+ */
219
+ export function cell_set_text_halign(table_id, column, row, value) {
220
+ setCell('cell_set_text_halign', 'text_halign', table_id, column, row, value);
221
+ }
222
+ /**
223
+ * Changes the vertical alignment of the text of a cell. A cell that was not written yet is created.
224
+ * @param table_id - The table.
225
+ * @param column - Column of the cell, from 0.
226
+ * @param row - Row of the cell, from 0.
227
+ * @param value - `text.align_top`, `text.align_center` or `text.align_bottom`.
228
+ * @example
229
+ * ```js
230
+ * const t = table.new(position.top_right, 1, 1);
231
+ * table.cell(t, 0, 0, "Volume", { height: 8 });
232
+ * table.cell_set_text_valign(t, 0, 0, text.align_bottom);
233
+ * ```
234
+ */
235
+ export function cell_set_text_valign(table_id, column, row, value) {
236
+ setCell('cell_set_text_valign', 'text_valign', table_id, column, row, value);
237
+ }
238
+ /**
239
+ * Changes the text size of a cell. A cell that was not written yet is created.
240
+ * @param table_id - The table.
241
+ * @param column - Column of the cell, from 0.
242
+ * @param row - Row of the cell, from 0.
243
+ * @param value - `size.tiny`, `size.small`, `size.normal`, `size.large`, `size.huge`, `size.auto`, or a size in points.
244
+ * @example
245
+ * ```js
246
+ * const t = table.new(position.top_right, 1, 1);
247
+ * table.cell(t, 0, 0, "Signal");
248
+ * table.cell_set_text_size(t, 0, 0, size.large);
249
+ * ```
250
+ */
251
+ export function cell_set_text_size(table_id, column, row, value) {
252
+ setCell('cell_set_text_size', 'text_size', table_id, column, row, value);
253
+ }
254
+ /**
255
+ * Changes the background colour of a cell. A cell that was not written yet is created.
256
+ * @param table_id - The table.
257
+ * @param column - Column of the cell, from 0.
258
+ * @param row - Row of the cell, from 0.
259
+ * @param value - New background colour.
260
+ * @example
261
+ * ```js
262
+ * const t = table.new(position.top_right, 1, 1);
263
+ * eachBar((c) => {
264
+ * if (c.i === c.n - 1) table.cell_set_bgcolor(t, 0, 0, c.close > c.open ? color.teal : color.maroon);
265
+ * });
266
+ * ```
267
+ */
268
+ export function cell_set_bgcolor(table_id, column, row, value) {
269
+ setCell('cell_set_bgcolor', 'bgcolor', table_id, column, row, value);
270
+ }
271
+ /**
272
+ * Changes the tooltip of a cell: the text shown when the pointer is over it. A cell that was not written yet is
273
+ * created.
274
+ * @param table_id - The table.
275
+ * @param column - Column of the cell, from 0.
276
+ * @param row - Row of the cell, from 0.
277
+ * @param value - Tooltip text.
278
+ * @example
279
+ * ```js
280
+ * const t = table.new(position.top_right, 1, 1);
281
+ * table.cell(t, 0, 0, "ATR");
282
+ * table.cell_set_tooltip(t, 0, 0, "Average true range over 14 bars");
283
+ * ```
284
+ */
285
+ export function cell_set_tooltip(table_id, column, row, value) {
286
+ setCell('cell_set_tooltip', 'tooltip', table_id, column, row, value);
287
+ }
288
+ /**
289
+ * Changes the font of a cell's text. A cell that was not written yet is created.
290
+ * @param table_id - The table.
291
+ * @param column - Column of the cell, from 0.
292
+ * @param row - Row of the cell, from 0.
293
+ * @param value - `font.family_default` or `font.family_monospace`.
294
+ * @example
295
+ * ```js
296
+ * const t = table.new(position.top_right, 1, 1);
297
+ * table.cell(t, 0, 0, "123.45");
298
+ * table.cell_set_text_font_family(t, 0, 0, font.family_monospace);
299
+ * ```
300
+ */
301
+ export function cell_set_text_font_family(table_id, column, row, value) {
302
+ setCell('cell_set_text_font_family', 'text_font_family', table_id, column, row, value);
303
+ }
304
+ /**
305
+ * Makes a cell's text bold, italic, both or plain. A cell that was not written yet is created.
306
+ * @param table_id - The table.
307
+ * @param column - Column of the cell, from 0.
308
+ * @param row - Row of the cell, from 0.
309
+ * @param value - `text.format_bold`, `text.format_italic`, their sum, or `text.format_none`.
310
+ * @example
311
+ * ```js
312
+ * const t = table.new(position.top_right, 1, 1);
313
+ * table.cell(t, 0, 0, "Summary");
314
+ * table.cell_set_text_formatting(t, 0, 0, text.format_bold + text.format_italic);
315
+ * ```
316
+ */
317
+ export function cell_set_text_formatting(table_id, column, row, value) {
318
+ setCell('cell_set_text_formatting', 'text_formatting', table_id, column, row, value);
319
+ }
320
+ /**
321
+ * Joins a block of cells into one cell, for a title over several columns for example. The merged cell shows the
322
+ * content and look of its start (top-left) cell. Merging the same block again does nothing. A cell outside the table,
323
+ * or an end before the start, is an error; on a deleted table it does nothing.
324
+ * @param table_id - The table.
325
+ * @param start_column - Column of the top-left cell of the block, from 0.
326
+ * @param start_row - Row of the top-left cell of the block, from 0.
327
+ * @param end_column - Column of the bottom-right cell of the block (not before `start_column`).
328
+ * @param end_row - Row of the bottom-right cell of the block (not before `start_row`).
329
+ * @example
330
+ * ```js
331
+ * const t = table.new(position.top_right, 2, 2);
332
+ * table.cell(t, 0, 0, "Daily stats");
333
+ * table.merge_cells(t, 0, 0, 1, 0); // the title spans both columns
334
+ * ```
123
335
  */
124
336
  export function merge_cells(table_id, start_column, start_row, end_column, end_row) {
125
337
  if (isDeleted(table_id))
@@ -136,8 +348,20 @@ export function merge_cells(table_id, start_column, start_row, end_column, end_r
136
348
  }
137
349
  }
138
350
  /**
139
- * Removes the cells from start_column / start_row to end_column / end_row (PineScript `table.clear`; default end:
140
- * the start cell), and the merges that start in that range.
351
+ * Empties a block of cells (text and look), and removes the merges that start inside it. Without an end, only the
352
+ * start cell is cleared. A cell outside the table is an error; on a deleted table it does nothing.
353
+ * @param table_id - The table.
354
+ * @param start_column - Column of the top-left cell of the block, from 0.
355
+ * @param start_row - Row of the top-left cell of the block, from 0.
356
+ * @param end_column - Column of the bottom-right cell of the block. Default: `start_column`.
357
+ * @param end_row - Row of the bottom-right cell of the block. Default: `start_row`.
358
+ * @example
359
+ * ```js
360
+ * const t = table.new(position.top_right, 3, 3);
361
+ * eachBar((c) => {
362
+ * if (c.i === c.n - 1) table.clear(t, 0, 0, 2, 2); // empty all nine cells
363
+ * });
364
+ * ```
141
365
  */
142
366
  export function clear(table_id, start_column, start_row, end_column = start_column, end_row = start_row) {
143
367
  if (isDeleted(table_id))
@@ -152,16 +376,25 @@ export function clear(table_id, start_column, start_row, end_column = start_colu
152
376
  if (table_id.merges)
153
377
  table_id.merges = table_id.merges.filter((m) => !inside(m.start_column, m.start_row));
154
378
  }
155
- function setTable(field) {
156
- return (table_id, value) => {
157
- if (isDeleted(table_id))
158
- return;
159
- table_id[field] = value;
160
- };
379
+ /** Sets one property of a table; nothing on a deleted table. */
380
+ function setTable(table_id, field, value) {
381
+ if (isDeleted(table_id))
382
+ return;
383
+ table_id[field] = value;
161
384
  }
162
385
  /**
163
- * Moves the table to another position (`position.*`). A live table at that position with the same `force_overlay` is
164
- * deleted (#182).
386
+ * Moves the table to another place of the pane. A live table already at that position (with the same
387
+ * `force_overlay`) is deleted. Does nothing on a deleted table.
388
+ * @param table_id - The table.
389
+ * @param position - New place: `position.top_left`, `position.top_center`, `position.top_right`,
390
+ * `position.middle_left`, `position.middle_center`, `position.middle_right`, `position.bottom_left`,
391
+ * `position.bottom_center` or `position.bottom_right`.
392
+ * @example
393
+ * ```js
394
+ * const where = input.string("Top right", "Table", { options: ["Top right", "Bottom left"] });
395
+ * const t = table.new(position.top_right, 1, 1);
396
+ * if (where === "Bottom left") table.set_position(t, position.bottom_left);
397
+ * ```
165
398
  */
166
399
  export function set_position(table_id, position) {
167
400
  if (isDeleted(table_id))
@@ -169,21 +402,99 @@ export function set_position(table_id, position) {
169
402
  freePosition(position, table_id.force_overlay ?? false, table_id);
170
403
  table_id.position = position;
171
404
  }
172
- /** Sets the background colour of the table. */
173
- export const set_bgcolor = setTable('bgcolor');
174
- /** Sets the colour of the outer frame. */
175
- export const set_frame_color = setTable('frame_color');
176
- /** Sets the width of the outer frame. */
177
- export const set_frame_width = setTable('frame_width');
178
- /** Sets the colour of the cell borders. */
179
- export const set_border_color = setTable('border_color');
180
- /** Sets the width of the cell borders. */
181
- export const set_border_width = setTable('border_width');
182
- /** Deletes the table (PineScript `table.delete`). */
405
+ /**
406
+ * Changes the background colour of the whole table (cells with their own background keep it). Does nothing on a
407
+ * deleted table.
408
+ * @param table_id - The table.
409
+ * @param value - New background colour.
410
+ * @example
411
+ * ```js
412
+ * const t = table.new(position.top_right, 1, 1);
413
+ * eachBar((c) => {
414
+ * if (c.i === c.n - 1) table.set_bgcolor(t, c.close > c.open ? color.new(color.green, 80) : color.new(color.red, 80));
415
+ * });
416
+ * ```
417
+ */
418
+ export function set_bgcolor(table_id, value) {
419
+ setTable(table_id, 'bgcolor', value);
420
+ }
421
+ /**
422
+ * Changes the colour of the outer frame of the table. Does nothing on a deleted table.
423
+ * @param table_id - The table.
424
+ * @param value - New frame colour.
425
+ * @example
426
+ * ```js
427
+ * const t = table.new(position.top_right, 1, 1, { frame_width: 1 });
428
+ * table.set_frame_color(t, color.gray);
429
+ * ```
430
+ */
431
+ export function set_frame_color(table_id, value) {
432
+ setTable(table_id, 'frame_color', value);
433
+ }
434
+ /**
435
+ * Changes the width of the outer frame of the table. Does nothing on a deleted table.
436
+ * @param table_id - The table.
437
+ * @param value - New frame width in pixels; 0 hides the frame.
438
+ * @example
439
+ * ```js
440
+ * const t = table.new(position.top_right, 1, 1, { frame_color: color.gray });
441
+ * table.set_frame_width(t, 2);
442
+ * ```
443
+ */
444
+ export function set_frame_width(table_id, value) {
445
+ setTable(table_id, 'frame_width', value);
446
+ }
447
+ /**
448
+ * Changes the colour of the lines between the cells. Does nothing on a deleted table.
449
+ * @param table_id - The table.
450
+ * @param value - New border colour.
451
+ * @example
452
+ * ```js
453
+ * const t = table.new(position.top_right, 2, 2, { border_width: 1 });
454
+ * table.set_border_color(t, color.silver);
455
+ * ```
456
+ */
457
+ export function set_border_color(table_id, value) {
458
+ setTable(table_id, 'border_color', value);
459
+ }
460
+ /**
461
+ * Changes the width of the lines between the cells. Does nothing on a deleted table.
462
+ * @param table_id - The table.
463
+ * @param value - New border width in pixels; 0 hides the lines.
464
+ * @example
465
+ * ```js
466
+ * const t = table.new(position.top_right, 2, 2, { border_color: color.silver });
467
+ * table.set_border_width(t, 1);
468
+ * ```
469
+ */
470
+ export function set_border_width(table_id, value) {
471
+ setTable(table_id, 'border_width', value);
472
+ }
473
+ /**
474
+ * Removes the table from the pane and from `table.all`. Afterwards the table functions do nothing on it; deleting it
475
+ * again does nothing.
476
+ * @param table_id - The table to delete.
477
+ * @example
478
+ * ```js
479
+ * const show = input.bool(true, "Show table");
480
+ * const t = table.new(position.top_right, 1, 1);
481
+ * if (!show) table.delete(t);
482
+ * ```
483
+ */
183
484
  export function delete_table(table_id) {
184
485
  remove('table', table_id);
185
486
  }
186
- /** All live tables, in creation order (PineScript `table.all`). A new array. */
487
+ /**
488
+ * Returns the tables that are still on the pane, oldest first. The array is a copy.
489
+ * (In a script, `table.all` is read as a value, without a call.)
490
+ * @returns The live tables in creation order.
491
+ * @example
492
+ * ```js
493
+ * eachBar((c) => {
494
+ * if (c.i === c.n - 1) for (const t of table.all) table.set_bgcolor(t, color.new(color.black, 50));
495
+ * });
496
+ * ```
497
+ */
187
498
  export function all() {
188
499
  return allDrawings('table');
189
500
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/table/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,GAAG,IAAI,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAQzF,0GAA0G;AAC1G,SAAS,YAAY,CAAC,QAAuB,EAAE,aAAsB,EAAE,IAAY;IACjF,KAAK,MAAM,GAAG,IAAI,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC;QACvC,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,CAAC,QAAQ,KAAK,QAAQ,IAAI,CAAC,GAAG,CAAC,aAAa,IAAI,KAAK,CAAC,KAAK,aAAa;YAAE,MAAM,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;IACxH,CAAC;AACH,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,SAAS,CACvB,QAAuB,EACvB,OAAe,EACf,IAAY,EACZ,OAAe,EACf,WAAmB,EACnB,WAAoB,EACpB,YAAoB,EACpB,YAAqB,EACrB,aAAuB;IAEvB,YAAY,CAAC,QAAQ,EAAE,aAAa,IAAI,KAAK,CAAC,CAAC;IAC/C,OAAO,QAAQ,CAAC,OAAO,EAAE;QACvB,QAAQ;QACR,OAAO;QACP,IAAI;QACJ,OAAO;QACP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AC,OAAO,CAAC,CAAC;AAC9B,CAAC;AAED,gCAAgC;AAChC,OAAO,EAAE,SAAS,IAAI,GAAG,EAAE,CAAC;AAC5B,OAAO,EAAE,YAAY,IAAI,MAAM,EAAE,CAAC"}
@@ -1,29 +1,27 @@
1
1
  /**
2
- * Text namespace
3
- * PineScript `text.format_*` constants for `label.set_text_formatting` and `box.set_text_formatting`, and the
4
- * `text.align_*` / `text.wrap_*` constants.
2
+ * Text namespace: the `text.format_*` constants of `label.set_text_formatting()` and `box.set_text_formatting()`
3
+ * (`text_formatting` option), and the `text.align_*` / `text.wrap_*` constants of labels, boxes and table cells.
5
4
  *
6
- * The format values are flags that add up, as in PineScript (`text.format_bold + text.format_italic`).
7
- * They are the values PineScript uses for drawn labels and boxes.
5
+ * The format values are flags that add up: `text.format_bold + text.format_italic` is bold italic text.
8
6
  */
9
- /** No formatting. */
7
+ /** Plain text: neither bold nor italic (the default). */
10
8
  export declare const format_none = 0;
11
- /** Bold text. */
9
+ /** Bold text; add `text.format_italic` for bold italic. */
12
10
  export declare const format_bold = 1;
13
- /** Italic text. */
11
+ /** Italic text; add `text.format_bold` for bold italic. */
14
12
  export declare const format_italic = 2;
15
- /** Text aligned to the left (`table.cell`, `box.new`, `label.new` textalign). */
13
+ /** Text aligned to the left (`text_halign` of `table.cell()` and `box.new()`, `textalign` of `label.new()`). */
16
14
  export declare const align_left: "left";
17
- /** Text centred horizontally or vertically. */
15
+ /** Text centred, horizontally or vertically. */
18
16
  export declare const align_center: "center";
19
17
  /** Text aligned to the right. */
20
18
  export declare const align_right: "right";
21
- /** Text aligned to the top (`table.cell`, `box.new` text_valign). */
19
+ /** Text aligned to the top (`text_valign` of `table.cell()` and `box.new()`). */
22
20
  export declare const align_top: "top";
23
- /** Text aligned to the bottom. */
21
+ /** Text aligned to the bottom (`text_valign`). */
24
22
  export declare const align_bottom: "bottom";
25
- /** Text wrapped to the box width (`box.new` text_wrap). */
23
+ /** Text wrapped onto several lines to fit the width of the box (`text_wrap` of `box.new()`). */
26
24
  export declare const wrap_auto: "auto";
27
- /** Text not wrapped. */
25
+ /** Text not wrapped: each line of the text stays on one line. */
28
26
  export declare const wrap_none: "none";
29
27
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/text/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,qBAAqB;AACrB,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,iBAAiB;AACjB,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,mBAAmB;AACnB,eAAO,MAAM,aAAa,IAAI,CAAC;AAE/B,iFAAiF;AACjF,eAAO,MAAM,UAAU,EAAG,MAAe,CAAC;AAC1C,+CAA+C;AAC/C,eAAO,MAAM,YAAY,EAAG,QAAiB,CAAC;AAC9C,iCAAiC;AACjC,eAAO,MAAM,WAAW,EAAG,OAAgB,CAAC;AAC5C,qEAAqE;AACrE,eAAO,MAAM,SAAS,EAAG,KAAc,CAAC;AACxC,kCAAkC;AAClC,eAAO,MAAM,YAAY,EAAG,QAAiB,CAAC;AAC9C,2DAA2D;AAC3D,eAAO,MAAM,SAAS,EAAG,MAAe,CAAC;AACzC,wBAAwB;AACxB,eAAO,MAAM,SAAS,EAAG,MAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/text/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,yDAAyD;AACzD,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,2DAA2D;AAC3D,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,2DAA2D;AAC3D,eAAO,MAAM,aAAa,IAAI,CAAC;AAE/B,gHAAgH;AAChH,eAAO,MAAM,UAAU,EAAG,MAAe,CAAC;AAC1C,gDAAgD;AAChD,eAAO,MAAM,YAAY,EAAG,QAAiB,CAAC;AAC9C,iCAAiC;AACjC,eAAO,MAAM,WAAW,EAAG,OAAgB,CAAC;AAC5C,iFAAiF;AACjF,eAAO,MAAM,SAAS,EAAG,KAAc,CAAC;AACxC,kDAAkD;AAClD,eAAO,MAAM,YAAY,EAAG,QAAiB,CAAC;AAC9C,gGAAgG;AAChG,eAAO,MAAM,SAAS,EAAG,MAAe,CAAC;AACzC,iEAAiE;AACjE,eAAO,MAAM,SAAS,EAAG,MAAe,CAAC"}
@@ -1,29 +1,27 @@
1
1
  /**
2
- * Text namespace
3
- * PineScript `text.format_*` constants for `label.set_text_formatting` and `box.set_text_formatting`, and the
4
- * `text.align_*` / `text.wrap_*` constants.
2
+ * Text namespace: the `text.format_*` constants of `label.set_text_formatting()` and `box.set_text_formatting()`
3
+ * (`text_formatting` option), and the `text.align_*` / `text.wrap_*` constants of labels, boxes and table cells.
5
4
  *
6
- * The format values are flags that add up, as in PineScript (`text.format_bold + text.format_italic`).
7
- * They are the values PineScript uses for drawn labels and boxes.
5
+ * The format values are flags that add up: `text.format_bold + text.format_italic` is bold italic text.
8
6
  */
9
- /** No formatting. */
7
+ /** Plain text: neither bold nor italic (the default). */
10
8
  export const format_none = 0;
11
- /** Bold text. */
9
+ /** Bold text; add `text.format_italic` for bold italic. */
12
10
  export const format_bold = 1;
13
- /** Italic text. */
11
+ /** Italic text; add `text.format_bold` for bold italic. */
14
12
  export const format_italic = 2;
15
- /** Text aligned to the left (`table.cell`, `box.new`, `label.new` textalign). */
13
+ /** Text aligned to the left (`text_halign` of `table.cell()` and `box.new()`, `textalign` of `label.new()`). */
16
14
  export const align_left = 'left';
17
- /** Text centred horizontally or vertically. */
15
+ /** Text centred, horizontally or vertically. */
18
16
  export const align_center = 'center';
19
17
  /** Text aligned to the right. */
20
18
  export const align_right = 'right';
21
- /** Text aligned to the top (`table.cell`, `box.new` text_valign). */
19
+ /** Text aligned to the top (`text_valign` of `table.cell()` and `box.new()`). */
22
20
  export const align_top = 'top';
23
- /** Text aligned to the bottom. */
21
+ /** Text aligned to the bottom (`text_valign`). */
24
22
  export const align_bottom = 'bottom';
25
- /** Text wrapped to the box width (`box.new` text_wrap). */
23
+ /** Text wrapped onto several lines to fit the width of the box (`text_wrap` of `box.new()`). */
26
24
  export const wrap_auto = 'auto';
27
- /** Text not wrapped. */
25
+ /** Text not wrapped: each line of the text stays on one line. */
28
26
  export const wrap_none = 'none';
29
27
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/text/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,qBAAqB;AACrB,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC;AAC7B,iBAAiB;AACjB,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC;AAC7B,mBAAmB;AACnB,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC;AAE/B,iFAAiF;AACjF,MAAM,CAAC,MAAM,UAAU,GAAG,MAAe,CAAC;AAC1C,+CAA+C;AAC/C,MAAM,CAAC,MAAM,YAAY,GAAG,QAAiB,CAAC;AAC9C,iCAAiC;AACjC,MAAM,CAAC,MAAM,WAAW,GAAG,OAAgB,CAAC;AAC5C,qEAAqE;AACrE,MAAM,CAAC,MAAM,SAAS,GAAG,KAAc,CAAC;AACxC,kCAAkC;AAClC,MAAM,CAAC,MAAM,YAAY,GAAG,QAAiB,CAAC;AAC9C,2DAA2D;AAC3D,MAAM,CAAC,MAAM,SAAS,GAAG,MAAe,CAAC;AACzC,wBAAwB;AACxB,MAAM,CAAC,MAAM,SAAS,GAAG,MAAe,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/text/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,yDAAyD;AACzD,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC;AAC7B,2DAA2D;AAC3D,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC;AAC7B,2DAA2D;AAC3D,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC;AAE/B,g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