@orangecharts/wrun-chart-host 0.11.1 → 0.15.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 (319) hide show
  1. package/README.md +1 -0
  2. package/dist/constants/feature-flags.constants.d.ts +4 -4
  3. package/dist/constants/feature-flags.constants.js +38 -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 +69 -3
  13. package/dist/host-env.js +21 -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 +52 -12
  18. package/dist/indicators/controls/tpo-session.util.js +113 -16
  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 +141 -20
  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 +5 -5
  35. package/dist/market-data/venues/opra.js +3 -3
  36. package/dist/market-data/venues/stocks.contract.copy.json +6 -5
  37. package/dist/market-data/venues/stocks.d.ts +5 -5
  38. package/dist/market-data/venues/stocks.js +21 -18
  39. package/dist/settings-templates/frvp-fields.d.ts +12 -1
  40. package/dist/settings-templates/frvp-fields.js +15 -4
  41. package/dist/settings-templates/index.js +12 -5
  42. package/dist/settings-templates/indicator-fields.js +43 -2
  43. package/dist/settings-templates/tool-rules.d.ts +17 -8
  44. package/dist/settings-templates/tool-rules.js +15 -8
  45. package/dist/settings-templates/tool-tables.generated.js +4 -2
  46. package/dist/utility/auth/server-clock.util.d.ts +3 -1
  47. package/dist/utility/auth/server-clock.util.js +3 -1
  48. package/dist/utility/chart/book-live-bucket.util.js +2 -2
  49. package/dist/utility/chart/cache-alignment.util.d.ts +38 -7
  50. package/dist/utility/chart/cache-alignment.util.js +50 -13
  51. package/dist/utility/chart/chart-data-fetch-generation.util.d.ts +2 -0
  52. package/dist/utility/chart/chart-data-fetch-generation.util.js +16 -0
  53. package/dist/utility/chart/cme-session-bucket.util.d.ts +18 -75
  54. package/dist/utility/chart/cme-session-bucket.util.js +25 -332
  55. package/dist/utility/chart/continuous-contracts.util.js +6 -5
  56. package/dist/utility/chart/display-offset.leaf.d.ts +24 -0
  57. package/dist/utility/chart/display-offset.leaf.js +41 -0
  58. package/dist/utility/chart/effective-chart-session.util.d.ts +2 -1
  59. package/dist/utility/chart/effective-chart-session.util.js +13 -5
  60. package/dist/utility/chart/feed-interval.util.d.ts +6 -20
  61. package/dist/utility/chart/feed-interval.util.js +13 -22
  62. package/dist/utility/chart/fetch-dedupe-policy.util.d.ts +27 -7
  63. package/dist/utility/chart/fetch-dedupe-policy.util.js +86 -11
  64. package/dist/utility/chart/footprint-band.util.d.ts +21 -5
  65. package/dist/utility/chart/footprint-band.util.js +53 -14
  66. package/dist/utility/chart/host-bar-placement.util.d.ts +7 -4
  67. package/dist/utility/chart/host-bar-placement.util.js +8 -2
  68. package/dist/utility/chart/indicator-inflight-registry.util.d.ts +32 -0
  69. package/dist/utility/chart/indicator-inflight-registry.util.js +52 -0
  70. package/dist/utility/chart/indicator-run-interval.util.d.ts +10 -4
  71. package/dist/utility/chart/indicator-run-interval.util.js +21 -12
  72. package/dist/utility/chart/interval-registry.util.d.ts +1 -1
  73. package/dist/utility/chart/interval-registry.util.js +1 -1
  74. package/dist/utility/chart/kscript-legend-entries.util.d.ts +12 -0
  75. package/dist/utility/chart/kscript-legend-entries.util.js +16 -0
  76. package/dist/utility/chart/kscript-run-interval-projection.util.d.ts +1 -1
  77. package/dist/utility/chart/kscript-run-interval-projection.util.js +4 -2
  78. package/dist/utility/chart/kscript-venue-policy.util.d.ts +53 -62
  79. package/dist/utility/chart/kscript-venue-policy.util.js +85 -94
  80. package/dist/utility/chart/live-bucket.util.d.ts +39 -17
  81. package/dist/utility/chart/live-bucket.util.js +103 -57
  82. package/dist/utility/chart/local-kscript-source-revalidation.util.d.ts +58 -20
  83. package/dist/utility/chart/local-kscript-source-revalidation.util.js +98 -23
  84. package/dist/utility/chart/local-kscript-warmup-depth.util.d.ts +35 -11
  85. package/dist/utility/chart/local-kscript-warmup-depth.util.js +24 -3
  86. package/dist/utility/chart/market-session-schedule.util.d.ts +8 -0
  87. package/dist/utility/chart/market-session-schedule.util.js +39 -1
  88. package/dist/utility/chart/market-session.util.d.ts +136 -0
  89. package/dist/utility/chart/market-session.util.js +341 -0
  90. package/dist/utility/chart/om-panel.util.d.ts +5 -3
  91. package/dist/utility/chart/om-panel.util.js +42 -7
  92. package/dist/utility/chart/om-target.util.d.ts +14 -1
  93. package/dist/utility/chart/om-target.util.js +22 -5
  94. package/dist/utility/chart/opra-read-access.leaf.d.ts +16 -1
  95. package/dist/utility/chart/opra-read-access.leaf.js +22 -0
  96. package/dist/utility/chart/profile-row-height.util.d.ts +49 -16
  97. package/dist/utility/chart/profile-row-height.util.js +74 -37
  98. package/dist/utility/chart/rth-session.util.d.ts +55 -20
  99. package/dist/utility/chart/rth-session.util.js +94 -46
  100. package/dist/utility/chart/session-lattice.util.d.ts +150 -0
  101. package/dist/utility/chart/session-lattice.util.js +488 -0
  102. package/dist/utility/chart/trading-day.util.d.ts +40 -2
  103. package/dist/utility/chart/trading-day.util.js +84 -7
  104. package/dist/utility/chart/us-equities-session.util.d.ts +32 -11
  105. package/dist/utility/chart/us-equities-session.util.js +44 -15
  106. package/dist/utility/chart/window-geometry.leaf.d.ts +28 -7
  107. package/dist/utility/chart/window-geometry.leaf.js +57 -8
  108. package/dist/utility/chart/wrun-bar-session-facts.util.d.ts +21 -14
  109. package/dist/utility/chart/wrun-bar-session-facts.util.js +32 -38
  110. package/dist/utility/chart/wrun-run-result.util.d.ts +38 -13
  111. package/dist/utility/chart/wrun-run-result.util.js +97 -27
  112. package/dist/utility/common/time.util.js +5 -4
  113. package/dist/utility/market-events/earnings-scope.util.d.ts +10 -5
  114. package/dist/utility/market-events/earnings-scope.util.js +17 -9
  115. package/dist/utility/market-events/market-events.util.d.ts +14 -7
  116. package/dist/utility/market-events/market-events.util.js +30 -17
  117. package/dist/utility/number-format.util.d.ts +14 -21
  118. package/dist/utility/number-format.util.js +38 -24
  119. package/dist/utility/options/option-venue-disclosure.util.d.ts +40 -6
  120. package/dist/utility/options/option-venue-disclosure.util.js +71 -11
  121. package/dist/utility/options/option-venue.util.d.ts +1 -1
  122. package/dist/utility/options/option-venue.util.js +1 -1
  123. package/dist/utility/pool-symbol.leaf.d.ts +7 -0
  124. package/dist/utility/pool-symbol.leaf.js +50 -5
  125. package/dist/utility/stocks/stock-display.util.d.ts +15 -0
  126. package/dist/utility/stocks/stock-display.util.js +37 -0
  127. package/dist/utility/symbol-selection/contract-expiry.util.js +5 -4
  128. package/dist/utility/v2/gate-plane.util.d.ts +6 -0
  129. package/dist/utility/v2/gate-plane.util.js +11 -1
  130. package/dist/utility/v2/gate-session-latch.util.d.ts +1 -1
  131. package/dist/utility/v2/gate-session-latch.util.js +3 -3
  132. package/dist/utility/v2/governed-tier.leaf.d.ts +17 -16
  133. package/dist/utility/v2/governed-tier.leaf.js +17 -16
  134. package/dist/utility/v2/stocks-governed.util.d.ts +5 -0
  135. package/dist/utility/v2/stocks-governed.util.js +14 -0
  136. package/dist/utility/v2/v2-enums.leaf.d.ts +13 -0
  137. package/dist/utility/v2/v2-enums.leaf.js +458 -0
  138. package/dist/utility/wrun/derived-roots.leaf.d.ts +21 -1
  139. package/dist/utility/wrun/derived-roots.leaf.js +27 -1
  140. package/dist/utility/wrun/derived-roots.util.d.ts +44 -32
  141. package/dist/utility/wrun/derived-roots.util.js +97 -56
  142. package/dist/utility/wrun/run-schedule/wrun-late-reads.util.d.ts +4 -3
  143. package/dist/utility/wrun/run-schedule/wrun-late-reads.util.js +4 -3
  144. package/dist/utility/wrun/sources/lanes/option_daily.d.ts +2 -1
  145. package/dist/utility/wrun/sources/lanes/option_daily.js +2 -1
  146. package/dist/utility/wrun/sources/lanes/options_flow.d.ts +3 -0
  147. package/dist/utility/wrun/sources/lanes/options_flow.js +23 -5
  148. package/dist/utility/wrun/sources/opra-option-lanes.util.d.ts +3 -4
  149. package/dist/utility/wrun/sources/row-lane-registry.js +9 -4
  150. package/dist/utility/wrun/sources/row-lanes/dark_pool.d.ts +19 -0
  151. package/dist/utility/wrun/sources/row-lanes/dark_pool.js +104 -0
  152. package/dist/utility/wrun/sources/row-lanes/index.js +2 -0
  153. package/dist/utility/wrun/sources/wrun-lane-fetch-abort.util.d.ts +20 -0
  154. package/dist/utility/wrun/sources/wrun-lane-fetch-abort.util.js +103 -0
  155. package/dist/utility/wrun/sources/wrun-poll-lane.types.d.ts +19 -2
  156. package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +15 -13
  157. package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +49 -23
  158. package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +14 -9
  159. package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +75 -27
  160. package/dist/utility/wrun/sources/wrun-row-lanes.util.js +139 -82
  161. package/dist/utility/wrun/wrun-app-layer.leaf.d.ts +78 -0
  162. package/dist/utility/wrun/wrun-app-layer.leaf.js +89 -0
  163. package/dist/utility/wrun/wrun-bar-count.util.d.ts +11 -7
  164. package/dist/utility/wrun/wrun-bar-count.util.js +12 -8
  165. package/dist/utility/wrun/wrun-batched-kinds.leaf.d.ts +13 -0
  166. package/dist/utility/wrun/wrun-batched-kinds.leaf.js +18 -0
  167. package/dist/utility/wrun/wrun-batched-marks.util.d.ts +46 -23
  168. package/dist/utility/wrun/wrun-batched-marks.util.js +260 -62
  169. package/dist/utility/wrun/wrun-batched-readout.util.d.ts +26 -19
  170. package/dist/utility/wrun/wrun-batched-readout.util.js +81 -27
  171. package/dist/utility/wrun/wrun-book-bands.leaf.d.ts +8 -0
  172. package/dist/utility/wrun/wrun-book-bands.leaf.js +7 -0
  173. package/dist/utility/wrun/wrun-candle-equal.leaf.d.ts +19 -0
  174. package/dist/utility/wrun/wrun-candle-equal.leaf.js +40 -0
  175. package/dist/utility/wrun/wrun-canvas-readout.util.d.ts +4 -2
  176. package/dist/utility/wrun/wrun-canvases.util.d.ts +24 -7
  177. package/dist/utility/wrun/wrun-canvases.util.js +99 -30
  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-hover.util.d.ts +8 -2
  209. package/dist/utility/wrun/wrun-hover.util.js +24 -13
  210. package/dist/utility/wrun/wrun-inert-legend.util.d.ts +13 -0
  211. package/dist/utility/wrun/wrun-inert-legend.util.js +31 -3
  212. package/dist/utility/wrun/wrun-input-requirements.leaf.d.ts +7 -5
  213. package/dist/utility/wrun/wrun-input-requirements.leaf.js +16 -6
  214. package/dist/utility/wrun/wrun-install-pacer.util.d.ts +26 -0
  215. package/dist/utility/wrun/wrun-install-pacer.util.js +145 -0
  216. package/dist/utility/wrun/wrun-kit-refusal-stages.types.d.ts +22 -0
  217. package/dist/utility/wrun/wrun-kit-refusal-stages.types.js +1 -0
  218. package/dist/utility/wrun/wrun-lane-refusal.leaf.d.ts +12 -5
  219. package/dist/utility/wrun/wrun-lane-refusal.leaf.js +23 -5
  220. package/dist/utility/wrun/wrun-lane-warmup.util.js +22 -4
  221. package/dist/utility/wrun/wrun-leg-close.util.d.ts +6 -5
  222. package/dist/utility/wrun/wrun-leg-close.util.js +11 -9
  223. package/dist/utility/wrun/wrun-leg-fetch.util.d.ts +3 -1
  224. package/dist/utility/wrun/wrun-leg-fetch.util.js +9 -2
  225. package/dist/utility/wrun/wrun-levels-child.util.d.ts +2 -0
  226. package/dist/utility/wrun/wrun-levels-child.util.js +6 -0
  227. package/dist/utility/wrun/wrun-lifecycle.contract.d.ts +4 -0
  228. package/dist/utility/wrun/wrun-live-intake.util.d.ts +15 -6
  229. package/dist/utility/wrun/wrun-live-intake.util.js +167 -47
  230. package/dist/utility/wrun/wrun-live-tick.util.d.ts +52 -8
  231. package/dist/utility/wrun/wrun-live-tick.util.js +655 -97
  232. package/dist/utility/wrun/wrun-market-facts.util.d.ts +16 -2
  233. package/dist/utility/wrun/wrun-market-facts.util.js +32 -3
  234. package/dist/utility/wrun/wrun-market-size-defaults.leaf.d.ts +27 -27
  235. package/dist/utility/wrun/wrun-market-size-defaults.leaf.js +28 -16
  236. package/dist/utility/wrun/wrun-market-size-defaults.util.js +34 -5
  237. package/dist/utility/wrun/wrun-oi-lane.util.d.ts +10 -7
  238. package/dist/utility/wrun/wrun-oi-lane.util.js +16 -10
  239. package/dist/utility/wrun/wrun-option-strike-flow.util.js +1 -1
  240. package/dist/utility/wrun/wrun-option-views.util.d.ts +2 -2
  241. package/dist/utility/wrun/wrun-option-views.util.js +5 -2
  242. package/dist/utility/wrun/wrun-options-flow-underlying.leaf.d.ts +5 -0
  243. package/dist/utility/wrun/wrun-options-flow-underlying.leaf.js +16 -0
  244. package/dist/utility/wrun/wrun-options-stop.util.d.ts +3 -2
  245. package/dist/utility/wrun/wrun-options-stop.util.js +6 -4
  246. package/dist/utility/wrun/wrun-output-words.util.d.ts +14 -0
  247. package/dist/utility/wrun/wrun-output-words.util.js +51 -0
  248. package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +116 -11
  249. package/dist/utility/wrun/wrun-overlay-drivers.util.js +208 -43
  250. package/dist/utility/wrun/wrun-overlay-lifecycle.util.js +20 -10
  251. package/dist/utility/wrun/wrun-overlay-park.util.d.ts +84 -0
  252. package/dist/utility/wrun/wrun-overlay-park.util.js +135 -0
  253. package/dist/utility/wrun/wrun-overlay-recovery.util.d.ts +37 -4
  254. package/dist/utility/wrun/wrun-overlay-recovery.util.js +26 -14
  255. package/dist/utility/wrun/wrun-overlay-result.util.d.ts +6 -1
  256. package/dist/utility/wrun/wrun-overlay-result.util.js +2 -0
  257. package/dist/utility/wrun/wrun-overlay-run.util.d.ts +247 -26
  258. package/dist/utility/wrun/wrun-overlay-run.util.js +2234 -408
  259. package/dist/utility/wrun/wrun-pack.util.d.ts +8 -5
  260. package/dist/utility/wrun/wrun-panel-mount.util.d.ts +11 -2
  261. package/dist/utility/wrun/wrun-panel-mount.util.js +122 -19
  262. package/dist/utility/wrun/wrun-panel-style.util.d.ts +4 -2
  263. package/dist/utility/wrun/wrun-panel-style.util.js +3 -2
  264. package/dist/utility/wrun/wrun-pin-spelling.util.d.ts +7 -0
  265. package/dist/utility/wrun/wrun-pin-spelling.util.js +18 -4
  266. package/dist/utility/wrun/wrun-pin-venues.util.d.ts +26 -17
  267. package/dist/utility/wrun/wrun-pin-venues.util.js +43 -36
  268. package/dist/utility/wrun/wrun-pinned-lanes.util.d.ts +58 -0
  269. package/dist/utility/wrun/wrun-pinned-lanes.util.js +72 -0
  270. package/dist/utility/wrun/wrun-prefix-cohort.util.js +2 -1
  271. package/dist/utility/wrun/wrun-prefix-lanes.util.d.ts +22 -9
  272. package/dist/utility/wrun/wrun-prefix-lanes.util.js +145 -26
  273. package/dist/utility/wrun/wrun-prefix-proof.util.d.ts +29 -0
  274. package/dist/utility/wrun/wrun-prefix-proof.util.js +23 -5
  275. package/dist/utility/wrun/wrun-refusal-surface.util.d.ts +9 -1
  276. package/dist/utility/wrun/wrun-refusal-surface.util.js +15 -1
  277. package/dist/utility/wrun/wrun-refusal.util.d.ts +19 -1
  278. package/dist/utility/wrun/wrun-refusal.util.js +103 -16
  279. package/dist/utility/wrun/wrun-registry-errors.util.d.ts +20 -6
  280. package/dist/utility/wrun/wrun-registry-errors.util.js +20 -6
  281. package/dist/utility/wrun/wrun-replay-rows.util.js +6 -10
  282. package/dist/utility/wrun/wrun-run-health.util.d.ts +95 -5
  283. package/dist/utility/wrun/wrun-run-health.util.js +209 -3
  284. package/dist/utility/wrun/wrun-run-interval-session.util.d.ts +2 -2
  285. package/dist/utility/wrun/wrun-run-interval-session.util.js +2 -2
  286. package/dist/utility/wrun/wrun-run-interval.util.d.ts +9 -8
  287. package/dist/utility/wrun/wrun-run-interval.util.js +13 -11
  288. package/dist/utility/wrun/wrun-sandbox-row-source.js +5 -2
  289. package/dist/utility/wrun/wrun-script-inputs.util.d.ts +38 -11
  290. package/dist/utility/wrun/wrun-script-inputs.util.js +194 -56
  291. package/dist/utility/wrun/wrun-session-composition.util.d.ts +81 -0
  292. package/dist/utility/wrun/wrun-session-composition.util.js +169 -0
  293. package/dist/utility/wrun/wrun-setting-words.util.d.ts +10 -7
  294. package/dist/utility/wrun/wrun-setting-words.util.js +25 -7
  295. package/dist/utility/wrun/wrun-source-rows.util.d.ts +94 -28
  296. package/dist/utility/wrun/wrun-source-rows.util.js +738 -93
  297. package/dist/utility/wrun/wrun-stream-clock.util.d.ts +45 -0
  298. package/dist/utility/wrun/wrun-stream-clock.util.js +108 -0
  299. package/dist/utility/wrun/wrun-style-names.util.d.ts +23 -0
  300. package/dist/utility/wrun/wrun-style-names.util.js +74 -0
  301. package/dist/utility/wrun/wrun-tape-coins.util.d.ts +116 -0
  302. package/dist/utility/wrun/wrun-tape-coins.util.js +110 -0
  303. package/dist/utility/wrun/wrun-tape-source.util.d.ts +62 -32
  304. package/dist/utility/wrun/wrun-tape-source.util.js +72 -34
  305. package/dist/utility/wrun/wrun-tier-grid.util.d.ts +13 -5
  306. package/dist/utility/wrun/wrun-tier-grid.util.js +23 -13
  307. package/dist/utility/wrun/wrun-tpo-rows.util.js +2 -1
  308. package/dist/utility/wrun/wrun-trades-lane.util.d.ts +73 -0
  309. package/dist/utility/wrun/wrun-trades-lane.util.js +82 -0
  310. package/dist/utility/wrun/wrun-twin-compute-inputs.util.d.ts +5 -0
  311. package/dist/utility/wrun/wrun-twin-compute-inputs.util.js +9 -2
  312. package/dist/utility/wrun/wrun-visibility-table.d.ts +13 -0
  313. package/dist/utility/wrun/wrun-visibility-table.js +9 -0
  314. package/dist/utility/wrun/wrun-volume-profile.util.js +7 -3
  315. package/dist/utils/replay/replay-buffer-math.d.ts +16 -6
  316. package/dist/utils/replay/replay-buffer-math.js +60 -30
  317. package/dist/workers/constants/socket-slots.d.ts +11 -7
  318. package/dist/workers/constants/socket-slots.js +6 -5
  319. package/package.json +5 -5
