@orangecharts/wrun-chart-host 0.11.0 → 0.14.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 (311) hide show
  1. package/README.md +1 -0
  2. package/dist/constants/feature-flags.constants.d.ts +3 -4
  3. package/dist/constants/feature-flags.constants.js +34 -52
  4. package/dist/constants/feature-limits.constants.d.ts +1 -1
  5. package/dist/constants/feature-limits.constants.js +5 -4
  6. package/dist/constants/interval.constants.d.ts +7 -0
  7. package/dist/constants/interval.constants.js +7 -0
  8. package/dist/constants/scriptEditor/cme-official-scripts.constants.d.ts +20 -149
  9. package/dist/constants/scriptEditor/cme-official-scripts.constants.js +20 -309
  10. package/dist/constants/stocks-compliance.constants.d.ts +15 -0
  11. package/dist/constants/stocks-compliance.constants.js +15 -0
  12. package/dist/host-env.d.ts +55 -3
  13. package/dist/host-env.js +6 -0
  14. package/dist/host-ports.types.d.ts +36 -3
  15. package/dist/index.d.ts +18 -0
  16. package/dist/index.js +19 -0
  17. package/dist/indicators/controls/tpo-session.util.d.ts +78 -15
  18. package/dist/indicators/controls/tpo-session.util.js +320 -242
  19. package/dist/instances/script-engine-worker-ohlcv-transfer.d.ts +6 -0
  20. package/dist/instances/script-engine-worker-ohlcv-transfer.js +16 -0
  21. package/dist/interfaces/cme-realtime.interface.d.ts +8 -0
  22. package/dist/interfaces/cme-realtime.interface.js +2 -1
  23. package/dist/interfaces/feed.interface.d.ts +15 -1
  24. package/dist/interfaces/replay.interface.d.ts +5 -0
  25. package/dist/interfaces/stocks-realtime.interface.d.ts +4 -3
  26. package/dist/interfaces/stocks-realtime.interface.js +5 -4
  27. package/dist/interfaces/wrun-runtime.interface.d.ts +97 -19
  28. package/dist/kscript-data/controls/live-ohlcv-merge.util.d.ts +17 -0
  29. package/dist/kscript-data/controls/live-ohlcv-merge.util.js +22 -0
  30. package/dist/kscript-data/controls/live-trades-merge.util.d.ts +46 -40
  31. package/dist/kscript-data/controls/live-trades-merge.util.js +80 -107
  32. package/dist/market-data/billing.interface.d.ts +9 -1
  33. package/dist/market-data/venue.d.ts +1 -1
  34. package/dist/market-data/venues/index.d.ts +4 -4
  35. package/dist/market-data/venues/stocks.contract.copy.json +4 -4
  36. package/dist/market-data/venues/stocks.d.ts +4 -4
  37. package/dist/market-data/venues/stocks.js +15 -13
  38. package/dist/settings-templates/frvp-fields.d.ts +12 -1
  39. package/dist/settings-templates/frvp-fields.js +15 -4
  40. package/dist/settings-templates/index.js +12 -5
  41. package/dist/settings-templates/indicator-fields.js +28 -2
  42. package/dist/settings-templates/tool-rules.d.ts +17 -8
  43. package/dist/settings-templates/tool-rules.js +15 -8
  44. package/dist/settings-templates/tool-tables.generated.js +4 -2
  45. package/dist/utility/auth/server-clock.util.d.ts +3 -1
  46. package/dist/utility/auth/server-clock.util.js +3 -1
  47. package/dist/utility/chart/book-live-bucket.util.js +2 -2
  48. package/dist/utility/chart/cache-alignment.util.d.ts +15 -7
  49. package/dist/utility/chart/cache-alignment.util.js +14 -7
  50. package/dist/utility/chart/chart-data-fetch-generation.util.d.ts +2 -0
  51. package/dist/utility/chart/chart-data-fetch-generation.util.js +16 -0
  52. package/dist/utility/chart/cme-session-bucket.util.d.ts +18 -75
  53. package/dist/utility/chart/cme-session-bucket.util.js +25 -332
  54. package/dist/utility/chart/continuous-contracts.util.js +6 -5
  55. package/dist/utility/chart/display-offset.leaf.d.ts +24 -0
  56. package/dist/utility/chart/display-offset.leaf.js +41 -0
  57. package/dist/utility/chart/effective-chart-session.util.d.ts +2 -1
  58. package/dist/utility/chart/effective-chart-session.util.js +13 -5
  59. package/dist/utility/chart/feed-interval.util.d.ts +6 -20
  60. package/dist/utility/chart/feed-interval.util.js +13 -22
  61. package/dist/utility/chart/fetch-dedupe-policy.util.d.ts +27 -7
  62. package/dist/utility/chart/fetch-dedupe-policy.util.js +86 -11
  63. package/dist/utility/chart/host-bar-placement.util.d.ts +7 -4
  64. package/dist/utility/chart/host-bar-placement.util.js +8 -2
  65. package/dist/utility/chart/indicator-inflight-registry.util.d.ts +32 -0
  66. package/dist/utility/chart/indicator-inflight-registry.util.js +52 -0
  67. package/dist/utility/chart/indicator-run-interval.util.d.ts +10 -4
  68. package/dist/utility/chart/indicator-run-interval.util.js +21 -12
  69. package/dist/utility/chart/interval-registry.util.d.ts +1 -1
  70. package/dist/utility/chart/interval-registry.util.js +1 -1
  71. package/dist/utility/chart/kscript-legend-entries.util.d.ts +12 -0
  72. package/dist/utility/chart/kscript-legend-entries.util.js +16 -0
  73. package/dist/utility/chart/kscript-run-interval-projection.util.d.ts +1 -1
  74. package/dist/utility/chart/kscript-run-interval-projection.util.js +4 -2
  75. package/dist/utility/chart/kscript-venue-policy.util.d.ts +53 -62
  76. package/dist/utility/chart/kscript-venue-policy.util.js +85 -94
  77. package/dist/utility/chart/live-bucket.util.d.ts +39 -17
  78. package/dist/utility/chart/live-bucket.util.js +103 -57
  79. package/dist/utility/chart/local-kscript-source-revalidation.util.d.ts +58 -20
  80. package/dist/utility/chart/local-kscript-source-revalidation.util.js +98 -23
  81. package/dist/utility/chart/local-kscript-warmup-depth.util.d.ts +35 -11
  82. package/dist/utility/chart/local-kscript-warmup-depth.util.js +24 -3
  83. package/dist/utility/chart/market-session-schedule.util.d.ts +8 -0
  84. package/dist/utility/chart/market-session-schedule.util.js +39 -1
  85. package/dist/utility/chart/market-session.util.d.ts +136 -0
  86. package/dist/utility/chart/market-session.util.js +341 -0
  87. package/dist/utility/chart/market-sessions.util.d.ts +83 -0
  88. package/dist/utility/chart/market-sessions.util.js +220 -0
  89. package/dist/utility/chart/om-panel.util.d.ts +5 -3
  90. package/dist/utility/chart/om-panel.util.js +42 -7
  91. package/dist/utility/chart/om-target.util.d.ts +14 -1
  92. package/dist/utility/chart/om-target.util.js +22 -5
  93. package/dist/utility/chart/opra-read-access.leaf.d.ts +16 -1
  94. package/dist/utility/chart/opra-read-access.leaf.js +22 -0
  95. package/dist/utility/chart/profile-row-height.util.d.ts +49 -16
  96. package/dist/utility/chart/profile-row-height.util.js +74 -37
  97. package/dist/utility/chart/rth-session.util.d.ts +55 -20
  98. package/dist/utility/chart/rth-session.util.js +94 -46
  99. package/dist/utility/chart/session-interval.util.d.ts +2 -1
  100. package/dist/utility/chart/session-interval.util.js +1 -3
  101. package/dist/utility/chart/session-lattice.util.d.ts +150 -0
  102. package/dist/utility/chart/session-lattice.util.js +488 -0
  103. package/dist/utility/chart/trading-day.util.d.ts +40 -2
  104. package/dist/utility/chart/trading-day.util.js +84 -7
  105. package/dist/utility/chart/us-equities-session.util.d.ts +32 -11
  106. package/dist/utility/chart/us-equities-session.util.js +44 -15
  107. package/dist/utility/chart/window-geometry.leaf.d.ts +28 -7
  108. package/dist/utility/chart/window-geometry.leaf.js +57 -8
  109. package/dist/utility/chart/wrun-bar-session-facts.util.d.ts +21 -14
  110. package/dist/utility/chart/wrun-bar-session-facts.util.js +32 -38
  111. package/dist/utility/chart/wrun-run-result.util.d.ts +29 -12
  112. package/dist/utility/chart/wrun-run-result.util.js +89 -25
  113. package/dist/utility/common/time.util.js +5 -4
  114. package/dist/utility/market-events/earnings-scope.util.d.ts +10 -5
  115. package/dist/utility/market-events/earnings-scope.util.js +17 -9
  116. package/dist/utility/market-events/market-events.util.d.ts +14 -7
  117. package/dist/utility/market-events/market-events.util.js +30 -17
  118. package/dist/utility/number-format.util.d.ts +14 -21
  119. package/dist/utility/number-format.util.js +38 -24
  120. package/dist/utility/options/option-venue-disclosure.util.d.ts +40 -6
  121. package/dist/utility/options/option-venue-disclosure.util.js +71 -11
  122. package/dist/utility/options/option-venue.util.d.ts +1 -1
  123. package/dist/utility/options/option-venue.util.js +1 -1
  124. package/dist/utility/pool-symbol.leaf.d.ts +7 -0
  125. package/dist/utility/pool-symbol.leaf.js +50 -5
  126. package/dist/utility/stocks/stock-display.util.d.ts +15 -0
  127. package/dist/utility/stocks/stock-display.util.js +37 -0
  128. package/dist/utility/symbol-selection/contract-expiry.util.js +5 -4
  129. package/dist/utility/v2/gate-plane.util.d.ts +6 -0
  130. package/dist/utility/v2/gate-plane.util.js +11 -1
  131. package/dist/utility/v2/gate-session-latch.util.d.ts +1 -1
  132. package/dist/utility/v2/gate-session-latch.util.js +3 -3
  133. package/dist/utility/v2/governed-tier.leaf.d.ts +17 -16
  134. package/dist/utility/v2/governed-tier.leaf.js +17 -16
  135. package/dist/utility/v2/stocks-governed.util.d.ts +5 -0
  136. package/dist/utility/v2/stocks-governed.util.js +14 -0
  137. package/dist/utility/v2/v2-enums.leaf.d.ts +13 -0
  138. package/dist/utility/v2/v2-enums.leaf.js +458 -0
  139. package/dist/utility/wrun/derived-roots.leaf.d.ts +21 -1
  140. package/dist/utility/wrun/derived-roots.leaf.js +27 -1
  141. package/dist/utility/wrun/derived-roots.util.d.ts +44 -32
  142. package/dist/utility/wrun/derived-roots.util.js +97 -56
  143. package/dist/utility/wrun/run-schedule/wrun-late-reads.util.d.ts +4 -3
  144. package/dist/utility/wrun/run-schedule/wrun-late-reads.util.js +4 -3
  145. package/dist/utility/wrun/sources/lanes/option_daily.d.ts +2 -1
  146. package/dist/utility/wrun/sources/lanes/option_daily.js +2 -1
  147. package/dist/utility/wrun/sources/lanes/options_flow.d.ts +3 -0
  148. package/dist/utility/wrun/sources/lanes/options_flow.js +23 -5
  149. package/dist/utility/wrun/sources/opra-option-lanes.util.d.ts +3 -4
  150. package/dist/utility/wrun/sources/row-lane-registry.js +9 -4
  151. package/dist/utility/wrun/sources/row-lanes/dark_pool.d.ts +19 -0
  152. package/dist/utility/wrun/sources/row-lanes/dark_pool.js +104 -0
  153. package/dist/utility/wrun/sources/row-lanes/index.js +2 -0
  154. package/dist/utility/wrun/sources/wrun-lane-fetch-abort.util.d.ts +20 -0
  155. package/dist/utility/wrun/sources/wrun-lane-fetch-abort.util.js +103 -0
  156. package/dist/utility/wrun/sources/wrun-poll-lane.types.d.ts +19 -2
  157. package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +15 -13
  158. package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +49 -23
  159. package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +14 -9
  160. package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +75 -27
  161. package/dist/utility/wrun/sources/wrun-row-lanes.util.js +139 -82
  162. package/dist/utility/wrun/wrun-app-layer.leaf.d.ts +78 -0
  163. package/dist/utility/wrun/wrun-app-layer.leaf.js +89 -0
  164. package/dist/utility/wrun/wrun-bar-count.util.d.ts +11 -7
  165. package/dist/utility/wrun/wrun-bar-count.util.js +12 -8
  166. package/dist/utility/wrun/wrun-batched-kinds.leaf.d.ts +13 -0
  167. package/dist/utility/wrun/wrun-batched-kinds.leaf.js +18 -0
  168. package/dist/utility/wrun/wrun-batched-marks.util.d.ts +41 -22
  169. package/dist/utility/wrun/wrun-batched-marks.util.js +255 -59
  170. package/dist/utility/wrun/wrun-batched-readout.util.d.ts +26 -19
  171. package/dist/utility/wrun/wrun-batched-readout.util.js +81 -27
  172. package/dist/utility/wrun/wrun-book-bands.leaf.d.ts +8 -0
  173. package/dist/utility/wrun/wrun-book-bands.leaf.js +7 -0
  174. package/dist/utility/wrun/wrun-candle-equal.leaf.d.ts +19 -0
  175. package/dist/utility/wrun/wrun-candle-equal.leaf.js +40 -0
  176. package/dist/utility/wrun/wrun-canvas-readout.util.d.ts +4 -2
  177. package/dist/utility/wrun/wrun-canvases.util.js +7 -3
  178. package/dist/utility/wrun/wrun-chart-context-names.util.d.ts +6 -3
  179. package/dist/utility/wrun/wrun-chart-context-names.util.js +8 -4
  180. package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +47 -29
  181. package/dist/utility/wrun/wrun-chart-market-facts.util.js +201 -201
  182. package/dist/utility/wrun/wrun-child-overlay-id.util.js +2 -1
  183. package/dist/utility/wrun/wrun-cme-legs-note.util.d.ts +15 -0
  184. package/dist/utility/wrun/wrun-cme-legs-note.util.js +49 -0
  185. package/dist/utility/wrun/wrun-cme-root-specs.util.d.ts +38 -0
  186. package/dist/utility/wrun/wrun-cme-root-specs.util.js +81 -0
  187. package/dist/utility/wrun/wrun-coin-lane-live.util.js +3 -0
  188. package/dist/utility/wrun/wrun-color-settings.util.d.ts +6 -1
  189. package/dist/utility/wrun/wrun-color-settings.util.js +32 -7
  190. package/dist/utility/wrun/wrun-dark-pool.util.d.ts +50 -0
  191. package/dist/utility/wrun/wrun-dark-pool.util.js +127 -0
  192. package/dist/utility/wrun/wrun-declared-warmup.util.d.ts +67 -12
  193. package/dist/utility/wrun/wrun-declared-warmup.util.js +165 -13
  194. package/dist/utility/wrun/wrun-draft-legend-note.util.d.ts +18 -8
  195. package/dist/utility/wrun/wrun-draft-legend-note.util.js +57 -11
  196. package/dist/utility/wrun/wrun-draft-overlay.util.d.ts +14 -10
  197. package/dist/utility/wrun/wrun-draft-overlay.util.js +26 -14
  198. package/dist/utility/wrun/wrun-earnings-facts.util.js +3 -2
  199. package/dist/utility/wrun/wrun-etf-funds.util.d.ts +2 -0
  200. package/dist/utility/wrun/wrun-etf-funds.util.js +4 -0
  201. package/dist/utility/wrun/wrun-held-lanes.util.js +8 -2
  202. package/dist/utility/wrun/wrun-history-as-of.util.d.ts +77 -0
  203. package/dist/utility/wrun/wrun-history-as-of.util.js +108 -0
  204. package/dist/utility/wrun/wrun-host.service.d.ts +64 -14
  205. package/dist/utility/wrun/wrun-host.service.js +137 -27
  206. package/dist/utility/wrun/wrun-hosted-wire-caps.d.ts +3 -3
  207. package/dist/utility/wrun/wrun-hosted-wire-caps.js +12 -2
  208. package/dist/utility/wrun/wrun-inert-legend.util.d.ts +13 -0
  209. package/dist/utility/wrun/wrun-inert-legend.util.js +31 -3
  210. package/dist/utility/wrun/wrun-input-requirements.leaf.d.ts +7 -5
  211. package/dist/utility/wrun/wrun-input-requirements.leaf.js +16 -6
  212. package/dist/utility/wrun/wrun-install-pacer.util.d.ts +26 -0
  213. package/dist/utility/wrun/wrun-install-pacer.util.js +145 -0
  214. package/dist/utility/wrun/wrun-kit-refusal-stages.types.d.ts +22 -0
  215. package/dist/utility/wrun/wrun-kit-refusal-stages.types.js +1 -0
  216. package/dist/utility/wrun/wrun-lane-refusal.leaf.d.ts +12 -5
  217. package/dist/utility/wrun/wrun-lane-refusal.leaf.js +23 -5
  218. package/dist/utility/wrun/wrun-lane-warmup.util.js +22 -4
  219. package/dist/utility/wrun/wrun-leg-close.util.d.ts +6 -5
  220. package/dist/utility/wrun/wrun-leg-close.util.js +11 -9
  221. package/dist/utility/wrun/wrun-leg-fetch.util.d.ts +3 -1
  222. package/dist/utility/wrun/wrun-leg-fetch.util.js +9 -2
  223. package/dist/utility/wrun/wrun-levels-child.util.d.ts +2 -0
  224. package/dist/utility/wrun/wrun-levels-child.util.js +6 -0
  225. package/dist/utility/wrun/wrun-lifecycle.contract.d.ts +4 -0
  226. package/dist/utility/wrun/wrun-live-intake.util.d.ts +15 -6
  227. package/dist/utility/wrun/wrun-live-intake.util.js +167 -47
  228. package/dist/utility/wrun/wrun-live-tick.util.d.ts +52 -8
  229. package/dist/utility/wrun/wrun-live-tick.util.js +648 -97
  230. package/dist/utility/wrun/wrun-market-facts.util.d.ts +16 -2
  231. package/dist/utility/wrun/wrun-market-facts.util.js +32 -3
  232. package/dist/utility/wrun/wrun-market-size-defaults.leaf.d.ts +27 -27
  233. package/dist/utility/wrun/wrun-market-size-defaults.leaf.js +28 -16
  234. package/dist/utility/wrun/wrun-market-size-defaults.util.js +34 -5
  235. package/dist/utility/wrun/wrun-oi-lane.util.d.ts +10 -7
  236. package/dist/utility/wrun/wrun-oi-lane.util.js +16 -10
  237. package/dist/utility/wrun/wrun-option-strike-flow.util.js +1 -1
  238. package/dist/utility/wrun/wrun-option-views.util.d.ts +2 -2
  239. package/dist/utility/wrun/wrun-option-views.util.js +5 -2
  240. package/dist/utility/wrun/wrun-options-flow-underlying.leaf.d.ts +5 -0
  241. package/dist/utility/wrun/wrun-options-flow-underlying.leaf.js +16 -0
  242. package/dist/utility/wrun/wrun-options-stop.util.d.ts +3 -2
  243. package/dist/utility/wrun/wrun-options-stop.util.js +6 -4
  244. package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +75 -11
  245. package/dist/utility/wrun/wrun-overlay-drivers.util.js +176 -43
  246. package/dist/utility/wrun/wrun-overlay-lifecycle.util.js +20 -10
  247. package/dist/utility/wrun/wrun-overlay-park.util.d.ts +84 -0
  248. package/dist/utility/wrun/wrun-overlay-park.util.js +135 -0
  249. package/dist/utility/wrun/wrun-overlay-recovery.util.d.ts +37 -4
  250. package/dist/utility/wrun/wrun-overlay-recovery.util.js +26 -14
  251. package/dist/utility/wrun/wrun-overlay-run.util.d.ts +239 -24
  252. package/dist/utility/wrun/wrun-overlay-run.util.js +2204 -405
  253. package/dist/utility/wrun/wrun-pack.util.d.ts +8 -5
  254. package/dist/utility/wrun/wrun-panel-mount.util.d.ts +2 -1
  255. package/dist/utility/wrun/wrun-panel-mount.util.js +20 -14
  256. package/dist/utility/wrun/wrun-panel-style.util.d.ts +4 -2
  257. package/dist/utility/wrun/wrun-panel-style.util.js +3 -2
  258. package/dist/utility/wrun/wrun-pin-spelling.util.d.ts +7 -0
  259. package/dist/utility/wrun/wrun-pin-spelling.util.js +18 -4
  260. package/dist/utility/wrun/wrun-pin-venues.util.d.ts +26 -17
  261. package/dist/utility/wrun/wrun-pin-venues.util.js +43 -36
  262. package/dist/utility/wrun/wrun-pinned-lanes.util.d.ts +58 -0
  263. package/dist/utility/wrun/wrun-pinned-lanes.util.js +72 -0
  264. package/dist/utility/wrun/wrun-prefix-cohort.util.js +2 -1
  265. package/dist/utility/wrun/wrun-prefix-lanes.util.d.ts +22 -9
  266. package/dist/utility/wrun/wrun-prefix-lanes.util.js +145 -26
  267. package/dist/utility/wrun/wrun-prefix-proof.util.d.ts +29 -0
  268. package/dist/utility/wrun/wrun-prefix-proof.util.js +23 -5
  269. package/dist/utility/wrun/wrun-refusal-surface.util.d.ts +9 -1
  270. package/dist/utility/wrun/wrun-refusal-surface.util.js +15 -1
  271. package/dist/utility/wrun/wrun-refusal.util.d.ts +19 -1
  272. package/dist/utility/wrun/wrun-refusal.util.js +103 -16
  273. package/dist/utility/wrun/wrun-registry-errors.util.d.ts +20 -6
  274. package/dist/utility/wrun/wrun-registry-errors.util.js +20 -6
  275. package/dist/utility/wrun/wrun-replay-rows.util.js +6 -10
  276. package/dist/utility/wrun/wrun-run-health.util.d.ts +89 -2
  277. package/dist/utility/wrun/wrun-run-health.util.js +204 -1
  278. package/dist/utility/wrun/wrun-run-interval-session.util.d.ts +2 -2
  279. package/dist/utility/wrun/wrun-run-interval-session.util.js +2 -2
  280. package/dist/utility/wrun/wrun-run-interval.util.d.ts +9 -8
  281. package/dist/utility/wrun/wrun-run-interval.util.js +13 -11
  282. package/dist/utility/wrun/wrun-sandbox-row-source.js +5 -2
  283. package/dist/utility/wrun/wrun-script-inputs.util.d.ts +13 -3
  284. package/dist/utility/wrun/wrun-script-inputs.util.js +51 -13
  285. package/dist/utility/wrun/wrun-session-composition.util.d.ts +81 -0
  286. package/dist/utility/wrun/wrun-session-composition.util.js +169 -0
  287. package/dist/utility/wrun/wrun-setting-words.util.d.ts +10 -7
  288. package/dist/utility/wrun/wrun-setting-words.util.js +25 -7
  289. package/dist/utility/wrun/wrun-source-rows.util.d.ts +94 -28
  290. package/dist/utility/wrun/wrun-source-rows.util.js +738 -93
  291. package/dist/utility/wrun/wrun-stream-clock.util.d.ts +45 -0
  292. package/dist/utility/wrun/wrun-stream-clock.util.js +108 -0
  293. package/dist/utility/wrun/wrun-tape-coins.util.d.ts +116 -0
  294. package/dist/utility/wrun/wrun-tape-coins.util.js +110 -0
  295. package/dist/utility/wrun/wrun-tape-source.util.d.ts +62 -32
  296. package/dist/utility/wrun/wrun-tape-source.util.js +72 -34
  297. package/dist/utility/wrun/wrun-tier-grid.util.d.ts +13 -5
  298. package/dist/utility/wrun/wrun-tier-grid.util.js +23 -13
  299. package/dist/utility/wrun/wrun-tpo-rows.util.js +2 -1
  300. package/dist/utility/wrun/wrun-trades-lane.util.d.ts +73 -0
  301. package/dist/utility/wrun/wrun-trades-lane.util.js +82 -0
  302. package/dist/utility/wrun/wrun-twin-compute-inputs.util.d.ts +5 -0
  303. package/dist/utility/wrun/wrun-twin-compute-inputs.util.js +9 -2
  304. package/dist/utility/wrun/wrun-visibility-table.d.ts +13 -0
  305. package/dist/utility/wrun/wrun-visibility-table.js +9 -0
  306. package/dist/utility/wrun/wrun-volume-profile.util.js +44 -32
  307. package/dist/utils/replay/replay-buffer-math.d.ts +16 -6
  308. package/dist/utils/replay/replay-buffer-math.js +60 -30
  309. package/dist/workers/constants/socket-slots.d.ts +11 -7
  310. package/dist/workers/constants/socket-slots.js +6 -5
  311. package/package.json +11 -11
