@orangecharts/wrun-chart-host 0.3.0 → 0.5.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 (362) hide show
  1. package/README.md +23 -6
  2. package/dist/constants/exchange-names.leaf.d.ts +8 -0
  3. package/dist/constants/exchange-names.leaf.js +101 -0
  4. package/dist/constants/kscript-data-interval-restrictions.constants.d.ts +15 -0
  5. package/dist/constants/kscript-data-interval-restrictions.constants.js +40 -0
  6. package/dist/constants/opra-compliance.constants.d.ts +19 -0
  7. package/dist/constants/opra-compliance.constants.js +19 -0
  8. package/dist/constants/replay-ladder.leaf.d.ts +30 -0
  9. package/dist/constants/replay-ladder.leaf.js +99 -0
  10. package/dist/constants/scriptEditor/builtin-script-snippets.d.ts +133 -0
  11. package/dist/constants/scriptEditor/builtin-script-snippets.js +451 -0
  12. package/dist/constants/scriptEditor/cme-official-scripts.constants.d.ts +168 -0
  13. package/dist/constants/scriptEditor/cme-official-scripts.constants.js +398 -0
  14. package/dist/constants/scriptEditor/converted-script-id.leaf.d.ts +8 -0
  15. package/dist/constants/scriptEditor/converted-script-id.leaf.js +10 -0
  16. package/dist/constants/scriptEditor/execution.constants.d.ts +4 -0
  17. package/dist/constants/scriptEditor/execution.constants.js +14 -0
  18. package/dist/constants/wrun-prefix-safe.constants.d.ts +23 -0
  19. package/dist/constants/wrun-prefix-safe.constants.js +26 -0
  20. package/dist/host-env.d.ts +321 -24
  21. package/dist/host-env.js +15 -0
  22. package/dist/host-ports.types.d.ts +857 -35
  23. package/dist/index.d.ts +149 -2
  24. package/dist/index.js +149 -2
  25. package/dist/instances/script-engine-worker-ohlcv-transfer.d.ts +31 -0
  26. package/dist/instances/script-engine-worker-ohlcv-transfer.js +164 -0
  27. package/dist/interfaces/market-event.interface.d.ts +231 -0
  28. package/dist/interfaces/market-event.interface.js +15 -0
  29. package/dist/interfaces/opra-realtime.interface.d.ts +70 -134
  30. package/dist/interfaces/opra-realtime.interface.js +34 -59
  31. package/dist/interfaces/replay.interface.d.ts +285 -0
  32. package/dist/interfaces/replay.interface.js +1 -0
  33. package/dist/kscript-data/controls/live-ohlcv-merge.util.d.ts +1 -0
  34. package/dist/kscript-data/controls/live-ohlcv-merge.util.js +93 -0
  35. package/dist/kscript-data/controls/live-trades-merge.util.d.ts +5 -1
  36. package/dist/kscript-data/controls/live-trades-merge.util.js +2 -2
  37. package/dist/market-data/billing.interface.d.ts +219 -0
  38. package/dist/market-data/billing.interface.js +58 -0
  39. package/dist/market-data/venue-governed.util.d.ts +2 -0
  40. package/dist/market-data/venue-governed.util.js +10 -0
  41. package/dist/market-data/venue.d.ts +122 -0
  42. package/dist/market-data/venue.js +1 -0
  43. package/dist/market-data/venues/index.d.ts +97 -0
  44. package/dist/market-data/venues/index.js +33 -0
  45. package/dist/market-data/venues/opra.contract.copy.json +35 -0
  46. package/dist/market-data/venues/opra.d.ts +70 -0
  47. package/dist/market-data/venues/opra.js +74 -0
  48. package/dist/replay/replayIndicatorRows.d.ts +31 -0
  49. package/dist/replay/replayIndicatorRows.js +117 -0
  50. package/dist/replay/replayLadder.d.ts +85 -0
  51. package/dist/replay/replayLadder.js +388 -0
  52. package/dist/utility/auth/server-clock.util.d.ts +81 -0
  53. package/dist/utility/auth/server-clock.util.js +238 -0
  54. package/dist/utility/chart/builtin-identity.util.d.ts +18 -0
  55. package/dist/utility/chart/builtin-identity.util.js +51 -0
  56. package/dist/utility/chart/cache-alignment.util.d.ts +454 -0
  57. package/dist/utility/chart/cache-alignment.util.js +926 -0
  58. package/dist/utility/chart/chart-data-fetch-generation.util.d.ts +15 -0
  59. package/dist/utility/chart/chart-data-fetch-generation.util.js +22 -0
  60. package/dist/utility/chart/chart-mount-epoch.util.d.ts +5 -0
  61. package/dist/utility/chart/chart-mount-epoch.util.js +29 -0
  62. package/dist/utility/chart/chart-time-domain.util.d.ts +12 -0
  63. package/dist/utility/chart/chart-time-domain.util.js +23 -0
  64. package/dist/utility/chart/color-customization.leaf.d.ts +10 -0
  65. package/dist/utility/chart/color-customization.leaf.js +16 -0
  66. package/dist/utility/chart/date-labelled-interval.leaf.d.ts +15 -0
  67. package/dist/utility/chart/date-labelled-interval.leaf.js +19 -0
  68. package/dist/utility/chart/footprint-tick-grid.util.d.ts +106 -0
  69. package/dist/utility/chart/footprint-tick-grid.util.js +167 -0
  70. package/dist/utility/chart/gesture-timing.leaf.d.ts +29 -0
  71. package/dist/utility/chart/gesture-timing.leaf.js +29 -0
  72. package/dist/utility/chart/governed-contract-coin.util.d.ts +22 -0
  73. package/dist/utility/chart/governed-contract-coin.util.js +39 -0
  74. package/dist/utility/chart/host-bar-placement.util.d.ts +107 -0
  75. package/dist/utility/chart/host-bar-placement.util.js +447 -0
  76. package/dist/utility/chart/index-host-tier.util.d.ts +31 -0
  77. package/dist/utility/chart/index-host-tier.util.js +118 -0
  78. package/dist/utility/chart/index-mode-admission.util.d.ts +34 -0
  79. package/dist/utility/chart/index-mode-admission.util.js +67 -0
  80. package/dist/utility/chart/indicator-error-message.util.d.ts +35 -0
  81. package/dist/utility/chart/indicator-error-message.util.js +44 -0
  82. package/dist/utility/chart/indicator-run-interval.util.d.ts +130 -0
  83. package/dist/utility/chart/indicator-run-interval.util.js +268 -0
  84. package/dist/utility/chart/kscript-apply-fingerprint.util.d.ts +65 -0
  85. package/dist/utility/chart/kscript-apply-fingerprint.util.js +357 -0
  86. package/dist/utility/chart/kscript-chart-flush.leaf.d.ts +22 -0
  87. package/dist/utility/chart/kscript-chart-flush.leaf.js +13 -0
  88. package/dist/utility/chart/kscript-data-interval-restriction.leaf.d.ts +6 -0
  89. package/dist/utility/chart/kscript-data-interval-restriction.leaf.js +27 -0
  90. package/dist/utility/chart/kscript-integration-decision.leaf.d.ts +89 -0
  91. package/dist/utility/chart/kscript-integration-decision.leaf.js +80 -0
  92. package/dist/utility/chart/kscript-live-coalesce.util.d.ts +76 -0
  93. package/dist/utility/chart/kscript-live-coalesce.util.js +156 -0
  94. package/dist/utility/chart/kscript-live-rest-pace.util.d.ts +34 -0
  95. package/dist/utility/chart/kscript-live-rest-pace.util.js +134 -0
  96. package/dist/utility/chart/kscript-live-source-identity.util.d.ts +98 -0
  97. package/dist/utility/chart/kscript-live-source-identity.util.js +121 -0
  98. package/dist/utility/chart/kscript-mounted-plot-set.leaf.d.ts +48 -0
  99. package/dist/utility/chart/kscript-mounted-plot-set.leaf.js +145 -0
  100. package/dist/utility/chart/kscript-perf-tracker.util.d.ts +243 -0
  101. package/dist/utility/chart/kscript-perf-tracker.util.js +522 -0
  102. package/dist/utility/chart/kscript-run-interval-projection.util.d.ts +43 -0
  103. package/dist/utility/chart/kscript-run-interval-projection.util.js +471 -0
  104. package/dist/utility/chart/kscript-run-result-equality.util.d.ts +38 -0
  105. package/dist/utility/chart/kscript-run-result-equality.util.js +89 -0
  106. package/dist/utility/chart/kscript-settings-revision.leaf.d.ts +2 -0
  107. package/dist/utility/chart/kscript-settings-revision.leaf.js +12 -0
  108. package/dist/utility/chart/kscript-source-degrade.leaf.d.ts +63 -0
  109. package/dist/utility/chart/kscript-source-degrade.leaf.js +68 -0
  110. package/dist/utility/chart/kscript-source-retention.util.d.ts +134 -0
  111. package/dist/utility/chart/kscript-source-retention.util.js +218 -0
  112. package/dist/utility/chart/kscript-standin-identity.leaf.d.ts +57 -0
  113. package/dist/utility/chart/kscript-standin-identity.leaf.js +61 -0
  114. package/dist/utility/chart/kscript-titancharts-preparation.util.d.ts +15 -0
  115. package/dist/utility/chart/kscript-titancharts-preparation.util.js +376 -0
  116. package/dist/utility/chart/kscript-titancharts-render-keys.constants.d.ts +9 -0
  117. package/dist/utility/chart/kscript-titancharts-render-keys.constants.js +130 -0
  118. package/dist/utility/chart/kscript-venue-policy.util.d.ts +217 -0
  119. package/dist/utility/chart/kscript-venue-policy.util.js +324 -0
  120. package/dist/utility/chart/live-cadence.util.d.ts +38 -0
  121. package/dist/utility/chart/live-cadence.util.js +37 -0
  122. package/dist/utility/chart/live-feed-series-match.leaf.d.ts +13 -0
  123. package/dist/utility/chart/live-feed-series-match.leaf.js +21 -0
  124. package/dist/utility/chart/local-engine-self-heal-backoff.util.d.ts +46 -0
  125. package/dist/utility/chart/local-engine-self-heal-backoff.util.js +46 -0
  126. package/dist/utility/chart/local-engine-uninit.leaf.d.ts +21 -0
  127. package/dist/utility/chart/local-engine-uninit.leaf.js +22 -0
  128. package/dist/utility/chart/local-kscript-source-revalidation.util.d.ts +62 -0
  129. package/dist/utility/chart/local-kscript-source-revalidation.util.js +123 -0
  130. package/dist/utility/chart/local-kscript-warmup-depth.util.d.ts +214 -0
  131. package/dist/utility/chart/local-kscript-warmup-depth.util.js +376 -0
  132. package/dist/utility/chart/local-technical-script-live-apply-coalescer.util.d.ts +85 -0
  133. package/dist/utility/chart/local-technical-script-live-apply-coalescer.util.js +197 -0
  134. package/dist/utility/chart/local-technical-script-range.leaf.d.ts +72 -0
  135. package/dist/utility/chart/local-technical-script-range.leaf.js +126 -0
  136. package/dist/utility/chart/mixed-mode.util.d.ts +167 -0
  137. package/dist/utility/chart/mixed-mode.util.js +139 -0
  138. package/dist/utility/chart/ohlcv-row-readiness.util.d.ts +36 -0
  139. package/dist/utility/chart/ohlcv-row-readiness.util.js +90 -0
  140. package/dist/utility/chart/opra-user-scripts-gate.util.d.ts +19 -0
  141. package/dist/utility/chart/opra-user-scripts-gate.util.js +32 -0
  142. package/dist/utility/chart/overlay-execution-guard-key.leaf.d.ts +8 -0
  143. package/dist/utility/chart/overlay-execution-guard-key.leaf.js +10 -0
  144. package/dist/utility/chart/price-precision.util.d.ts +40 -0
  145. package/dist/utility/chart/price-precision.util.js +70 -0
  146. package/dist/utility/chart/profile-block-size.util.d.ts +64 -0
  147. package/dist/utility/chart/profile-block-size.util.js +141 -0
  148. package/dist/utility/chart/protected-kscript-degenerate-rows.leaf.d.ts +11 -0
  149. package/dist/utility/chart/protected-kscript-degenerate-rows.leaf.js +29 -0
  150. package/dist/utility/chart/protected-kscript-empty-output.util.d.ts +28 -0
  151. package/dist/utility/chart/protected-kscript-empty-output.util.js +84 -0
  152. package/dist/utility/chart/run-interval-unservable.leaf.d.ts +9 -0
  153. package/dist/utility/chart/run-interval-unservable.leaf.js +20 -0
  154. package/dist/utility/chart/run-interval-warmup.leaf.d.ts +19 -0
  155. package/dist/utility/chart/run-interval-warmup.leaf.js +35 -0
  156. package/dist/utility/chart/titan-constants.pin.d.ts +9 -5
  157. package/dist/utility/chart/titan-constants.pin.js +18 -5
  158. package/dist/utility/chart/warmup-backfill-retry.leaf.d.ts +9 -0
  159. package/dist/utility/chart/warmup-backfill-retry.leaf.js +9 -0
  160. package/dist/utility/chart/window-geometry.leaf.d.ts +119 -0
  161. package/dist/utility/chart/window-geometry.leaf.js +391 -0
  162. package/dist/utility/chart/window-owner.leaf.d.ts +19 -0
  163. package/dist/utility/chart/window-owner.leaf.js +24 -0
  164. package/dist/utility/chart/wrun-bar-session-facts.util.d.ts +11 -2
  165. package/dist/utility/chart/wrun-bar-session-facts.util.js +10 -3
  166. package/dist/utility/chart/wrun-run-result.util.d.ts +5 -1
  167. package/dist/utility/chart/wrun-run-result.util.js +20 -14
  168. package/dist/utility/common/data-processing.util.d.ts +138 -0
  169. package/dist/utility/common/data-processing.util.js +346 -0
  170. package/dist/utility/common/visible-timeout.util.d.ts +13 -4
  171. package/dist/utility/common/visible-timeout.util.js +23 -8
  172. package/dist/utility/exchange-format.leaf.d.ts +1 -0
  173. package/dist/utility/exchange-format.leaf.js +47 -0
  174. package/dist/utility/html-escape.leaf.d.ts +11 -0
  175. package/dist/utility/html-escape.leaf.js +20 -0
  176. package/dist/utility/market-events/earnings-scope.util.d.ts +60 -0
  177. package/dist/utility/market-events/earnings-scope.util.js +92 -0
  178. package/dist/utility/market-events/market-events.util.d.ts +147 -0
  179. package/dist/utility/market-events/market-events.util.js +392 -0
  180. package/dist/utility/market-events/zoned-clock.util.d.ts +1 -0
  181. package/dist/utility/market-events/zoned-clock.util.js +11 -0
  182. package/dist/utility/options/option-venue-disclosure.util.d.ts +43 -0
  183. package/dist/utility/options/option-venue-disclosure.util.js +56 -0
  184. package/dist/utility/scriptEditor/package-semver.util.d.ts +51 -0
  185. package/dist/utility/scriptEditor/package-semver.util.js +120 -0
  186. package/dist/utility/scriptEditor/temp-script-id.util.d.ts +18 -0
  187. package/dist/utility/scriptEditor/temp-script-id.util.js +25 -0
  188. package/dist/utility/symbol-selection/markets-request-from-symbols.leaf.d.ts +20 -0
  189. package/dist/utility/symbol-selection/markets-request-from-symbols.leaf.js +81 -0
  190. package/dist/utility/v2/governed-tier.leaf.d.ts +103 -0
  191. package/dist/utility/v2/governed-tier.leaf.js +113 -0
  192. package/dist/utility/watchlist/import/import-request.leaf.d.ts +10 -0
  193. package/dist/utility/watchlist/import/import-request.leaf.js +10 -0
  194. package/dist/utility/wrun/sources/lanes/option_daily.d.ts +43 -15
  195. package/dist/utility/wrun/sources/lanes/option_daily.js +78 -20
  196. package/dist/utility/wrun/sources/lanes/option_stats_10m.d.ts +14 -10
  197. package/dist/utility/wrun/sources/lanes/option_stats_10m.js +5 -4
  198. package/dist/utility/wrun/sources/lanes/series.js +2 -2
  199. package/dist/utility/wrun/sources/opra-option-lanes.util.d.ts +22 -3
  200. package/dist/utility/wrun/sources/opra-option-lanes.util.js +38 -7
  201. package/dist/utility/wrun/sources/registry.js +31 -1
  202. package/dist/utility/wrun/sources/row-lane-registry.js +5 -5
  203. package/dist/utility/wrun/sources/row-lanes/option_contract_state.d.ts +49 -0
  204. package/dist/utility/wrun/sources/row-lanes/option_contract_state.js +75 -20
  205. package/dist/utility/wrun/sources/row-lanes/option_strikes.d.ts +49 -0
  206. package/dist/utility/wrun/sources/row-lanes/option_strikes.js +57 -47
  207. package/dist/utility/wrun/sources/row-lanes/option_surface.d.ts +36 -4
  208. package/dist/utility/wrun/sources/row-lanes/option_surface.js +6 -12
  209. package/dist/utility/wrun/sources/wrun-poll-lane.types.d.ts +37 -3
  210. package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +128 -2
  211. package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +233 -51
  212. package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +0 -8
  213. package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +26 -24
  214. package/dist/utility/wrun/sources/wrun-row-lanes.util.js +85 -104
  215. package/dist/utility/wrun/wrun-alert-outputs.registry.d.ts +166 -0
  216. package/dist/utility/wrun/wrun-alert-outputs.registry.js +219 -0
  217. package/dist/utility/wrun/wrun-bar-count.util.d.ts +83 -0
  218. package/dist/utility/wrun/wrun-bar-count.util.js +259 -0
  219. package/dist/utility/wrun/wrun-chart-context-names.util.d.ts +84 -0
  220. package/dist/utility/wrun/wrun-chart-context-names.util.js +186 -0
  221. package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +253 -0
  222. package/dist/utility/wrun/wrun-chart-market-facts.util.js +731 -0
  223. package/dist/utility/wrun/wrun-cloud-opra-stamp.util.d.ts +28 -0
  224. package/dist/utility/wrun/wrun-cloud-opra-stamp.util.js +45 -0
  225. package/dist/utility/wrun/wrun-coin-lane-live.util.d.ts +18 -0
  226. package/dist/utility/wrun/wrun-coin-lane-live.util.js +47 -0
  227. package/dist/utility/wrun/wrun-deadline.util.js +2 -1
  228. package/dist/utility/wrun/wrun-debug-output.util.d.ts +39 -0
  229. package/dist/utility/wrun/wrun-debug-output.util.js +63 -0
  230. package/dist/utility/wrun/wrun-declared-warmup.util.d.ts +113 -0
  231. package/dist/utility/wrun/wrun-declared-warmup.util.js +181 -0
  232. package/dist/utility/wrun/wrun-draft-legend-note.util.d.ts +43 -0
  233. package/dist/utility/wrun/wrun-draft-legend-note.util.js +158 -0
  234. package/dist/utility/wrun/wrun-draft-overlay.util.d.ts +181 -0
  235. package/dist/utility/wrun/wrun-draft-overlay.util.js +357 -0
  236. package/dist/utility/wrun/wrun-draw-skipped.leaf.d.ts +16 -0
  237. package/dist/utility/wrun/wrun-draw-skipped.leaf.js +16 -0
  238. package/dist/utility/wrun/wrun-earnings-facts.util.d.ts +42 -0
  239. package/dist/utility/wrun/wrun-earnings-facts.util.js +131 -0
  240. package/dist/utility/wrun/wrun-first-run-depth.util.d.ts +32 -0
  241. package/dist/utility/wrun/wrun-first-run-depth.util.js +118 -0
  242. package/dist/utility/wrun/wrun-gate-plane-readers.util.d.ts +24 -0
  243. package/dist/utility/wrun/wrun-gate-plane-readers.util.js +31 -0
  244. package/dist/utility/wrun/wrun-held-lanes.util.d.ts +32 -0
  245. package/dist/utility/wrun/wrun-held-lanes.util.js +94 -0
  246. package/dist/utility/wrun/wrun-host-visible-clock.util.d.ts +2 -0
  247. package/dist/utility/wrun/wrun-host-visible-clock.util.js +17 -0
  248. package/dist/utility/wrun/wrun-host.service.d.ts +266 -0
  249. package/dist/utility/wrun/wrun-host.service.js +655 -0
  250. package/dist/utility/wrun/wrun-inert-legend.util.d.ts +33 -0
  251. package/dist/utility/wrun/wrun-inert-legend.util.js +125 -0
  252. package/dist/utility/wrun/wrun-input-requirements.leaf.d.ts +155 -0
  253. package/dist/utility/wrun/wrun-input-requirements.leaf.js +450 -0
  254. package/dist/utility/wrun/wrun-integration-route.util.d.ts +51 -0
  255. package/dist/utility/wrun/wrun-integration-route.util.js +59 -0
  256. package/dist/utility/wrun/wrun-latest-history.leaf.d.ts +8 -0
  257. package/dist/utility/wrun/wrun-latest-history.leaf.js +8 -0
  258. package/dist/utility/wrun/wrun-legend-hover.lazy.d.ts +12 -0
  259. package/dist/utility/wrun/wrun-legend-hover.lazy.js +96 -0
  260. package/dist/utility/wrun/wrun-lifecycle-runtime.util.d.ts +21 -0
  261. package/dist/utility/wrun/wrun-lifecycle-runtime.util.js +21 -0
  262. package/dist/utility/wrun/wrun-live-hidden-hold.util.d.ts +23 -0
  263. package/dist/utility/wrun/wrun-live-hidden-hold.util.js +13 -0
  264. package/dist/utility/wrun/wrun-live-intake.util.d.ts +374 -0
  265. package/dist/utility/wrun/wrun-live-intake.util.js +2027 -0
  266. package/dist/utility/wrun/wrun-live-patch.util.d.ts +116 -0
  267. package/dist/utility/wrun/wrun-live-patch.util.js +523 -0
  268. package/dist/utility/wrun/wrun-live-tick.util.d.ts +619 -0
  269. package/dist/utility/wrun/wrun-live-tick.util.js +4974 -0
  270. package/dist/utility/wrun/wrun-loading-owner.util.d.ts +58 -0
  271. package/dist/utility/wrun/wrun-loading-owner.util.js +89 -0
  272. package/dist/utility/wrun/wrun-official-scope.leaf.d.ts +29 -0
  273. package/dist/utility/wrun/wrun-official-scope.leaf.js +36 -0
  274. package/dist/utility/wrun/wrun-oi-lane.util.d.ts +27 -0
  275. package/dist/utility/wrun/wrun-oi-lane.util.js +42 -0
  276. package/dist/utility/wrun/wrun-opra-stats.leaf.d.ts +29 -10
  277. package/dist/utility/wrun/wrun-opra-stats.leaf.js +29 -10
  278. package/dist/utility/wrun/wrun-options-stop.util.d.ts +52 -0
  279. package/dist/utility/wrun/wrun-options-stop.util.js +123 -0
  280. package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +719 -0
  281. package/dist/utility/wrun/wrun-overlay-drivers.util.js +1180 -0
  282. package/dist/utility/wrun/wrun-overlay-lifecycle.lazy.d.ts +50 -0
  283. package/dist/utility/wrun/wrun-overlay-lifecycle.lazy.js +131 -0
  284. package/dist/utility/wrun/wrun-overlay-lifecycle.util.d.ts +118 -0
  285. package/dist/utility/wrun/wrun-overlay-lifecycle.util.js +466 -0
  286. package/dist/utility/wrun/wrun-overlay-metadata.util.d.ts +45 -0
  287. package/dist/utility/wrun/wrun-overlay-metadata.util.js +112 -0
  288. package/dist/utility/wrun/wrun-overlay-recovery.util.d.ts +114 -0
  289. package/dist/utility/wrun/wrun-overlay-recovery.util.js +971 -0
  290. package/dist/utility/wrun/wrun-overlay-run.util.d.ts +858 -0
  291. package/dist/utility/wrun/wrun-overlay-run.util.js +11013 -0
  292. package/dist/utility/wrun/wrun-panel-mount.lazy.d.ts +10 -0
  293. package/dist/utility/wrun/wrun-panel-mount.lazy.js +68 -0
  294. package/dist/utility/wrun/wrun-panel-mount.util.d.ts +392 -0
  295. package/dist/utility/wrun/wrun-panel-mount.util.js +2346 -0
  296. package/dist/utility/wrun/wrun-param-map.util.d.ts +19 -4
  297. package/dist/utility/wrun/wrun-param-map.util.js +40 -47
  298. package/dist/utility/wrun/wrun-param-values.util.d.ts +9 -3
  299. package/dist/utility/wrun/wrun-param-values.util.js +5 -5
  300. package/dist/utility/wrun/wrun-pause-dim.util.d.ts +52 -0
  301. package/dist/utility/wrun/wrun-pause-dim.util.js +153 -0
  302. package/dist/utility/wrun/wrun-plot-gate.types.d.ts +23 -0
  303. package/dist/utility/wrun/wrun-plot-gate.types.js +7 -0
  304. package/dist/utility/wrun/wrun-prefix-cohort.util.d.ts +93 -0
  305. package/dist/utility/wrun/wrun-prefix-cohort.util.js +484 -0
  306. package/dist/utility/wrun/wrun-prefix-lanes.util.d.ts +114 -0
  307. package/dist/utility/wrun/wrun-prefix-lanes.util.js +486 -0
  308. package/dist/utility/wrun/wrun-prefix-proof.util.d.ts +317 -0
  309. package/dist/utility/wrun/wrun-prefix-proof.util.js +630 -0
  310. package/dist/utility/wrun/wrun-refusal-surface.util.d.ts +73 -0
  311. package/dist/utility/wrun/wrun-refusal-surface.util.js +380 -0
  312. package/dist/utility/wrun/wrun-refusal-text.util.d.ts +15 -0
  313. package/dist/utility/wrun/wrun-refusal-text.util.js +40 -0
  314. package/dist/utility/wrun/wrun-replay-lane.util.d.ts +139 -0
  315. package/dist/utility/wrun/wrun-replay-lane.util.js +520 -0
  316. package/dist/utility/wrun/wrun-replay-rows.util.d.ts +21 -0
  317. package/dist/utility/wrun/wrun-replay-rows.util.js +172 -0
  318. package/dist/utility/wrun/wrun-row-source-factory.d.ts +53 -0
  319. package/dist/utility/wrun/wrun-row-source-factory.js +435 -0
  320. package/dist/utility/wrun/wrun-run-cells.util.d.ts +36 -0
  321. package/dist/utility/wrun/wrun-run-cells.util.js +46 -0
  322. package/dist/utility/wrun/wrun-run-interval-projection.types.d.ts +14 -0
  323. package/dist/utility/wrun/wrun-run-interval-projection.types.js +1 -0
  324. package/dist/utility/wrun/wrun-run-interval-session.util.d.ts +133 -0
  325. package/dist/utility/wrun/wrun-run-interval-session.util.js +121 -0
  326. package/dist/utility/wrun/wrun-run-interval.util.d.ts +98 -0
  327. package/dist/utility/wrun/wrun-run-interval.util.js +207 -0
  328. package/dist/utility/wrun/wrun-run-retained.util.d.ts +122 -0
  329. package/dist/utility/wrun/wrun-run-retained.util.js +255 -0
  330. package/dist/utility/wrun/wrun-sandbox-row-source.d.ts +184 -0
  331. package/dist/utility/wrun/wrun-sandbox-row-source.js +444 -0
  332. package/dist/utility/wrun/wrun-script-inputs.util.js +4 -4
  333. package/dist/utility/wrun/wrun-series-stream.util.d.ts +86 -0
  334. package/dist/utility/wrun/wrun-series-stream.util.js +537 -0
  335. package/dist/utility/wrun/wrun-sheet-remembered.util.d.ts +21 -0
  336. package/dist/utility/wrun/wrun-sheet-remembered.util.js +36 -0
  337. package/dist/utility/wrun/wrun-signal-sound-reasons.leaf.d.ts +7 -0
  338. package/dist/utility/wrun/wrun-signal-sound-reasons.leaf.js +12 -0
  339. package/dist/utility/wrun/wrun-socket-row-source.js +4 -2
  340. package/dist/utility/wrun/wrun-source-rows.util.d.ts +175 -3
  341. package/dist/utility/wrun/wrun-source-rows.util.js +294 -8
  342. package/dist/utility/wrun/wrun-stats-strip.util.d.ts +46 -0
  343. package/dist/utility/wrun/wrun-stats-strip.util.js +87 -0
  344. package/dist/utility/wrun/wrun-table-chrome.util.d.ts +163 -0
  345. package/dist/utility/wrun/wrun-table-chrome.util.js +557 -0
  346. package/dist/utility/wrun/wrun-text-params.util.d.ts +11 -6
  347. package/dist/utility/wrun/wrun-text-params.util.js +19 -30
  348. package/dist/utility/wrun/wrun-transient-rerun.util.d.ts +64 -0
  349. package/dist/utility/wrun/wrun-transient-rerun.util.js +317 -0
  350. package/dist/utility/wrun/wrun-twin-lookback.util.d.ts +10 -0
  351. package/dist/utility/wrun/wrun-twin-lookback.util.js +43 -0
  352. package/dist/utility/wrun/wrun-warmup-head-store.util.d.ts +41 -0
  353. package/dist/utility/wrun/wrun-warmup-head-store.util.js +120 -0
  354. package/dist/utility/wrun-alert-params.leaf.d.ts +24 -0
  355. package/dist/utility/wrun-alert-params.leaf.js +24 -0
  356. package/dist/utils/replay/replay-buffer-math.d.ts +148 -0
  357. package/dist/utils/replay/replay-buffer-math.js +684 -0
  358. package/dist/workers/wrun/wrun-abi-host.d.ts +190 -0
  359. package/dist/workers/wrun/wrun-abi-host.js +1201 -0
  360. package/dist/workers/wrun/wrun-engine-handler.d.ts +37 -0
  361. package/dist/workers/wrun/wrun-engine-handler.js +211 -0
  362. package/package.json +3 -3