@@ -25,17 +25,20 @@
25
25
  import type { WrunAbiVersion, WrunIndicatorMetadata, WrunOutputRow, WrunPackedRunRequest, WrunWorkerResponse } from '../../interfaces/wrun-runtime.interface.js';
26
26
  export { registerWrunRowLaneTupleWidths } from './wrun-pack-widths.leaf.js';
27
27
  export { WRUN_CELL_CAPACITY_INVALID_CODE, wrunCellBlockTuples, wrunCellCapacityIssue, wrunCellReadCapacity, wrunModuleCellCapacity, wrunSheetCellBlockTuples, } from './wrun-cell-capacity.leaf.js';
28
+ /** One bar's flat f64 cells of one celled input: an array, or a view of the book adapter's one f64 block
29
+ * (wrun-source-rows.util `wrunBookCellRows`, WRUN-PANBACK-2 S2: a book lane's cells are never spelled as arrays). */
30
+ export type WrunCellBlock = number[] | Float64Array;
28
31
  /** One runtime input row: `values` is the positional scalar block (celled
29
32
  * slots carry NaN placeholders); `cellBlocks` maps a celled input index to
30
- * that bar's flat f64 cell array. An index with no entry is a missing block
31
- * (`wrun_arg_len` answers -1); an empty array is a zero-cell bar (0).
33
+ * that bar's flat f64 cell block. An index with no entry is a missing block
34
+ * (`wrun_arg_len` answers -1); an empty block is a zero-cell bar (0).
32
35
  * A block is read, never written: the row builder hands the shared host's
33
- * own array through uncopied, and `packWrunRows` copying it into the ABI
34
- * buffer is its one copy. */
36
+ * own array (or the book adapter's view) through uncopied, and `packWrunRows`
37
+ * copying it into the ABI buffer is its one copy. */
35
38
  export interface WrunInputRow {
36
39
  ts: number;
37
40
  values: number[];
38
- cellBlocks?: Map<number, number[]>;
41
+ cellBlocks?: Map<number, WrunCellBlock>;
39
42
  }
40
43
  /** Cell tuple widths per celled source class (f64 cells per source tuple), the shared host's table
41
44
  * (`WRUN_HOST_CELL_TUPLE_WIDTHS`): `volume_profile` = [low, high, buy, sell]; `book` = [price,
@@ -2,6 +2,7 @@ import { type KScriptLegendEntry } from '../chart/kscript-legend-entries.util.js
2
2
  import { type EnginePanelHooks } from '../chart/om-panel.util.js';
3
3
  import { WRUN_WINDOW_TABLES_ONLY_SETTING } from '../chart/window-geometry.leaf.js';
4
4
  import { wrunSeriesChildId, type WrunRunResult } from '../chart/wrun-run-result.util.js';
5
+ import type { WrunPictureIdentity } from './wrun-overlay-drivers.util.js';
5
6
  import { type WrunBuiltinTwin, type WrunPaneFormatChart } from './wrun-pane-format.util.js';
6
7
  import type { WrunRunIntervalProjection } from './wrun-run-interval-projection.types.js';
7
8
  interface WrunOverlayConfig {
@@ -170,6 +171,7 @@ export declare const WRUN_CHILD_LEGEND_ROW: {
170
171
  readonly marks: "parent";
171
172
  readonly spans: "parent";
172
173
  readonly rays: "parent";
174
+ readonly flags: "parent";
173
175
  };
174
176
  /** A save of the package overlay: every mounted series child takes the chart switches it carries,
175
177
  * its container through the engine's settings door and its plots' price markers through the
@@ -266,7 +268,7 @@ export interface PreparedWrunWindowLanding {
266
268
  * never samples colour bounds, a full run does. Rejects with `WrunStaleLandingError` when the mount holds no
267
269
  * such child to land into, and with the pack error when a pack failed.
268
270
  *
269
- * A batched child (WRUN-BATCHED-MARKS: marks, spans, rays) lands through the same seam (round-2 fold 10:
271
+ * A batched child (WRUN-BATCHED-MARKS: marks, spans, rays, flags) lands through the same seam (round-2 fold 10:
270
272
  * the row-backed canvas kinds prepend rows): its merged rows are budgeted on the batched ledger, each pass
271
273
  * row that replaces a mounted bar charged its old copy too, and the ring logs `wrun-batched-prefix-landed`;
272
274
  * a run's heatmap and batched landings commit as one transaction. `prepareWrunChildWindowLanding` names
@@ -313,7 +315,7 @@ export { WRUN_WINDOW_TABLES_ONLY_SETTING };
313
315
  * precision (OT29, X7): the panels' formatters and the lower pane's legend
314
316
  * print "price" values with it. A tick's heatmap tail (`tailOnly`) only
315
317
  * ever merges its rows into a mounted canvas. */
316
- export declare function mountWrunChildOverlays({ tc, overlayId, runResult, replaceFrames, swapCanvasRows, canvasRowsFromTs, historyWindow, projection, cell, priceDigits, onMainThreadMs, chartIndex, }: {
318
+ export declare function mountWrunChildOverlays({ tc, overlayId, runResult, replaceFrames, swapCanvasRows, canvasRowsFromTs, historyWindow, projection, pictureIdentity, cell, priceDigits, onMainThreadMs, chartIndex, }: {
317
319
  tc: WrunChildOverlayChart;
318
320
  overlayId: string;
319
321
  runResult: WrunRunResult;
@@ -345,6 +347,13 @@ export declare function mountWrunChildOverlays({ tc, overlayId, runResult, repla
345
347
  historyWindow?: WrunChildHistoryWindow;
346
348
  /** The parent ran at another interval: its series child projects the same way. */
347
349
  projection?: WrunRunIntervalProjection;
350
+ /** What the pass's rows were computed for (`wrunPictureIdentityOf`: the run's or the session's compute settings
351
+ * revision and market identity). A mounted heatmap decides its colour scale at its install and at the first
352
+ * whole-window pass (a run's, a swap, a window that rolled past its rows) of another picture; a whole-window pass
353
+ * of the picture that decided it keeps the bounds on screen and the sample a Sensitivity re-pick reads, while
354
+ * its rows swap as before (`holdsHeatmapScale`). A merge never moves the scale. Absent, every whole-window pass
355
+ * decides again, the rule before the hold. */
356
+ pictureIdentity?: WrunPictureIdentity;
348
357
  /** The cell the mount lands on (WrunMountCell); the parent's owner flag decides when absent. */
349
358
  cell?: WrunMountCell;
350
359
  /** The chart's price digits, read per call (the symbol may change). */
@@ -37,7 +37,12 @@
37
37
  * await: prepareWrunHeatmapWindowLanding),
38
38
  * matrices frame-backed like levels; a heatmap takes the viewer's
39
39
  * Sensitivity at this door (`rescaleWrunHeatmapChildren` re-picks the mounted
40
- * bounds with no run). Batched marks (WRUN-BATCHED-MARKS: marks, spans and
40
+ * bounds with no run). A heatmap's colour scale is decided once per picture
41
+ * (the picture identity a pass hands, `wrunPictureIdentityOf`): at its install
42
+ * or at the first whole-window pass of another picture; every other pass keeps
43
+ * the decided bounds and the sample a Sensitivity re-pick reads, while its rows
44
+ * swap or merge as before (`carryHeatmapScale`). Batched marks
45
+ * (WRUN-BATCHED-MARKS: marks, spans and
41
46
  * rays children) are row-backed like heatmaps: a tick merges every row it
42
47
  * re-evaluated, row by row; a windowed run lands inside its window; the engine
43
48
  * gate refuses a kind the chart cannot draw by name; their own cell budget
@@ -55,8 +60,8 @@ import { isWrunWindowOwner } from '../chart/window-owner.leaf.js';
55
60
  import { ownerPaneDrawsNothing, planWindowWeights, reconcileWindowOwnerGeometry, savedWindowSplit, tableRowCountOf, WRUN_WINDOW_TABLES_ONLY_SETTING, } from '../chart/window-geometry.leaf.js';
56
61
  import { wrunLegendName } from '../chart/wrun-legend-name.util.js';
57
62
  import { wrunResultLegendColors, wrunSeriesChildId, } from '../chart/wrun-run-result.util.js';
58
- import { budgetWrunBatchedRetained, budgetWrunBatchedRows, commitWrunBatchedPlan, currentWrunBatchedPlan, forgetWrunBatchedCells, isWrunBatchedMarksKind, noteWrunBatchedRowsCut, planWrunBatchedMerged, restoreWrunBatchedLedger, snapshotWrunBatchedLedger, wrunBatchedChargeOf, wrunBatchedChildConfig, wrunBatchedChildrenOverShare, wrunBatchedSiblingsToRebalance, } from './wrun-batched-marks.util.js';
59
- import { forgetWrunCanvasReadout, keepWrunHeatmapScaleSample, rememberWrunCanvasReadout, wrunCanvasChildConfig, wrunHeatmapSensitivityBounds, wrunPlainCanvasRow, } from './wrun-canvases.util.js';
63
+ import { budgetWrunBatchedRetained, budgetWrunBatchedRows, commitWrunBatchedPlan, currentWrunBatchedPlan, forgetWrunBatchedCells, isWrunBatchedMarksKind, noteWrunBatchedRowsCut, planWrunBatchedMerged, restoreWrunBatchedLedger, snapshotWrunBatchedLedger, WRUN_BATCHED_MARKS_KINDS, wrunBatchedChargeOf, wrunBatchedChildConfig, wrunBatchedChildrenOverShare, wrunBatchedEngineVerdict, wrunBatchedSiblingsToRebalance, } from './wrun-batched-marks.util.js';
64
+ import { forgetWrunCanvasReadout, keepWrunHeatmapScaleSample, rememberWrunCanvasReadout, wrunCanvasChildConfig, wrunHeatmapScaleDecided, wrunHeatmapScaleKept, wrunHeatmapSensitivityBounds, wrunPlainCanvasRow, } from './wrun-canvases.util.js';
60
65
  import { wrunChildHiddenRowKey } from './wrun-child-overlay-id.util.js';
61
66
  import { wrunHeatmapSensitivitySetting, wrunHeatmapSensitivityValue } from './wrun-color-settings.util.js';
62
67
  import { budgetWrunHeatmapRetained, budgetWrunHeatmapRows, commitWrunHeatmapPlan, currentWrunHeatmapPlan, planWrunHeatmapMerged, restoreWrunHeatmapLedger, snapshotWrunHeatmapLedger, wrunHeatmapCellLayoutOf, wrunHeatmapChildrenOverShare, wrunHeatmapSiblingsToRebalance, } from './wrun-heatmap-cell-budget.util.js';
@@ -106,6 +111,7 @@ export const WRUN_CHILD_LEGEND_ROW = {
106
111
  marks: 'parent',
107
112
  spans: 'parent',
108
113
  rays: 'parent',
114
+ flags: 'parent',
109
115
  };
110
116
  /** The pane height panels and the series lower pane share below the chart. */
111
117
  const CHILD_PANE_GRID_HEIGHT = 0.22;
@@ -127,9 +133,7 @@ const ROW_BACKED_KINDS = new Set([
127
133
  'series',
128
134
  'heatmap',
129
135
  'profile',
130
- 'marks',
131
- 'spans',
132
- 'rays',
136
+ ...WRUN_BATCHED_MARKS_KINDS,
133
137
  ]);
134
138
  function overlayPresent(tc, id) {
135
139
  return tc.metadata.some((meta) => meta.id === id);
@@ -167,12 +171,12 @@ function rebuiltRecord(record, ctx) {
167
171
  return record.blanked === true ? blankedRecord(rebuilt) : rebuilt;
168
172
  }
169
173
  /** The price canvases (g6: heatmap, profile and matrix children) and the
170
- * batched marks drawn over the price pane like them (marks, spans, rays):
174
+ * batched marks drawn over the price pane like them (marks, spans, rays, flags):
171
175
  * no price marker, a readout registered when the config is built. */
172
176
  function isCanvasChild(child) {
173
177
  return child.kind === 'heatmap' || child.kind === 'profile' || child.kind === 'matrix' || isBatchedChild(child);
174
178
  }
175
- /** A batched child (WRUN-BATCHED-MARKS): marks, spans or rays. */
179
+ /** A batched child (WRUN-BATCHED-MARKS): marks, spans, rays or flags. */
176
180
  function isBatchedChild(child) {
177
181
  return isWrunBatchedMarksKind(child.kind);
178
182
  }
@@ -299,10 +303,10 @@ function resolveSettingsColorWords(settings, theme) {
299
303
  }
300
304
  return resolved;
301
305
  }
302
- /** The chart's display timezone offset for the panel translation (SC37).
303
- * A chart mounted before the user store exists (a bare test chart, a boot
304
- * path) reads as UTC, the engine's own default. */
305
- function displayTimezoneOffsetMs() {
306
+ /** The chart's display timezone offset for the panel translation (SC37): a fixed shift, or the shift at each instant
307
+ * (the host's answer, read at each key and record time, never once for all of them). A chart mounted before the
308
+ * user store exists (a bare test chart, a boot path) reads as UTC, the engine's own default. */
309
+ function displayTimezoneOffset() {
306
310
  try {
307
311
  return wrunChartHostEnv().user.chartDisplayTimezoneOffsetMs();
308
312
  }
@@ -600,6 +604,7 @@ function childKindConfig(child, ctx) {
600
604
  case 'marks':
601
605
  case 'spans':
602
606
  case 'rays':
607
+ case 'flags':
603
608
  return batchedChildConfig(child, ctx);
604
609
  case 'inset':
605
610
  // The docked door keeps the inset sender fields only (a colour word
@@ -1232,6 +1237,74 @@ function isHeatmapRecord(record) {
1232
1237
  function isWindowRecord(record) {
1233
1238
  return isHeatmapRecord(record) || isBatchedRecord(record);
1234
1239
  }
1240
+ // ── A heatmap's colour scale: decided once per picture ──────────────────────────────────────────────────
1241
+ //
1242
+ // Every pass hands the picture its rows were computed for (`pictureIdentity`, the one derivation
1243
+ // `wrunPictureIdentityOf` in wrun-overlay-drivers.util: the compute settings revision and the market identity of the
1244
+ // run or live session that computed them, with the reasons those two facts are the identity).
1245
+ /**
1246
+ * The picture each mounted heatmap's colour scale was decided under, keyed (like its scale sample,
1247
+ * wrun-canvases.util `heatmapSamples`) by its input's `settings` object: every seam that keeps a record (a live
1248
+ * merge, a trim, a windowed landing, a retranslate, a rescale, a blank, a landing's roll-back) copies the input as
1249
+ * `{ ...input, data }` or keeps it whole, so the stamp travels with the bounds it names and no seam has to copy it.
1250
+ */
1251
+ const decidedPictures = new WeakMap();
1252
+ /** A heatmap pass decides its own colour scale (its install, or a whole-window pass of another picture): the
1253
+ * record it becomes is stamped with the pass's picture (none when the pass named none). */
1254
+ function decideHeatmapScale(entry, picture) {
1255
+ if (entry.input.kind !== 'heatmap')
1256
+ return;
1257
+ if (picture !== undefined)
1258
+ decidedPictures.set(entry.input.settings, picture);
1259
+ else
1260
+ decidedPictures.delete(entry.input.settings);
1261
+ }
1262
+ /**
1263
+ * Whether a whole-window pass of `picture` keeps the colour scale `stayed` shows: the same picture decided it, its
1264
+ * sample gave the bounds on screen at the quantile they are read at (`sensitivity`, the viewer's position now;
1265
+ * `wrunHeatmapScaleDecided`: an empty sample, one whose cells all sit at the floor or the centre, or one where the
1266
+ * quantile's share of them does, decided nothing, and its stand-in bounds would saturate every cell the next rows
1267
+ * bring), on a record no blank emptied (a symbol, interval or session switch blanks the children, and the rows that
1268
+ * come after it are a new load), under the same scale declaration. Anything else decides again from the pass's own
1269
+ * rows.
1270
+ */
1271
+ function holdsHeatmapScale(stayed, entry, picture, sensitivity) {
1272
+ return (picture !== undefined &&
1273
+ stayed.blanked !== true &&
1274
+ isHeatmapRecord(stayed) &&
1275
+ entry.input.kind === 'heatmap' &&
1276
+ decidedPictures.get(stayed.input.settings) === picture &&
1277
+ wrunHeatmapScaleDecided(stayed.input, sensitivity) &&
1278
+ heatmapScaleDeclaration(stayed.input) === heatmapScaleDeclaration(entry.input));
1279
+ }
1280
+ /** The words a heatmap's colour scale is built under: its Sensitivity inputs when it has a row (the author's scale
1281
+ * words, the layout and value word the sample reads) and the words its settings carry (the cell layout, the value
1282
+ * word, the curve, the centre). Equal under one picture by construction (they move only with a compute save or
1283
+ * the script); compared all the same, so a scale is never carried onto another declaration. */
1284
+ function heatmapScaleDeclaration(child) {
1285
+ const { cellLayout, valueField, scale, center } = child.settings;
1286
+ return JSON.stringify([child.scale ?? null, cellLayout, valueField, scale, center]);
1287
+ }
1288
+ /**
1289
+ * Carry the colour scale `stayed` shows onto `entry`, the record a pass stores while it keeps that scale: the pass's
1290
+ * own child (its rows, every other setting it built) with the decided own bounds, the decided sample beside them
1291
+ * (`keepWrunHeatmapScaleSample`) and the decided picture, and the config at those bounds (the viewer's Sensitivity
1292
+ * re-picks them from the decided sample right after, `repickHeatmapBounds`). The pass's rows still swap or merge as
1293
+ * it asks; only the scale is held. The run result's own child is never written: the record takes a copy.
1294
+ */
1295
+ function carryHeatmapScale(stayed, entry) {
1296
+ if (entry.input.kind !== 'heatmap')
1297
+ return;
1298
+ const { min, max } = stayed.input.settings;
1299
+ const held = { ...entry.input, settings: { ...entry.input.settings, min, max } };
1300
+ keepWrunHeatmapScaleSample(stayed.input, held);
1301
+ const picture = decidedPictures.get(stayed.input.settings);
1302
+ if (picture !== undefined)
1303
+ decidedPictures.set(held.settings, picture);
1304
+ entry.input = held;
1305
+ entry.config.settings.min = min;
1306
+ entry.config.settings.max = max;
1307
+ }
1235
1308
  /** The merge of a pass into a mounted heatmap's or batched child's window and its budget, planned from the
1236
1309
  * record's rows (the rows the mount means the engine to hold, a trim titan still queues included), writing
1237
1310
  * nothing. */
@@ -1302,8 +1375,9 @@ function landHeatmapWindow(tc, overlayId, state, record, plan, deferred = NO_DEF
1302
1375
  }
1303
1376
  return landed;
1304
1377
  }
1378
+ // The landed input shares the record's settings, so the decided scale (its sample and its picture, both kept
1379
+ // beside the settings) stays the one a Sensitivity re-pick and the next pass read.
1305
1380
  commitWrunHeatmapPlan(tc, plan.budget.plan, held);
1306
- keepWrunHeatmapScaleSample(record.input.data, rows);
1307
1381
  for (const sibling of wrunHeatmapChildrenOverShare(tc, overlayId, plan.childId, held)) {
1308
1382
  if (!deferred.has(sibling))
1309
1383
  budgetMountedHeatmap(tc, overlayId, sibling);
@@ -1434,7 +1508,7 @@ function rollBackLandingGroup(group) {
1434
1508
  * never samples colour bounds, a full run does. Rejects with `WrunStaleLandingError` when the mount holds no
1435
1509
  * such child to land into, and with the pack error when a pack failed.
1436
1510
  *
1437
- * A batched child (WRUN-BATCHED-MARKS: marks, spans, rays) lands through the same seam (round-2 fold 10:
1511
+ * A batched child (WRUN-BATCHED-MARKS: marks, spans, rays, flags) lands through the same seam (round-2 fold 10:
1438
1512
  * the row-backed canvas kinds prepend rows): its merged rows are budgeted on the batched ledger, each pass
1439
1513
  * row that replaces a mounted bar charged its old copy too, and the ring logs `wrun-batched-prefix-landed`;
1440
1514
  * a run's heatmap and batched landings commit as one transaction. `prepareWrunChildWindowLanding` names
@@ -1734,7 +1808,7 @@ function mountContext(tc, overlayId, parent, children, priceDigits, chartHeightP
1734
1808
  priceDigits,
1735
1809
  theme: wrunColorThemeOf(tc),
1736
1810
  themeMode: userThemeMode(),
1737
- timezoneOffsetMs: displayTimezoneOffsetMs(),
1811
+ timezoneOffsetMs: displayTimezoneOffset(),
1738
1812
  windowCell,
1739
1813
  planned,
1740
1814
  anchorPaneId: ownerTimePaneId(parent, overlayId, children),
@@ -1764,7 +1838,7 @@ function mountContext(tc, overlayId, parent, children, priceDigits, chartHeightP
1764
1838
  * precision (OT29, X7): the panels' formatters and the lower pane's legend
1765
1839
  * print "price" values with it. A tick's heatmap tail (`tailOnly`) only
1766
1840
  * ever merges its rows into a mounted canvas. */
1767
- export function mountWrunChildOverlays({ tc, overlayId, runResult, replaceFrames = true, swapCanvasRows, canvasRowsFromTs, historyWindow, projection, cell, priceDigits, onMainThreadMs, chartIndex, }) {
1841
+ export function mountWrunChildOverlays({ tc, overlayId, runResult, replaceFrames = true, swapCanvasRows, canvasRowsFromTs, historyWindow, projection, pictureIdentity, cell, priceDigits, onMainThreadMs, chartIndex, }) {
1768
1842
  if (runResult.failureReason !== undefined)
1769
1843
  return Promise.reject(new Error(runResult.failureReason));
1770
1844
  if (tc.isDestroyed)
@@ -1916,8 +1990,13 @@ export function mountWrunChildOverlays({ tc, overlayId, runResult, replaceFrames
1916
1990
  forgetWrunCanvasReadout(entry.config.id);
1917
1991
  return;
1918
1992
  }
1919
- const newer = entry.input.newer;
1920
- const cause = newer !== undefined ? 'old-engine' : batchedGateCause(tc, entry.config.plot, packs[at]);
1993
+ const gated = entry.input.newer !== undefined ? 'old-engine' : batchedGateCause(tc, entry.config.plot, packs[at]);
1994
+ // The engine draws the kind: a look its kind renderer would draw as another (the diamond, the log size law
1995
+ // and its px bounds before the engine release that draws flags, wrunBatchedEngineVerdict) is refused by name
1996
+ // and reason like a layout newer than this chart, never drawn as another look.
1997
+ const engineShort = gated === null ? wrunBatchedEngineVerdict(entry.input, (type) => tc.hasPlotRenderer?.(type) === true) : null;
1998
+ const newer = entry.input.newer ?? engineShort ?? undefined;
1999
+ const cause = newer !== undefined ? 'old-engine' : gated;
1921
2000
  if (cause === null)
1922
2001
  return;
1923
2002
  const refusal = {
@@ -1986,6 +2065,7 @@ export function mountWrunChildOverlays({ tc, overlayId, runResult, replaceFrames
1986
2065
  case 'marks':
1987
2066
  case 'spans':
1988
2067
  case 'rays':
2068
+ case 'flags':
1989
2069
  return sameCanvas(mounted.config, next.config) ? [[id, mounted]] : [];
1990
2070
  // A frame that stays on its pane is refreshed in place right here and
1991
2071
  // kept as this run's child (the engine keeps one overlay throughout);
@@ -1999,7 +2079,8 @@ export function mountWrunChildOverlays({ tc, overlayId, runResult, replaceFrames
1999
2079
  current.children = new Map(preserved);
2000
2080
  // The configs were built before the pack await: a heatmap about to be
2001
2081
  // installed or refreshed re-picks its bounds from the Sensitivity it holds
2002
- // NOW (a drag or a save during the await), never the one it was built with.
2082
+ // NOW (a drag or a save during the await), never the one it was built with,
2083
+ // over the scale its record keeps (its own, or the one carried onto it).
2003
2084
  const repickHeatmapBounds = ({ input, config }) => {
2004
2085
  if (input.kind !== 'heatmap' || input.scale === undefined)
2005
2086
  return;
@@ -2040,6 +2121,8 @@ export function mountWrunChildOverlays({ tc, overlayId, runResult, replaceFrames
2040
2121
  forgetWrunCanvasReadout(id);
2041
2122
  }
2042
2123
  else if (!mounted) {
2124
+ // An install decides a heatmap's colour scale from its own rows, exactly as before the hold.
2125
+ decideHeatmapScale(entry, pictureIdentity);
2043
2126
  repickHeatmapBounds(entry);
2044
2127
  current.children.set(id, entry);
2045
2128
  budgetHeatmapChild(tc, overlayId, entry);
@@ -2098,6 +2181,18 @@ export function mountWrunChildOverlays({ tc, overlayId, runResult, replaceFrames
2098
2181
  swapCanvasRows === true ||
2099
2182
  !sameDataWindow(mountedConfig, config) ||
2100
2183
  canvasGridMoved(mountedConfig, config)) {
2184
+ // A whole-window pass swaps the rows. A heatmap keeps the colour scale on screen while the pass is
2185
+ // of the picture that decided it (a reseed, a refine, an eviction's or a gap's swap, a window that
2186
+ // rolled past the mounted rows, a rerun with nothing changed): its rows repaint at the decided
2187
+ // bounds. A pass of another picture (an input, the symbol or the interval moved), one that named no
2188
+ // picture, and a record whose scale an empty sample or a blank left undecided decide it again from
2189
+ // the pass's own rows (2026-11-07: every rebuild re-picked from the rows held then, so cells on
2190
+ // screen changed brightness while nothing they showed had changed).
2191
+ const sensitivity = heatmapSensitivityOf(current.previews, parent, input.name);
2192
+ if (holdsHeatmapScale(stayed, entry, pictureIdentity, sensitivity))
2193
+ carryHeatmapScale(stayed, entry);
2194
+ else
2195
+ decideHeatmapScale(entry, pictureIdentity);
2101
2196
  repickHeatmapBounds(entry);
2102
2197
  budgetHeatmapChild(tc, overlayId, entry);
2103
2198
  refreshChildInPlace(tc, mountedConfig, config);
@@ -2110,6 +2205,14 @@ export function mountWrunChildOverlays({ tc, overlayId, runResult, replaceFrames
2110
2205
  const held = mountedHeatmapRecord(tc, id);
2111
2206
  if (held !== undefined)
2112
2207
  keepHeatmapRows(entry, held.config.data);
2208
+ // A merge hands the engine rows only, so the screen keeps the scale it shows; the record keeps it too
2209
+ // (the pass's own bounds and sample, picked from its rows, would reach the screen at the next
2210
+ // retranslate, Sensitivity re-pick or windowed landing), a stand-in included: the next whole-window
2211
+ // pass decides that one again (holdsHeatmapScale).
2212
+ if (isHeatmapRecord(held) && wrunHeatmapScaleKept(held.input)) {
2213
+ carryHeatmapScale(held, entry);
2214
+ repickHeatmapBounds(entry);
2215
+ }
2113
2216
  current.children.set(id, entry);
2114
2217
  }
2115
2218
  }
@@ -24,6 +24,7 @@
24
24
  * om-panel-push-style.util), so nothing here refuses.
25
25
  */
26
26
  import type { WrunPanelSeriesStyle, WrunPanelStyle } from '../../interfaces/wrun-runtime.interface.js';
27
+ import type { DisplayOffset } from '../chart/display-offset.leaf.js';
27
28
  import type { ParsedPanel } from '../chart/om-panel.util.js';
28
29
  import { type WrunColorTheme } from './wrun-style-words.util.js';
29
30
  import type { WrunPanelFrameChrome } from './wrun-frames.js';
@@ -46,11 +47,12 @@ export type WrunPanelValueRole = 'x' | 'axis' | 'value';
46
47
  export type WrunPanelValueFormatter = (value: number, role: WrunPanelValueRole, index: number) => string;
47
48
  /** What the wrun lane hands the mappers: the chart's palette (tokens resolve
48
49
  * against it), its price digits (the "price" format) and the display
49
- * timezone shift (time-keyed panels). The push lane passes none. */
50
+ * timezone shift (time-keyed panels: a fixed shift, or the shift at each
51
+ * instant, read at each key). The push lane passes none. */
50
52
  export interface WrunPanelTranslateContext {
51
53
  theme?: WrunColorTheme;
52
54
  priceDigits?: number;
53
- timezoneOffsetMs?: number;
55
+ timezoneOffsetMs?: DisplayOffset;
54
56
  }
55
57
  /** A settings patch: every key present is written, a `series` array merges
56
58
  * per index. */
@@ -420,8 +420,9 @@ function titleLegendStyle(panel) {
420
420
  }
421
421
  /** The markers a line draws this run (SC04): the frame list replaces the
422
422
  * declared one. `x` rides as is for "spot" and numeric lines, seconds become
423
- * ms on a time line (SC37), a category key becomes its row index on a
424
- * category line (a key absent from the rows drops that marker). A point
423
+ * ms on a time line (its instant, as the curve's rows are, SC37), a category
424
+ * key becomes its row index on a category line (a key absent from the rows
425
+ * drops that marker). A point
425
426
  * callout (C3) carries `labelPlacement: 'point'`, its `y` and the NAME of
426
427
  * its declared series (`series`; absent = the engine's first series): the
427
428
  * engine anchors a callout on the series whose `name` it names (titan
@@ -110,6 +110,13 @@ export declare function parseWrunPinSpelling(text: string): PinReading;
110
110
  * `COINBASE:BTC-USD`, `FX_OTC:EUR/USD`, `POLYGON:AAPL/USD`, `CME:ES1!`), which run as written.
111
111
  */
112
112
  export declare function isForeignSpelling(input: WrunPinInput, chartExchange?: string): boolean;
113
+ /**
114
+ * Whether the pin step reads a pin as a CME Group market, read before it runs (no catalog, no shared host): as written,
115
+ * our key in its symbol half (`BINANCE` + `CME|ES1!`), our escape (`OPENMARKET:CME|ES1!`) or a TradingView CME prefix
116
+ * (`CME_MINI:ES1!`), the readings `cmeMarketOf` respells. The run head's reading (its flag wait, its authorisation);
117
+ * the venue judge reads the resolved market after the step. An expression's reading may say yes: its run refuses it.
118
+ */
119
+ export declare function wrunPinSpellingReadsCme(input: WrunPinInput, chartExchange?: string): boolean;
113
120
  /** The catalog identities a pin's spelling may name, in the order the resolver reads them (the asks a caller sends
114
121
  * when the resolver answers `catalog-pending`). */
115
122
  export declare function wrunPinCandidates(input: WrunPinInput, chartExchange?: string): WrunPinCandidate[];
@@ -27,7 +27,9 @@
27
27
  * - Refused by name before any fetch: `wrun_pin_unresolvable` (a venue we know, or one the tables map, with no market
28
28
  * of ours under that spelling) and `wrun_pin_venue_unknown` (a venue word no table maps, the venue judge's own
29
29
  * words). A CME Group market (ours as written, or the one a TradingView CME prefix names, `CME_MINI:ES1!` read as
30
- * `CME|ES1!`) and an expression go on to the venue judge, which refuses them in its own words.
30
+ * `CME|ES1!`) and an expression go on to the venue judge, which judges a CME market by the run's CME facts (a run
31
+ * the data wall lets read CME pins it on any chart) and refuses the rest in its own words. A CME symbol no gateway
32
+ * serves is no spelling question: it reaches the fetch and ends as `legs-empty`, like a market on any served venue.
31
33
  * - A respelled pin runs on the resolved market with a legend note (`WRUN_PIN_RESPELLED`, "Pinned COINBASE:BTCUSD runs
32
34
  * as COINBASE|BTC-USD"); the SAVED value is never rewritten (the respelling lives on the run's copy only).
33
35
  *
@@ -216,8 +218,20 @@ function cryptoCandidates(venue, symbol) {
216
218
  out.push(cryptoCandidate(venue, `${alias}${pair.quote}`));
217
219
  return out;
218
220
  }
219
- /** The CME Group market a reading names, by its venue (the venue judge refuses it, never the catalog): the written
220
- * word on the shared host's refused list, or a TradingView CME prefix through the continuous root table. */
221
+ /**
222
+ * Whether the pin step reads a pin as a CME Group market, read before it runs (no catalog, no shared host): as written,
223
+ * our key in its symbol half (`BINANCE` + `CME|ES1!`), our escape (`OPENMARKET:CME|ES1!`) or a TradingView CME prefix
224
+ * (`CME_MINI:ES1!`), the readings `cmeMarketOf` respells. The run head's reading (its flag wait, its authorisation);
225
+ * the venue judge reads the resolved market after the step. An expression's reading may say yes: its run refuses it.
226
+ */
227
+ export function wrunPinSpellingReadsCme(input, chartExchange) {
228
+ const readings = readingsOf(input, chartExchange);
229
+ const named = (reading) => Object.hasOwn(CME_PREFIXES, upper(reading.exchange));
230
+ return isForeignSpelling(input, chartExchange) ? readings.some(named) : named(readings[0]);
231
+ }
232
+ /** The CME Group market a reading names, by its venue (the venue judge decides it by the run's CME facts, never the
233
+ * catalog): the written word on the shared host's CME Group list, or a TradingView CME prefix through the continuous
234
+ * root table. */
221
235
  function cmeMarketOf(reading) {
222
236
  if (reading.exchange === '' || reading.symbol === '')
223
237
  return undefined;
@@ -291,7 +305,7 @@ export function resolveWrunPinMarket(input, lookup, chartExchange) {
291
305
  const unchanged = { market: writtenKey, respelled: false };
292
306
  if (!isForeignSpelling(input, chartExchange))
293
307
  return unchanged;
294
- // An expression or a CME Group venue is the venue judge's, in its own words (its precedence stands).
308
+ // An expression or a CME Group venue is the venue judge's (its precedence stands): a CME market by the run's facts.
295
309
  const literal = readings.filter((reading) => wrunPinMarketIsLiteral(reading.exchange, reading.symbol));
296
310
  if (literal.length === 0)
297
311
  return unchanged;
@@ -1,3 +1,4 @@
1
+ import type { CmePinRefusalVariant } from '../chart/kscript-venue-policy.util.js';
1
2
  import { type WrunRefusalSeed } from './wrun-refusal.util.js';
2
3
  import type { WrunUnservedLeg } from './wrun-run-health.util.js';
3
4
  import type { WrunPinnedLeg, WrunPinnedWire } from './wrun-source-rows.util.js';
@@ -29,6 +30,12 @@ export declare function wrunPinMarketsOf(exchange: string, symbol: string): Arra
29
30
  * with the sheet contract's code (`WRUN_PIN_SYMBOL_LITERAL_CODE`, om owns it). */
30
31
  export declare function wrunPinMarketIsLiteral(exchange: string, symbol: string): boolean;
31
32
  export type WrunPinVenueVerdict = 'served' | 'refused' | 'unserved' | 'unknown';
33
+ /** The run's CME plane facts a pin's venue verdict reads (see the header): `cmeOpen` is `mayReadCmePin` of the run's
34
+ * head; `cmeClosed` the words a refusal takes while it is closed (`cmePinRefusalVariant`). */
35
+ export interface WrunPinVenueFacts {
36
+ cmeOpen: boolean;
37
+ cmeClosed?: CmePinRefusalVariant;
38
+ }
32
39
  /** Whether the chart's lanes can ask a venue word: a member of the wire's exchange enum
33
40
  * (`Exchange`, the table the symbol search derives its venues from and every series ask maps
34
41
  * the word through; `getExchangeFromSymbol` hands the K_OHLCV worker an enum name), never a
@@ -36,12 +43,13 @@ export type WrunPinVenueVerdict = 'served' | 'refused' | 'unserved' | 'unknown';
36
43
  * moves NASDAQ, NYSE, CBOE and their siblings to POLYGON on persisted records; a SAVED pin is never
37
44
  * rewritten: wrun-pin-spelling.util respells the run's copy). Exact, as the wire reads the word. */
38
45
  export declare function wrunPinVenueOnWire(exchange: string): boolean;
39
- /** What the chart does with a pin on `exchange`: `refused` (a CME Group venue, by name, the run
40
- * does not start), `unserved` (an index venue the gateway does not serve to scripts yet, the
41
- * leg soft-refused), `unknown` (a venue word the chart's lanes cannot ask, `wrunPinVenueOnWire`:
42
- * by name, the run does not start), `served` (everything else; an absent exchange is the chart's
43
- * own market). */
44
- export declare function wrunPinVenueVerdict(exchange: string | undefined): WrunPinVenueVerdict;
46
+ /** What the chart does with a pin on `exchange`: `refused` (a CME Group venue the run's facts do not
47
+ * open, by name, the run does not start), `unserved` (an index venue the gateway does not serve to
48
+ * scripts yet, the leg soft-refused), `unknown` (a venue word the chart's lanes cannot ask,
49
+ * `wrunPinVenueOnWire`: by name, the run does not start), `served` (everything else; an absent
50
+ * exchange is the chart's own market). No facts reads the CME family refused; `unserved` never
51
+ * depends on them. */
52
+ export declare function wrunPinVenueVerdict(exchange: string | undefined, facts?: WrunPinVenueFacts): WrunPinVenueVerdict;
45
53
  /** The unknown venue's words: the input, then the sheet contract's own message (the text om's
46
54
  * sheet check writes for the same word, `wrun_pin_venue_unknown: venue '<word>' ...`). */
47
55
  export declare function wrunPinVenueUnknownMessage(inputName: string, exchange: string): string;
@@ -66,8 +74,9 @@ export declare function wrunPinVenueUnknownSeed(venue: string, settingBound: boo
66
74
  * served; the one point the run pass judges every leg at (the tick's reconcile re-asks only legs
67
75
  * that passed here):
68
76
  * - every market the expression parser extracts from the pin's `exchange|symbol` gets the venue
69
- * verdict (a CME Group market hidden behind a served exchange refuses by the contract's words):
70
- * `pin-refused`, the refused market's symbol as `pin` (its exchange when it names none);
77
+ * verdict under the run's `facts` (a CME Group market hidden behind a served exchange refuses by
78
+ * the contract's words while the facts keep CME closed): `pin-refused`, the refused market's
79
+ * symbol as `pin` (its exchange when it names none), worded by `facts.cmeClosed`;
71
80
  * - a pin that is not one literal market refuses (`WRUN_PIN_SYMBOL_LITERAL_CODE`): a failed run;
72
81
  * - a literal market on a venue word the chart's lanes cannot ask refuses
73
82
  * (`WRUN_PIN_VENUE_UNKNOWN_CODE`): a failed run, its way out the settings when `settingBound`
@@ -75,16 +84,16 @@ export declare function wrunPinVenueUnknownSeed(venue: string, settingBound: boo
75
84
  * - a multi-day leg shorter than a week on a session venue, the pinned market's or the chart's
76
85
  * own, refuses (`WRUN_PIN_SESSION_INTERVAL_UNSERVED_CODE`): a failed run.
77
86
  * An own-market leg (no `market`) is the chart's own venue: never a pin for the first three rules. */
78
- export declare function wrunPinnedLegRefusalOf(leg: Pick<WrunPinnedLeg, 'market' | 'intervalKey' | 'legMs'>, inputName: string, chartExchange: string | undefined, settingBound?: boolean): WrunPinnedLegRefusal | null;
79
- /** The words of `wrunPinnedLegRefusalOf`, or null when the leg is served. */
80
- export declare function wrunPinnedLegRefusal(leg: Pick<WrunPinnedLeg, 'market' | 'intervalKey' | 'legMs'>, inputName: string, chartExchange: string | undefined): string | null;
87
+ export declare function wrunPinnedLegRefusalOf(leg: Pick<WrunPinnedLeg, 'market' | 'intervalKey' | 'legMs'>, inputName: string, chartExchange: string | undefined, settingBound?: boolean, facts?: WrunPinVenueFacts): WrunPinnedLegRefusal | null;
88
+ /** The words of `wrunPinnedLegRefusalOf` under the run's `facts`, or null when the leg is served. */
89
+ export declare function wrunPinnedLegRefusal(leg: Pick<WrunPinnedLeg, 'market' | 'intervalKey' | 'legMs'>, inputName: string, chartExchange: string | undefined, facts?: WrunPinVenueFacts): string | null;
81
90
  /** Refuse by name, before any fetch, the first pinned leg in declaration order that
82
- * `wrunPinnedLegRefusalOf` refuses (a CME Group market, declared or hidden in an expression
83
- * symbol; a pin that is not one literal market; a venue word the chart's lanes cannot ask; a
84
- * multi-day leg on a session venue), the refusal's seed attached to the error. `settingBoundAt`
85
- * names the inputs a symbol setting pins (`symbol_param`): a leg one of them reads offers the
86
- * settings as its way out. */
87
- export declare function assertWrunPinnedLegVenues(legs: ReadonlyArray<WrunPinnedLeg>, inputNameAt: (index: number) => string, chartExchange?: string, settingBoundAt?: (index: number) => boolean): void;
91
+ * `wrunPinnedLegRefusalOf` refuses under the run's `facts` (a CME Group market the facts keep
92
+ * closed, declared or hidden in an expression symbol; a pin that is not one literal market; a venue
93
+ * word the chart's lanes cannot ask; a multi-day leg on a session venue), the refusal's seed
94
+ * attached to the error. `settingBoundAt` names the inputs a symbol setting pins (`symbol_param`):
95
+ * a leg one of them reads offers the settings as its way out. */
96
+ export declare function assertWrunPinnedLegVenues(legs: ReadonlyArray<WrunPinnedLeg>, inputNameAt: (index: number) => string, chartExchange?: string, settingBoundAt?: (index: number) => boolean, facts?: WrunPinVenueFacts): void;
88
97
  /** The inputs whose wire consumes THIS leg's fetched rows, by index, ascending: matched by the
89
98
  * fetch key each wire reads against the leg's (`wrunWireFetchKey`). A foreign forming view counts
90
99
  * for its grid leg only; an own-market forming view, a typed feed and an own-period view never