@@ -1,5 +1,5 @@
1
1
  /**
2
- * The batched records' readout (WRUN-BATCHED-MARKS): a `marks`, `spans` or `rays` record's meta
2
+ * The batched records' readout (WRUN-BATCHED-MARKS): a `marks`, `spans`, `rays` or `flags` record's meta
3
3
  * decode, the number formats a template (and a marks caption) prints with (THE one list,
4
4
  * WRUN_BATCHED_NUMBER_FORMATS), and the tooltip text.
5
5
  * The batched mount registers the text as its readout's `text` (wrun-batched-marks.util
@@ -8,6 +8,7 @@
8
8
  * record (stride 5, WRUN-MARKS-CONTRACT F2) answers `{{start}}` and `{{end}}`, printed as the
9
9
  * chart prints a time (wrun-chart-time.util), its meta read from its fifth field.
10
10
  */
11
+ import { displayWallMs } from '../chart/display-offset.leaf.js';
11
12
  import { CANVAS_PLACEHOLDER } from './wrun-canvas-readout.util.js';
12
13
  import { wrunChartTimeText } from './wrun-chart-time.util.js';
13
14
  /** The largest `offset_ms` a marks meta packs (2^30 ms, 12.4 days). */
@@ -25,6 +26,11 @@ export function decodeWrunMarkMeta(meta) {
25
26
  return null;
26
27
  return { side: meta % 4, fills: Math.floor(meta / 4) % 65536, offsetMs };
27
28
  }