@@ -0,0 +1,10 @@
1
+ import type { WrunChildOverlayChart } from './wrun-panel-mount.util.js';
2
+ export type WrunPanelMountRuntime = Pick<typeof import('./wrun-panel-mount.util.js'), 'retranslateWrunChildOverlays'> & Partial<Pick<typeof import('./wrun-panel-mount.util.js'), 'cutWrunBatchedChildRecords'>>;
3
+ /** Hand the child mount over: it calls this as it evaluates. */
4
+ export declare function bindWrunPanelMountRuntime(loaded: WrunPanelMountRuntime): void;
5
+ /** `retranslateWrunChildOverlays` (the child mount): nothing to do without a child on the chart. */
6
+ export declare function retranslateWrunChildOverlays(tc: WrunChildOverlayChart): void;
7
+ /** `cutWrunBatchedChildRecords` (the child mount): the replay cut of a batched child's mount record. A
8
+ * child mount not bound yet holds no record (it owns them and binds as it evaluates), so the cut has
9
+ * nothing to cut and no import is made. */
10
+ export declare function cutWrunBatchedChildRecords(tc: WrunChildOverlayChart, overlayId: string, fromTs: number, toTs: number): string[];
@@ -0,0 +1,68 @@
1
+ /**
2
+ * The boot graph's side of the wrun child mount (`wrun-panel-mount.util`): the timezone sync
3
+ * (timezone-sync.util) retranslates every chart's mounted wrun children through here, so the child
4
+ * mount, the panel translator and the run-result adapter behind it stay out of the pre-candle
5
+ * closure (docs/features/kscript/wrun/wrun-browser-runtime.md, "Boot doors").
6
+ *
7
+ * The door's contract:
8
+ * - The child mount in hand: the call goes straight to it in the caller's turn. The child mount
9
+ * binds itself as it evaluates (`bindWrunPanelMountRuntime`): it owns the map of mounted
10
+ * children, so a chart can hold none before it evaluates, and every lane that mounts one (the
11
+ * loaders' run pass, the hosted lanes) evaluates it first.
12
+ * - Not mine: no child overlay id (`<parent>::<kind>:<name>`, wrun-child-overlay-id.util) on the
13
+ * chart's metadata, no import. A flag-off session and every kScript chart stay here.
14
+ * - A child id before the child mount (a registrant that skipped it): the child mount loads once
15
+ * and the retranslate runs once when it lands, never rejecting; the children relabel then.
16
+ * Ring `wrun-panel-mount-late`.
17
+ */
18
+ import { wrunChartHostEnv } from '../../host-env.js';
19
+ import { wrunChildOverlayParentId } from './wrun-child-overlay-id.util.js';
20
+ let runtime;
21
+ let loading;
22
+ /** Hand the child mount over: it calls this as it evaluates. */
23
+ export function bindWrunPanelMountRuntime(loaded) {
24
+ runtime = loaded;
25
+ }
26
+ function loadWrunPanelMountRuntime() {
27
+ if (runtime)
28
+ return Promise.resolve(runtime);
29
+ // The mount's host ports load beside it (chart.loadPanelMountPorts): its retranslate reads them.
30
+ loading ??= Promise.all([import('./wrun-panel-mount.util.js'), wrunChartHostEnv().chart.loadPanelMountPorts()]).then(([loaded]) => {
31
+ runtime ??= loaded;
32
+ return runtime;
33
+ }, (error) => {
34
+ loading = undefined;
35
+ throw error;
36
+ });
37
+ return loading;
38
+ }
39
+ /** True when the chart's metadata holds a wrun child overlay. */
40
+ function chartHoldsWrunChild(tc) {
41
+ const metadata = tc?.metadata;
42
+ if (!Array.isArray(metadata))
43
+ return false;
44
+ return metadata.some((meta) => typeof meta?.id === 'string' && wrunChildOverlayParentId(meta.id) !== null);
45
+ }
46
+ /** `retranslateWrunChildOverlays` (the child mount): nothing to do without a child on the chart. */
47
+ export function retranslateWrunChildOverlays(tc) {
48
+ if (runtime) {
49
+ runtime.retranslateWrunChildOverlays(tc);
50
+ return;
51
+ }
52
+ if (!chartHoldsWrunChild(tc))
53
+ return;
54
+ if (wrunChartHostEnv().diagnostics.debugEnabled()) {
55
+ wrunChartHostEnv().diagnostics.debug('wrun-panel-mount-late', { entry: 'retranslate' });
56
+ }
57
+ void loadWrunPanelMountRuntime()
58
+ .then((loaded) => loaded.retranslateWrunChildOverlays(tc))
59
+ .catch((error) => {
60
+ console.warn("[wrun] child mount unavailable for 'retranslate':", error);
61
+ });
62
+ }
63
+ /** `cutWrunBatchedChildRecords` (the child mount): the replay cut of a batched child's mount record. A
64
+ * child mount not bound yet holds no record (it owns them and binds as it evaluates), so the cut has
65
+ * nothing to cut and no import is made. */
66
+ export function cutWrunBatchedChildRecords(tc, overlayId, fromTs, toTs) {
67
+ return runtime?.cutWrunBatchedChildRecords?.(tc, overlayId, fromTs, toTs) ?? [];
68
+ }
@@ -0,0 +1,392 @@
1
+ import { type KScriptLegendEntry } from '../chart/kscript-legend-entries.util.js';
2
+ import { type EnginePanelHooks } from '../chart/om-panel.util.js';
3
+ import { wrunSeriesChildId, type WrunRunResult } from '../chart/wrun-run-result.util.js';
4
+ import { type WrunBuiltinTwin, type WrunPaneFormatChart } from './wrun-pane-format.util.js';
5
+ import type { WrunRunIntervalProjection } from './wrun-run-interval-projection.types.js';
6
+ interface WrunOverlayConfig {
7
+ id: string;
8
+ name: string;
9
+ plot: string;
10
+ type: 'onchart' | 'offchart';
11
+ interval: number;
12
+ data: unknown[][];
13
+ /** The meta-level axis label formatter (titan consults it before its own
14
+ * digit default): the lower pane prints K/M/B from 1K and its own step
15
+ * digits below (wrun-pane-format.util); a panel with a declared format
16
+ * prints its ticks through its own formatter (SC08). */
17
+ getYLabel?: (price: number) => string;
18
+ /** A panel's number formatter for every value the pane prints (SC08):
19
+ * the engine reads it off the meta. */
20
+ formatDomainValue?: EnginePanelHooks['formatDomainValue'];
21
+ /** The dynamic legend readout (the store stamps the technical-script
22
+ * control's on every indicator overlay; the lower pane brings its own,
23
+ * wrunSeriesChildLegendText). */
24
+ getLegendText?: (point: number[] | undefined, meta: unknown) => KScriptLegendEntry[];
25
+ /** The static legend content: titan creates one span per entry at
26
+ * addOverlay time and drops updates for ids it never created, so every
27
+ * slot getLegendText may address is born here (the parent's rule). */
28
+ initLegendText?: () => Array<KScriptLegendEntry & {
29
+ isStatic: boolean;
30
+ }>;
31
+ /** The pane's y bounds come from its OWN rows only (the flag the store
32
+ * stamps on every indicator overlay); without it titan also walks the
33
+ * main series through the pane's extractors and an RSI pane scales to
34
+ * the price. */
35
+ isIndependentSubsetRange?: boolean;
36
+ /** An own price scale with axis labels (titan builds it only when truthy). */
37
+ showIndependentYAxis?: boolean;
38
+ /** A table pane owns no value axis, and a rich line draws its own left
39
+ * axis (C4): the scale cell stays blank instead of echoing the chart's
40
+ * prices. */
41
+ hidePriceScale?: boolean;
42
+ /** A pane pinned over the candles on its own hidden scale (OT24): the
43
+ * nested plots draw on the parent's scale, never folded into the main
44
+ * pane's range. */
45
+ isPinnedToChart?: boolean;
46
+ shouldAdjustMainGridRange?: boolean;
47
+ /** A price canvas's row readers (the native profile extractor) and live
48
+ * merge (wrun-canvases.util). */
49
+ extractors?: unknown;
50
+ mergeLiveDataPoint?: unknown;
51
+ /** A tick's heatmap tail (wrun-canvases.util `tailOnly`): the newest rows
52
+ * without a colour scale, never the canvas's rows (never added, never
53
+ * swapped in, never the mounted record). */
54
+ tailOnly?: true;
55
+ settings: Record<string, unknown>;
56
+ }
57
+ export interface WrunChildOverlayChart extends WrunPaneFormatChart {
58
+ metadata: ReadonlyArray<{
59
+ id: string;
60
+ name?: string;
61
+ interval?: number;
62
+ isHidden?: boolean;
63
+ /** The parent's side: an offchart parent docks its lower-pane levels on
64
+ * itself (DL-lower-pane); also the first of the pane fields the window
65
+ * geometry reads (window-geometry.util). */
66
+ type?: string;
67
+ plot?: string;
68
+ gridHeight?: number;
69
+ isPaneHidden?: boolean;
70
+ hostPaneId?: string;
71
+ settings?: Record<string, unknown>;
72
+ rawData?: unknown;
73
+ data?: unknown;
74
+ }>;
75
+ isDestroyed?: boolean;
76
+ /** The chart canvas in CSS px sizes a table pane to its rows; the focus mode names the expanded pane. */
77
+ canvasChartController?: {
78
+ canvasElement?: {
79
+ clientHeight?: number;
80
+ } | null;
81
+ focusMode?: {
82
+ focusedGridId?: string | null;
83
+ };
84
+ } | null;
85
+ /** titan's focus mode (one pane expanded to the whole chart). Its removeOverlay ends it whatever pane it removes,
86
+ * so a pass that takes a child off reads the focused pane first and enters it again after (keepFocusedPane). */
87
+ isFocusModeActive?(): boolean;
88
+ enterFocusMode?(paneId: string): void;
89
+ addOverlay(config: WrunOverlayConfig): void;
90
+ removeOverlay(id: string): void;
91
+ /** The engine's in-place row swap (rawData, process, render); a panel
92
+ * child rides it on a rerun so its pane keeps its place in the stack, a
93
+ * row-backed canvas on a full run. */
94
+ updateData?(id: string, data: unknown[][], options?: {
95
+ shouldResetRange?: boolean;
96
+ }): void;
97
+ /** The engine's live row merge (the forming row replaced, a newer one
98
+ * appended through the overlay's `mergeLiveDataPoint`): a row-backed
99
+ * canvas rides it on a tick. */
100
+ liveUpdateData?(id: string, row: unknown): void;
101
+ changeVisibilityOverlay?(id: string, isVisible: boolean): void;
102
+ /** The engine gate of a batched child (titan): true once a pack is registered on this chart, and
103
+ * true when a renderer exists for a plot type (false also for a known type no pack registered). */
104
+ hasFeaturePack?(name: string): boolean;
105
+ hasPlotRenderer?(type: string): boolean;
106
+ /** The engine's note that a host mutated an overlay's rows in place (a replay cut): it bumps the
107
+ * overlay's data version so a pack's cached geometry is read again, and paints once. */
108
+ notifyLiveDataMutated?(id: string): void;
109
+ /** Titan's object events; a `reset` (pane regroup, swap, order) carries no refs. */
110
+ on?(event: 'objects', listener: (event: {
111
+ type: string;
112
+ refs?: ReadonlyArray<{
113
+ id: string;
114
+ }>;
115
+ }) => void): () => void;
116
+ processData?(): void;
117
+ renderService?: {
118
+ renderOnce?(): void;
119
+ };
120
+ /** The offchart height path a window's planned weights ride (window-geometry.util). */
121
+ updateSettings?(id: string, payload: Record<string, unknown>): unknown;
122
+ resizeCanvasOnce?(): void;
123
+ }
124
+ /**
125
+ * The cell a mount lands on. On a WINDOW (the parent is the flagged owner,
126
+ * window-cell.util) the children take the window plan's weights at their
127
+ * first mount instead of the shared 0.22, so a window never flashes a chart
128
+ * layout, and the plan is reconciled onto the mounted panes when the mount
129
+ * settles. Absent, the parent's engine settings decide (the owner flag rides
130
+ * them); a parent without the flag is a normal cell, whose configs are byte
131
+ * for byte today's unless its host hands a plan.
132
+ */
133
+ export interface WrunMountCell {
134
+ window: boolean;
135
+ /** The chart canvas in CSS px (read from the engine when absent). */
136
+ canvasHeightPx?: number;
137
+ /** A plan the host hands (child id to gridHeight), read on EVERY cell ahead of the series and panel defaults: a
138
+ * window's weights, or a normal cell's remembered pane heights (the heights its reader dragged, so a remounted
139
+ * pane comes back at them). The mount keeps it for the retranslate, and a child it names keeps its pane when only
140
+ * its height moved (the host owns that height). Absent: a window plans from the run's children, a normal cell
141
+ * keeps the shared heights. */
142
+ planned?: ReadonlyMap<string, number>;
143
+ }
144
+ /**
145
+ * Every child kind and its legend row, decided here once (the legend guard in
146
+ * the mount spec mounts one of each kind listed). The `own` kinds are the
147
+ * allowlist that keeps a row by design: a panel (a side panel too) and a
148
+ * series pane own a pane, a title and controls, and an inset's row carries its
149
+ * latest value. Every other kind folds into the parent's row: `childConfig`
150
+ * sends it `hideLegend: true`, so the engine builds no row, the parent's row
151
+ * carries the Indicator and the parent's eye still governs the child
152
+ * (`syncChildVisibility`). A kind missing here gets no row either, and the
153
+ * typecheck refuses the table until it is decided. Each kind used to opt out
154
+ * on its own, and the levels child that forgot printed a second row titled
155
+ * "gex_by_strike".
156
+ */
157
+ export declare const WRUN_CHILD_LEGEND_ROW: {
158
+ readonly panel: "own";
159
+ readonly series: "own";
160
+ readonly inset: "own";
161
+ readonly levels: "parent";
162
+ readonly heatmap: "parent";
163
+ readonly profile: "parent";
164
+ readonly matrix: "parent";
165
+ readonly marks: "parent";
166
+ readonly spans: "parent";
167
+ readonly rays: "parent";
168
+ };
169
+ /** A save of the package overlay: every mounted series child takes the chart switches it carries,
170
+ * its container through the engine's settings door and its plots' price markers through the
171
+ * adapter's own stamp (the one the parent's plots take). */
172
+ export declare function syncWrunSeriesChildChartSettings(tc: WrunChildOverlayChart, overlayId: string, settings: Record<string, unknown> | undefined): void;
173
+ /** The lower pane's legend readout, the parent's own rule brought to its
174
+ * child: every value line of the pane's nested plots at the hovered bar,
175
+ * named by its output's `labels` column (kScriptLegendEntries, the same
176
+ * entries the technical-script control prints for the parent) and printed
177
+ * by its output's declared `format` word and companions (OT32), else by the
178
+ * lower-pane legend rule (K/M/B from 1K, the built-in legend decimals below,
179
+ * never the axis step: formatWrunLegendValue); "price" prints at the chart's
180
+ * price digits (OT29, the provider). A candle group reads its four values
181
+ * after the legend's O / H / L / C markers (OT28); every dot shows the
182
+ * colour the hovered bar is drawn in (OT27). A single line keeps the
183
+ * unlabelled single-slot readout, like the parent. An output with
184
+ * `legend: false` is never a line (kScriptLegendLines). A proven twin's pane
185
+ * (`builtinTwin`) prints by its built-in's legend rule instead. */
186
+ export declare function wrunSeriesChildLegendText(builtinTwin?: WrunBuiltinTwin, priceDigits?: () => number): (point: number[] | undefined, meta: unknown) => KScriptLegendEntry[];
187
+ /** The lower pane's static legend: the slot pool the dynamic readout
188
+ * addresses (one labelled span per slot, born empty, the parent's rule:
189
+ * titan creates legend spans only from this list and drops updates for ids
190
+ * it never created). The palette now rides each update's swatch, so the
191
+ * slots start in the value ink; the argument stays for the callers. */
192
+ export declare function wrunSeriesChildLegendSlots(_palette?: ReadonlyArray<string>): Array<KScriptLegendEntry & {
193
+ isStatic: boolean;
194
+ }>;
195
+ /** The series child's overlay id (`<parent>::series:<name>`), defined by the
196
+ * adapter (the visibility apply reads it there) and re-exported here. */
197
+ export { wrunSeriesChildId };
198
+ /**
199
+ * True while the engine gate refuses the batched child `childId` of `overlayId` (the last pass that
200
+ * judged it): a child the chart cannot draw is never mounted, so the live tick leaves it out of its
201
+ * changed-tail decision (wrun-live-tick.util) instead of rebuilding every section's whole window on
202
+ * every tick for as long as the refusal holds. A tick still carries its tail and the gate judges it
203
+ * again: one the chart draws again stops reading as refused, and the next tick mounts it. A layout
204
+ * refusal (a section or a retained record newer than this chart) is not the tail's to lift: it holds
205
+ * until a full build (a run, a reseed, a whole-window tick) judges the child again.
206
+ */
207
+ export declare function isWrunBatchedChildRefused(tc: WrunChildOverlayChart, overlayId: string, childId: string): boolean;
208
+ /** A run's history window: the span the run recomputed (a pan wave's window, clamped or the whole
209
+ * loaded range), epoch ms, both ends inclusive. */
210
+ export interface WrunChildHistoryWindow {
211
+ fromMs: number;
212
+ toMs: number;
213
+ }
214
+ /** Why a prepared landing no longer applies (`WrunStaleLandingError.reason`): `chart` the chart index names
215
+ * another chart now (or it was destroyed); `mount` the Indicator's mount moved on (another mount pass, an
216
+ * unmount); `parent` the parent overlay is not the one mounted; `child` the heatmap is no longer a mounted
217
+ * heatmap (it left the chart), or holds none to keep a scale from; `paused` the Indicator is paused;
218
+ * `rolled-back` another landing of the same run failed and the run's landings were rolled back; `spent` the
219
+ * landing already committed, failed or was discarded. */
220
+ export type WrunStaleLandingReason = 'chart' | 'mount' | 'parent' | 'child' | 'paused' | 'rolled-back' | 'spent';
221
+ /** A prepared heatmap landing that can no longer land (C6): nothing of it is applied. */
222
+ export declare class WrunStaleLandingError extends Error {
223
+ readonly childId: string;
224
+ readonly reason: WrunStaleLandingReason;
225
+ constructor(childId: string, reason: WrunStaleLandingReason);
226
+ }
227
+ /**
228
+ * A heatmap child's rows for a history window, prepared to land (C6, a prefix run's child): every await
229
+ * done (the chart, the packs, the pause lookup), the rows merged into the child's mounted rows and the cell
230
+ * budget planned, nothing applied yet. The counts read the plan (the commit's own once it landed).
231
+ */
232
+ export interface PreparedWrunWindowLanding {
233
+ readonly childId: string;
234
+ /** Pass rows the child holds once the landing commits: the window's rows the cell budget kept. */
235
+ readonly landedRows: number;
236
+ /** Mounted rows outside the window the child keeps, the same row objects (C3). */
237
+ readonly keptRows: number;
238
+ /** Merged rows the cell budget drops, the oldest bars first. */
239
+ readonly trimmedRows: number;
240
+ /** Land the rows, with no await. The mount token, the chart object, the parent, the child and the pause are
241
+ * checked first, and a change throws `WrunStaleLandingError` with nothing applied. Rows the child gained or
242
+ * lost since the prepare (a tick that was already on its way, a rebuild) are merged again from what it
243
+ * holds now; a sibling landing of the same run never cuts it before its own commit. The rows reach the
244
+ * engine through its row swap, the mount record and the cell ledger follow, and the ring logs
245
+ * `wrun-heatmap-prefix-landed`. The landings one run prepared for an Indicator land as one transaction: a
246
+ * commit that throws rolls back the run's landings that already landed (their rows, records and ledger
247
+ * entries, a sibling trim included). A second commit throws (`spent`). */
248
+ commit(): void;
249
+ /** Release the prepared rows; a commit afterwards throws (`spent`). Dropping a landing that never landed
250
+ * while another landing of the same run did leaves the run partial, so the landed ones roll back. After its
251
+ * own commit (or a failed one) a discard does nothing. */
252
+ discard(): void;
253
+ }
254
+ /**
255
+ * Prepare a mounted heatmap child's landing of `rows` inside `historyWindow` (both ends inclusive, epoch ms):
256
+ * the C6 seam a prefix run lands its heatmap children through, as an asynchronous prepare and a synchronous
257
+ * commit under the run's own lock. Every await is here: the chart the index names, the child's packs, the
258
+ * pause lookup. Then, with no await, the rows merge into the rows the mount record holds (the rows outside the
259
+ * window kept by identity, C3), the cell budget is planned from the merged rows and the ledger as it stands
260
+ * (no whole-run skip: the budget only cuts the oldest bars), and the mounted scale is kept: a windowed landing
261
+ * never samples colour bounds, a full run does. Rejects with `WrunStaleLandingError` when the mount holds no
262
+ * such child to land into, and with the pack error when a pack failed.
263
+ *
264
+ * A batched child (WRUN-BATCHED-MARKS: marks, spans, rays) lands through the same seam (round-2 fold 10:
265
+ * the row-backed canvas kinds prepend rows): its merged rows are budgeted on the batched ledger, each pass
266
+ * row that replaces a mounted bar charged its old copy too, and the ring logs `wrun-batched-prefix-landed`;
267
+ * a run's heatmap and batched landings commit as one transaction. `prepareWrunChildWindowLanding` names
268
+ * the generalized seam.
269
+ */
270
+ export declare function prepareWrunHeatmapWindowLanding(input: {
271
+ chartIndex: number;
272
+ indicatorId: string;
273
+ childId: string;
274
+ rows: ReadonlyArray<ReadonlyArray<number>>;
275
+ historyWindow: {
276
+ fromTs: number;
277
+ toTs: number;
278
+ };
279
+ }): Promise<PreparedWrunWindowLanding>;
280
+ /** The window landing of any row-backed canvas child (a heatmap or a batched child), the generalized name. */
281
+ export declare const prepareWrunChildWindowLanding: typeof prepareWrunHeatmapWindowLanding;
282
+ /** Mount a run snapshot after every required pack has settled.
283
+ * The parent remains the canonical numeric-output container. A panel child
284
+ * the run still declares in the same pane takes the new rows in place; one
285
+ * whose pane changed (side, species, axis, chrome, carved height) or that
286
+ * the run dropped is replaced or removed. A heatmap or profile that stays
287
+ * the same canvas, and an inset that stays the same strip (sameInset), takes
288
+ * the run's rows in place too; a levels or matrix child in the same pane
289
+ * and kind refreshes in place when its frame signature changed (one that
290
+ * moved pane or kind is replaced). A tick
291
+ * without frames touches only the row-backed kinds: an inset takes its rows
292
+ * in place (a moved strip is replaced, one the tick dropped removed),
293
+ * heatmaps and profiles their newest row (every row from `canvasRowsFromTs`
294
+ * on when the tick added bars; all their rows and settings when
295
+ * the row grid moved), and the series child is refreshed in place; a series
296
+ * child is never removed while the run still declares it in the same pane (a
297
+ * pane moved onto the price or given another height is re-carved). Every
298
+ * child mounts with the parent's eye, a child the reader hid on its own row
299
+ * hidden (syncChildVisibility). `priceDigits` is the chart's price
300
+ * precision (OT29, X7): the panels' formatters and the lower pane's legend
301
+ * print "price" values with it. A tick's heatmap tail (`tailOnly`) only
302
+ * ever merges its rows into a mounted canvas. */
303
+ export declare function mountWrunChildOverlays({ tc, overlayId, runResult, replaceFrames, swapCanvasRows, canvasRowsFromTs, historyWindow, projection, cell, priceDigits, onMainThreadMs, chartIndex, }: {
304
+ tc: WrunChildOverlayChart;
305
+ overlayId: string;
306
+ runResult: WrunRunResult;
307
+ /** The parent's chart: a mount whose packs loaded after the parent was paused applies nothing
308
+ * (the retained picture stays; Resume reruns). Without it the mount cannot recheck the pause. */
309
+ chartIndex?: number;
310
+ replaceFrames?: boolean;
311
+ /** A mounted heatmap or profile takes the pass's rows whole, never only its newest row, while
312
+ * frame-backed children still follow `replaceFrames`: the hosted path's pass, whose rows are the
313
+ * whole session (a pan-back page adds rows on the left). Absent, a pass without frames merges the
314
+ * newest row as before. */
315
+ swapCanvasRows?: boolean;
316
+ /** A live tick that added bars since the canvases last painted (the live tick's
317
+ * `paintedThroughTs`, wrun-live-tick.util `wrunLiveCanvasPass`): a mounted heatmap (its tail
318
+ * included) or profile that takes the live merge merges the pass's row holding this bar and every
319
+ * row after it, oldest first (`liveCanvasRows`), never only the newest, which would leave a roll's
320
+ * closed bar as the last drain before the close drew it and skip the bars between. Absent, the
321
+ * newest row as before; `swapCanvasRows` wins over it. */
322
+ canvasRowsFromTs?: number;
323
+ /** A run's history window (WrunChildHistoryWindow): a mounted heatmap holding rows takes the pass's
324
+ * rows inside it, merged into the rows its record holds (`heatmapRowsWithWindow`), budgeted with
325
+ * its earlier demand carried (`landHeatmapWindow`, the landing a prefix run's prepared child takes
326
+ * too), and keeps the rows outside it and the settings it was drawn with (a clamped page's colour
327
+ * bounds were sampled on the page alone; the Sensitivity sample stays the mounted one), on
328
+ * a frameless pass (the merge route, any window) and on a run (the remount a refused merge falls
329
+ * back to, a partial window) alike. A heatmap the pass omits is left to the pass's own rule.
330
+ * Absent, a frameless pass merges a heatmap's newest row and a run swaps its rows whole, as
331
+ * before; `swapCanvasRows` wins over it. */
332
+ historyWindow?: WrunChildHistoryWindow;
333
+ /** The parent ran at another interval: its series child projects the same way. */
334
+ projection?: WrunRunIntervalProjection;
335
+ /** The cell the mount lands on (WrunMountCell); the parent's owner flag decides when absent. */
336
+ cell?: WrunMountCell;
337
+ /** The chart's price digits, read per call (the symbol may change). */
338
+ priceDigits?: () => number;
339
+ /** Hears the main-thread ms the mount spends applying the children once their packs load
340
+ * (installs, row refreshes): work that lands after the caller stopped its own clock for the
341
+ * wait. The config build before the wait runs inside the caller's call. The engine pass the
342
+ * mount asks for runs after it, on the engine's frame, and is charged by the engine's own prep
343
+ * clock (scheduleKScriptChartPaint); only a chart that cannot defer keeps that pass in here. */
344
+ onMainThreadMs?: (ms: number) => void;
345
+ }): Promise<boolean>;
346
+ /** Re-resolve every mounted child of every Indicator on the chart against
347
+ * the chart's current palette, theme name and display timezone, without a
348
+ * rerun (X13; hosted runs follow too). A child that stays the child it was
349
+ * (the run's own keep rule: the same pane, canvas, strip or docked surface)
350
+ * is refreshed in place on the overlay it has (refreshRetranslatedChild:
351
+ * its settings, then its rows), so it keeps its place in the stack, its
352
+ * height, its legend row and the reader's expanded pane; only a child that
353
+ * cannot stay (another surface, an engine without the doors) is rebuilt
354
+ * from its unresolved input under the same id, in the chart's own order so
355
+ * the rebuilt ones keep their stacking, with the reader's expanded pane
356
+ * kept around the rebuild (keepFocusedPane). The series child's colours
357
+ * ride the adapter's own theme reguard. Called by the theme rerun when a
358
+ * packed colour moved and by the timezone sync per chart. */
359
+ export declare function retranslateWrunChildOverlays(tc: WrunChildOverlayChart): void;
360
+ /**
361
+ * Re-pick the colour bounds of an Indicator's mounted heatmaps for the
362
+ * viewer's Sensitivity, with no run. With `preview` the named heatmap holds
363
+ * the slider's drag value (ahead of the saved row, for every mount until a
364
+ * commit); without one the call commits: held values drop and every heatmap
365
+ * takes its saved row (`heatmap:<name>:sensitivity` on the parent's engine
366
+ * settings; none draws the author's bounds). Only `min` and `max` move on the
367
+ * engine meta: titan reads meta.settings on every draw and keys its colour
368
+ * table on the bounds, so there is no row swap and no remount. The bounds go
369
+ * through the engine's settings door (`updateSettings`), which also commits a
370
+ * content mutation, so the 2D strip cache of the canvas fallback never blits
371
+ * pixels drawn with the old bounds back on a live-edge sliver. The mounted
372
+ * record keeps the config with the bounds it now holds, so the next run
373
+ * diffs against them. Returns whether a bound moved.
374
+ */
375
+ export declare function rescaleWrunHeatmapChildren(tc: WrunChildOverlayChart, overlayId: string, preview?: {
376
+ name: string;
377
+ value: number;
378
+ }): boolean;
379
+ /**
380
+ * A replay cut of an Indicator's batched children (WRUN-BATCHED-MARKS, round-2 fold 9), synchronous with
381
+ * the cut of the engine rows (wrun-replay-rows.util, which also tells the engine the rows moved in place so
382
+ * a pack's cached geometry is read again): each mounted batched child's record (the input a retranslate
383
+ * rebuilds from and the config) keeps the rows inside [fromTs, toTs] (fromTs NaN keeps every row through
384
+ * toTs) and its cell ledger follows. A theme or timezone switch while the replay holds its reseed then
385
+ * rebuilds the cut rows, never the rows the step took away. Returns the child ids whose records were cut.
386
+ */
387
+ export declare function cutWrunBatchedChildRecords(tc: WrunChildOverlayChart, overlayId: string, fromTs: number, toTs: number): string[];
388
+ /** Full compute runs await the async work started by the synchronous
389
+ * integration seam. A failed pack never becomes a successful full run. */
390
+ export declare function awaitWrunChildOverlays(tc: WrunChildOverlayChart, overlayId: string): Promise<boolean>;
391
+ /** Explicit teardown is also used by the engine's post-removal object event. */
392
+ export declare function unmountWrunChildOverlays(tc: WrunChildOverlayChart, overlayId: string): void;