oakscriptjs 0.23.0 → 0.25.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.
Files changed (310) 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 +1065 -1006
  102. package/dist/cjs/script/index.d.ts.map +1 -1
  103. package/dist/cjs/script/index.js +532 -61
  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/security/other.d.ts +8 -3
  110. package/dist/cjs/security/other.d.ts.map +1 -1
  111. package/dist/cjs/security/other.js +23 -6
  112. package/dist/cjs/security/other.js.map +2 -2
  113. package/dist/cjs/str/index.d.ts +50 -75
  114. package/dist/cjs/str/index.d.ts.map +1 -1
  115. package/dist/cjs/str/index.js +2 -2
  116. package/dist/cjs/str/index.js.map +2 -2
  117. package/dist/cjs/strategy/index.d.ts +102 -1
  118. package/dist/cjs/strategy/index.d.ts.map +1 -1
  119. package/dist/cjs/strategy/index.js.map +2 -2
  120. package/dist/cjs/table/index.d.ts +330 -49
  121. package/dist/cjs/table/index.d.ts.map +1 -1
  122. package/dist/cjs/table/index.js +55 -27
  123. package/dist/cjs/table/index.js.map +2 -2
  124. package/dist/cjs/text/index.d.ts +12 -14
  125. package/dist/cjs/text/index.d.ts.map +1 -1
  126. package/dist/cjs/text/index.js.map +2 -2
  127. package/dist/cjs/types/index.d.ts +15 -8
  128. package/dist/cjs/types/index.d.ts.map +1 -1
  129. package/dist/cjs/types/index.js +12 -3
  130. package/dist/cjs/types/index.js.map +2 -2
  131. package/dist/esm/box/index.d.ts +348 -289
  132. package/dist/esm/box/index.d.ts.map +1 -1
  133. package/dist/esm/box/index.js +276 -276
  134. package/dist/esm/box/index.js.map +1 -1
  135. package/dist/esm/check/node.d.ts.map +1 -1
  136. package/dist/esm/check/node.js +1 -0
  137. package/dist/esm/check/node.js.map +1 -1
  138. package/dist/esm/check/preview.d.ts +31 -0
  139. package/dist/esm/check/preview.d.ts.map +1 -0
  140. package/dist/esm/check/preview.js +296 -0
  141. package/dist/esm/check/preview.js.map +1 -0
  142. package/dist/esm/color/index.d.ts +11 -11
  143. package/dist/esm/color/index.js +11 -11
  144. package/dist/esm/color/parse.d.ts +2 -0
  145. package/dist/esm/color/parse.d.ts.map +1 -1
  146. package/dist/esm/color/parse.js +7 -0
  147. package/dist/esm/color/parse.js.map +1 -1
  148. package/dist/esm/compare/index.d.ts +76 -12
  149. package/dist/esm/compare/index.d.ts.map +1 -1
  150. package/dist/esm/compare/index.js +76 -12
  151. package/dist/esm/compare/index.js.map +1 -1
  152. package/dist/esm/drawing/registry.d.ts +28 -5
  153. package/dist/esm/drawing/registry.d.ts.map +1 -1
  154. package/dist/esm/drawing/registry.js +39 -3
  155. package/dist/esm/drawing/registry.js.map +1 -1
  156. package/dist/esm/index.d.ts +1 -1
  157. package/dist/esm/index.js +1 -1
  158. package/dist/esm/label/index.d.ts +265 -187
  159. package/dist/esm/label/index.d.ts.map +1 -1
  160. package/dist/esm/label/index.js +207 -177
  161. package/dist/esm/label/index.js.map +1 -1
  162. package/dist/esm/line/index.d.ts +247 -207
  163. package/dist/esm/line/index.d.ts.map +1 -1
  164. package/dist/esm/line/index.js +202 -194
  165. package/dist/esm/line/index.js.map +1 -1
  166. package/dist/esm/linefill/index.d.ts +61 -89
  167. package/dist/esm/linefill/index.d.ts.map +1 -1
  168. package/dist/esm/linefill/index.js +61 -89
  169. package/dist/esm/linefill/index.js.map +1 -1
  170. package/dist/esm/math/index.d.ts +49 -40
  171. package/dist/esm/math/index.d.ts.map +1 -1
  172. package/dist/esm/math/index.js +22 -9
  173. package/dist/esm/math/index.js.map +1 -1
  174. package/dist/esm/polyline/index.d.ts +57 -78
  175. package/dist/esm/polyline/index.d.ts.map +1 -1
  176. package/dist/esm/polyline/index.js +57 -78
  177. package/dist/esm/polyline/index.js.map +1 -1
  178. package/dist/esm/runtime/input-active.d.ts +2 -2
  179. package/dist/esm/runtime/input-active.js +2 -2
  180. package/dist/esm/runtime/series.d.ts +241 -161
  181. package/dist/esm/runtime/series.d.ts.map +1 -1
  182. package/dist/esm/runtime/series.js +241 -161
  183. package/dist/esm/runtime/series.js.map +1 -1
  184. package/dist/esm/script/api/alert.d.ts +37 -0
  185. package/dist/esm/script/api/alert.d.ts.map +1 -0
  186. package/dist/esm/script/api/alert.js +7 -0
  187. package/dist/esm/script/api/alert.js.map +1 -0
  188. package/dist/esm/script/api/calc.d.ts +232 -0
  189. package/dist/esm/script/api/calc.d.ts.map +1 -0
  190. package/dist/esm/script/api/calc.js +6 -0
  191. package/dist/esm/script/api/calc.js.map +1 -0
  192. package/dist/esm/script/api/color.d.ts +213 -0
  193. package/dist/esm/script/api/color.d.ts.map +1 -0
  194. package/dist/esm/script/api/color.js +6 -0
  195. package/dist/esm/script/api/color.js.map +1 -0
  196. package/dist/esm/script/api/context.d.ts +764 -0
  197. package/dist/esm/script/api/context.d.ts.map +1 -0
  198. package/dist/esm/script/api/context.js +7 -0
  199. package/dist/esm/script/api/context.js.map +1 -0
  200. package/dist/esm/script/api/log.d.ts +58 -0
  201. package/dist/esm/script/api/log.d.ts.map +1 -0
  202. package/dist/esm/script/api/log.js +6 -0
  203. package/dist/esm/script/api/log.js.map +1 -0
  204. package/dist/esm/script/api/strategy.d.ts +391 -0
  205. package/dist/esm/script/api/strategy.d.ts.map +1 -0
  206. package/dist/esm/script/api/strategy.js +7 -0
  207. package/dist/esm/script/api/strategy.js.map +1 -0
  208. package/dist/esm/script/api/ta.d.ts +1012 -0
  209. package/dist/esm/script/api/ta.d.ts.map +1 -0
  210. package/dist/esm/script/api/ta.js +6 -0
  211. package/dist/esm/script/api/ta.js.map +1 -0
  212. package/dist/esm/script/api/table.d.ts +479 -0
  213. package/dist/esm/script/api/table.d.ts.map +1 -0
  214. package/dist/esm/script/api/table.js +7 -0
  215. package/dist/esm/script/api/table.js.map +1 -0
  216. package/dist/esm/script/constants.d.ts +228 -83
  217. package/dist/esm/script/constants.d.ts.map +1 -1
  218. package/dist/esm/script/constants.js +110 -24
  219. package/dist/esm/script/constants.js.map +1 -1
  220. package/dist/esm/script/define.d.ts +94 -0
  221. package/dist/esm/script/define.d.ts.map +1 -0
  222. package/dist/esm/script/define.js +136 -0
  223. package/dist/esm/script/define.js.map +1 -0
  224. package/dist/esm/script/drawing-args.d.ts.map +1 -1
  225. package/dist/esm/script/drawing-args.js +2 -1
  226. package/dist/esm/script/drawing-args.js.map +1 -1
  227. package/dist/esm/script/formula.d.ts +53 -0
  228. package/dist/esm/script/formula.d.ts.map +1 -0
  229. package/dist/esm/script/formula.js +408 -0
  230. package/dist/esm/script/formula.js.map +1 -0
  231. package/dist/esm/script/globals.d.ts +10 -0
  232. package/dist/esm/script/globals.d.ts.map +1 -1
  233. package/dist/esm/script/globals.js.map +1 -1
  234. package/dist/esm/script/index.d.ts +1065 -1006
  235. package/dist/esm/script/index.d.ts.map +1 -1
  236. package/dist/esm/script/index.js +1099 -153
  237. package/dist/esm/script/index.js.map +1 -1
  238. package/dist/esm/script/json.d.ts +117 -0
  239. package/dist/esm/script/json.d.ts.map +1 -0
  240. package/dist/esm/script/json.js +375 -0
  241. package/dist/esm/script/json.js.map +1 -0
  242. package/dist/esm/security/other.d.ts +8 -3
  243. package/dist/esm/security/other.d.ts.map +1 -1
  244. package/dist/esm/security/other.js +45 -10
  245. package/dist/esm/security/other.js.map +1 -1
  246. package/dist/esm/str/index.d.ts +50 -75
  247. package/dist/esm/str/index.d.ts.map +1 -1
  248. package/dist/esm/str/index.js +51 -76
  249. package/dist/esm/str/index.js.map +1 -1
  250. package/dist/esm/strategy/index.d.ts +102 -1
  251. package/dist/esm/strategy/index.d.ts.map +1 -1
  252. package/dist/esm/strategy/index.js +1 -1
  253. package/dist/esm/strategy/index.js.map +1 -1
  254. package/dist/esm/table/index.d.ts +330 -49
  255. package/dist/esm/table/index.d.ts.map +1 -1
  256. package/dist/esm/table/index.js +372 -61
  257. package/dist/esm/table/index.js.map +1 -1
  258. package/dist/esm/text/index.d.ts +12 -14
  259. package/dist/esm/text/index.d.ts.map +1 -1
  260. package/dist/esm/text/index.js +12 -14
  261. package/dist/esm/text/index.js.map +1 -1
  262. package/dist/esm/types/index.d.ts +15 -8
  263. package/dist/esm/types/index.d.ts.map +1 -1
  264. package/dist/esm/types/index.js +15 -8
  265. package/dist/esm/types/index.js.map +1 -1
  266. package/docs/first-indicator.md +152 -0
  267. package/docs/guide.md +1185 -0
  268. package/docs/inventory.md +772 -0
  269. package/docs/no-code.md +207 -0
  270. package/docs/recipes.md +202 -0
  271. package/package.json +2 -1
  272. package/skills/oakscript/SKILL.md +8 -0
  273. package/skills/oakscript/reference/errors.md +3 -2
  274. package/skills/oakscript/reference/timeframes-symbols.md +4 -0
  275. package/src/box/index.ts +348 -289
  276. package/src/check/node.ts +1 -0
  277. package/src/check/preview.ts +307 -0
  278. package/src/color/index.ts +11 -11
  279. package/src/color/parse.ts +7 -0
  280. package/src/compare/index.ts +76 -12
  281. package/src/drawing/registry.ts +44 -5
  282. package/src/index.ts +1 -1
  283. package/src/label/index.ts +267 -189
  284. package/src/line/index.ts +248 -208
  285. package/src/linefill/index.ts +61 -89
  286. package/src/math/index.ts +51 -42
  287. package/src/polyline/index.ts +57 -78
  288. package/src/runtime/input-active.ts +2 -2
  289. package/src/runtime/series.ts +243 -163
  290. package/src/script/api/alert.ts +43 -0
  291. package/src/script/api/calc.ts +250 -0
  292. package/src/script/api/color.ts +245 -0
  293. package/src/script/api/context.ts +944 -0
  294. package/src/script/api/log.ts +60 -0
  295. package/src/script/api/strategy.ts +410 -0
  296. package/src/script/api/ta.ts +1115 -0
  297. package/src/script/api/table.ts +538 -0
  298. package/src/script/constants.ts +229 -25
  299. package/src/script/define.ts +221 -0
  300. package/src/script/drawing-args.ts +2 -1
  301. package/src/script/formula.ts +438 -0
  302. package/src/script/globals.ts +10 -0
  303. package/src/script/index.ts +1520 -241
  304. package/src/script/json.ts +457 -0
  305. package/src/security/other.ts +43 -9
  306. package/src/str/index.ts +51 -76
  307. package/src/strategy/index.ts +102 -1
  308. package/src/table/index.ts +388 -62
  309. package/src/text/index.ts +12 -14
  310. package/src/types/index.ts +15 -8
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/table/index.ts"],
4
- "sourcesContent": ["/**\n * Table namespace\n * Functions for creating and filling table drawing objects.\n *\n * @remarks\n * A table is drawn at a fixed position of the pane (`position.*`), not at a bar. Tables have no getters in\n * PineScript; the script API returns the live tables in `result.tables`.\n *\n * PineScript rules:\n * - `table.cell` defines a cell: the arguments it does not give get their default, a previous definition of the\n * cell is replaced\n * - `table.cell_set_*` changes one property of a cell (a cell that was not defined is created)\n * - a column or row outside the table is a runtime error\n * - a deleted table is `na`: its functions do nothing\n * - one live table per position and pane: `table.new` or `table.set_position` at the position of a live table with\n * the same `force_overlay` deletes that table (#176, #182); a table with `force_overlay = true` and one without\n * keep each their own position, also in an overlay script\n *\n * @version 6\n */\n\nimport { all as allDrawings, isDeleted, register, remove } from '../drawing/registry.js';\nimport type { Table, TableCell, color } from '../types/index.js';\n\ntype TablePosition = Table['position'];\ntype HAlign = 'left' | 'center' | 'right';\ntype VAlign = 'top' | 'center' | 'bottom';\ntype FontFamily = 'default' | 'monospace';\n\n/** Deletes the live tables other than `keep` at `position` with the same `force_overlay` (#176, #182). */\nfunction freePosition(position: TablePosition, force_overlay: boolean, keep?: Table): void {\n for (const old of allDrawings('table')) {\n if (old !== keep && old.position === position && (old.force_overlay ?? false) === force_overlay) remove('table', old);\n }\n}\n\n/**\n * Creates a new table (PineScript `table.new`). A live table at the same position with the same `force_overlay` is\n * deleted, as PineScript keeps one table per position and pane (#176, #182).\n *\n * @example\n * ```typescript\n * const t = table.new(position.top_right, 2, 3, '#131722', '#787B86', 1);\n * table.cell(t, 0, 0, 'RSI', 0, 0, '#FFFFFF');\n * ```\n */\nexport function new_table(\n position: TablePosition,\n columns: number,\n rows: number,\n bgcolor?: color,\n frame_color?: color,\n frame_width?: number,\n border_color?: color,\n border_width?: number,\n force_overlay?: boolean\n): Table {\n freePosition(position, force_overlay ?? false);\n return register('table', {\n position,\n columns,\n rows,\n bgcolor,\n frame_color,\n frame_width,\n border_color,\n border_width,\n force_overlay: force_overlay ?? false,\n cells: new Map(),\n merges: [],\n });\n}\n\nfunction checkCell(caller: string, id: Table, column: number, row: number): void {\n if (!(column >= 0 && column < id.columns && row >= 0 && row < id.rows)) {\n throw new RangeError(\n `${caller}: column ${column}, row ${row} is outside the table (${id.columns} columns, ${id.rows} rows).`\n );\n }\n}\n\nconst key = (column: number, row: number): string => `${column},${row}`;\n\n/** The cell at column / row, created when it was not defined. */\nfunction cellOf(caller: string, id: Table, column: number, row: number): TableCell {\n checkCell(caller, id, column, row);\n const cells = (id.cells ??= new Map());\n let cell = cells.get(key(column, row));\n if (!cell) cells.set(key(column, row), (cell = { text: '' }));\n return cell;\n}\n\n/**\n * Defines a cell (PineScript `table.cell`): its text and properties. Omitted properties get their default.\n */\nexport function cell(\n table_id: Table,\n column: number,\n row: number,\n text?: string,\n width?: number,\n height?: number,\n text_color?: color,\n text_halign?: HAlign,\n text_valign?: VAlign,\n text_size?: string | number,\n bgcolor?: color,\n tooltip?: string,\n text_font_family?: FontFamily,\n text_formatting?: number\n): void {\n if (isDeleted(table_id)) return;\n checkCell('table.cell()', table_id, column, row);\n (table_id.cells ??= new Map()).set(key(column, row), {\n text: text ?? '',\n width,\n height,\n text_color,\n text_halign,\n text_valign,\n text_size,\n bgcolor,\n tooltip,\n text_font_family,\n text_formatting,\n });\n}\n\nfunction setCell<K extends keyof TableCell>(name: string, field: K) {\n return (table_id: Table, column: number, row: number, value: TableCell[K]): void => {\n if (isDeleted(table_id)) return;\n cellOf(`table.${name}()`, table_id, column, row)[field] = value;\n };\n}\n\n/** Sets the text of a cell. */\nexport const cell_set_text = setCell('cell_set_text', 'text');\n/** Sets the width of a cell (% of the chart width; 0 fits the text). */\nexport const cell_set_width = setCell('cell_set_width', 'width');\n/** Sets the height of a cell (% of the chart height; 0 fits the text). */\nexport const cell_set_height = setCell('cell_set_height', 'height');\n/** Sets the text colour of a cell. */\nexport const cell_set_text_color = setCell('cell_set_text_color', 'text_color');\n/** Sets the horizontal text alignment of a cell. */\nexport const cell_set_text_halign = setCell('cell_set_text_halign', 'text_halign');\n/** Sets the vertical text alignment of a cell. */\nexport const cell_set_text_valign = setCell('cell_set_text_valign', 'text_valign');\n/** Sets the text size of a cell. */\nexport const cell_set_text_size = setCell('cell_set_text_size', 'text_size');\n/** Sets the background colour of a cell. */\nexport const cell_set_bgcolor = setCell('cell_set_bgcolor', 'bgcolor');\n/** Sets the tooltip of a cell. */\nexport const cell_set_tooltip = setCell('cell_set_tooltip', 'tooltip');\n/** Sets the font family of a cell. */\nexport const cell_set_text_font_family = setCell('cell_set_text_font_family', 'text_font_family');\n/** Sets the text formatting of a cell (`text.format_*` flags). */\nexport const cell_set_text_formatting = setCell('cell_set_text_formatting', 'text_formatting');\n\n/**\n * Merges the cells from start_column / start_row to end_column / end_row (PineScript `table.merge_cells`). The\n * merged cell shows the content of the start cell.\n */\nexport function merge_cells(\n table_id: Table,\n start_column: number,\n start_row: number,\n end_column: number,\n end_row: number\n): void {\n if (isDeleted(table_id)) return;\n checkCell('table.merge_cells()', table_id, start_column, start_row);\n checkCell('table.merge_cells()', table_id, end_column, end_row);\n if (end_column < start_column || end_row < start_row) {\n throw new RangeError('table.merge_cells(): the end cell is before the start cell.');\n }\n // One merge per range, as PineScript: merging the same cells again (a script that merges on every bar) keeps one.\n const merges = (table_id.merges ??= []);\n if (!merges.some((m) => m.start_column === start_column && m.start_row === start_row && m.end_column === end_column && m.end_row === end_row)) {\n merges.push({ start_column, start_row, end_column, end_row });\n }\n}\n\n/**\n * Removes the cells from start_column / start_row to end_column / end_row (PineScript `table.clear`; default end:\n * the start cell), and the merges that start in that range.\n */\nexport function clear(\n table_id: Table,\n start_column: number,\n start_row: number,\n end_column: number = start_column,\n end_row: number = start_row\n): void {\n if (isDeleted(table_id)) return;\n checkCell('table.clear()', table_id, start_column, start_row);\n checkCell('table.clear()', table_id, end_column, end_row);\n const inside = (column: number, row: number): boolean =>\n column >= start_column && column <= end_column && row >= start_row && row <= end_row;\n for (let column = start_column; column <= end_column; column++) {\n for (let row = start_row; row <= end_row; row++) table_id.cells?.delete(key(column, row));\n }\n if (table_id.merges) table_id.merges = table_id.merges.filter((m) => !inside(m.start_column, m.start_row));\n}\n\nfunction setTable<K extends keyof Table>(field: K) {\n return (table_id: Table, value: Table[K]): void => {\n if (isDeleted(table_id)) return;\n table_id[field] = value;\n };\n}\n\n/**\n * Moves the table to another position (`position.*`). A live table at that position with the same `force_overlay` is\n * deleted (#182).\n */\nexport function set_position(table_id: Table, position: TablePosition): void {\n if (isDeleted(table_id)) return;\n freePosition(position, table_id.force_overlay ?? false, table_id);\n table_id.position = position;\n}\n/** Sets the background colour of the table. */\nexport const set_bgcolor = setTable('bgcolor');\n/** Sets the colour of the outer frame. */\nexport const set_frame_color = setTable('frame_color');\n/** Sets the width of the outer frame. */\nexport const set_frame_width = setTable('frame_width');\n/** Sets the colour of the cell borders. */\nexport const set_border_color = setTable('border_color');\n/** Sets the width of the cell borders. */\nexport const set_border_width = setTable('border_width');\n\n/** Deletes the table (PineScript `table.delete`). */\nexport function delete_table(table_id: Table): void {\n remove('table', table_id);\n}\n\n/** All live tables, in creation order (PineScript `table.all`). A new array. */\nexport function all(): Table[] {\n return allDrawings('table');\n}\n\n// Alias to match PineScript API\nexport { new_table as new };\nexport { delete_table as delete };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAqBA,sBAAgE;AAShE,SAAS,aAAa,UAAyB,eAAwB,MAAoB;AACzF,aAAW,WAAO,gBAAAA,KAAY,OAAO,GAAG;AACtC,QAAI,QAAQ,QAAQ,IAAI,aAAa,aAAa,IAAI,iBAAiB,WAAW,cAAe,6BAAO,SAAS,GAAG;AAAA,EACtH;AACF;AAYO,SAAS,UACd,UACA,SACA,MACA,SACA,aACA,aACA,cACA,cACA,eACO;AACP,eAAa,UAAU,iBAAiB,KAAK;AAC7C,aAAO,0BAAS,SAAS;AAAA,IACvB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,eAAe,iBAAi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O,aAAa,OAAO;AAC/E,WAAS,SAAS,cAAc,UAAU,YAAY,UAAU;AAC9D,aAAS,MAAM,WAAW,OAAO,SAAS,MAAO,UAAS,OAAO,OAAO,IAAI,QAAQ,GAAG,CAAC;AAAA,EAC1F;AACA,MAAI,SAAS,OAAQ,UAAS,SAAS,SAAS,OAAO,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,cAAc,EAAE,SAAS,CAAC;AAC3G;AAEA,SAAS,SAAgC,OAAU;AACjD,SAAO,CAAC,UAAiB,UAA0B;AACjD,YAAI,2BAAU,QAAQ,EAAG;AACzB,aAAS,KAAK,IAAI;AAAA,EACpB;AACF;AAMO,SAAS,aAAa,UAAiB,UAA+B;AAC3E,UAAI,2BAAU,QAAQ,EAAG;AACzB,eAAa,UAAU,SAAS,iBAAiB,OAAO,QAAQ;AAChE,WAAS,WAAW;AACtB;AAEO,MAAM,cAAc,SAAS,SAAS;AAEtC,MAAM,kBAAkB,SAAS,aAAa;AAE9C,MAAM,kBAAkB,SAAS,aAAa;AAE9C,MAAM,mBAAmB,SAAS,cAAc;AAEhD,MAAM,mBAAmB,SAAS,cAAc;AAGhD,SAAS,aAAa,UAAuB;AAClD,8BAAO,SAAS,QAAQ;AAC1B;AAGO,SAAS,MAAe;AAC7B,aAAO,gBAAAD,KAAY,OAAO;AAC5B;",
4
+ "sourcesContent": ["/**\n * Table namespace\n * Functions for creating and filling table drawing objects.\n *\n * @remarks\n * A table is drawn at a fixed position of the pane (`position.*`), not at a bar. Tables have no getters in\n * PineScript; the script API returns the live tables in `result.tables`.\n *\n * PineScript rules:\n * - `table.cell` defines a cell: the arguments it does not give get their default, a previous definition of the\n * cell is replaced\n * - `table.cell_set_*` changes one property of a cell (a cell that was not defined is created)\n * - a column or row outside the table is a runtime error\n * - a deleted table is `na`: its functions do nothing\n * - one live table per position and pane: `table.new` or `table.set_position` at the position of a live table with\n * the same `force_overlay` deletes that table (#176, #182); a table with `force_overlay = true` and one without\n * keep each their own position, also in an overlay script\n *\n * @version 6\n */\n\nimport { all as allDrawings, isDeleted, register, remove } from '../drawing/registry.js';\nimport type { Table, TableCell, color } from '../types/index.js';\n\ntype TablePosition = Table['position'];\ntype HAlign = 'left' | 'center' | 'right';\ntype VAlign = 'top' | 'center' | 'bottom';\ntype FontFamily = 'default' | 'monospace';\n\n/** Deletes the live tables other than `keep` at `position` with the same `force_overlay` (#176, #182). */\nfunction freePosition(position: TablePosition, force_overlay: boolean, keep?: Table): void {\n for (const old of allDrawings('table')) {\n if (old !== keep && old.position === position && (old.force_overlay ?? false) === force_overlay) remove('table', old);\n }\n}\n\n/**\n * Creates a table fixed at a place of the pane (it does not scroll with the bars) and returns its handle; fill its\n * cells with `table.cell()`. A pane holds one table per position: a live table at the same position (with the same\n * `force_overlay`) is deleted. The arguments after `rows` can also be given by name in an object.\n * @param position - Where the table sits: `position.top_left`, `position.top_center`, `position.top_right`,\n * `position.middle_left`, `position.middle_center`, `position.middle_right`, `position.bottom_left`,\n * `position.bottom_center` or `position.bottom_right`.\n * @param columns - Number of columns.\n * @param rows - Number of rows.\n * @param bgcolor - Background colour of the whole table. Default: none (transparent).\n * @param frame_color - Colour of the outer frame. Default: none.\n * @param frame_width - Width of the outer frame in pixels. Default: 0 (no frame).\n * @param border_color - Colour of the lines between the cells. Default: none.\n * @param border_width - Width of the lines between the cells in pixels. Default: 0 (no lines).\n * @param force_overlay - When true, the table is drawn on the price pane even if the script has its own pane.\n * Default: false.\n * @returns The new table.\n * @example\n * ```js\n * const t = table.new(position.top_right, 2, 1, { bgcolor: color.new(color.black, 20), border_width: 1 });\n * eachBar((c) => {\n * if (c.i === c.n - 1) table.cell(t, 0, 0, \"Close\", { text_color: color.white });\n * });\n * ```\n */\nexport function new_table(\n position: TablePosition,\n columns: number,\n rows: number,\n bgcolor?: color,\n frame_color?: color,\n frame_width?: number,\n border_color?: color,\n border_width?: number,\n force_overlay?: boolean\n): Table {\n freePosition(position, force_overlay ?? false);\n return register('table', {\n position,\n columns,\n rows,\n bgcolor,\n frame_color,\n frame_width,\n border_color,\n border_width,\n force_overlay: force_overlay ?? false,\n cells: new Map(),\n merges: [],\n });\n}\n\nfunction checkCell(caller: string, id: Table, column: number, row: number): void {\n if (!(column >= 0 && column < id.columns && row >= 0 && row < id.rows)) {\n throw new RangeError(\n `${caller}: column ${column}, row ${row} is outside the table (${id.columns} columns, ${id.rows} rows).`\n );\n }\n}\n\nconst key = (column: number, row: number): string => `${column},${row}`;\n\n/** The cell at column / row, created when it was not defined. */\nfunction cellOf(caller: string, id: Table, column: number, row: number): TableCell {\n checkCell(caller, id, column, row);\n const cells = (id.cells ??= new Map());\n let cell = cells.get(key(column, row));\n if (!cell) cells.set(key(column, row), (cell = { text: '' }));\n return cell;\n}\n\n/**\n * Writes a cell of a table: its text and look. The properties not given get their default, so calling it again\n * replaces the whole cell; use `table.cell_set_*()` to change one property. A column or row outside the table is an\n * error; on a deleted table it does nothing. The arguments after `row` can also be given by name in an object.\n * @param table_id - The table (from `table.new()`).\n * @param column - Column of the cell, from 0 (left).\n * @param row - Row of the cell, from 0 (top).\n * @param text - Text of the cell; `\\n` starts a new line. Default: \"\".\n * @param width - Width of the cell in percent of the pane's width; 0 fits the text. Default: 0.\n * @param height - Height of the cell in percent of the pane's height; 0 fits the text. Default: 0.\n * @param text_color - Text colour. Default: dark gray (#363A45).\n * @param text_halign - Horizontal alignment of the text: `text.align_left`, `text.align_center` or\n * `text.align_right`. Default: `text.align_center`.\n * @param text_valign - Vertical alignment of the text: `text.align_top`, `text.align_center` or\n * `text.align_bottom`. Default: `text.align_center`.\n * @param text_size - `size.tiny`, `size.small`, `size.normal`, `size.large`, `size.huge`, `size.auto`, or a size in\n * points. Default: `size.auto`.\n * @param bgcolor - Background colour of the cell. Default: none (the table's background shows).\n * @param tooltip - Text shown when the pointer is over the cell. Default: none.\n * @param text_font_family - `font.family_default` or `font.family_monospace`. Default: `font.family_default`.\n * @param text_formatting - `text.format_bold`, `text.format_italic`, their sum, or `text.format_none`.\n * Default: `text.format_none`.\n * @example\n * ```js\n * const t = table.new(position.bottom_right, 2, 1);\n * eachBar((c) => {\n * if (c.i === c.n - 1) table.cell(t, 1, 0, str.tostring(c.close, \"#.##\"), { bgcolor: color.teal, text_color: color.white });\n * });\n * ```\n */\nexport function cell(\n table_id: Table,\n column: number,\n row: number,\n text?: string,\n width?: number,\n height?: number,\n text_color?: color,\n text_halign?: HAlign,\n text_valign?: VAlign,\n text_size?: string | number,\n bgcolor?: color,\n tooltip?: string,\n text_font_family?: FontFamily,\n text_formatting?: number\n): void {\n if (isDeleted(table_id)) return;\n checkCell('table.cell()', table_id, column, row);\n (table_id.cells ??= new Map()).set(key(column, row), {\n text: text ?? '',\n width,\n height,\n text_color,\n text_halign,\n text_valign,\n text_size,\n bgcolor,\n tooltip,\n text_font_family,\n text_formatting,\n });\n}\n\n/** Sets one property of a cell (the cell is created when it was not defined); nothing on a deleted table. */\nfunction setCell<K extends keyof TableCell>(name: string, field: K, table_id: Table, column: number, row: number, value: TableCell[K]): void {\n if (isDeleted(table_id)) return;\n cellOf(`table.${name}()`, table_id, column, row)[field] = value;\n}\n\n/**\n * Changes the text of a cell and keeps its other properties. A cell that was not written yet is created.\n * A column or row outside the table is an error; on a deleted table it does nothing.\n * @param table_id - The table.\n * @param column - Column of the cell, from 0.\n * @param row - Row of the cell, from 0.\n * @param value - New text; `\\n` starts a new line.\n * @example\n * ```js\n * const t = table.new(position.top_right, 1, 1);\n * eachBar((c) => {\n * if (c.i === c.n - 1) table.cell_set_text(t, 0, 0, \"Close \" + str.tostring(c.close, \"#.##\"));\n * });\n * ```\n */\nexport function cell_set_text(table_id: Table, column: number, row: number, value: TableCell['text']): void {\n setCell('cell_set_text', 'text', table_id, column, row, value);\n}\n\n/**\n * Changes the width of a cell. A cell that was not written yet is created.\n * @param table_id - The table.\n * @param column - Column of the cell, from 0.\n * @param row - Row of the cell, from 0.\n * @param value - Width in percent of the pane's width; 0 fits the text.\n * @example\n * ```js\n * const t = table.new(position.top_right, 1, 1);\n * table.cell(t, 0, 0, \"Trend\");\n * table.cell_set_width(t, 0, 0, 10);\n * ```\n */\nexport function cell_set_width(table_id: Table, column: number, row: number, value: TableCell['width']): void {\n setCell('cell_set_width', 'width', table_id, column, row, value);\n}\n\n/**\n * Changes the height of a cell. A cell that was not written yet is created.\n * @param table_id - The table.\n * @param column - Column of the cell, from 0.\n * @param row - Row of the cell, from 0.\n * @param value - Height in percent of the pane's height; 0 fits the text.\n * @example\n * ```js\n * const t = table.new(position.top_right, 1, 1);\n * table.cell(t, 0, 0, \"Trend\");\n * table.cell_set_height(t, 0, 0, 5);\n * ```\n */\nexport function cell_set_height(table_id: Table, column: number, row: number, value: TableCell['height']): void {\n setCell('cell_set_height', 'height', table_id, column, row, value);\n}\n\n/**\n * Changes the text colour of a cell. A cell that was not written yet is created.\n * @param table_id - The table.\n * @param column - Column of the cell, from 0.\n * @param row - Row of the cell, from 0.\n * @param value - New text colour (`color.red`, `\"#FF0000\"`...).\n * @example\n * ```js\n * const t = table.new(position.top_right, 1, 1);\n * eachBar((c) => {\n * if (c.i === c.n - 1) table.cell_set_text_color(t, 0, 0, c.close > c.open ? color.green : color.red);\n * });\n * ```\n */\nexport function cell_set_text_color(table_id: Table, column: number, row: number, value: TableCell['text_color']): void {\n setCell('cell_set_text_color', 'text_color', table_id, column, row, value);\n}\n\n/**\n * Changes the horizontal alignment of the text of a cell. A cell that was not written yet is created.\n * @param table_id - The table.\n * @param column - Column of the cell, from 0.\n * @param row - Row of the cell, from 0.\n * @param value - `text.align_left`, `text.align_center` or `text.align_right`.\n * @example\n * ```js\n * const t = table.new(position.top_right, 1, 1);\n * table.cell(t, 0, 0, \"Volume\", { width: 15 });\n * table.cell_set_text_halign(t, 0, 0, text.align_left);\n * ```\n */\nexport function cell_set_text_halign(table_id: Table, column: number, row: number, value: TableCell['text_halign']): void {\n setCell('cell_set_text_halign', 'text_halign', table_id, column, row, value);\n}\n\n/**\n * Changes the vertical alignment of the text of a cell. A cell that was not written yet is created.\n * @param table_id - The table.\n * @param column - Column of the cell, from 0.\n * @param row - Row of the cell, from 0.\n * @param value - `text.align_top`, `text.align_center` or `text.align_bottom`.\n * @example\n * ```js\n * const t = table.new(position.top_right, 1, 1);\n * table.cell(t, 0, 0, \"Volume\", { height: 8 });\n * table.cell_set_text_valign(t, 0, 0, text.align_bottom);\n * ```\n */\nexport function cell_set_text_valign(table_id: Table, column: number, row: number, value: TableCell['text_valign']): void {\n setCell('cell_set_text_valign', 'text_valign', table_id, column, row, value);\n}\n\n/**\n * Changes the text size of a cell. A cell that was not written yet is created.\n * @param table_id - The table.\n * @param column - Column of the cell, from 0.\n * @param row - Row of the cell, from 0.\n * @param value - `size.tiny`, `size.small`, `size.normal`, `size.large`, `size.huge`, `size.auto`, or a size in points.\n * @example\n * ```js\n * const t = table.new(position.top_right, 1, 1);\n * table.cell(t, 0, 0, \"Signal\");\n * table.cell_set_text_size(t, 0, 0, size.large);\n * ```\n */\nexport function cell_set_text_size(table_id: Table, column: number, row: number, value: TableCell['text_size']): void {\n setCell('cell_set_text_size', 'text_size', table_id, column, row, value);\n}\n\n/**\n * Changes the background colour of a cell. A cell that was not written yet is created.\n * @param table_id - The table.\n * @param column - Column of the cell, from 0.\n * @param row - Row of the cell, from 0.\n * @param value - New background colour.\n * @example\n * ```js\n * const t = table.new(position.top_right, 1, 1);\n * eachBar((c) => {\n * if (c.i === c.n - 1) table.cell_set_bgcolor(t, 0, 0, c.close > c.open ? color.teal : color.maroon);\n * });\n * ```\n */\nexport function cell_set_bgcolor(table_id: Table, column: number, row: number, value: TableCell['bgcolor']): void {\n setCell('cell_set_bgcolor', 'bgcolor', table_id, column, row, value);\n}\n\n/**\n * Changes the tooltip of a cell: the text shown when the pointer is over it. A cell that was not written yet is\n * created.\n * @param table_id - The table.\n * @param column - Column of the cell, from 0.\n * @param row - Row of the cell, from 0.\n * @param value - Tooltip text.\n * @example\n * ```js\n * const t = table.new(position.top_right, 1, 1);\n * table.cell(t, 0, 0, \"ATR\");\n * table.cell_set_tooltip(t, 0, 0, \"Average true range over 14 bars\");\n * ```\n */\nexport function cell_set_tooltip(table_id: Table, column: number, row: number, value: TableCell['tooltip']): void {\n setCell('cell_set_tooltip', 'tooltip', table_id, column, row, value);\n}\n\n/**\n * Changes the font of a cell's text. A cell that was not written yet is created.\n * @param table_id - The table.\n * @param column - Column of the cell, from 0.\n * @param row - Row of the cell, from 0.\n * @param value - `font.family_default` or `font.family_monospace`.\n * @example\n * ```js\n * const t = table.new(position.top_right, 1, 1);\n * table.cell(t, 0, 0, \"123.45\");\n * table.cell_set_text_font_family(t, 0, 0, font.family_monospace);\n * ```\n */\nexport function cell_set_text_font_family(table_id: Table, column: number, row: number, value: TableCell['text_font_family']): void {\n setCell('cell_set_text_font_family', 'text_font_family', table_id, column, row, value);\n}\n\n/**\n * Makes a cell's text bold, italic, both or plain. A cell that was not written yet is created.\n * @param table_id - The table.\n * @param column - Column of the cell, from 0.\n * @param row - Row of the cell, from 0.\n * @param value - `text.format_bold`, `text.format_italic`, their sum, or `text.format_none`.\n * @example\n * ```js\n * const t = table.new(position.top_right, 1, 1);\n * table.cell(t, 0, 0, \"Summary\");\n * table.cell_set_text_formatting(t, 0, 0, text.format_bold + text.format_italic);\n * ```\n */\nexport function cell_set_text_formatting(table_id: Table, column: number, row: number, value: TableCell['text_formatting']): void {\n setCell('cell_set_text_formatting', 'text_formatting', table_id, column, row, value);\n}\n\n/**\n * Joins a block of cells into one cell, for a title over several columns for example. The merged cell shows the\n * content and look of its start (top-left) cell. Merging the same block again does nothing. A cell outside the table,\n * or an end before the start, is an error; on a deleted table it does nothing.\n * @param table_id - The table.\n * @param start_column - Column of the top-left cell of the block, from 0.\n * @param start_row - Row of the top-left cell of the block, from 0.\n * @param end_column - Column of the bottom-right cell of the block (not before `start_column`).\n * @param end_row - Row of the bottom-right cell of the block (not before `start_row`).\n * @example\n * ```js\n * const t = table.new(position.top_right, 2, 2);\n * table.cell(t, 0, 0, \"Daily stats\");\n * table.merge_cells(t, 0, 0, 1, 0); // the title spans both columns\n * ```\n */\nexport function merge_cells(\n table_id: Table,\n start_column: number,\n start_row: number,\n end_column: number,\n end_row: number\n): void {\n if (isDeleted(table_id)) return;\n checkCell('table.merge_cells()', table_id, start_column, start_row);\n checkCell('table.merge_cells()', table_id, end_column, end_row);\n if (end_column < start_column || end_row < start_row) {\n throw new RangeError('table.merge_cells(): the end cell is before the start cell.');\n }\n // One merge per range, as PineScript: merging the same cells again (a script that merges on every bar) keeps one.\n const merges = (table_id.merges ??= []);\n if (!merges.some((m) => m.start_column === start_column && m.start_row === start_row && m.end_column === end_column && m.end_row === end_row)) {\n merges.push({ start_column, start_row, end_column, end_row });\n }\n}\n\n/**\n * Empties a block of cells (text and look), and removes the merges that start inside it. Without an end, only the\n * start cell is cleared. A cell outside the table is an error; on a deleted table it does nothing.\n * @param table_id - The table.\n * @param start_column - Column of the top-left cell of the block, from 0.\n * @param start_row - Row of the top-left cell of the block, from 0.\n * @param end_column - Column of the bottom-right cell of the block. Default: `start_column`.\n * @param end_row - Row of the bottom-right cell of the block. Default: `start_row`.\n * @example\n * ```js\n * const t = table.new(position.top_right, 3, 3);\n * eachBar((c) => {\n * if (c.i === c.n - 1) table.clear(t, 0, 0, 2, 2); // empty all nine cells\n * });\n * ```\n */\nexport function clear(\n table_id: Table,\n start_column: number,\n start_row: number,\n end_column: number = start_column,\n end_row: number = start_row\n): void {\n if (isDeleted(table_id)) return;\n checkCell('table.clear()', table_id, start_column, start_row);\n checkCell('table.clear()', table_id, end_column, end_row);\n const inside = (column: number, row: number): boolean =>\n column >= start_column && column <= end_column && row >= start_row && row <= end_row;\n for (let column = start_column; column <= end_column; column++) {\n for (let row = start_row; row <= end_row; row++) table_id.cells?.delete(key(column, row));\n }\n if (table_id.merges) table_id.merges = table_id.merges.filter((m) => !inside(m.start_column, m.start_row));\n}\n\n/** Sets one property of a table; nothing on a deleted table. */\nfunction setTable<K extends keyof Table>(table_id: Table, field: K, value: Table[K]): void {\n if (isDeleted(table_id)) return;\n table_id[field] = value;\n}\n\n/**\n * Moves the table to another place of the pane. A live table already at that position (with the same\n * `force_overlay`) is deleted. Does nothing on a deleted table.\n * @param table_id - The table.\n * @param position - New place: `position.top_left`, `position.top_center`, `position.top_right`,\n * `position.middle_left`, `position.middle_center`, `position.middle_right`, `position.bottom_left`,\n * `position.bottom_center` or `position.bottom_right`.\n * @example\n * ```js\n * const where = input.string(\"Top right\", \"Table\", { options: [\"Top right\", \"Bottom left\"] });\n * const t = table.new(position.top_right, 1, 1);\n * if (where === \"Bottom left\") table.set_position(t, position.bottom_left);\n * ```\n */\nexport function set_position(table_id: Table, position: TablePosition): void {\n if (isDeleted(table_id)) return;\n freePosition(position, table_id.force_overlay ?? false, table_id);\n table_id.position = position;\n}\n\n/**\n * Changes the background colour of the whole table (cells with their own background keep it). Does nothing on a\n * deleted table.\n * @param table_id - The table.\n * @param value - New background colour.\n * @example\n * ```js\n * const t = table.new(position.top_right, 1, 1);\n * eachBar((c) => {\n * if (c.i === c.n - 1) table.set_bgcolor(t, c.close > c.open ? color.new(color.green, 80) : color.new(color.red, 80));\n * });\n * ```\n */\nexport function set_bgcolor(table_id: Table, value: Table['bgcolor']): void {\n setTable(table_id, 'bgcolor', value);\n}\n\n/**\n * Changes the colour of the outer frame of the table. Does nothing on a deleted table.\n * @param table_id - The table.\n * @param value - New frame colour.\n * @example\n * ```js\n * const t = table.new(position.top_right, 1, 1, { frame_width: 1 });\n * table.set_frame_color(t, color.gray);\n * ```\n */\nexport function set_frame_color(table_id: Table, value: Table['frame_color']): void {\n setTable(table_id, 'frame_color', value);\n}\n\n/**\n * Changes the width of the outer frame of the table. Does nothing on a deleted table.\n * @param table_id - The table.\n * @param value - New frame width in pixels; 0 hides the frame.\n * @example\n * ```js\n * const t = table.new(position.top_right, 1, 1, { frame_color: color.gray });\n * table.set_frame_width(t, 2);\n * ```\n */\nexport function set_frame_width(table_id: Table, value: Table['frame_width']): void {\n setTable(table_id, 'frame_width', value);\n}\n\n/**\n * Changes the colour of the lines between the cells. Does nothing on a deleted table.\n * @param table_id - The table.\n * @param value - New border colour.\n * @example\n * ```js\n * const t = table.new(position.top_right, 2, 2, { border_width: 1 });\n * table.set_border_color(t, color.silver);\n * ```\n */\nexport function set_border_color(table_id: Table, value: Table['border_color']): void {\n setTable(table_id, 'border_color', value);\n}\n\n/**\n * Changes the width of the lines between the cells. Does nothing on a deleted table.\n * @param table_id - The table.\n * @param value - New border width in pixels; 0 hides the lines.\n * @example\n * ```js\n * const t = table.new(position.top_right, 2, 2, { border_color: color.silver });\n * table.set_border_width(t, 1);\n * ```\n */\nexport function set_border_width(table_id: Table, value: Table['border_width']): void {\n setTable(table_id, 'border_width', value);\n}\n\n/**\n * Removes the table from the pane and from `table.all`. Afterwards the table functions do nothing on it; deleting it\n * again does nothing.\n * @param table_id - The table to delete.\n * @example\n * ```js\n * const show = input.bool(true, \"Show table\");\n * const t = table.new(position.top_right, 1, 1);\n * if (!show) table.delete(t);\n * ```\n */\nexport function delete_table(table_id: Table): void {\n remove('table', table_id);\n}\n\n/**\n * Returns the tables that are still on the pane, oldest first. The array is a copy.\n * (In a script, `table.all` is read as a value, without a call.)\n * @returns The live tables in creation order.\n * @example\n * ```js\n * eachBar((c) => {\n * if (c.i === c.n - 1) for (const t of table.all) table.set_bgcolor(t, color.new(color.black, 50));\n * });\n * ```\n */\nexport function all(): Table[] {\n return allDrawings('table');\n}\n\n// Alias to match PineScript API\nexport { new_table as new };\nexport { delete_table as delete };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAqBA,sBAAgE;AAShE,SAAS,aAAa,UAAyB,eAAwB,MAAoB;AACzF,aAAW,WAAO,gBAAAA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SAAS,SAAS,OAAO,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,cAAc,EAAE,SAAS,CAAC;AAC3G;AAGA,SAAS,SAAgC,UAAiB,OAAU,OAAuB;AACzF,UAAI,2BAAU,QAAQ,EAAG;AACzB,WAAS,KAAK,IAAI;AACpB;AAgBO,SAAS,aAAa,UAAiB,UAA+B;AAC3E,UAAI,2BAAU,QAAQ,EAAG;AACzB,eAAa,UAAU,SAAS,iBAAiB,OAAO,QAAQ;AAChE,WAAS,WAAW;AACtB;AAeO,SAAS,YAAY,UAAiB,OAA+B;AAC1E,WAAS,UAAU,WAAW,KAAK;AACrC;AAYO,SAAS,gBAAgB,UAAiB,OAAmC;AAClF,WAAS,UAAU,eAAe,KAAK;AACzC;AAYO,SAAS,gBAAgB,UAAiB,OAAmC;AAClF,WAAS,UAAU,eAAe,KAAK;AACzC;AAYO,SAAS,iBAAiB,UAAiB,OAAoC;AACpF,WAAS,UAAU,gBAAgB,KAAK;AAC1C;AAYO,SAAS,iBAAiB,UAAiB,OAAoC;AACpF,WAAS,UAAU,gBAAgB,KAAK;AAC1C;AAaO,SAAS,aAAa,UAAuB;AAClD,8BAAO,SAAS,QAAQ;AAC1B;AAaO,SAAS,MAAe;AAC7B,aAAO,gBAAAD,KAAY,OAAO;AAC5B;",
6
6
  "names": ["allDrawings", "cell"]
7
7
  }
@@ -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,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/text/index.ts"],
4
- "sourcesContent": ["/**\n * Text namespace\n * PineScript `text.format_*` constants for `label.set_text_formatting` and `box.set_text_formatting`, and the\n * `text.align_*` / `text.wrap_*` constants.\n *\n * The format values are flags that add up, as in PineScript (`text.format_bold + text.format_italic`).\n * They are the values PineScript uses for drawn labels and boxes.\n */\n\n/** No formatting. */\nexport const format_none = 0;\n/** Bold text. */\nexport const format_bold = 1;\n/** Italic text. */\nexport const format_italic = 2;\n\n/** Text aligned to the left (`table.cell`, `box.new`, `label.new` textalign). */\nexport const align_left = 'left' as const;\n/** Text centred horizontally or vertically. */\nexport const align_center = 'center' as const;\n/** Text aligned to the right. */\nexport const align_right = 'right' as const;\n/** Text aligned to the top (`table.cell`, `box.new` text_valign). */\nexport const align_top = 'top' as const;\n/** Text aligned to the bottom. */\nexport const align_bottom = 'bottom' as const;\n/** Text wrapped to the box width (`box.new` text_wrap). */\nexport const wrap_auto = 'auto' as const;\n/** Text not wrapped. */\nexport const wrap_none = 'none' as const;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUO,MAAM,cAAc;AAEpB,MAAM,cAAc;AAEpB,MAAM,gBAAgB;AAGtB,MAAM,aAAa;AAEnB,MAAM,eAAe;AAErB,MAAM,cAAc;AAEpB,MAAM,YAAY;AAElB,MAAM,eAAe;AAErB,MAAM,YAAY;AAElB,MAAM,YAAY;",
4
+ "sourcesContent": ["/**\n * Text namespace: the `text.format_*` constants of `label.set_text_formatting()` and `box.set_text_formatting()`\n * (`text_formatting` option), and the `text.align_*` / `text.wrap_*` constants of labels, boxes and table cells.\n *\n * The format values are flags that add up: `text.format_bold + text.format_italic` is bold italic text.\n */\n\n/** Plain text: neither bold nor italic (the default). */\nexport const format_none = 0;\n/** Bold text; add `text.format_italic` for bold italic. */\nexport const format_bold = 1;\n/** Italic text; add `text.format_bold` for bold italic. */\nexport const format_italic = 2;\n\n/** Text aligned to the left (`text_halign` of `table.cell()` and `box.new()`, `textalign` of `label.new()`). */\nexport const align_left = 'left' as const;\n/** Text centred, horizontally or vertically. */\nexport const align_center = 'center' as const;\n/** Text aligned to the right. */\nexport const align_right = 'right' as const;\n/** Text aligned to the top (`text_valign` of `table.cell()` and `box.new()`). */\nexport const align_top = 'top' as const;\n/** Text aligned to the bottom (`text_valign`). */\nexport const align_bottom = 'bottom' as const;\n/** Text wrapped onto several lines to fit the width of the box (`text_wrap` of `box.new()`). */\nexport const wrap_auto = 'auto' as const;\n/** Text not wrapped: each line of the text stays on one line. */\nexport const wrap_none = 'none' as const;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQO,MAAM,cAAc;AAEpB,MAAM,cAAc;AAEpB,MAAM,gBAAgB;AAGtB,MAAM,aAAa;AAEnB,MAAM,eAAe;AAErB,MAAM,cAAc;AAEpB,MAAM,YAAY;AAElB,MAAM,eAAe;AAErB,MAAM,YAAY;AAElB,MAAM,YAAY;",
6
6
  "names": []
7
7
  }
@@ -302,30 +302,37 @@ export interface OHLC {
302
302
  }
303
303
  export declare const na: null;
304
304
  export type na = null;
305
- /**
306
- * X-axis location constants
307
- * Used to specify whether x-coordinates are bar indices, timestamps or places on the pane
308
- */
305
+ /** What the x coordinates of a drawing (label, line, box, polyline) are (`xloc` option). */
309
306
  export declare const xloc: {
310
- /** X-coordinates are bar indices */
307
+ /** Bar indexes: 0 is the first bar, `bar_index` the current one (the default). */
311
308
  bar_index: "bar_index";
312
- /** X-coordinates are UNIX timestamps in milliseconds */
309
+ /** UNIX times in milliseconds, such as `time` or `time_close`. */
313
310
  bar_time: "bar_time";
314
- /** X-coordinates are percents of the pane's width: 0 left edge, 100 right edge (not a PineScript value) */
311
+ /** Percents of the pane's width (0 left edge, 100 right edge): the drawing stays in place while the user scrolls and zooms. */
315
312
  pane: "pane";
316
313
  };
317
314
  /**
318
- * Table position constants (PineScript `position.*`), for `table.new` and `table.set_position`
315
+ * Where a table sits in the pane: the first argument of `table.new()` and of `table.set_position()`
316
+ * (`table.new(position.top_right, 2, 3)`).
319
317
  */
320
318
  export declare const position: {
319
+ /** The top-left corner of the pane. */
321
320
  top_left: "top_left";
321
+ /** The middle of the top edge. */
322
322
  top_center: "top_center";
323
+ /** The top-right corner of the pane. */
323
324
  top_right: "top_right";
325
+ /** The middle of the left edge. */
324
326
  middle_left: "middle_left";
327
+ /** The centre of the pane. */
325
328
  middle_center: "middle_center";
329
+ /** The middle of the right edge. */
326
330
  middle_right: "middle_right";
331
+ /** The bottom-left corner of the pane. */
327
332
  bottom_left: "bottom_left";
333
+ /** The middle of the bottom edge. */
328
334
  bottom_center: "bottom_center";
335
+ /** The bottom-right corner of the pane. */
329
336
  bottom_right: "bottom_right";
330
337
  };
331
338
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,MAAM,MAAM,GAAG,GAAG,MAAM,CAAC;AACzB,MAAM,MAAM,KAAK,GAAG,MAAM,CAAC;AAC3B,MAAM,MAAM,IAAI,GAAG,OAAO,CAAC;AAE3B,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;AAGpC,MAAM,MAAM,MAAM,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;AAC5B,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;AACrC,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AACzC,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;AACvC,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;AAC3C,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AAGzC,MAAM,MAAM,UAAU,GAAG,GAAG,CAAC;AAC7B,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC;AACjC,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC;AAC/B,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC;AACnC,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC;AAGjC,MAAM,MAAM,SAAS,GAAG,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
27
27
  const xloc = {
28
- /** X-coordinates are bar indices */
28
+ /** Bar indexes: 0 is the first bar, `bar_index` the current one (the default). */
29
29
  bar_index: "bar_index",
30
- /** X-coordinates are UNIX timestamps in milliseconds */
30
+ /** UNIX times in milliseconds, such as `time` or `time_close`. */
31
31
  bar_time: "bar_time",
32
- /** X-coordinates are percents of the pane's width: 0 left edge, 100 right edge (not a PineScript value) */
32
+ /** Percents of the pane's width (0 left edge, 100 right edge): the drawing stays in place while the user scrolls and zooms. */
33
33
  pane: "pane"
34
34
  };
35
35
  const position = {
36
+ /** The top-left corner of the pane. */
36
37
  top_left: "top_left",
38
+ /** The middle of the top edge. */
37
39
  top_center: "top_center",
40
+ /** The top-right corner of the pane. */
38
41
  top_right: "top_right",
42
+ /** The middle of the left edge. */
39
43
  middle_left: "middle_left",
44
+ /** The centre of the pane. */
40
45
  middle_center: "middle_center",
46
+ /** The middle of the right edge. */
41
47
  middle_right: "middle_right",
48
+ /** The bottom-left corner of the pane. */
42
49
  bottom_left: "bottom_left",
50
+ /** The middle of the bottom edge. */
43
51
  bottom_center: "bottom_center",
52
+ /** The bottom-right corner of the pane. */
44
53
  bottom_right: "bottom_right"
45
54
  };
46
55
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/types/index.ts"],
4
- "sourcesContent": ["/**\n * Core types for OakScriptJS\n * These types mirror the PineScript type system\n */\n\n// Basic types\nexport type int = number;\nexport type float = number;\nexport type bool = boolean;\n//export type string = string;\nexport type color = string | number;\n\n// Series types - In PineScript, series are time-series arrays\nexport type series<T> = T[];\nexport type series_int = series<int>;\nexport type series_float = series<float>;\nexport type series_bool = series<bool>;\nexport type series_string = series<string>;\nexport type series_color = series<color>;\n\n// Simple types (non-series)\nexport type simple_int = int;\nexport type simple_float = float;\nexport type simple_bool = bool;\nexport type simple_string = string;\nexport type simple_color = color;\n\n// Input types\nexport type input_int = int;\nexport type input_float = float;\nexport type input_bool = bool;\nexport type input_string = string;\nexport type input_color = color;\n\n// Const types (compile-time constants)\nexport type const_int = int;\nexport type const_float = float;\nexport type const_bool = bool;\nexport type const_string = string;\nexport type const_color = color;\n\n// Source types for indicators\nexport type Source = series_float;\n\n// Array types\n// PineScript arrays are JS arrays; aliased for API parity and future extension.\nexport type PineArray<T> = Array<T>;\n\n// Map types\n// PineScript maps are JS Maps: keys in insertion order, exact key equality.\nexport type PineMapKey = number | string | boolean;\nexport type PineMap<K extends PineMapKey, V> = Map<K, V>;\n\n// Matrix types\nexport interface PineMatrix<T> {\n rows: int;\n columns: int;\n data: T[][];\n}\n\n// Drawing object types - Now implemented for computational use!\n// While primarily used for visualization in PineScript, these objects have computational value:\n// - line.get_price() for trend analysis\n// - box getters for gap detection and range breakouts\n\n/**\n * Line object - Represents a line on the chart\n * @remarks\n * While lines are visual in PineScript, line.get_price() provides computational value\n * for detecting trend line breakouts, calculating support/resistance levels, etc.\n */\nexport interface Line {\n /** First point's x coordinate (bar index, UNIX timestamp, or percent of the pane's width with xloc 'pane') */\n x1: number;\n /** First point's y coordinate (price level) */\n y1: number;\n /** Second point's x coordinate (bar index, UNIX timestamp, or percent of the pane's width with xloc 'pane') */\n x2: number;\n /** Second point's y coordinate (price level) */\n y2: number;\n /** X-axis coordinate system */\n xloc: 'bar_index' | 'bar_time' | 'pane';\n /** Extension mode */\n extend: 'none' | 'left' | 'right' | 'both';\n /** Line color (stored but not used for calculations) */\n color?: color;\n /** Line style (stored but not used for calculations) */\n style?: 'solid' | 'dotted' | 'dashed' | 'arrow_left' | 'arrow_right' | 'arrow_both';\n /** Line width in pixels (stored but not used for calculations) */\n width?: number;\n /** Display on the main chart pane (PineScript force_overlay) */\n force_overlay?: boolean;\n}\n\n/**\n * Box object - Represents a rectangular area on the chart\n * @remarks\n * Box getters (get_top, get_bottom, get_left, get_right) enable gap detection,\n * range breakout analysis, and consolidation zone identification.\n */\nexport interface Box {\n /** Left border x coordinate (bar index, UNIX timestamp, or percent of the pane's width with xloc 'pane') */\n left: number;\n /** Top border y coordinate (price level) */\n top: number;\n /** Right border x coordinate (bar index, UNIX timestamp, or percent of the pane's width with xloc 'pane') */\n right: number;\n /** Bottom border y coordinate (price level) */\n bottom: number;\n /** X-axis coordinate system */\n xloc: 'bar_index' | 'bar_time' | 'pane';\n /** Horizontal extension mode */\n extend: 'none' | 'left' | 'right' | 'both';\n /** Border color (stored but not used for calculations) */\n border_color?: color;\n /** Border width in pixels (stored but not used for calculations) */\n border_width?: number;\n /** Border style (stored but not used for calculations) */\n border_style?: 'solid' | 'dotted' | 'dashed';\n /** Background fill color (stored but not used for calculations) */\n bgcolor?: color;\n /** Text content displayed in the box */\n text?: string;\n /** Text size */\n text_size?: string | number;\n /** Text color */\n text_color?: color;\n /** Horizontal text alignment */\n text_halign?: 'left' | 'center' | 'right';\n /** Vertical text alignment */\n text_valign?: 'top' | 'center' | 'bottom';\n /** Text wrapping mode */\n text_wrap?: 'none' | 'auto';\n /** Text font family */\n text_font_family?: 'default' | 'monospace';\n /** Text formatting flags: 0 none, 1 bold, 2 italic, 3 bold + italic (PineScript text.format_*) */\n text_formatting?: number;\n /** Display on the main chart pane (PineScript force_overlay) */\n force_overlay?: boolean;\n}\n\n/**\n * Label object - Represents a label/annotation on the chart\n * @remarks\n * Labels have limited computational value. Primarily used for marking points and displaying text.\n */\nexport interface Label {\n /** X coordinate (bar index, UNIX timestamp, or percent of the pane's width with xloc 'pane') */\n x: number;\n /** Y coordinate (price level when yloc = 'price') */\n y: number;\n /** X-axis coordinate system */\n xloc: 'bar_index' | 'bar_time' | 'pane';\n /** Y-axis positioning mode */\n yloc: 'price' | 'abovebar' | 'belowbar';\n /** Label text content */\n text?: string;\n /** Tooltip text shown on hover */\n tooltip?: string;\n /** Border and arrow color */\n color?: color;\n /** Label style */\n style?: 'none' | 'xcross' | 'cross' | 'triangleup' | 'triangledown' | 'flag' | 'circle' |\n 'arrowup' | 'arrowdown' | 'label_up' | 'label_down' | 'label_left' | 'label_right' |\n 'label_lower_left' | 'label_lower_right' | 'label_upper_left' | 'label_upper_right' |\n 'label_center' | 'square' | 'diamond' | 'text_outline';\n /** Text color */\n textcolor?: color;\n /** Label size */\n size?: string | number;\n /** Text alignment */\n textalign?: 'left' | 'center' | 'right';\n /** Text font family */\n text_font_family?: 'default' | 'monospace';\n /** Text formatting flags: 0 none, 1 bold, 2 italic, 3 bold + italic (PineScript text.format_*) */\n text_formatting?: number;\n /** Display on the main chart pane (PineScript force_overlay) */\n force_overlay?: boolean;\n}\n\n/**\n * Linefill object - Represents a filled area between two lines\n * @remarks\n * Minimal computational value. Used to fill channel areas visually.\n */\nexport interface Linefill {\n /** First line reference */\n line1: Line;\n /** Second line reference */\n line2: Line;\n /** Fill color */\n color?: color;\n}\n\n/**\n * Table object - Represents a table for displaying data\n * @remarks\n * Tables have NO computational value (no getter functions in PineScript).\n * Purely for display/visualization purposes.\n */\nexport interface Table {\n /** Table position on chart */\n position: 'top_left' | 'top_center' | 'top_right' |\n 'middle_left' | 'middle_center' | 'middle_right' |\n 'bottom_left' | 'bottom_center' | 'bottom_right';\n /** Number of columns */\n columns: number;\n /** Number of rows */\n rows: number;\n /** Outer frame color */\n frame_color?: color;\n /** Outer frame width */\n frame_width?: number;\n /** Cell border color */\n border_color?: color;\n /** Cell border width */\n border_width?: number;\n /** Table background color */\n bgcolor?: color;\n /** Display on the main chart pane (PineScript force_overlay) */\n force_overlay?: boolean;\n /** Cells by \"column,row\" */\n cells?: Map<string, TableCell>;\n /** Merged cell ranges (PineScript table.merge_cells) */\n merges?: TableMerge[];\n}\n\n/**\n * Merged cell range of a table\n */\nexport interface TableMerge {\n start_column: number;\n start_row: number;\n end_column: number;\n end_row: number;\n}\n\n/**\n * Table cell data\n */\nexport interface TableCell {\n /** Cell text content */\n text?: string;\n /** Cell width as percentage */\n width?: number;\n /** Cell height as percentage */\n height?: number;\n /** Text color */\n text_color?: color;\n /** Horizontal text alignment */\n text_halign?: 'left' | 'center' | 'right';\n /** Vertical text alignment */\n text_valign?: 'top' | 'center' | 'bottom';\n /** Text size */\n text_size?: string | number;\n /** Cell background color */\n bgcolor?: color;\n /** Cell tooltip */\n tooltip?: string;\n /** Text font family */\n text_font_family?: 'default' | 'monospace';\n /** Text formatting flags: 0 none, 1 bold, 2 italic, 3 bold + italic (PineScript text.format_*) */\n text_formatting?: number;\n}\n\n// Series types for drawing objects\nexport type series_line = series<Line>;\nexport type series_box = series<Box>;\nexport type series_label = series<Label>;\nexport type series_linefill = series<Linefill>;\nexport type series_table = series<Table>;\n\n/**\n * Plot object - Represents a plot instance created by plot() function\n * @remarks\n * In PineScript, plot() returns a reference to a plot instance that can be used with fill().\n * This ID is used to reference the plot for filling between plots.\n */\nexport interface Plot {\n /** Unique identifier for this plot */\n id: string;\n /** Series being plotted */\n series: any;\n /** Plot title */\n title?: string;\n /** Plot color */\n color?: any;\n /** Line width */\n linewidth?: number;\n /** Plot style */\n style?: 'line' | 'stepline' | 'histogram' | 'area' | 'circles' | 'columns';\n /** Track price on y-axis */\n trackprice?: boolean;\n /** Histogram base level */\n histbase?: number;\n /** Offset in bars */\n offset?: number;\n /** Join gaps */\n join?: boolean;\n /** Editable in chart */\n editable?: boolean;\n /** Display mode */\n display?: 'all' | 'none';\n}\n\n/**\n * HLine object - Represents a horizontal line instance created by hline() function\n * @remarks\n * In PineScript, hline() returns a reference to an hline instance that can be used with fill().\n * This ID is used to reference the horizontal line for filling between levels.\n */\nexport interface HLine {\n /** Unique identifier for this hline */\n id: string;\n /** Price level for the horizontal line */\n price: number;\n /** Line title */\n title?: string;\n /** Line color */\n color?: any;\n /** Line style */\n linestyle?: 'solid' | 'dashed' | 'dotted';\n /** Line width */\n linewidth?: number;\n /** Editable in chart */\n editable?: boolean;\n}\n\n// Series types for plot and hline (always series qualifier in PineScript)\nexport type series_plot = Plot;\nexport type series_hline = HLine;\n\n// Excluded types (StrategyEntry, StrategyExit) - not used in calculation-only library\n\n// Bar data\nexport interface Bar {\n time: int;\n open: float;\n high: float;\n low: float;\n close: float;\n volume?: float;\n}\n\n// OHLC data type\nexport interface OHLC {\n open: series_float;\n high: series_float;\n low: series_float;\n close: series_float;\n volume?: series_float;\n}\n\n// Constants\nexport const na = null;\nexport type na = null;\n\n/**\n * X-axis location constants\n * Used to specify whether x-coordinates are bar indices, timestamps or places on the pane\n */\nexport const xloc = {\n /** X-coordinates are bar indices */\n bar_index: 'bar_index' as const,\n /** X-coordinates are UNIX timestamps in milliseconds */\n bar_time: 'bar_time' as const,\n /** X-coordinates are percents of the pane's width: 0 left edge, 100 right edge (not a PineScript value) */\n pane: 'pane' as const,\n};\n\n/**\n * Table position constants (PineScript `position.*`), for `table.new` and `table.set_position`\n */\nexport const position = {\n top_left: 'top_left' as const,\n top_center: 'top_center' as const,\n top_right: 'top_right' as const,\n middle_left: 'middle_left' as const,\n middle_center: 'middle_center' as const,\n middle_right: 'middle_right' as const,\n bottom_left: 'bottom_left' as const,\n bottom_center: 'bottom_center' as const,\n bottom_right: 'bottom_right' as const,\n};\n\n/**\n * ChartPoint interface - Represents a point on the chart\n * @remarks\n * A chart point can have time, index, and price coordinates.\n * At least one of time or index should be provided for x-coordinate positioning.\n */\nexport interface ChartPoint {\n /** UNIX timestamp in milliseconds (null if using bar index) */\n readonly time: number | null;\n /** Bar index (null if using time) */\n readonly index: number | null;\n /** Y-axis price value */\n readonly price: number;\n}\n\n/**\n * Polyline interface - Represents a polyline on the chart\n * @remarks\n * A polyline connects multiple chart points with line segments.\n * When closed, it forms a polygon that can be filled with color.\n */\nexport interface Polyline {\n /** Unique identifier for this polyline */\n readonly id: string;\n /** Array of chart points that define the polyline */\n readonly points: readonly ChartPoint[];\n /** If true, use curved line segments (not yet supported - uses straight lines) */\n readonly curved: boolean;\n /** If true, connect the first point to the last point */\n readonly closed: boolean;\n /** X-coordinate mode: 'bar_index', 'bar_time' or 'pane' */\n readonly xloc: 'bar_index' | 'bar_time' | 'pane';\n /** Color of line segments */\n readonly line_color: color;\n /** Fill color for closed polylines (null for no fill) */\n readonly fill_color: color | null;\n /** Line style */\n readonly line_style: 'solid' | 'dotted' | 'dashed';\n /** Line width in pixels */\n readonly line_width: number;\n /** Force display on main pane */\n readonly force_overlay: boolean;\n}\n\n// Series types for chart point and polyline\nexport type series_chartpoint = series<ChartPoint>;\nexport type series_polyline = series<Polyline>;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAkWO,MAAM,KAAK;AAOX,MAAM,OAAO;AAAA;AAAA,EAElB,WAAW;AAAA;AAAA,EAEX,UAAU;AAAA;AAAA,EAEV,MAAM;AACR;AAKO,MAAM,WAAW;AAAA,EACtB,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,aAAa;AAAA,EACb,eAAe;AAAA,EACf,cAAc;AAAA,EACd,aAAa;AAAA,EACb,eAAe;AAAA,EACf,cAAc;AAChB;",
4
+ "sourcesContent": ["/**\n * Core types for OakScriptJS\n * These types mirror the PineScript type system\n */\n\n// Basic types\nexport type int = number;\nexport type float = number;\nexport type bool = boolean;\n//export type string = string;\nexport type color = string | number;\n\n// Series types - In PineScript, series are time-series arrays\nexport type series<T> = T[];\nexport type series_int = series<int>;\nexport type series_float = series<float>;\nexport type series_bool = series<bool>;\nexport type series_string = series<string>;\nexport type series_color = series<color>;\n\n// Simple types (non-series)\nexport type simple_int = int;\nexport type simple_float = float;\nexport type simple_bool = bool;\nexport type simple_string = string;\nexport type simple_color = color;\n\n// Input types\nexport type input_int = int;\nexport type input_float = float;\nexport type input_bool = bool;\nexport type input_string = string;\nexport type input_color = color;\n\n// Const types (compile-time constants)\nexport type const_int = int;\nexport type const_float = float;\nexport type const_bool = bool;\nexport type const_string = string;\nexport type const_color = color;\n\n// Source types for indicators\nexport type Source = series_float;\n\n// Array types\n// PineScript arrays are JS arrays; aliased for API parity and future extension.\nexport type PineArray<T> = Array<T>;\n\n// Map types\n// PineScript maps are JS Maps: keys in insertion order, exact key equality.\nexport type PineMapKey = number | string | boolean;\nexport type PineMap<K extends PineMapKey, V> = Map<K, V>;\n\n// Matrix types\nexport interface PineMatrix<T> {\n rows: int;\n columns: int;\n data: T[][];\n}\n\n// Drawing object types - Now implemented for computational use!\n// While primarily used for visualization in PineScript, these objects have computational value:\n// - line.get_price() for trend analysis\n// - box getters for gap detection and range breakouts\n\n/**\n * Line object - Represents a line on the chart\n * @remarks\n * While lines are visual in PineScript, line.get_price() provides computational value\n * for detecting trend line breakouts, calculating support/resistance levels, etc.\n */\nexport interface Line {\n /** First point's x coordinate (bar index, UNIX timestamp, or percent of the pane's width with xloc 'pane') */\n x1: number;\n /** First point's y coordinate (price level) */\n y1: number;\n /** Second point's x coordinate (bar index, UNIX timestamp, or percent of the pane's width with xloc 'pane') */\n x2: number;\n /** Second point's y coordinate (price level) */\n y2: number;\n /** X-axis coordinate system */\n xloc: 'bar_index' | 'bar_time' | 'pane';\n /** Extension mode */\n extend: 'none' | 'left' | 'right' | 'both';\n /** Line color (stored but not used for calculations) */\n color?: color;\n /** Line style (stored but not used for calculations) */\n style?: 'solid' | 'dotted' | 'dashed' | 'arrow_left' | 'arrow_right' | 'arrow_both';\n /** Line width in pixels (stored but not used for calculations) */\n width?: number;\n /** Display on the main chart pane (PineScript force_overlay) */\n force_overlay?: boolean;\n}\n\n/**\n * Box object - Represents a rectangular area on the chart\n * @remarks\n * Box getters (get_top, get_bottom, get_left, get_right) enable gap detection,\n * range breakout analysis, and consolidation zone identification.\n */\nexport interface Box {\n /** Left border x coordinate (bar index, UNIX timestamp, or percent of the pane's width with xloc 'pane') */\n left: number;\n /** Top border y coordinate (price level) */\n top: number;\n /** Right border x coordinate (bar index, UNIX timestamp, or percent of the pane's width with xloc 'pane') */\n right: number;\n /** Bottom border y coordinate (price level) */\n bottom: number;\n /** X-axis coordinate system */\n xloc: 'bar_index' | 'bar_time' | 'pane';\n /** Horizontal extension mode */\n extend: 'none' | 'left' | 'right' | 'both';\n /** Border color (stored but not used for calculations) */\n border_color?: color;\n /** Border width in pixels (stored but not used for calculations) */\n border_width?: number;\n /** Border style (stored but not used for calculations) */\n border_style?: 'solid' | 'dotted' | 'dashed';\n /** Background fill color (stored but not used for calculations) */\n bgcolor?: color;\n /** Text content displayed in the box */\n text?: string;\n /** Text size */\n text_size?: string | number;\n /** Text color */\n text_color?: color;\n /** Horizontal text alignment */\n text_halign?: 'left' | 'center' | 'right';\n /** Vertical text alignment */\n text_valign?: 'top' | 'center' | 'bottom';\n /** Text wrapping mode */\n text_wrap?: 'none' | 'auto';\n /** Text font family */\n text_font_family?: 'default' | 'monospace';\n /** Text formatting flags: 0 none, 1 bold, 2 italic, 3 bold + italic (PineScript text.format_*) */\n text_formatting?: number;\n /** Display on the main chart pane (PineScript force_overlay) */\n force_overlay?: boolean;\n}\n\n/**\n * Label object - Represents a label/annotation on the chart\n * @remarks\n * Labels have limited computational value. Primarily used for marking points and displaying text.\n */\nexport interface Label {\n /** X coordinate (bar index, UNIX timestamp, or percent of the pane's width with xloc 'pane') */\n x: number;\n /** Y coordinate (price level when yloc = 'price') */\n y: number;\n /** X-axis coordinate system */\n xloc: 'bar_index' | 'bar_time' | 'pane';\n /** Y-axis positioning mode */\n yloc: 'price' | 'abovebar' | 'belowbar';\n /** Label text content */\n text?: string;\n /** Tooltip text shown on hover */\n tooltip?: string;\n /** Border and arrow color */\n color?: color;\n /** Label style */\n style?: 'none' | 'xcross' | 'cross' | 'triangleup' | 'triangledown' | 'flag' | 'circle' |\n 'arrowup' | 'arrowdown' | 'label_up' | 'label_down' | 'label_left' | 'label_right' |\n 'label_lower_left' | 'label_lower_right' | 'label_upper_left' | 'label_upper_right' |\n 'label_center' | 'square' | 'diamond' | 'text_outline';\n /** Text color */\n textcolor?: color;\n /** Label size */\n size?: string | number;\n /** Text alignment */\n textalign?: 'left' | 'center' | 'right';\n /** Text font family */\n text_font_family?: 'default' | 'monospace';\n /** Text formatting flags: 0 none, 1 bold, 2 italic, 3 bold + italic (PineScript text.format_*) */\n text_formatting?: number;\n /** Display on the main chart pane (PineScript force_overlay) */\n force_overlay?: boolean;\n}\n\n/**\n * Linefill object - Represents a filled area between two lines\n * @remarks\n * Minimal computational value. Used to fill channel areas visually.\n */\nexport interface Linefill {\n /** First line reference */\n line1: Line;\n /** Second line reference */\n line2: Line;\n /** Fill color */\n color?: color;\n}\n\n/**\n * Table object - Represents a table for displaying data\n * @remarks\n * Tables have NO computational value (no getter functions in PineScript).\n * Purely for display/visualization purposes.\n */\nexport interface Table {\n /** Table position on chart */\n position: 'top_left' | 'top_center' | 'top_right' |\n 'middle_left' | 'middle_center' | 'middle_right' |\n 'bottom_left' | 'bottom_center' | 'bottom_right';\n /** Number of columns */\n columns: number;\n /** Number of rows */\n rows: number;\n /** Outer frame color */\n frame_color?: color;\n /** Outer frame width */\n frame_width?: number;\n /** Cell border color */\n border_color?: color;\n /** Cell border width */\n border_width?: number;\n /** Table background color */\n bgcolor?: color;\n /** Display on the main chart pane (PineScript force_overlay) */\n force_overlay?: boolean;\n /** Cells by \"column,row\" */\n cells?: Map<string, TableCell>;\n /** Merged cell ranges (PineScript table.merge_cells) */\n merges?: TableMerge[];\n}\n\n/**\n * Merged cell range of a table\n */\nexport interface TableMerge {\n start_column: number;\n start_row: number;\n end_column: number;\n end_row: number;\n}\n\n/**\n * Table cell data\n */\nexport interface TableCell {\n /** Cell text content */\n text?: string;\n /** Cell width as percentage */\n width?: number;\n /** Cell height as percentage */\n height?: number;\n /** Text color */\n text_color?: color;\n /** Horizontal text alignment */\n text_halign?: 'left' | 'center' | 'right';\n /** Vertical text alignment */\n text_valign?: 'top' | 'center' | 'bottom';\n /** Text size */\n text_size?: string | number;\n /** Cell background color */\n bgcolor?: color;\n /** Cell tooltip */\n tooltip?: string;\n /** Text font family */\n text_font_family?: 'default' | 'monospace';\n /** Text formatting flags: 0 none, 1 bold, 2 italic, 3 bold + italic (PineScript text.format_*) */\n text_formatting?: number;\n}\n\n// Series types for drawing objects\nexport type series_line = series<Line>;\nexport type series_box = series<Box>;\nexport type series_label = series<Label>;\nexport type series_linefill = series<Linefill>;\nexport type series_table = series<Table>;\n\n/**\n * Plot object - Represents a plot instance created by plot() function\n * @remarks\n * In PineScript, plot() returns a reference to a plot instance that can be used with fill().\n * This ID is used to reference the plot for filling between plots.\n */\nexport interface Plot {\n /** Unique identifier for this plot */\n id: string;\n /** Series being plotted */\n series: any;\n /** Plot title */\n title?: string;\n /** Plot color */\n color?: any;\n /** Line width */\n linewidth?: number;\n /** Plot style */\n style?: 'line' | 'stepline' | 'histogram' | 'area' | 'circles' | 'columns';\n /** Track price on y-axis */\n trackprice?: boolean;\n /** Histogram base level */\n histbase?: number;\n /** Offset in bars */\n offset?: number;\n /** Join gaps */\n join?: boolean;\n /** Editable in chart */\n editable?: boolean;\n /** Display mode */\n display?: 'all' | 'none';\n}\n\n/**\n * HLine object - Represents a horizontal line instance created by hline() function\n * @remarks\n * In PineScript, hline() returns a reference to an hline instance that can be used with fill().\n * This ID is used to reference the horizontal line for filling between levels.\n */\nexport interface HLine {\n /** Unique identifier for this hline */\n id: string;\n /** Price level for the horizontal line */\n price: number;\n /** Line title */\n title?: string;\n /** Line color */\n color?: any;\n /** Line style */\n linestyle?: 'solid' | 'dashed' | 'dotted';\n /** Line width */\n linewidth?: number;\n /** Editable in chart */\n editable?: boolean;\n}\n\n// Series types for plot and hline (always series qualifier in PineScript)\nexport type series_plot = Plot;\nexport type series_hline = HLine;\n\n// Excluded types (StrategyEntry, StrategyExit) - not used in calculation-only library\n\n// Bar data\nexport interface Bar {\n time: int;\n open: float;\n high: float;\n low: float;\n close: float;\n volume?: float;\n}\n\n// OHLC data type\nexport interface OHLC {\n open: series_float;\n high: series_float;\n low: series_float;\n close: series_float;\n volume?: series_float;\n}\n\n// Constants\nexport const na = null;\nexport type na = null;\n\n/** What the x coordinates of a drawing (label, line, box, polyline) are (`xloc` option). */\nexport const xloc = {\n /** Bar indexes: 0 is the first bar, `bar_index` the current one (the default). */\n bar_index: 'bar_index' as const,\n /** UNIX times in milliseconds, such as `time` or `time_close`. */\n bar_time: 'bar_time' as const,\n /** Percents of the pane's width (0 left edge, 100 right edge): the drawing stays in place while the user scrolls and zooms. */\n pane: 'pane' as const,\n};\n\n/**\n * Where a table sits in the pane: the first argument of `table.new()` and of `table.set_position()`\n * (`table.new(position.top_right, 2, 3)`).\n */\nexport const position = {\n /** The top-left corner of the pane. */\n top_left: 'top_left' as const,\n /** The middle of the top edge. */\n top_center: 'top_center' as const,\n /** The top-right corner of the pane. */\n top_right: 'top_right' as const,\n /** The middle of the left edge. */\n middle_left: 'middle_left' as const,\n /** The centre of the pane. */\n middle_center: 'middle_center' as const,\n /** The middle of the right edge. */\n middle_right: 'middle_right' as const,\n /** The bottom-left corner of the pane. */\n bottom_left: 'bottom_left' as const,\n /** The middle of the bottom edge. */\n bottom_center: 'bottom_center' as const,\n /** The bottom-right corner of the pane. */\n bottom_right: 'bottom_right' as const,\n};\n\n/**\n * ChartPoint interface - Represents a point on the chart\n * @remarks\n * A chart point can have time, index, and price coordinates.\n * At least one of time or index should be provided for x-coordinate positioning.\n */\nexport interface ChartPoint {\n /** UNIX timestamp in milliseconds (null if using bar index) */\n readonly time: number | null;\n /** Bar index (null if using time) */\n readonly index: number | null;\n /** Y-axis price value */\n readonly price: number;\n}\n\n/**\n * Polyline interface - Represents a polyline on the chart\n * @remarks\n * A polyline connects multiple chart points with line segments.\n * When closed, it forms a polygon that can be filled with color.\n */\nexport interface Polyline {\n /** Unique identifier for this polyline */\n readonly id: string;\n /** Array of chart points that define the polyline */\n readonly points: readonly ChartPoint[];\n /** If true, use curved line segments (not yet supported - uses straight lines) */\n readonly curved: boolean;\n /** If true, connect the first point to the last point */\n readonly closed: boolean;\n /** X-coordinate mode: 'bar_index', 'bar_time' or 'pane' */\n readonly xloc: 'bar_index' | 'bar_time' | 'pane';\n /** Color of line segments */\n readonly line_color: color;\n /** Fill color for closed polylines (null for no fill) */\n readonly fill_color: color | null;\n /** Line style */\n readonly line_style: 'solid' | 'dotted' | 'dashed';\n /** Line width in pixels */\n readonly line_width: number;\n /** Force display on main pane */\n readonly force_overlay: boolean;\n}\n\n// Series types for chart point and polyline\nexport type series_chartpoint = series<ChartPoint>;\nexport type series_polyline = series<Polyline>;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAkWO,MAAM,KAAK;AAIX,MAAM,OAAO;AAAA;AAAA,EAElB,WAAW;AAAA;AAAA,EAEX,UAAU;AAAA;AAAA,EAEV,MAAM;AACR;AAMO,MAAM,WAAW;AAAA;AAAA,EAEtB,UAAU;AAAA;AAAA,EAEV,YAAY;AAAA;AAAA,EAEZ,WAAW;AAAA;AAAA,EAEX,aAAa;AAAA;AAAA,EAEb,eAAe;AAAA;AAAA,EAEf,cAAc;AAAA;AAAA,EAEd,aAAa;AAAA;AAAA,EAEb,eAAe;AAAA;AAAA,EAEf,cAAc;AAChB;",
6
6
  "names": []
7
7
  }