29
+ /** A flags meta read apart as a marks meta is (`decodeWrunMarkMeta`); null for a value that is no packed meta. */
30
+ export function decodeWrunFlagMeta(meta) {
31
+ const packed = decodeWrunMarkMeta(meta);
32
+ return packed === null ? null : { word: packed.side, count: packed.fills, offsetMs: packed.offsetMs };
33
+ }
28
34
  /** A spans or rays meta read apart, extend as the bit it is (`floor(meta / 256) % 2`, the engine's
29
35
  * read); null for a value that is no packed meta (not a whole number from 0 to 511: a meta past
30
36
  * the extend bit packs a field this chart does not read). */
@@ -61,13 +67,15 @@ export function wrunTimedRecordSpan(record) {
61
67
  }
62
68
  /**
63
69
  * THE number formats a batched template and a marks caption print with, the kit's WRUN_MARK_TEXT_FORMATS (its
64
- * WRUN_BATCHED_TOOLTIP_FORMATS): `compact` (Big Trades 0.3.2's caption, "1.2M", "1.2K"), `price` (the pane's price),
65
- * `int` (rounded), `usd` ("$" before the compact amount, "$12M", "-$1.2K") and `units` (a mark's quantity in the
66
- * market's own unit, `wrunMarkQtyInUnits`, printed compact; in dollars where no unit is proven). The layout gate's
70
+ * WRUN_BATCHED_TOOLTIP_FORMATS): `compact` (Big Trades 0.3.2's caption, "1.2B", "1.2M", "1.2K"), `price` (the pane's
71
+ * price), `int` (rounded), `usd` ("$" before the compact amount, "$12M", "-$1.2K") and `units` (a mark's quantity in
72
+ * the market's own unit, `wrunMarkQtyInUnits`, printed compact; in dollars where no unit is proven). The layout gate's
67
73
  * vocabulary, the engine settings and this readout read this list, and the format type derives from it: a word added
68
74
  * in one hand copy alone refused the section ("Needs a newer chart") or printed the placeholder as written
69
75
  * (tests/utility/wrun/wrun-batched-readout.util.spec.ts holds it to its golden and finds any second spelling of it in
70
- * the package). TitanCharts keeps the engine's own copy for the caption, pinned to the same golden there.
76
+ * the package). TitanCharts keeps the engine's own copy for the caption and a flag's chip (batchedMarks formats.ts):
77
+ * the same spec runs the INSTALLED engine's copy and holds this list and every word's text to it, so a hover always
78
+ * prints a record as its bubble does.
71
79
  */
72
80
  export const WRUN_BATCHED_NUMBER_FORMATS = Object.freeze(['compact', 'price', 'int', 'usd', 'units']);
73
81
  const BATCHED_FORMATS = new Set(WRUN_BATCHED_NUMBER_FORMATS);
@@ -91,7 +99,11 @@ export function wrunMarkQtyInUnits(qty, price, valuePerUnit) {
91
99
  const unit = wrunMarkUnitValue(valuePerUnit);
92
100
  if (unit === undefined || !(Number.isFinite(price) && price > 0))
93
101
  return undefined;
94
- return qty / (price * unit);
102
+ // A product past the doubles (or under them) is no unit either: the caption prints dollars then, so does the hover.
103
+ const perUnit = price * unit;
104
+ if (!(Number.isFinite(perUnit) && perUnit > 0))
105
+ return undefined;
106
+ return qty / perUnit;
95
107
  }
96
108
  /** `tenths` (a whole count of tenths) as "1.5" or "2" (never "2.0"). */
97
109
  function tenthsText(tenths) {
@@ -108,25 +120,34 @@ function amountText(value) {
108
120
  return tenthsText(Math.round(value * 10));
109
121
  return (Math.round(value * 100) / 100).toFixed(2);
110
122
  }
111
- /** A size, at least 0, compact: "1.2M", "1.2K", else the full amount. */
123
+ /** The largest magnitude a compact number shows: a larger one prints as this (the engine caption's VALUE_TEXT_MAX). */
124
+ const COMPACT_MAX = 1e15;
125
+ /** A size, at least 0, compact as the engine captions it: "1.2B", "1.2M", "1.2K", else the full amount; past 1e15
126
+ * as 1e15. */
112
127
  function compactText(size) {
113
- if (size >= 1_000_000)
114
- return `${tenthsText(Math.round(size / 100_000))}M`;
115
- if (size >= 1_000)
116
- return `${tenthsText(Math.round(size / 100))}K`;
117
- return amountText(size);
128
+ const v = Math.min(size, COMPACT_MAX);
129
+ if (v >= 1_000_000_000)
130
+ return `${tenthsText(Math.round(v / 100_000_000))}B`;
131
+ if (v >= 1_000_000)
132
+ return `${tenthsText(Math.round(v / 100_000))}M`;
133
+ if (v >= 1_000)
134
+ return `${tenthsText(Math.round(v / 100))}K`;
135
+ return amountText(v);
118
136
  }
119
- /** A number in a batched format: `compact` is Big Trades 0.3.2's caption ("1.2M", "1.2K", a whole
120
- * number from 100, one decimal from 1, two below 1), `usd` the same after a "$" ("$12M", "-$1.2K"),
121
- * `units` compact (a mark's quantity reaches it converted, `wrunMarkQtyInUnits`), `int` the rounded
122
- * whole number, `price` the pane's price; a negative value keeps its sign. Not finite: '-'. */
137
+ /** A number in a batched format, as the engine captions it: `compact` is Big Trades 0.3.2's caption ("1.2B", "1.2M",
138
+ * "1.2K", a whole number from 100, one decimal from 1, two below 1), `usd` the same after a "$" ("$12M", "-$1.2K"),
139
+ * `units` compact (a mark's quantity reaches it converted, `wrunMarkQtyInUnits`), `int` the whole number (a half
140
+ * away from zero, never "-0"), `price` the pane's price; a negative value keeps its sign. Not finite: '-' (the
141
+ * caption draws nothing). */
123
142
  export function formatWrunBatchedNumber(value, format, formatPrice) {
124
143
  if (!Number.isFinite(value))
125
144
  return '-';
126
145
  if (format === 'price')
127
146
  return formatPrice(value);
128
- if (format === 'int')
129
- return String(Math.round(value));
147
+ if (format === 'int') {
148
+ const whole = Math.sign(value) * Math.round(Math.abs(value));
149
+ return String(whole === 0 ? 0 : whole);
150
+ }
130
151
  const sign = value < 0 ? '-' : '';
131
152
  const size = Math.abs(value);
132
153
  if (format === 'amount')
@@ -146,7 +167,10 @@ const SIDE_WORDS = { 0: 'Sell', 1: 'Buy' };
146
167
  * price), both `{{length}}` (the length in bars, default int) and `{{word}}` (the section's word the meta
147
168
  * names, '' when none); a timed record (stride 5) `{{start}}` and `{{end}}` in place of `{{length}}`,
148
169
  * each the time as the chart prints it (`formatters.formatTime`, else wrun-chart-time.util shifted by
149
- * the display offset the mount door stamped on the readout), its meta its fifth field; `{{label}}` is
170
+ * the display offset the mount door stamped on the readout, read at that time), its meta its fifth field; flags read
171
+ * `{{qty}}` and `{{price}}` as marks do, `{{count}}` (default int) and `{{word}}` (the chip text: the
172
+ * template the meta's word names, its own `{{qty}}` (default compact, the chip's caption), `{{price}}` and
173
+ * `{{count}}` printed from the same record; '' when none); `{{label}}` is
150
174
  * the readout's title. A placeholder
151
175
  * the record does not read, or a format word outside the list, stays as written; a hole (a
152
176
  * non-finite field) prints '-'.
@@ -158,31 +182,61 @@ export function wrunBatchedReadoutText(readout, record, formatters) {
158
182
  };
159
183
  const timed = readout.timed === true && (readout.kind === 'spans' || readout.kind === 'rays');
160
184
  const markMeta = readout.kind === 'marks' ? decodeWrunMarkMeta(field(2)) : null;
185
+ const flagMeta = readout.kind === 'flags' ? decodeWrunFlagMeta(field(2)) : null;
161
186
  const spanMeta = readout.kind === 'spans' || readout.kind === 'rays' ? decodeWrunSpanMeta(field(timed ? TIMED_META : 3)) : null;
162
187
  // A printed time never breaks across the card's lines: its words are joined by no-break spaces.
163
188
  const timeText = (ms) => {
164
189
  const text = formatters.formatTime !== undefined
165
190
  ? formatters.formatTime(ms)
166
- : wrunChartTimeText(ms + (readout.timeOffsetMs ?? 0));
191
+ : wrunChartTimeText(displayWallMs(readout.timeOffsetMs ?? 0, ms));
167
192
  return text === undefined ? '-' : text.replace(/ /g, '\u00a0');
168
193
  };
169
194
  const number = (value, written, fallback) => formatWrunBatchedNumber(value, written !== undefined ? written : fallback, formatters.formatPrice);
195
+ // A record's quantity (marks, flags): `units` in the market's own unit, in dollars where the readout holds no unit or
196
+ // the record no price.
197
+ const qty = (format, fallback) => {
198
+ if (format !== 'units')
199
+ return number(field(1), format, fallback);
200
+ const units = wrunMarkQtyInUnits(field(1), field(0), readout.valuePerUnit);
201
+ return units === undefined ? number(field(1), 'usd', fallback) : number(units, 'units', fallback);
202
+ };
203
+ // A flags record's tokens. Inside its chip text (`inWord`) the quantity defaults to compact, as a caption prints it,
204
+ // and `{{word}}` stays as written.
205
+ const flagToken = (literal, name, format, inWord) => {
206
+ if (format !== undefined && !BATCHED_FORMATS.has(format))
207
+ return literal;
208
+ switch (name) {
209
+ case 'qty':
210
+ return qty(format, inWord ? 'compact' : 'amount');
211
+ case 'price':
212
+ return number(field(0), format, 'price');
213
+ case 'count':
214
+ return flagMeta === null ? '-' : number(flagMeta.count, format, 'int');
215
+ case 'word': {
216
+ if (inWord)
217
+ return literal;
218
+ const word = flagMeta === null ? undefined : readout.words?.[flagMeta.word];
219
+ return word === undefined
220
+ ? ''
221
+ : word.replace(CANVAS_PLACEHOLDER, (inner, token, written) => flagToken(inner, token, written, true));
222
+ }
223
+ default:
224
+ return literal;
225
+ }
226
+ };
170
227
  return readout.tooltip.replace(CANVAS_PLACEHOLDER, (literal, name, format) => {
171
228
  if (format !== undefined && !BATCHED_FORMATS.has(format))
172
229
  return literal;
173
230
  if (name === 'label')
174
231
  return readout.label;
232
+ if (readout.kind === 'flags')
233
+ return flagToken(literal, name, format, false);
175
234
  if (readout.kind === 'marks') {
176
235
  switch (name) {
177
236
  case 'side':
178
237
  return markMeta === null ? '-' : (SIDE_WORDS[markMeta.side] ?? String(markMeta.side));
179
- case 'qty': {
180
- if (format !== 'units')
181
- return number(field(1), format, 'amount');
182
- // The quantity in the market's own unit; dollars where the readout holds no unit or the record no price.
183
- const units = wrunMarkQtyInUnits(field(1), field(0), readout.valuePerUnit);
184
- return units === undefined ? number(field(1), 'usd', 'amount') : number(units, 'units', 'amount');
185
- }
238
+ case 'qty':
239
+ return qty(format, 'amount');
186
240
  case 'price':
187
241
  return number(field(0), format, 'price');
188
242
  case 'fills':
@@ -0,0 +1,8 @@
1
+ /** Banded book inputs (kit 0.109.0). A LEAF (no imports): the packer's width rule rides the boot path. */
2
+ /** A banded book block's f64s per tuple: a band's bid sum and its ask sum. */
3
+ export declare const WRUN_BOOK_BAND_TUPLE_WIDTH = 2;
4
+ /** Whether a source is a `book` input declaring `bands`: its block holds band sums, never the book's levels. */
5
+ export declare function isWrunBandedBookSource(source: {
6
+ readonly source?: unknown;
7
+ readonly bands?: unknown;
8
+ } | undefined): boolean;
@@ -0,0 +1,7 @@
1
+ /** Banded book inputs (kit 0.109.0). A LEAF (no imports): the packer's width rule rides the boot path. */
2
+ /** A banded book block's f64s per tuple: a band's bid sum and its ask sum. */
3
+ export const WRUN_BOOK_BAND_TUPLE_WIDTH = 2;
4
+ /** Whether a source is a `book` input declaring `bands`: its block holds band sums, never the book's levels. */
5
+ export function isWrunBandedBookSource(source) {
6
+ return source?.source === 'book' && source.bands !== undefined;
7
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * The one rule for whether a live session can tell two lane values, or two candles, apart: the drain's closed-candle
3
+ * comparison (wrun-live-tick.util `noteRevisedClosedCandles`, a revised closed candle owes a reseed) and the
4
+ * carry-with-build install (wrun-overlay-run.util: a carry built with its rows is kept only while every closed candle
5
+ * it read still reads the same) both read it, so the install falls back to the two steps exactly when a drain would
6
+ * see a revision. Pure functions and constants, no imports.
7
+ */
8
+ /**
9
+ * Whether a session cannot tell two lane values apart: the same value, both
10
+ * NaN, or two finite numbers within float rounding of each other. A control
11
+ * that sums or averages sub-rows rounds another way when its window moves
12
+ * (measured 2026-10-02: 1.9177000000000004 against 1.9177 on a long/short
13
+ * ratio, a candle volume one step apart), and read as a revision that
14
+ * reseeded the whole session on every poll.
15
+ */
16
+ export declare function wrunLaneValuesEqual(x: unknown, y: unknown): boolean;
17
+ /** Whether two candles `[ts, o, h, l, c, v]` read the same: every OHLCV column within lane noise (the stamps are the
18
+ * caller's to match). */
19
+ export declare function wrunCandleEqual(evaluated: ArrayLike<number>, current: ArrayLike<number>): boolean;
@@ -0,0 +1,40 @@
1
+ /**
2
+ * The one rule for whether a live session can tell two lane values, or two candles, apart: the drain's closed-candle
3
+ * comparison (wrun-live-tick.util `noteRevisedClosedCandles`, a revised closed candle owes a reseed) and the
4
+ * carry-with-build install (wrun-overlay-run.util: a carry built with its rows is kept only while every closed candle
5
+ * it read still reads the same) both read it, so the install falls back to the two steps exactly when a drain would
6
+ * see a revision. Pure functions and constants, no imports.
7
+ */
8
+ /** The rounding two answers for the same value can differ by, relative to
9
+ * the value, with an absolute floor for a value at zero: far below one price
10
+ * tick, one trade or one cent of notional on any series a lane serves. */
11
+ const WRUN_LANE_VALUE_NOISE = 1e-9;
12
+ const WRUN_LANE_VALUE_NOISE_FLOOR = 1e-12;
13
+ /**
14
+ * Whether a session cannot tell two lane values apart: the same value, both
15
+ * NaN, or two finite numbers within float rounding of each other. A control
16
+ * that sums or averages sub-rows rounds another way when its window moves
17
+ * (measured 2026-10-02: 1.9177000000000004 against 1.9177 on a long/short
18
+ * ratio, a candle volume one step apart), and read as a revision that
19
+ * reseeded the whole session on every poll.
20
+ */
21
+ export function wrunLaneValuesEqual(x, y) {
22
+ if (x === y)
23
+ return true;
24
+ if (typeof x !== 'number' || typeof y !== 'number')
25
+ return false;
26
+ if (x !== x && y !== y)
27
+ return true;
28
+ if (!Number.isFinite(x) || !Number.isFinite(y))
29
+ return false;
30
+ return (Math.abs(x - y) <= Math.max(WRUN_LANE_VALUE_NOISE_FLOOR, WRUN_LANE_VALUE_NOISE * Math.max(Math.abs(x), Math.abs(y))));
31
+ }
32
+ /** Whether two candles `[ts, o, h, l, c, v]` read the same: every OHLCV column within lane noise (the stamps are the
33
+ * caller's to match). */
34
+ export function wrunCandleEqual(evaluated, current) {
35
+ for (let column = 1; column <= 5; column += 1) {
36
+ if (!wrunLaneValuesEqual(Number(evaluated[column]), Number(current[column])))
37
+ return false;
38
+ }
39
+ return true;
40
+ }
@@ -11,6 +11,7 @@
11
11
  * already answers for a cell without a readout: no card.
12
12
  */
13
13
  import type { WrunBatchedMarksKind } from '../../interfaces/wrun-runtime.interface.js';
14
+ import type { DisplayOffset } from '../chart/display-offset.leaf.js';
14
15
  import { type WrunNumberFormatSpec } from './wrun-style-words.util.js';
15
16
  /** A hover readout (a heatmap or matrix with a `tooltip`, or a batched section with one): the
16
17
  * title, the template and the number format the inspector prints the cell or record with. */
@@ -25,8 +26,9 @@ export interface WrunCanvasReadout {
25
26
  words?: string[];
26
27
  /** Spans and rays at stride 5: `[top|y1, bottom|y2, startTs, endTs, meta]`, times in ms. */
27
28
  timed?: true;
28
- /** The display offset (ms) a timed record's `{{start}}` and `{{end}}` print in, stamped by the mount door. */
29
- timeOffsetMs?: number;
29
+ /** The display offset (ms) a timed record's `{{start}}` and `{{end}}` print in, stamped by the mount door: a fixed
30
+ * shift, or the shift at each instant (each time reads its own, a zone moves its clock). */
31
+ timeOffsetMs?: DisplayOffset;
30
32
  /** Marks: the market's dollar unit (US dollars per price unit and size unit, the run's `wrunMarketDollarUnit`),
31
33
  * which `{{qty:units}}` divides a record's dollar value by; stamped by the batched build, absent where none is
32
34
  * proven (`units` then prints dollars). */
@@ -32,11 +32,12 @@
32
32
  * colour rows are the declared `palette` / buy and sell colours read below.
33
33
  */
34
34
  import { DEFAULT_TPO_COLOR_SCHEMES } from '../../constants/tpo-color-schemes.constants.js';
35
- import { profileRowMultiplier, tpoPeriodWord } from '../chart/profile-row-height.util.js';
35
+ import { profileRowMultiplier, tpoPeriodWord, viewScaledProfileRowMultiplier } from '../chart/profile-row-height.util.js';
36
36
  import { getTradingDayAnchor } from '../chart/trading-day.util.js';
37
37
  import { wrunLegendName } from '../chart/wrun-legend-name.util.js';
38
38
  import { heatmapSensitivityForQuantile, heatmapSensitivityQuantile } from '../indicators/heatmap-sensitivity.util.js';
39
39
  import { isWrunStyleTargetHidden } from './wrun-color-settings.util.js';
40
+ import { isWrunBandedBookSource } from './wrun-book-bands.leaf.js';
40
41
  import { WRUN_MAX_ROWS_PER_PERIOD, WRUN_ROW_CAP_MAX_DOUBLINGS, wrunAutoRowUnit } from './wrun-auto-row.util.js';
41
42
  import { WRUN_FOOTPRINT_CELL_METRIC_DEFAULT, WRUN_FOOTPRINT_MODE_DEFAULT } from './wrun-footprint-modes.util.js';
42
43
  import { formatWrunNumber, resolveWrunColorWord, wrunFontFamilyCss, } from './wrun-style-words.util.js';
@@ -528,10 +529,13 @@ function rowsIntervalMs(rows) {
528
529
  }
529
530
  return Number.isFinite(smallest) ? smallest : undefined;
530
531
  }
532
+ /** The source class a canvas's `cells` name: none for a banded book input (`isWrunBandedBookSource`), whose block is
533
+ * band sums, never the levels a book canvas paints (the kit refuses a canvas naming one). */
531
534
  function inputSourceClass(sheet, name) {
532
535
  if (name === undefined)
533
536
  return undefined;
534
- return sheet.inputSources?.[name]?.source;
537
+ const source = sheet.inputSources?.[name];
538
+ return isWrunBandedBookSource(source) ? undefined : source?.source;
535
539
  }
536
540
  // ── The run's cell rows (handed by the run and tick routes) ─────────────────
537
541
  /**
@@ -1020,7 +1024,7 @@ function tpoAutoRow(ctx, period, cellRows, bars, profileRows) {
1020
1024
  // on the chart interval (an intrabar leg's finer bars would shrink it).
1021
1025
  bars: (cellRows?.ohlcvRows ?? bars),
1022
1026
  });
1023
- const multiplier = resolved.source === 'bar-range' ? 1 : profileRowMultiplier('tpo', ctx.intervalMs, tpoPeriodWord(period));
1027
+ const multiplier = resolved.source === 'bar-range' ? 1 : viewScaledProfileRowMultiplier('tpo', ctx.intervalMs, tpoPeriodWord(period));
1024
1028
  const unit = Math.max(resolved.unit, widestBarSpan(bars ?? []) / ((WRUN_TPO_MAX_ROWS_PER_BAR / 2) * multiplier));
1025
1029
  return { rowHeight: trimmedRowHeight(unit * multiplier), minimumBarHeight: unit };
1026
1030
  }
@@ -7,7 +7,8 @@
7
7
  * - symbol: the TickerBar's display symbol (useSymbolData's `displaySymbol`,
8
8
  * built on `resolveChartSymbolData`: the "prefix+coin+quote" of a market, a
9
9
  * formula's expression by labels, an economic series' label, a prediction
10
- * market's title; the raw metadata symbol before the resolve lands).
10
+ * market's title; the metadata symbol before the resolve lands, a US stock's
11
+ * by its bare ticker, `stock-display.util`).
11
12
  * - exchange: the header's display exchange name (TBSymbolButton: a
12
13
  * prediction market's `formatEnhancedExchangeName` upper-cased, a formula's
13
14
  * one venue label, an economic series' publisher label, else
@@ -43,10 +44,12 @@ export interface WrunChartNameSource {
43
44
  /** The header's display symbol (useSymbolData's `displaySymbol`): a
44
45
  * prediction market's title, a formula's labelled expression, an economic
45
46
  * series' label, else "prefix+coin+quote" (a pool address appended), and
46
- * the raw metadata symbol while nothing is resolved. On a plain market the
47
+ * the metadata symbol while nothing is resolved. On a plain market the
47
48
  * three parts are slices of the venue's own symbol, so the name is that
48
49
  * symbol, the string a kScript's `currentSymbol` reads on the same chart
49
- * (1000PEPEUSDT keeps its 1000, KRW-RLUSD its KRW-). */
50
+ * (1000PEPEUSDT keeps its 1000, KRW-RLUSD its KRW-), but for a US stock:
51
+ * it names its bare ticker (SOXL), never its vendor pair's SOXL/USD, both
52
+ * resolved and before (`stock-display.util`). */
50
53
  export declare function wrunChartDisplaySymbol(meta: WrunChartNameSource | undefined, data: WrunSymbolDisplayData | null | undefined): string;
51
54
  /** The header's display exchange name (TBSymbolButton): a prediction
52
55
  * market's short venue label upper-cased (HYPERLIQUID_HIP4 reads "HL
@@ -7,7 +7,8 @@
7
7
  * - symbol: the TickerBar's display symbol (useSymbolData's `displaySymbol`,
8
8
  * built on `resolveChartSymbolData`: the "prefix+coin+quote" of a market, a
9
9
  * formula's expression by labels, an economic series' label, a prediction
10
- * market's title; the raw metadata symbol before the resolve lands).
10
+ * market's title; the metadata symbol before the resolve lands, a US stock's
11
+ * by its bare ticker, `stock-display.util`).
11
12
  * - exchange: the header's display exchange name (TBSymbolButton: a
12
13
  * prediction market's `formatEnhancedExchangeName` upper-cased, a formula's
13
14
  * one venue label, an economic series' publisher label, else
@@ -32,23 +33,26 @@ import { formatEnhancedExchangeName } from '../../constants/exchange-names.leaf.
32
33
  import { checkIsPredictionMarket } from '../chart/index-mode.util.js';
33
34
  import { formatExchangeDisplay } from '../exchange-format.leaf.js';
34
35
  import { formatPoolAddress } from '../pool-symbol.leaf.js';
36
+ import { marketDisplaySymbol } from '../stocks/stock-display.util.js';
35
37
  function nonEmptyString(value) {
36
38
  return typeof value === 'string' && value !== '' ? value : undefined;
37
39
  }
38
40
  /** The header's display symbol (useSymbolData's `displaySymbol`): a
39
41
  * prediction market's title, a formula's labelled expression, an economic
40
42
  * series' label, else "prefix+coin+quote" (a pool address appended), and
41
- * the raw metadata symbol while nothing is resolved. On a plain market the
43
+ * the metadata symbol while nothing is resolved. On a plain market the
42
44
  * three parts are slices of the venue's own symbol, so the name is that
43
45
  * symbol, the string a kScript's `currentSymbol` reads on the same chart
44
- * (1000PEPEUSDT keeps its 1000, KRW-RLUSD its KRW-). */
46
+ * (1000PEPEUSDT keeps its 1000, KRW-RLUSD its KRW-), but for a US stock:
47
+ * it names its bare ticker (SOXL), never its vendor pair's SOXL/USD, both
48
+ * resolved and before (`stock-display.util`). */
45
49
  export function wrunChartDisplaySymbol(meta, data) {
46
50
  const raw = nonEmptyString(meta?.symbol) ?? '';
47
51
  const pm = meta?.polymarketMetadata;
48
52
  if (pm)
49
53
  return nonEmptyString(pm.fullName) ?? nonEmptyString(pm.title) ?? raw;
50
54
  if (!data)
51
- return raw;
55
+ return marketDisplaySymbol(nonEmptyString(meta?.exchange), raw);
52
56
  if (data.isTransformation)
53
57
  return data.displayExpression ?? data.fullSymbol;
54
58
  if (data.isFred)
@@ -63,7 +63,6 @@
63
63
  * only (the directory read goes through the markets service); the hosted lanes
64
64
  * carry the numbers to the worker inside `wrunHostFill`.
65
65
  */
66
- import type { WrunMarketKind, WrunMarketQuoteIsUsd } from '@orangecharts/indicator-kit';
67
66
  import type { WrunVenueLegsResult } from '../../host-ports.types.js';
68
67
  import type { CmeExchangeDto } from '../../interfaces/cme-realtime.interface.js';
69
68
  import type { WrunIndicatorMetadata } from '../../interfaces/wrun-runtime.interface.js';
@@ -115,17 +114,7 @@ export interface WrunMarketDirectoryRow {
115
114
  coin?: unknown;
116
115
  underlyingSymbol?: unknown;
117
116
  }
118
- export interface CmeRootSpec {
119
- /** What the contract trades (a futures contract reports its underlying's kind). */
120
- kind: WrunMarketKind;
121
- pointValue: number;
122
- /** The quotation currency of the price the chart draws. */
123
- quote: WrunMarketQuoteIsUsd;
124
- /** The CME Group exchange the root lists on (its contracts and its options). */
125
- exchange: CmeExchangeDto;
126
- }
127
- /** Read-only outside this module: the paper venue reads each contract's point value from it. */
128
- export declare const CME_ROOT_SPECS: Readonly<Record<string, Readonly<CmeRootSpec>>>;
117
+ export { CME_ROOT_SPECS, type CmeRootSpec } from './wrun-cme-root-specs.util.js';
129
118
  /** The CME Group exchange a futures root lists on (`CME_ROOT_SPECS`), or undefined for a root off the table. */
130
119
  export declare function wrunCmeRootExchange(root: string): CmeExchangeDto | undefined;
131
120
  /**
@@ -214,8 +203,10 @@ export declare function wrunMarketFactsNeedDirectory(metadata: (Pick<WrunIndicat
214
203
  * (wrunVisibleByNeedsKind: it names some but not all of 0, 1 and 2): the sheet's lane demand on a
215
204
  * market (wrunSheetWithLaneDemand) then waits on the directory row, so a crypto venue's coin is
216
205
  * never read as unit 0 before the row answers. A list deciding on contracts alone (`[0, 1, 2]`,
217
- * `[3]`) needs only the point value and the zone and waits on nothing. */
218
- export declare function wrunLaneDemandNeedsDirectory(sheet: Partial<Pick<WrunIndicatorMetadata, 'inputSources'>> | undefined): boolean;
206
+ * `[3]`) needs only the point value and the zone and waits on nothing. A setting key (C-COINS item
207
+ * 1) reads its select's default where the market hides the select's row, so a select only the kind
208
+ * shows decides the demand too. */
209
+ export declare function wrunLaneDemandNeedsDirectory(sheet: Partial<Pick<WrunIndicatorMetadata, 'inputSources' | 'params'>> | undefined): boolean;
219
210
  /** wrunMarketFactsNeedDirectory over an overlay's declared inputs
220
211
  * (`settings.scriptInputs`), for a lane that holds no sheet (the cloud
221
212
  * payload): a row under a directory fact's generated name. */
@@ -235,16 +226,32 @@ export declare function wrunChartSizeUnit(market: WrunFactsMarket | undefined):
235
226
  * copy with its own `inputSources`, every other key shared.
236
227
  */
237
228
  export declare function wrunSheetWithLaneCurrencies<Sheet extends Pick<WrunIndicatorMetadata, 'inputSources'>>(sheet: Sheet, sizeUnit: number): Sheet;
229
+ /**
230
+ * The value a setting key reads on a market of size unit `sizeUnit` (contract C-COINS item 1), the run's side of the
231
+ * dialog's `wrunRowsOnMarket`, read only to decide whether a row shows or an input is asked: the run value of the
232
+ * select it names (`wrunParamValuesFromSettings` over `settings`), or its declared default where the select's own row
233
+ * is hidden on the market (its `visible_by` size-unit list alone: a select a key names is keyed by the size unit only),
234
+ * so a stock or CME chart that saved Coins decides as Dollars. init() and the paint still read the saved value.
235
+ * Undefined for a name the sheet declares no param under (the key then never hides).
236
+ */
237
+ export declare function wrunSheetSettingReader(sheet: Partial<Pick<WrunIndicatorMetadata, 'params'>>, settings: unknown, sizeUnit: number): (name: string) => number | undefined;
238
+ /** `sheet` with the inputs the sheet a session ran on its market left unasked (`ran`, the live context's) marked
239
+ * `undemanded` again, by name: a paint-only save swaps the session's sheet for the overlay's own sheet repainted, and
240
+ * without the marks the session's ticks would ask and fill a lane its run never asked (0.9.0's dollar tape on CME).
241
+ * The sheet itself when `ran` marks none it lacks. */
242
+ export declare function wrunSheetKeepingRunMarksOf<Sheet extends Pick<WrunIndicatorMetadata, 'inputSources'>>(sheet: Sheet, ran: Partial<Pick<WrunIndicatorMetadata, 'inputSources'>> | undefined): Sheet;
238
243
  /**
239
244
  * The sheet a run plans its lanes from on a market of size unit `sizeUnit`: every input source whose
240
245
  * `needed_by` (kit 0.72.0) leaves that size unit out, read by the predicate a row's `visible_by` is
241
246
  * (wrunRowVisibleHere), is marked `undemanded`, so no reader past this seam asks, subscribes, folds
242
247
  * or re-asks its lane (wrunSourceLane answers none for it), and the row builder reads the input's
243
- * fill on every bar (NaN, 0 under `missing: "zero"`) without ever holding the run. An input without
244
- * the word is needed on every market. The sheet itself when every input is needed here; else a copy
245
- * with its own `inputSources`.
248
+ * fill on every bar (NaN, 0 under `missing: "zero"`) without ever holding the run. A setting key
249
+ * beside the size unit (contract C-COINS item 1) must list the value its select reads under
250
+ * `settings` (wrunSheetSettingReader: its default without settings, or where the market hides the
251
+ * select's own row). An input without the word is needed on every market. The sheet itself when
252
+ * every input is needed here; else a copy with its own `inputSources`.
246
253
  */
247
- export declare function wrunSheetWithLaneDemand<Sheet extends Pick<WrunIndicatorMetadata, 'inputSources'>>(sheet: Sheet, sizeUnit: number): Sheet;
254
+ export declare function wrunSheetWithLaneDemand<Sheet extends Pick<WrunIndicatorMetadata, 'inputSources'>>(sheet: Sheet, sizeUnit: number, settings?: unknown): Sheet;
248
255
  /**
249
256
  * The sheet a run plans its lanes from on a chart of span `chartIntervalMs`, with every leg stream lane (`candles`,
250
257
  * `oi_candles`, `volume_profile_candles`: wrun-leg-stream-classes) its `chart_interval_below` gates off there (the kit's own `wrunLaneGatedOff`, read off the shared
@@ -297,10 +304,17 @@ export declare function wrunHostedLaneFills(market: WrunFactsMarket | undefined)
297
304
  point_value: number;
298
305
  zone: number;
299
306
  };
307
+ /** A lead contract not known yet is no failed read: the run head never asks it again on its own, and says which. */
308
+ export type WrunMarketReadFailure = 'read-failed' | 'contract-unknown';
309
+ /** A person's own rerun ends every rest of the market's failed reads, or the Retry a refusal offers would read
310
+ * nothing for a minute; a definite answer and a read in flight stay. */
311
+ export declare function forgetWrunMarketReadFailures(market: WrunFactsMarket | undefined): void;
312
+ /** A run head's mark: its own re-asks (wrun-overlay-run.util) reach only reads that failed after it. */
313
+ export declare function wrunMarketReadMark(): number;
300
314
  /**
301
315
  * Ask the directory for `market`'s row (om's read): once per market for the
302
316
  * session, a definite answer (the row, or not listed) kept; concurrent callers
303
- * share one search; a failure is asked again a minute later and meanwhile the
317
+ * share one search; a failure rests a minute (`warmMarketRead`) and meanwhile the
304
318
  * facts read as the chart knows them without the row. Never rejects. A venue
305
319
  * whose listings om never reads asks nothing.
306
320
  */
@@ -348,13 +362,13 @@ export declare function wrunMarketTradeUnitsOf(record: Record<string, unknown> |
348
362
  /**
349
363
  * Ask the instrument registry for `market`'s trade units: once per market for the session, a definite answer (the
350
364
  * record's units, or none) kept; concurrent callers share one read; a failed read, or a continuous chart whose lead is
351
- * not known yet, is asked again a minute later. A host whose metadata service reads no registry record
352
- * (`getSymbolMetadata` unbound) settles none. Never rejects. The read is fresh (`{ fresh: true }`, as the option units
353
- * read is): a cached record can predate the registry's point value fill.
365
+ * not known yet, rests a minute (`warmMarketRead`, ended by a person's rerun). A host whose metadata service reads no
366
+ * registry record (`getSymbolMetadata` unbound) settles none. Never rejects. The read is fresh (`{ fresh: true }`, as
367
+ * the option units read is): a cached record can predate the registry's point value fill.
354
368
  */
355
369
  export declare function warmWrunMarketTradeUnits(market: WrunFactsMarket | undefined): Promise<void>;
356
370
  /** The registry's units of `market` once a read settled them: the units, null for no record, undefined while the
357
- * registry can still answer (not asked yet, in flight, or a failed read that is retried). Synchronous. */
371
+ * registry can still answer (not asked yet, in flight, or a failed read that rests). Synchronous. */
358
372
  export declare function wrunMarketTradeUnitsNow(market: WrunFactsMarket | undefined): WrunMarketTradeUnits | null | undefined;
359
373
  /** Warm everything a market's dollar unit and stored unit read (C-DOLLAR): the directory row (a crypto market's quote)
360
374
  * and the instrument registry's units. Never rejects. */
@@ -362,6 +376,9 @@ export declare function warmWrunMarketDollarFacts(market: WrunFactsMarket | unde
362
376
  /** True when a read of `market`'s dollar unit now would wait on nothing (warmWrunMarketDollarFacts): the directory row
363
377
  * (wrunMarketFactsSettled) and the registry's units each answered, failed recently, or are never asked. */
364
378
  export declare function wrunMarketDollarFactsSettled(market: WrunFactsMarket | undefined): boolean;
379
+ /** The refusal words tell a failed read from a lead contract not known yet; `failedAfter` (a `wrunMarketReadMark`)
380
+ * keeps a run head from asking again a rest an earlier run left. */
381
+ export declare function wrunMarketDollarReadFailure(market: WrunFactsMarket | undefined, failedAfter?: number): WrunMarketReadFailure | undefined;
365
382
  /** What one price unit times one size unit is worth in US dollars on a market (`unit`), or why that cannot be proven:
366
383
  * `point-value` (no point value: ICE, PLATTS, an option contract, a CME contract the registry holds none for) or
367
384
  * `quote` (the market is quoted in something other than dollars, or its quote is not known), `transient` while a read
@@ -413,12 +430,13 @@ export type WrunMarketStoredUnitDollars = {
413
430
  export declare function wrunStoredUnitDollarsOfRows(frames: readonly unknown[]): number | undefined;
414
431
  /**
415
432
  * Read what one STORED unit of `market` is worth in dollars off the large-print writer's own rows: the market's newest
416
- * TRADE_LARGE print (`wrunStoredUnitDollarsOfRows`), through the host's series read on the K_TRADES history's own wire
417
- * (the chart's market, its wire venue as the K_TRADES worker spells it; TRADE_LARGE is a v2-only read, never the /v3
418
- * catalog, whose crypto rows carry no unit): one row, newest first, over the table's week. Once per market for the
419
- * session; concurrent callers share one read; a failed read is asked again a minute later. A host whose v2 service
420
- * reads no series (`sendSeriesOneShot` unbound) settles none. Never rejects. Only a run head with a raw floor to carry
421
- * asks it (wrun-market-size-defaults.util).
433
+ * TRADE_LARGE print (`wrunStoredUnitDollarsOfRows`, the newest row of every answer), through the host's series read on
434
+ * the K_TRADES history's own wire (the chart's market, its wire venue as the K_TRADES worker spells it; TRADE_LARGE is
435
+ * a v2-only read, never the /v3 catalog, whose crypto rows carry no unit): one row a side, newest first, over the
436
+ * table's week (`STORED_UNIT_SIDES`: one row of a read whose limit binds is no newest by time, and on a linear market
437
+ * an older print's ratio is an older price). Once per market for the session; concurrent callers share one read; a
438
+ * failed read rests a minute (`warmMarketRead`). A host whose v2 service reads no series (`sendSeriesOneShot` unbound)
439
+ * settles none. Never rejects. Only a run head with a raw floor to carry asks it (wrun-market-size-defaults.util).
422
440
  */
423
441
  export declare function warmWrunMarketStoredUnit(market: WrunFactsMarket | undefined): Promise<void>;
424
442
  /**