@orangecharts/wrun-chart-host 0.4.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 (322) hide show
  1. package/README.md +15 -4
  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/cme-official-scripts.constants.d.ts +168 -0
  11. package/dist/constants/scriptEditor/cme-official-scripts.constants.js +398 -0
  12. package/dist/constants/scriptEditor/converted-script-id.leaf.d.ts +8 -0
  13. package/dist/constants/scriptEditor/converted-script-id.leaf.js +10 -0
  14. package/dist/constants/scriptEditor/execution.constants.d.ts +4 -0
  15. package/dist/constants/scriptEditor/execution.constants.js +14 -0
  16. package/dist/constants/wrun-prefix-safe.constants.d.ts +23 -0
  17. package/dist/constants/wrun-prefix-safe.constants.js +26 -0
  18. package/dist/host-env.d.ts +313 -18
  19. package/dist/host-env.js +15 -0
  20. package/dist/host-ports.types.d.ts +853 -16
  21. package/dist/index.d.ts +139 -2
  22. package/dist/index.js +139 -2
  23. package/dist/instances/script-engine-worker-ohlcv-transfer.d.ts +31 -0
  24. package/dist/instances/script-engine-worker-ohlcv-transfer.js +164 -0
  25. package/dist/interfaces/market-event.interface.d.ts +231 -0
  26. package/dist/interfaces/market-event.interface.js +15 -0
  27. package/dist/interfaces/opra-realtime.interface.d.ts +70 -134
  28. package/dist/interfaces/opra-realtime.interface.js +34 -59
  29. package/dist/interfaces/replay.interface.d.ts +285 -0
  30. package/dist/interfaces/replay.interface.js +1 -0
  31. package/dist/kscript-data/controls/live-ohlcv-merge.util.d.ts +1 -0
  32. package/dist/kscript-data/controls/live-ohlcv-merge.util.js +93 -0
  33. package/dist/kscript-data/controls/live-trades-merge.util.d.ts +5 -1
  34. package/dist/kscript-data/controls/live-trades-merge.util.js +2 -2
  35. package/dist/market-data/billing.interface.d.ts +219 -0
  36. package/dist/market-data/billing.interface.js +58 -0
  37. package/dist/market-data/venue-governed.util.d.ts +2 -0
  38. package/dist/market-data/venue-governed.util.js +10 -0
  39. package/dist/market-data/venue.d.ts +122 -0
  40. package/dist/market-data/venue.js +1 -0
  41. package/dist/market-data/venues/index.d.ts +97 -0
  42. package/dist/market-data/venues/index.js +33 -0
  43. package/dist/market-data/venues/opra.contract.copy.json +35 -0
  44. package/dist/market-data/venues/opra.d.ts +70 -0
  45. package/dist/market-data/venues/opra.js +74 -0
  46. package/dist/replay/replayIndicatorRows.d.ts +31 -0
  47. package/dist/replay/replayIndicatorRows.js +117 -0
  48. package/dist/replay/replayLadder.d.ts +85 -0
  49. package/dist/replay/replayLadder.js +388 -0
  50. package/dist/utility/auth/server-clock.util.d.ts +81 -0
  51. package/dist/utility/auth/server-clock.util.js +238 -0
  52. package/dist/utility/chart/builtin-identity.util.d.ts +18 -0
  53. package/dist/utility/chart/builtin-identity.util.js +51 -0
  54. package/dist/utility/chart/cache-alignment.util.d.ts +454 -0
  55. package/dist/utility/chart/cache-alignment.util.js +926 -0
  56. package/dist/utility/chart/chart-data-fetch-generation.util.d.ts +15 -0
  57. package/dist/utility/chart/chart-data-fetch-generation.util.js +22 -0
  58. package/dist/utility/chart/chart-mount-epoch.util.d.ts +5 -0
  59. package/dist/utility/chart/chart-mount-epoch.util.js +29 -0
  60. package/dist/utility/chart/chart-time-domain.util.d.ts +12 -0
  61. package/dist/utility/chart/chart-time-domain.util.js +23 -0
  62. package/dist/utility/chart/color-customization.leaf.d.ts +10 -0
  63. package/dist/utility/chart/color-customization.leaf.js +16 -0
  64. package/dist/utility/chart/footprint-tick-grid.util.d.ts +106 -0
  65. package/dist/utility/chart/footprint-tick-grid.util.js +167 -0
  66. package/dist/utility/chart/gesture-timing.leaf.d.ts +29 -0
  67. package/dist/utility/chart/gesture-timing.leaf.js +29 -0
  68. package/dist/utility/chart/governed-contract-coin.util.d.ts +22 -0
  69. package/dist/utility/chart/governed-contract-coin.util.js +39 -0
  70. package/dist/utility/chart/host-bar-placement.util.d.ts +107 -0
  71. package/dist/utility/chart/host-bar-placement.util.js +447 -0
  72. package/dist/utility/chart/index-host-tier.util.d.ts +31 -0
  73. package/dist/utility/chart/index-host-tier.util.js +118 -0
  74. package/dist/utility/chart/index-mode-admission.util.d.ts +34 -0
  75. package/dist/utility/chart/index-mode-admission.util.js +67 -0
  76. package/dist/utility/chart/indicator-error-message.util.d.ts +35 -0
  77. package/dist/utility/chart/indicator-error-message.util.js +44 -0
  78. package/dist/utility/chart/kscript-apply-fingerprint.util.d.ts +65 -0
  79. package/dist/utility/chart/kscript-apply-fingerprint.util.js +357 -0
  80. package/dist/utility/chart/kscript-chart-flush.leaf.d.ts +22 -0
  81. package/dist/utility/chart/kscript-chart-flush.leaf.js +13 -0
  82. package/dist/utility/chart/kscript-data-interval-restriction.leaf.d.ts +6 -0
  83. package/dist/utility/chart/kscript-data-interval-restriction.leaf.js +27 -0
  84. package/dist/utility/chart/kscript-integration-decision.leaf.d.ts +89 -0
  85. package/dist/utility/chart/kscript-integration-decision.leaf.js +80 -0
  86. package/dist/utility/chart/kscript-live-coalesce.util.d.ts +76 -0
  87. package/dist/utility/chart/kscript-live-coalesce.util.js +156 -0
  88. package/dist/utility/chart/kscript-live-rest-pace.util.d.ts +34 -0
  89. package/dist/utility/chart/kscript-live-rest-pace.util.js +134 -0
  90. package/dist/utility/chart/kscript-live-source-identity.util.d.ts +98 -0
  91. package/dist/utility/chart/kscript-live-source-identity.util.js +121 -0
  92. package/dist/utility/chart/kscript-mounted-plot-set.leaf.d.ts +48 -0
  93. package/dist/utility/chart/kscript-mounted-plot-set.leaf.js +145 -0
  94. package/dist/utility/chart/kscript-perf-tracker.util.d.ts +243 -0
  95. package/dist/utility/chart/kscript-perf-tracker.util.js +522 -0
  96. package/dist/utility/chart/kscript-run-interval-projection.util.d.ts +43 -0
  97. package/dist/utility/chart/kscript-run-interval-projection.util.js +471 -0
  98. package/dist/utility/chart/kscript-run-result-equality.util.d.ts +38 -0
  99. package/dist/utility/chart/kscript-run-result-equality.util.js +89 -0
  100. package/dist/utility/chart/kscript-settings-revision.leaf.d.ts +2 -0
  101. package/dist/utility/chart/kscript-settings-revision.leaf.js +12 -0
  102. package/dist/utility/chart/kscript-source-degrade.leaf.d.ts +63 -0
  103. package/dist/utility/chart/kscript-source-degrade.leaf.js +68 -0
  104. package/dist/utility/chart/kscript-source-retention.util.d.ts +134 -0
  105. package/dist/utility/chart/kscript-source-retention.util.js +218 -0
  106. package/dist/utility/chart/kscript-standin-identity.leaf.d.ts +57 -0
  107. package/dist/utility/chart/kscript-standin-identity.leaf.js +61 -0
  108. package/dist/utility/chart/kscript-titancharts-preparation.util.d.ts +15 -0
  109. package/dist/utility/chart/kscript-titancharts-preparation.util.js +376 -0
  110. package/dist/utility/chart/kscript-titancharts-render-keys.constants.d.ts +9 -0
  111. package/dist/utility/chart/kscript-titancharts-render-keys.constants.js +130 -0
  112. package/dist/utility/chart/kscript-venue-policy.util.d.ts +217 -0
  113. package/dist/utility/chart/kscript-venue-policy.util.js +324 -0
  114. package/dist/utility/chart/live-cadence.util.d.ts +38 -0
  115. package/dist/utility/chart/live-cadence.util.js +37 -0
  116. package/dist/utility/chart/live-feed-series-match.leaf.d.ts +13 -0
  117. package/dist/utility/chart/live-feed-series-match.leaf.js +21 -0
  118. package/dist/utility/chart/local-engine-self-heal-backoff.util.d.ts +46 -0
  119. package/dist/utility/chart/local-engine-self-heal-backoff.util.js +46 -0
  120. package/dist/utility/chart/local-engine-uninit.leaf.d.ts +21 -0
  121. package/dist/utility/chart/local-engine-uninit.leaf.js +22 -0
  122. package/dist/utility/chart/local-kscript-source-revalidation.util.d.ts +62 -0
  123. package/dist/utility/chart/local-kscript-source-revalidation.util.js +123 -0
  124. package/dist/utility/chart/local-kscript-warmup-depth.util.d.ts +214 -0
  125. package/dist/utility/chart/local-kscript-warmup-depth.util.js +376 -0
  126. package/dist/utility/chart/local-technical-script-live-apply-coalescer.util.d.ts +85 -0
  127. package/dist/utility/chart/local-technical-script-live-apply-coalescer.util.js +197 -0
  128. package/dist/utility/chart/local-technical-script-range.leaf.d.ts +72 -0
  129. package/dist/utility/chart/local-technical-script-range.leaf.js +126 -0
  130. package/dist/utility/chart/mixed-mode.util.d.ts +167 -0
  131. package/dist/utility/chart/mixed-mode.util.js +139 -0
  132. package/dist/utility/chart/ohlcv-row-readiness.util.d.ts +36 -0
  133. package/dist/utility/chart/ohlcv-row-readiness.util.js +90 -0
  134. package/dist/utility/chart/opra-user-scripts-gate.util.d.ts +19 -0
  135. package/dist/utility/chart/opra-user-scripts-gate.util.js +32 -0
  136. package/dist/utility/chart/overlay-execution-guard-key.leaf.d.ts +8 -0
  137. package/dist/utility/chart/overlay-execution-guard-key.leaf.js +10 -0
  138. package/dist/utility/chart/price-precision.util.d.ts +40 -0
  139. package/dist/utility/chart/price-precision.util.js +70 -0
  140. package/dist/utility/chart/profile-block-size.util.d.ts +64 -0
  141. package/dist/utility/chart/profile-block-size.util.js +141 -0
  142. package/dist/utility/chart/protected-kscript-degenerate-rows.leaf.d.ts +11 -0
  143. package/dist/utility/chart/protected-kscript-degenerate-rows.leaf.js +29 -0
  144. package/dist/utility/chart/protected-kscript-empty-output.util.d.ts +28 -0
  145. package/dist/utility/chart/protected-kscript-empty-output.util.js +84 -0
  146. package/dist/utility/chart/run-interval-unservable.leaf.d.ts +9 -0
  147. package/dist/utility/chart/run-interval-unservable.leaf.js +20 -0
  148. package/dist/utility/chart/run-interval-warmup.leaf.d.ts +19 -0
  149. package/dist/utility/chart/run-interval-warmup.leaf.js +35 -0
  150. package/dist/utility/chart/titan-constants.pin.d.ts +9 -5
  151. package/dist/utility/chart/titan-constants.pin.js +18 -5
  152. package/dist/utility/chart/warmup-backfill-retry.leaf.d.ts +9 -0
  153. package/dist/utility/chart/warmup-backfill-retry.leaf.js +9 -0
  154. package/dist/utility/chart/wrun-bar-session-facts.util.d.ts +11 -2
  155. package/dist/utility/chart/wrun-bar-session-facts.util.js +10 -3
  156. package/dist/utility/chart/wrun-run-result.util.d.ts +5 -1
  157. package/dist/utility/chart/wrun-run-result.util.js +20 -14
  158. package/dist/utility/common/data-processing.util.d.ts +138 -0
  159. package/dist/utility/common/data-processing.util.js +346 -0
  160. package/dist/utility/common/visible-timeout.util.d.ts +13 -4
  161. package/dist/utility/common/visible-timeout.util.js +23 -8
  162. package/dist/utility/exchange-format.leaf.d.ts +1 -0
  163. package/dist/utility/exchange-format.leaf.js +47 -0
  164. package/dist/utility/market-events/earnings-scope.util.d.ts +60 -0
  165. package/dist/utility/market-events/earnings-scope.util.js +92 -0
  166. package/dist/utility/market-events/market-events.util.d.ts +147 -0
  167. package/dist/utility/market-events/market-events.util.js +392 -0
  168. package/dist/utility/market-events/zoned-clock.util.d.ts +1 -0
  169. package/dist/utility/market-events/zoned-clock.util.js +11 -0
  170. package/dist/utility/options/option-venue-disclosure.util.d.ts +43 -0
  171. package/dist/utility/options/option-venue-disclosure.util.js +56 -0
  172. package/dist/utility/scriptEditor/package-semver.util.d.ts +51 -0
  173. package/dist/utility/scriptEditor/package-semver.util.js +120 -0
  174. package/dist/utility/scriptEditor/temp-script-id.util.d.ts +18 -0
  175. package/dist/utility/scriptEditor/temp-script-id.util.js +25 -0
  176. package/dist/utility/symbol-selection/markets-request-from-symbols.leaf.d.ts +20 -0
  177. package/dist/utility/symbol-selection/markets-request-from-symbols.leaf.js +81 -0
  178. package/dist/utility/v2/governed-tier.leaf.d.ts +103 -0
  179. package/dist/utility/v2/governed-tier.leaf.js +113 -0
  180. package/dist/utility/watchlist/import/import-request.leaf.d.ts +10 -0
  181. package/dist/utility/watchlist/import/import-request.leaf.js +10 -0
  182. package/dist/utility/wrun/sources/lanes/series.js +2 -2
  183. package/dist/utility/wrun/sources/row-lanes/option_contract_state.d.ts +4 -4
  184. package/dist/utility/wrun/sources/row-lanes/option_contract_state.js +5 -6
  185. package/dist/utility/wrun/wrun-alert-outputs.registry.d.ts +166 -0
  186. package/dist/utility/wrun/wrun-alert-outputs.registry.js +219 -0
  187. package/dist/utility/wrun/wrun-bar-count.util.d.ts +83 -0
  188. package/dist/utility/wrun/wrun-bar-count.util.js +259 -0
  189. package/dist/utility/wrun/wrun-chart-context-names.util.d.ts +84 -0
  190. package/dist/utility/wrun/wrun-chart-context-names.util.js +186 -0
  191. package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +253 -0
  192. package/dist/utility/wrun/wrun-chart-market-facts.util.js +731 -0
  193. package/dist/utility/wrun/wrun-cloud-opra-stamp.util.d.ts +28 -0
  194. package/dist/utility/wrun/wrun-cloud-opra-stamp.util.js +45 -0
  195. package/dist/utility/wrun/wrun-coin-lane-live.util.d.ts +18 -0
  196. package/dist/utility/wrun/wrun-coin-lane-live.util.js +47 -0
  197. package/dist/utility/wrun/wrun-deadline.util.js +2 -1
  198. package/dist/utility/wrun/wrun-debug-output.util.d.ts +39 -0
  199. package/dist/utility/wrun/wrun-debug-output.util.js +63 -0
  200. package/dist/utility/wrun/wrun-declared-warmup.util.d.ts +113 -0
  201. package/dist/utility/wrun/wrun-declared-warmup.util.js +181 -0
  202. package/dist/utility/wrun/wrun-draft-legend-note.util.d.ts +43 -0
  203. package/dist/utility/wrun/wrun-draft-legend-note.util.js +158 -0
  204. package/dist/utility/wrun/wrun-draft-overlay.util.d.ts +181 -0
  205. package/dist/utility/wrun/wrun-draft-overlay.util.js +357 -0
  206. package/dist/utility/wrun/wrun-draw-skipped.leaf.d.ts +16 -0
  207. package/dist/utility/wrun/wrun-draw-skipped.leaf.js +16 -0
  208. package/dist/utility/wrun/wrun-earnings-facts.util.d.ts +42 -0
  209. package/dist/utility/wrun/wrun-earnings-facts.util.js +131 -0
  210. package/dist/utility/wrun/wrun-first-run-depth.util.d.ts +32 -0
  211. package/dist/utility/wrun/wrun-first-run-depth.util.js +118 -0
  212. package/dist/utility/wrun/wrun-gate-plane-readers.util.d.ts +24 -0
  213. package/dist/utility/wrun/wrun-gate-plane-readers.util.js +31 -0
  214. package/dist/utility/wrun/wrun-held-lanes.util.d.ts +32 -0
  215. package/dist/utility/wrun/wrun-held-lanes.util.js +94 -0
  216. package/dist/utility/wrun/wrun-host-visible-clock.util.d.ts +2 -0
  217. package/dist/utility/wrun/wrun-host-visible-clock.util.js +17 -0
  218. package/dist/utility/wrun/wrun-host.service.d.ts +266 -0
  219. package/dist/utility/wrun/wrun-host.service.js +655 -0
  220. package/dist/utility/wrun/wrun-inert-legend.util.d.ts +33 -0
  221. package/dist/utility/wrun/wrun-inert-legend.util.js +125 -0
  222. package/dist/utility/wrun/wrun-input-requirements.leaf.d.ts +155 -0
  223. package/dist/utility/wrun/wrun-input-requirements.leaf.js +450 -0
  224. package/dist/utility/wrun/wrun-integration-route.util.d.ts +51 -0
  225. package/dist/utility/wrun/wrun-integration-route.util.js +59 -0
  226. package/dist/utility/wrun/wrun-latest-history.leaf.d.ts +8 -0
  227. package/dist/utility/wrun/wrun-latest-history.leaf.js +8 -0
  228. package/dist/utility/wrun/wrun-legend-hover.lazy.d.ts +12 -0
  229. package/dist/utility/wrun/wrun-legend-hover.lazy.js +96 -0
  230. package/dist/utility/wrun/wrun-lifecycle-runtime.util.d.ts +21 -0
  231. package/dist/utility/wrun/wrun-lifecycle-runtime.util.js +21 -0
  232. package/dist/utility/wrun/wrun-live-hidden-hold.util.d.ts +23 -0
  233. package/dist/utility/wrun/wrun-live-hidden-hold.util.js +13 -0
  234. package/dist/utility/wrun/wrun-live-intake.util.d.ts +374 -0
  235. package/dist/utility/wrun/wrun-live-intake.util.js +2027 -0
  236. package/dist/utility/wrun/wrun-live-patch.util.d.ts +116 -0
  237. package/dist/utility/wrun/wrun-live-patch.util.js +523 -0
  238. package/dist/utility/wrun/wrun-live-tick.util.d.ts +619 -0
  239. package/dist/utility/wrun/wrun-live-tick.util.js +4974 -0
  240. package/dist/utility/wrun/wrun-loading-owner.util.d.ts +58 -0
  241. package/dist/utility/wrun/wrun-loading-owner.util.js +89 -0
  242. package/dist/utility/wrun/wrun-official-scope.leaf.d.ts +29 -0
  243. package/dist/utility/wrun/wrun-official-scope.leaf.js +36 -0
  244. package/dist/utility/wrun/wrun-oi-lane.util.d.ts +27 -0
  245. package/dist/utility/wrun/wrun-oi-lane.util.js +42 -0
  246. package/dist/utility/wrun/wrun-options-stop.util.d.ts +52 -0
  247. package/dist/utility/wrun/wrun-options-stop.util.js +123 -0
  248. package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +719 -0
  249. package/dist/utility/wrun/wrun-overlay-drivers.util.js +1180 -0
  250. package/dist/utility/wrun/wrun-overlay-lifecycle.lazy.d.ts +50 -0
  251. package/dist/utility/wrun/wrun-overlay-lifecycle.lazy.js +131 -0
  252. package/dist/utility/wrun/wrun-overlay-lifecycle.util.d.ts +118 -0
  253. package/dist/utility/wrun/wrun-overlay-lifecycle.util.js +466 -0
  254. package/dist/utility/wrun/wrun-overlay-metadata.util.d.ts +45 -0
  255. package/dist/utility/wrun/wrun-overlay-metadata.util.js +112 -0
  256. package/dist/utility/wrun/wrun-overlay-recovery.util.d.ts +114 -0
  257. package/dist/utility/wrun/wrun-overlay-recovery.util.js +971 -0
  258. package/dist/utility/wrun/wrun-overlay-run.util.d.ts +858 -0
  259. package/dist/utility/wrun/wrun-overlay-run.util.js +11013 -0
  260. package/dist/utility/wrun/wrun-panel-mount.util.d.ts +24 -9
  261. package/dist/utility/wrun/wrun-panel-mount.util.js +138 -43
  262. package/dist/utility/wrun/wrun-param-map.util.d.ts +19 -4
  263. package/dist/utility/wrun/wrun-param-map.util.js +40 -47
  264. package/dist/utility/wrun/wrun-param-values.util.d.ts +9 -3
  265. package/dist/utility/wrun/wrun-param-values.util.js +5 -5
  266. package/dist/utility/wrun/wrun-prefix-cohort.util.d.ts +93 -0
  267. package/dist/utility/wrun/wrun-prefix-cohort.util.js +484 -0
  268. package/dist/utility/wrun/wrun-prefix-lanes.util.d.ts +114 -0
  269. package/dist/utility/wrun/wrun-prefix-lanes.util.js +486 -0
  270. package/dist/utility/wrun/wrun-prefix-proof.util.d.ts +317 -0
  271. package/dist/utility/wrun/wrun-prefix-proof.util.js +630 -0
  272. package/dist/utility/wrun/wrun-refusal-surface.util.d.ts +73 -0
  273. package/dist/utility/wrun/wrun-refusal-surface.util.js +380 -0
  274. package/dist/utility/wrun/wrun-refusal-text.util.d.ts +15 -0
  275. package/dist/utility/wrun/wrun-refusal-text.util.js +40 -0
  276. package/dist/utility/wrun/wrun-replay-lane.util.d.ts +139 -0
  277. package/dist/utility/wrun/wrun-replay-lane.util.js +520 -0
  278. package/dist/utility/wrun/wrun-replay-rows.util.d.ts +21 -0
  279. package/dist/utility/wrun/wrun-replay-rows.util.js +172 -0
  280. package/dist/utility/wrun/wrun-row-source-factory.d.ts +53 -0
  281. package/dist/utility/wrun/wrun-row-source-factory.js +435 -0
  282. package/dist/utility/wrun/wrun-run-cells.util.d.ts +36 -0
  283. package/dist/utility/wrun/wrun-run-cells.util.js +46 -0
  284. package/dist/utility/wrun/wrun-run-interval-session.util.d.ts +133 -0
  285. package/dist/utility/wrun/wrun-run-interval-session.util.js +121 -0
  286. package/dist/utility/wrun/wrun-run-interval.util.d.ts +98 -0
  287. package/dist/utility/wrun/wrun-run-interval.util.js +207 -0
  288. package/dist/utility/wrun/wrun-run-retained.util.d.ts +122 -0
  289. package/dist/utility/wrun/wrun-run-retained.util.js +255 -0
  290. package/dist/utility/wrun/wrun-sandbox-row-source.d.ts +184 -0
  291. package/dist/utility/wrun/wrun-sandbox-row-source.js +444 -0
  292. package/dist/utility/wrun/wrun-script-inputs.util.js +4 -4
  293. package/dist/utility/wrun/wrun-series-stream.util.d.ts +86 -0
  294. package/dist/utility/wrun/wrun-series-stream.util.js +537 -0
  295. package/dist/utility/wrun/wrun-sheet-remembered.util.d.ts +21 -0
  296. package/dist/utility/wrun/wrun-sheet-remembered.util.js +36 -0
  297. package/dist/utility/wrun/wrun-signal-sound-reasons.leaf.d.ts +7 -0
  298. package/dist/utility/wrun/wrun-signal-sound-reasons.leaf.js +12 -0
  299. package/dist/utility/wrun/wrun-socket-row-source.js +4 -2
  300. package/dist/utility/wrun/wrun-source-rows.util.d.ts +175 -3
  301. package/dist/utility/wrun/wrun-source-rows.util.js +294 -8
  302. package/dist/utility/wrun/wrun-stats-strip.util.d.ts +46 -0
  303. package/dist/utility/wrun/wrun-stats-strip.util.js +87 -0
  304. package/dist/utility/wrun/wrun-table-chrome.util.d.ts +163 -0
  305. package/dist/utility/wrun/wrun-table-chrome.util.js +557 -0
  306. package/dist/utility/wrun/wrun-text-params.util.d.ts +11 -6
  307. package/dist/utility/wrun/wrun-text-params.util.js +19 -30
  308. package/dist/utility/wrun/wrun-transient-rerun.util.d.ts +64 -0
  309. package/dist/utility/wrun/wrun-transient-rerun.util.js +317 -0
  310. package/dist/utility/wrun/wrun-twin-lookback.util.d.ts +10 -0
  311. package/dist/utility/wrun/wrun-twin-lookback.util.js +43 -0
  312. package/dist/utility/wrun/wrun-warmup-head-store.util.d.ts +41 -0
  313. package/dist/utility/wrun/wrun-warmup-head-store.util.js +120 -0
  314. package/dist/utility/wrun-alert-params.leaf.d.ts +24 -0
  315. package/dist/utility/wrun-alert-params.leaf.js +24 -0
  316. package/dist/utils/replay/replay-buffer-math.d.ts +148 -0
  317. package/dist/utils/replay/replay-buffer-math.js +684 -0
  318. package/dist/workers/wrun/wrun-abi-host.d.ts +190 -0
  319. package/dist/workers/wrun/wrun-abi-host.js +1201 -0
  320. package/dist/workers/wrun/wrun-engine-handler.d.ts +37 -0
  321. package/dist/workers/wrun/wrun-engine-handler.js +211 -0
  322. package/package.json +3 -3
@@ -73,12 +73,19 @@ export interface WrunChildOverlayChart extends WrunPaneFormatChart {
73
73
  data?: unknown;
74
74
  }>;
75
75
  isDestroyed?: boolean;
76
- /** The chart canvas in CSS px sizes a table pane to its rows. */
76
+ /** The chart canvas in CSS px sizes a table pane to its rows; the focus mode names the expanded pane. */
77
77
  canvasChartController?: {
78
78
  canvasElement?: {
79
79
  clientHeight?: number;
80
80
  } | null;
81
+ focusMode?: {
82
+ focusedGridId?: string | null;
83
+ };
81
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;
82
89
  addOverlay(config: WrunOverlayConfig): void;
83
90
  removeOverlay(id: string): void;
84
91
  /** The engine's in-place row swap (rawData, process, render); a panel
@@ -121,13 +128,17 @@ export interface WrunChildOverlayChart extends WrunPaneFormatChart {
121
128
  * layout, and the plan is reconciled onto the mounted panes when the mount
122
129
  * settles. Absent, the parent's engine settings decide (the owner flag rides
123
130
  * them); a parent without the flag is a normal cell, whose configs are byte
124
- * for byte today's.
131
+ * for byte today's unless its host hands a plan.
125
132
  */
126
133
  export interface WrunMountCell {
127
134
  window: boolean;
128
135
  /** The chart canvas in CSS px (read from the engine when absent). */
129
136
  canvasHeightPx?: number;
130
- /** A precomputed plan (child id to gridHeight); planned from the run's children when absent. */
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. */
131
142
  planned?: ReadonlyMap<string, number>;
132
143
  }
133
144
  /**
@@ -334,13 +345,17 @@ export declare function mountWrunChildOverlays({ tc, overlayId, runResult, repla
334
345
  }): Promise<boolean>;
335
346
  /** Re-resolve every mounted child of every Indicator on the chart against
336
347
  * the chart's current palette, theme name and display timezone, without a
337
- * rerun (X13; hosted runs follow too): a panel takes its retranslated rows
338
- * and settings in place (its pane keeps its place in the stack and the
339
- * height the run carved it at), a levels, inset or canvas child is rebuilt
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
340
354
  * from its unresolved input under the same id, in the chart's own order so
341
- * the rebuilt ones keep their stacking. The series child's colours ride
342
- * the adapter's own theme reguard. Called by the theme rerun when a packed
343
- * colour moved and by the timezone sync per chart. */
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. */
344
359
  export declare function retranslateWrunChildOverlays(tc: WrunChildOverlayChart): void;
345
360
  /**
346
361
  * Re-pick the colour bounds of an Indicator's mounted heatmaps for the
@@ -46,7 +46,6 @@ import { isWrunWindowOwner } from '../chart/window-owner.leaf.js';
46
46
  import { planWindowWeights, reconcileWindowOwnerGeometry, savedWindowSplit, tableRowCountOf, } from '../chart/window-geometry.leaf.js';
47
47
  import { wrunLegendName } from '../chart/wrun-legend-name.util.js';
48
48
  import { wrunResultLegendColors, wrunSeriesChildId, } from '../chart/wrun-run-result.util.js';
49
- import { escapeHtml } from '../html-escape.leaf.js';
50
49
  import { budgetWrunBatchedRetained, budgetWrunBatchedRows, commitWrunBatchedPlan, currentWrunBatchedPlan, forgetWrunBatchedCells, isWrunBatchedMarksKind, noteWrunBatchedRowsCut, planWrunBatchedMerged, restoreWrunBatchedLedger, snapshotWrunBatchedLedger, wrunBatchedChargeOf, wrunBatchedChildConfig, wrunBatchedChildrenOverShare, wrunBatchedSiblingsToRebalance, } from './wrun-batched-marks.util.js';
51
50
  import { forgetWrunCanvasReadout, keepWrunHeatmapScaleSample, rememberWrunCanvasReadout, wrunCanvasChildConfig, wrunHeatmapSensitivityBounds, wrunPlainCanvasRow, } from './wrun-canvases.util.js';
52
51
  import { wrunChildHiddenRowKey } from './wrun-child-overlay-id.util.js';
@@ -191,6 +190,40 @@ function syncCanvasReadouts(mounted, built) {
191
190
  forgetWrunCanvasReadout(id);
192
191
  }
193
192
  }
193
+ /** Whether the chart is in focus mode: false for a chart without a canvas (titan's own reader throws there) or one
194
+ * that answers nothing. */
195
+ function isFocusModeOn(tc) {
196
+ if (tc.isDestroyed || !tc.canvasChartController?.focusMode)
197
+ return false;
198
+ try {
199
+ return tc.isFocusModeActive?.() === true;
200
+ }
201
+ catch {
202
+ return false;
203
+ }
204
+ }
205
+ /** The pane a chart holds expanded (titan's focus mode), or null when none is. */
206
+ function focusedPaneOf(tc) {
207
+ return isFocusModeOn(tc) ? (tc.canvasChartController?.focusMode?.focusedGridId ?? null) : null;
208
+ }
209
+ /**
210
+ * Keep the reader's expanded pane through a pass that takes children off the chart: titan's removeOverlay ends focus
211
+ * mode whatever pane it removes, so the pane the chart held before the pass is entered again after it, when it is
212
+ * still mounted and the focus is off. A pane the pass took away stays exited (there is nothing to expand). Runs on
213
+ * every pass that retires or rebuilds a child: a later run, the retranslate, an unmount that leaves the chart.
214
+ */
215
+ function keepFocusedPane(tc, pass) {
216
+ const focused = focusedPaneOf(tc);
217
+ try {
218
+ return pass();
219
+ }
220
+ finally {
221
+ if (focused !== null && !tc.isDestroyed && !isFocusModeOn(tc)) {
222
+ if (focused === 'main' || overlayPresent(tc, focused))
223
+ tc.enterFocusMode?.(focused);
224
+ }
225
+ }
226
+ }
194
227
  /** Remove a child from the chart; its registrations go with it unless the
195
228
  * same id is about to be mounted again (a replaced child keeps the rows and
196
229
  * readout its new config already registered). */
@@ -251,7 +284,7 @@ function userThemeMode() {
251
284
  }
252
285
  /** A panel child's config (g1): the frame translated with the chart's
253
286
  * theme, price digits and display timezone (SC08 SC16 SC37); the run's
254
- * title and caption on the legend through escapeHtml (SC17); the maximize
287
+ * title and caption on the legend as text (SC17: titan renders both as text); the maximize
255
288
  * button and stats row (SC10); the declared height share (SC09); every
256
289
  * panel below the chart at its carved height, `place: "side"` included (a
257
290
  * side panel's right-side home is the window, never a strip that narrows
@@ -274,7 +307,7 @@ function panelChildConfig(child, ctx) {
274
307
  const ownAxis = panel.kind === 'table' || (panel.kind === 'line' && wrunPanelChrome(panel) !== 'box');
275
308
  return {
276
309
  id,
277
- name: escapeHtml(translated.name),
310
+ name: translated.name,
278
311
  plot: translated.plot,
279
312
  type: 'offchart',
280
313
  interval: ctx.interval,
@@ -293,7 +326,7 @@ function panelChildConfig(child, ctx) {
293
326
  ...(panel.maximize === true ? { showMaximizeBtn: true } : {}),
294
327
  ...(panel.stats_row === true ? { showStatsRow: true } : {}),
295
328
  // The function form skips the engine's $token expansion of a title.
296
- ...(caption !== undefined ? { customTitle: () => ` · ${escapeHtml(caption)}` } : {}),
329
+ ...(caption !== undefined ? { customTitle: () => ` · ${caption}` } : {}),
297
330
  // A pane below the chart takes the declared share, else the table's row
298
331
  // height or the shared weight; on a window the plan's weight.
299
332
  gridHeight: ctx.planned?.get(id) ?? panelGridHeight(panel, rows.length, ctx.chartHeightPx),
@@ -664,17 +697,20 @@ function integrateSeriesChild(tc, childId, result, mode, projection) {
664
697
  }
665
698
  /** The same pane, the shared rule (om-panel.util), for a panel and for the
666
699
  * series child alike: side, species, axis ownership, chrome and the carved
667
- * height the child was mounted with. On a window the height is the plan's
668
- * and moves in place (reconcileWindowOwnerGeometry at the end of the
669
- * mount), so only the other fields decide there: a plan that shifts when a
670
- * sibling arrives never re-mounts the panes that stay. */
671
- function samePane(mounted, next, windowCell = false) {
700
+ * height the child was mounted with. When the height is not the mount's to
701
+ * carve (`heightHeld`) only the other fields decide: on a window the height
702
+ * is the plan's and moves in place (reconcileWindowOwnerGeometry at the end
703
+ * of the mount), so a plan that shifts when a sibling arrives never re-mounts
704
+ * the panes that stay; a child a host's plan names on a normal cell holds the
705
+ * height its reader dragged (WrunMountCell.planned), which the engine pane
706
+ * already has, so a moved remembered height never re-mounts it either. */
707
+ function samePane(mounted, next, heightHeld = false) {
672
708
  if (mounted.type !== next.type)
673
709
  return false;
674
710
  const shape = (config) => ({
675
711
  plot: config.plot,
676
712
  hidePriceScale: config.hidePriceScale,
677
- gridHeight: windowCell ? 0 : Number(config.settings.gridHeight ?? CHILD_PANE_GRID_HEIGHT),
713
+ gridHeight: heightHeld ? 0 : Number(config.settings.gridHeight ?? CHILD_PANE_GRID_HEIGHT),
678
714
  ...(typeof config.settings.chromeStyle === 'string' ? { chromeStyle: config.settings.chromeStyle } : {}),
679
715
  });
680
716
  return samePanelPane(shape(mounted), shape(next));
@@ -1672,9 +1708,10 @@ export function mountWrunChildOverlays({ tc, overlayId, runResult, replaceFrames
1672
1708
  // a flagged owner never enters that path: its configs are today's.
1673
1709
  const windowCell = cell?.window ?? isWrunWindowOwner(parent);
1674
1710
  current.chartHeightPx = cell?.canvasHeightPx ?? tc.canvasChartController?.canvasElement?.clientHeight;
1675
- let planned;
1711
+ // The host's plan sizes the children on any cell (a normal cell's remembered heights included); a window without
1712
+ // one plans its own.
1713
+ let planned = cell?.planned;
1676
1714
  if (windowCell) {
1677
- planned = cell?.planned;
1678
1715
  if (!planned) {
1679
1716
  const panes = windowPanesOfMount(parent, overlayId, children, replaceFrames ? [] : [...current.children.values()].map((mounted) => mounted.config));
1680
1717
  // The reader's saved split (the parent's settings carry it,
@@ -1811,7 +1848,9 @@ export function mountWrunChildOverlays({ tc, overlayId, runResult, replaceFrames
1811
1848
  switch (mounted.input.kind) {
1812
1849
  case 'series':
1813
1850
  case 'panel':
1814
- return samePane(mounted.config, next.config, windowCell) ? [[id, mounted]] : [];
1851
+ return samePane(mounted.config, next.config, windowCell || planned?.has(id) === true)
1852
+ ? [[id, mounted]]
1853
+ : [];
1815
1854
  case 'heatmap':
1816
1855
  case 'profile':
1817
1856
  case 'marks':
@@ -2020,7 +2059,8 @@ export function mountWrunChildOverlays({ tc, overlayId, runResult, replaceFrames
2020
2059
  return false;
2021
2060
  const applyingSince = mountClockMs();
2022
2061
  try {
2023
- return applyChildren(packs);
2062
+ // A child this pass retires (removeOverlay) must not end the reader's expanded pane.
2063
+ return keepFocusedPane(tc, () => applyChildren(packs));
2024
2064
  }
2025
2065
  finally {
2026
2066
  // Stopped here, before this mount settles: a sibling mount that waited on the same packs
@@ -2075,15 +2115,60 @@ async function wrunMountParentPaused(chartIndex, overlayId) {
2075
2115
  function mountClockMs() {
2076
2116
  return typeof performance !== 'undefined' ? performance.now() : Date.now();
2077
2117
  }
2118
+ /**
2119
+ * A retranslated child refreshed on the overlay it has, by the rule a run keeps a child by (the same pane, canvas,
2120
+ * strip or docked surface, read with the run's own helpers, so the run and the retranslate never disagree on what
2121
+ * "unchanged" is): a panel through the shared panel refresh, a docked levels child, matrix or inset through the frame
2122
+ * refresh (its settings through the engine's settings door, then its rows through its row swap), a heatmap, profile
2123
+ * or batched canvas through the canvas refresh (budgeted as the rebuild was: the record's rows, no growth). False
2124
+ * when it cannot stay (another surface, an engine without the doors, the series child the adapter reguards): the
2125
+ * caller rebuilds it.
2126
+ */
2127
+ function refreshRetranslatedChild(tc, mounted, next, ctx, heightHeld) {
2128
+ const kind = mounted.input.kind;
2129
+ if (kind === 'panel') {
2130
+ if (!samePane(mounted.config, next.config, heightHeld))
2131
+ return false;
2132
+ refreshPanelChild(tc, mounted.config, next.config);
2133
+ return true;
2134
+ }
2135
+ if (kind === 'levels' || kind === 'matrix' || kind === 'inset') {
2136
+ // Signed as a run signs its frame configs before the engine sees them (sameFrameSignature).
2137
+ frameSignatures.set(next.config, sameFrameSignature(next.config));
2138
+ if (kind === 'levels')
2139
+ return refreshLevelsChild(tc, mounted, next, ctx.theme);
2140
+ if (kind === 'matrix')
2141
+ return refreshMatrixChild(tc, mounted, next);
2142
+ if (!sameInset(mounted.config, next.config))
2143
+ return false;
2144
+ if (!refreshInsetChild(tc, mounted, next))
2145
+ refreshChildInPlace(tc, mounted.config, next.config);
2146
+ return true;
2147
+ }
2148
+ if ((kind === 'heatmap' || kind === 'profile' || isBatchedChild(mounted.input)) &&
2149
+ overlayPresent(tc, next.config.id)) {
2150
+ if (!sameCanvas(mounted.config, next.config))
2151
+ return false;
2152
+ budgetHeatmapChild(tc, ctx.overlayId, next, 'rebuild');
2153
+ budgetBatchedChild(tc, ctx.overlayId, next, 'rebuild');
2154
+ refreshChildInPlace(tc, mounted.config, next.config);
2155
+ return true;
2156
+ }
2157
+ return false;
2158
+ }
2078
2159
  /** Re-resolve every mounted child of every Indicator on the chart against
2079
2160
  * the chart's current palette, theme name and display timezone, without a
2080
- * rerun (X13; hosted runs follow too): a panel takes its retranslated rows
2081
- * and settings in place (its pane keeps its place in the stack and the
2082
- * height the run carved it at), a levels, inset or canvas child is rebuilt
2161
+ * rerun (X13; hosted runs follow too). A child that stays the child it was
2162
+ * (the run's own keep rule: the same pane, canvas, strip or docked surface)
2163
+ * is refreshed in place on the overlay it has (refreshRetranslatedChild:
2164
+ * its settings, then its rows), so it keeps its place in the stack, its
2165
+ * height, its legend row and the reader's expanded pane; only a child that
2166
+ * cannot stay (another surface, an engine without the doors) is rebuilt
2083
2167
  * from its unresolved input under the same id, in the chart's own order so
2084
- * the rebuilt ones keep their stacking. The series child's colours ride
2085
- * the adapter's own theme reguard. Called by the theme rerun when a packed
2086
- * colour moved and by the timezone sync per chart. */
2168
+ * the rebuilt ones keep their stacking, with the reader's expanded pane
2169
+ * kept around the rebuild (keepFocusedPane). The series child's colours
2170
+ * ride the adapter's own theme reguard. Called by the theme rerun when a
2171
+ * packed colour moved and by the timezone sync per chart. */
2087
2172
  export function retranslateWrunChildOverlays(tc) {
2088
2173
  const owners = chartChildren.get(tc);
2089
2174
  if (!owners || tc.isDestroyed)
@@ -2104,25 +2189,29 @@ export function retranslateWrunChildOverlays(tc) {
2104
2189
  }
2105
2190
  let moved = false;
2106
2191
  const rebuilt = new Map();
2107
- for (const { id } of [...tc.metadata]) {
2108
- const owner = ownerOf.get(id);
2109
- const mounted = owner?.state.children.get(id);
2110
- if (owner === undefined || mounted === undefined)
2111
- continue;
2112
- const next = { input: mounted.input, config: childConfig(mounted.input, owner.ctx) };
2113
- if (mounted.input.kind === 'panel' && samePane(mounted.config, next.config, owner.state.windowCell ?? false)) {
2114
- refreshPanelChild(tc, mounted.config, next.config);
2115
- }
2116
- else {
2117
- removeChild(tc, id);
2118
- budgetHeatmapChild(tc, owner.ctx.overlayId, next, 'rebuild');
2119
- budgetBatchedChild(tc, owner.ctx.overlayId, next, 'rebuild');
2120
- installChild(tc, next, owner.ctx.theme);
2121
- rebuilt.set(owner.state, [...(rebuilt.get(owner.state) ?? []), id]);
2192
+ const refreshed = new Set();
2193
+ keepFocusedPane(tc, () => {
2194
+ for (const { id } of [...tc.metadata]) {
2195
+ const owner = ownerOf.get(id);
2196
+ const mounted = owner?.state.children.get(id);
2197
+ if (owner === undefined || mounted === undefined)
2198
+ continue;
2199
+ const next = { input: mounted.input, config: childConfig(mounted.input, owner.ctx) };
2200
+ const heightHeld = (owner.state.windowCell ?? false) || owner.state.planned?.has(id) === true;
2201
+ if (refreshRetranslatedChild(tc, mounted, next, owner.ctx, heightHeld)) {
2202
+ refreshed.add(owner.state);
2203
+ }
2204
+ else {
2205
+ removeChild(tc, id);
2206
+ budgetHeatmapChild(tc, owner.ctx.overlayId, next, 'rebuild');
2207
+ budgetBatchedChild(tc, owner.ctx.overlayId, next, 'rebuild');
2208
+ installChild(tc, next, owner.ctx.theme);
2209
+ rebuilt.set(owner.state, [...(rebuilt.get(owner.state) ?? []), id]);
2210
+ }
2211
+ owner.state.children.set(id, next);
2212
+ moved = true;
2122
2213
  }
2123
- owner.state.children.set(id, next);
2124
- moved = true;
2125
- }
2214
+ });
2126
2215
  if (!moved)
2127
2216
  return;
2128
2217
  // A rebuilt child comes back through addOverlay visible: it takes its
@@ -2131,13 +2220,15 @@ export function retranslateWrunChildOverlays(tc) {
2131
2220
  // It also comes back with its own opacity and painting: a paused
2132
2221
  // Indicator's rebuilt heatmaps take the pause dim again, and a paint-cost
2133
2222
  // pause's suspension reaches its rebuilt canvases (once per owner, after
2134
- // its rebuild).
2223
+ // its rebuild). A child refreshed in place keeps its overlay, its eye and
2224
+ // its painting, but its settings took the retranslated opacity: the pause
2225
+ // dim goes on again (it writes only what moved).
2135
2226
  for (const { state, ctx } of new Set(ownerOf.values())) {
2136
2227
  syncChildVisibility(tc, state.parent, state, rebuilt.get(state) ?? []);
2137
- if (rebuilt.has(state)) {
2228
+ if (rebuilt.has(state) || refreshed.has(state))
2138
2229
  reapplyWrunPauseDim(tc, ctx.overlayId);
2230
+ if (rebuilt.has(state))
2139
2231
  wrunChartHostEnv().chart.reapplyPausedOverlayPaint(tc, ctx.overlayId);
2140
- }
2141
2232
  }
2142
2233
  tc.processData?.();
2143
2234
  tc.renderService?.renderOnce?.();
@@ -2242,8 +2333,12 @@ export function unmountWrunChildOverlays(tc, overlayId) {
2242
2333
  owners?.delete(overlayId);
2243
2334
  state.token = Symbol(overlayId);
2244
2335
  state.unsubscribe?.();
2245
- for (const [id, mounted] of state.children)
2246
- retireChild(tc, id, mounted.input.kind, false);
2336
+ // The children leave; a pane the reader expanded elsewhere stays expanded (a removal of the parent itself ended
2337
+ // focus before this runs, so nothing is entered again then).
2338
+ keepFocusedPane(tc, () => {
2339
+ for (const [id, mounted] of state.children)
2340
+ retireChild(tc, id, mounted.input.kind, false);
2341
+ });
2247
2342
  state.children.clear();
2248
2343
  }
2249
2344
  // The boot graph's door (wrun-panel-mount.lazy.ts): bound as this module evaluates, since it owns
@@ -74,6 +74,25 @@ export type WrunHostedParams = Record<string, number | string>;
74
74
  * for a value the user cannot see. The arm identity stays consistent: the
75
75
  * alerts engine mints over the string it receives. */
76
76
  export declare function wrunHostedTextValue(param: Pick<WrunMetadataParam, 'text_default' | 'max_bytes' | 'multiline'>, raw: unknown): string;
77
+ /**
78
+ * The hosted lanes' ONE host-fill table: each `host_fill` word, the chart context key it packs from (paramRunValue's
79
+ * reads) and the hidden param the kit generates for it (`market.<word>()` declares `market_<word>`, `chart.<word>()`
80
+ * `chart_<word>`; the extractor refuses any other param under those names), in the kit's order: the market's tick
81
+ * size and decimals, the chart's interval seconds and five colours (the candle and grid colours since WRUN-STYLE
82
+ * TH-candle-colors), the market's five facts (WRUN-GAPS-1005, WRUN-SESSION), the issuer's three earnings facts and the
83
+ * option multiplier of the chart's options chain. Every hosted path reads it: the settings
84
+ * record's `hostFill` (wrunHostedHostFill), the declaration rebuild (WRUN_HOST_FILL_BY_GENERATED_NAME) and the kScript
85
+ * socket worker's read of the main thread's context (WRUN_HOST_FILL_CONTEXT_KEYS), so no hosted path drops a word
86
+ * another carries; wrun-param-values.util.spec holds the table to every word the kit's browser lane fills.
87
+ */
88
+ export declare const WRUN_HOST_FILL_WORDS: readonly [readonly ["tick_size", "tickSize", "market_tick_size"], readonly ["price_precision", "pricePrecision", "market_price_precision"], readonly ["interval_sec", "intervalSec", "chart_interval_sec"], readonly ["bg_color", "bgColor", "chart_bg_color"], readonly ["fg_color", "fgColor", "chart_fg_color"], readonly ["up_color", "upColor", "chart_up_color"], readonly ["down_color", "downColor", "chart_down_color"], readonly ["grid_color", "gridColor", "chart_grid_color"], readonly ["kind", "kind", "market_kind"], readonly ["point_value", "pointValue", "market_point_value"], readonly ["zone", "zone", "market_zone"], readonly ["quote_is_usd", "quoteIsUsd", "market_quote_is_usd"], readonly ["session_open", "sessionOpen", "market_session_open"], readonly ["earnings_next_ms", "earningsNextMs", "market_earnings_next_ms"], readonly ["earnings_prev_ms", "earningsPrevMs", "market_earnings_prev_ms"], readonly ["earnings_session", "earningsSession", "market_earnings_session"], readonly ["option_multiplier", "optionMultiplier", "market_option_multiplier"]];
89
+ /** The host-filled params by the names the kit generates for them (WRUN_HOST_FILL_WORDS). A declaration row carries
90
+ * no `host_fill` word, so the rebuild recovers it here: without it the host context could not fill the param and a
91
+ * hosted lane would evaluate the declared 0 (unavailable). */
92
+ export declare const WRUN_HOST_FILL_BY_GENERATED_NAME: ReadonlyMap<string, WrunParamHostFill>;
93
+ /** The chart context keys the kScript socket worker reads off the `wrunHostFill` the main thread puts beside a hosted
94
+ * overlay's settings (finite numbers only), one per host-fill word (WRUN_HOST_FILL_WORDS). */
95
+ export declare const WRUN_HOST_FILL_CONTEXT_KEYS: ReadonlyArray<keyof WrunHostFillContext>;
77
96
  /**
78
97
  * A sheet's `params` slice rebuilt from an overlay's declared inputs
79
98
  * (`settings.scriptInputs`, buildWrunScriptInputs' flat list): the lane
@@ -161,10 +180,6 @@ export declare function wrunHostedSettingsPatch(held: unknown, asked: unknown):
161
180
  * context by the kit's host-fill word, the record the SDK's resolver fills `host_fill` params from
162
181
  * (its `hostFills`). */
163
182
  export type WrunHostedHostFill = Partial<Record<WrunParamHostFill, number>>;
164
- /** Each host-fill word and the chart context key it packs from (paramRunValue's reads), in the kit's
165
- * order: the market's tick size and decimals, the chart's interval seconds and five colours, the
166
- * market's five facts. */
167
- export declare const WRUN_HOST_FILL_WORDS: readonly [readonly ["tick_size", "tickSize"], readonly ["price_precision", "pricePrecision"], readonly ["interval_sec", "intervalSec"], readonly ["bg_color", "bgColor"], readonly ["fg_color", "fgColor"], readonly ["up_color", "upColor"], readonly ["down_color", "downColor"], readonly ["grid_color", "gridColor"], readonly ["kind", "kind"], readonly ["point_value", "pointValue"], readonly ["zone", "zone"], readonly ["quote_is_usd", "quoteIsUsd"], readonly ["session_open", "sessionOpen"]];
168
183
  /** The host fills of a chart context (`wrunHostFill`, the pane's market and chart words, packed the
169
184
  * way the browser run fills them) by host-fill word: finite numbers only, in the kit's order; none
170
185
  * (undefined) for no context or a context holding none. */
@@ -97,34 +97,45 @@ function wrunHostedSymbolValue(param, settings) {
97
97
  const picked = wrunHostParamSetting(param, settings);
98
98
  return picked?.host === 'symbol' ? picked.text : 0;
99
99
  }
100
- /** The host-filled params by the names the kit generates for them
101
- * (`market.tick_size()` declares `market_tick_size`, `market.price_precision()`
102
- * `market_price_precision`, the market facts `market.kind()` /
103
- * `market.point_value()` / `market.zone()` / `market.quote_is_usd()` the
104
- * `market_<word>` names, `chart.interval_sec()` / `chart.bg_color()` /
105
- * `chart.fg_color()` / `chart.up_color()` / `chart.down_color()` /
106
- * `chart.grid_color()` the `chart_*` names; the extractor refuses any other
107
- * param under those names). A declaration row carries no `host_fill` word, so
108
- * the rebuild recovers it here: without it the host context could not fill
109
- * the param and a hosted lane would evaluate the declared 0 (unavailable). */
110
- const HOST_FILL_BY_GENERATED_NAME = {
111
- market_tick_size: 'tick_size',
112
- market_price_precision: 'price_precision',
113
- // WRUN-GAPS-1005: the market's facts (the chart's codes, wrun-chart-market-facts.util).
114
- market_kind: 'kind',
115
- market_point_value: 'point_value',
116
- market_zone: 'zone',
117
- market_quote_is_usd: 'quote_is_usd',
118
- market_session_open: 'session_open',
119
- chart_interval_sec: 'interval_sec',
120
- chart_bg_color: 'bg_color',
121
- chart_fg_color: 'fg_color',
122
- // WRUN-STYLE TH-candle-colors: the chart's candle and grid colours, read
123
- // once at createScript like bg / fg.
124
- chart_up_color: 'up_color',
125
- chart_down_color: 'down_color',
126
- chart_grid_color: 'grid_color',
127
- };
100
+ /**
101
+ * The hosted lanes' ONE host-fill table: each `host_fill` word, the chart context key it packs from (paramRunValue's
102
+ * reads) and the hidden param the kit generates for it (`market.<word>()` declares `market_<word>`, `chart.<word>()`
103
+ * `chart_<word>`; the extractor refuses any other param under those names), in the kit's order: the market's tick
104
+ * size and decimals, the chart's interval seconds and five colours (the candle and grid colours since WRUN-STYLE
105
+ * TH-candle-colors), the market's five facts (WRUN-GAPS-1005, WRUN-SESSION), the issuer's three earnings facts and the
106
+ * option multiplier of the chart's options chain. Every hosted path reads it: the settings
107
+ * record's `hostFill` (wrunHostedHostFill), the declaration rebuild (WRUN_HOST_FILL_BY_GENERATED_NAME) and the kScript
108
+ * socket worker's read of the main thread's context (WRUN_HOST_FILL_CONTEXT_KEYS), so no hosted path drops a word
109
+ * another carries; wrun-param-values.util.spec holds the table to every word the kit's browser lane fills.
110
+ */
111
+ export const WRUN_HOST_FILL_WORDS = [
112
+ ['tick_size', 'tickSize', 'market_tick_size'],
113
+ ['price_precision', 'pricePrecision', 'market_price_precision'],
114
+ ['interval_sec', 'intervalSec', 'chart_interval_sec'],
115
+ ['bg_color', 'bgColor', 'chart_bg_color'],
116
+ ['fg_color', 'fgColor', 'chart_fg_color'],
117
+ ['up_color', 'upColor', 'chart_up_color'],
118
+ ['down_color', 'downColor', 'chart_down_color'],
119
+ ['grid_color', 'gridColor', 'chart_grid_color'],
120
+ ['kind', 'kind', 'market_kind'],
121
+ ['point_value', 'pointValue', 'market_point_value'],
122
+ ['zone', 'zone', 'market_zone'],
123
+ ['quote_is_usd', 'quoteIsUsd', 'market_quote_is_usd'],
124
+ ['session_open', 'sessionOpen', 'market_session_open'],
125
+ // The issuer's earnings facts (UW-PARITY S8): they ride whenever the context carries them.
126
+ ['earnings_next_ms', 'earningsNextMs', 'market_earnings_next_ms'],
127
+ ['earnings_prev_ms', 'earningsPrevMs', 'market_earnings_prev_ms'],
128
+ ['earnings_session', 'earningsSession', 'market_earnings_session'],
129
+ // The option multiplier of the chart's options chain (kit 0.87.0, wrun-chart-market-facts.util).
130
+ ['option_multiplier', 'optionMultiplier', 'market_option_multiplier'],
131
+ ];
132
+ /** The host-filled params by the names the kit generates for them (WRUN_HOST_FILL_WORDS). A declaration row carries
133
+ * no `host_fill` word, so the rebuild recovers it here: without it the host context could not fill the param and a
134
+ * hosted lane would evaluate the declared 0 (unavailable). */
135
+ export const WRUN_HOST_FILL_BY_GENERATED_NAME = new Map(WRUN_HOST_FILL_WORDS.map(([word, , name]) => [name, word]));
136
+ /** The chart context keys the kScript socket worker reads off the `wrunHostFill` the main thread puts beside a hosted
137
+ * overlay's settings (finite numbers only), one per host-fill word (WRUN_HOST_FILL_WORDS). */
138
+ export const WRUN_HOST_FILL_CONTEXT_KEYS = WRUN_HOST_FILL_WORDS.map(([, key]) => key);
128
139
  /** A declaration's default as the sheet number: a toggle 1/0, a colour its
129
140
  * packed number, a symbol or a text 0 (the module's slot), anything else
130
141
  * Number(). */
@@ -203,7 +214,7 @@ export function wrunSheetParamsFromDeclarations(declarations) {
203
214
  const labels = Array.isArray(row.optionLabels) && row.optionLabels.every((label) => typeof label === 'string')
204
215
  ? row.optionLabels
205
216
  : undefined;
206
- const hostFill = HOST_FILL_BY_GENERATED_NAME[row.name];
217
+ const hostFill = WRUN_HOST_FILL_BY_GENERATED_NAME.get(row.name);
207
218
  const symbolDefault = type === 'symbol' && typeof row.defaultValue === 'string' && row.defaultValue.trim() !== ''
208
219
  ? row.defaultValue
209
220
  : undefined;
@@ -375,24 +386,6 @@ export function wrunHostedSettingsPatch(held, asked) {
375
386
  }
376
387
  return patch;
377
388
  }
378
- /** Each host-fill word and the chart context key it packs from (paramRunValue's reads), in the kit's
379
- * order: the market's tick size and decimals, the chart's interval seconds and five colours, the
380
- * market's five facts. */
381
- export const WRUN_HOST_FILL_WORDS = [
382
- ['tick_size', 'tickSize'],
383
- ['price_precision', 'pricePrecision'],
384
- ['interval_sec', 'intervalSec'],
385
- ['bg_color', 'bgColor'],
386
- ['fg_color', 'fgColor'],
387
- ['up_color', 'upColor'],
388
- ['down_color', 'downColor'],
389
- ['grid_color', 'gridColor'],
390
- ['kind', 'kind'],
391
- ['point_value', 'pointValue'],
392
- ['zone', 'zone'],
393
- ['quote_is_usd', 'quoteIsUsd'],
394
- ['session_open', 'sessionOpen'],
395
- ];
396
389
  /** The host fills of a chart context (`wrunHostFill`, the pane's market and chart words, packed the
397
390
  * way the browser run fills them) by host-fill word: finite numbers only, in the kit's order; none
398
391
  * (undefined) for no context or a context holding none. */
@@ -8,9 +8,9 @@ import type { WrunIndicatorMetadata, WrunMetadataParam } from '../../interfaces/
8
8
  /** What the host fills into `host_fill` params at run time: the chart
9
9
  * market's tick size and price precision, the chart's bar interval in
10
10
  * seconds, its background / text / candle up / candle down / grid colour as
11
- * the kit's packed signed i32 (wrun-chart-context.util), and the market's
12
- * five facts as their codes (wrun-chart-market-facts.util); absent = the
13
- * declared default (0, unknown). */
11
+ * the kit's packed signed i32 (wrun-chart-context.util), the market's
12
+ * five facts as their codes and the option multiplier of its options chain
13
+ * (wrun-chart-market-facts.util); absent = the declared default (0, unknown). */
14
14
  export interface WrunHostFillContext {
15
15
  tickSize?: number;
16
16
  pricePrecision?: number;
@@ -42,6 +42,12 @@ export interface WrunHostFillContext {
42
42
  earningsNextMs?: number;
43
43
  earningsPrevMs?: number;
44
44
  earningsSession?: number;
45
+ /** `market.option_multiplier()` (kit 0.87.0, om WRUN_OPTION_FACT_FILLS): the
46
+ * US dollars one price unit times one size unit of an option on the
47
+ * chart's options chain is worth, 100 on OPRA, the root's point value on
48
+ * CME, 1 on a crypto chart (wrunChartOptionMultiplier); 0 where the chart
49
+ * has no options family, which a package reads as unknown (no premium). */
50
+ optionMultiplier?: number;
45
51
  }
46
52
  export declare function nonEmptyString(value: unknown): string | undefined;
47
53
  export declare function finiteNumber(value: unknown): number | undefined;
@@ -129,14 +129,14 @@ function paramRunValue(param, flat, host) {
129
129
  return finiteOr(finiteNumber(host?.quoteIsUsd), fallback);
130
130
  if (param.host_fill === 'session_open')
131
131
  return finiteOr(finiteNumber(host?.sessionOpen), fallback);
132
- // The earnings words (om WRUN_EARNINGS_FACT_FILLS), read before the kit pin names them.
133
- const fill = param.host_fill;
134
- if (fill === 'earnings_next_ms')
132
+ if (param.host_fill === 'earnings_next_ms')
135
133
  return finiteOr(finiteNumber(host?.earningsNextMs), fallback);
136
- if (fill === 'earnings_prev_ms')
134
+ if (param.host_fill === 'earnings_prev_ms')
137
135
  return finiteOr(finiteNumber(host?.earningsPrevMs), fallback);
138
- if (fill === 'earnings_session')
136
+ if (param.host_fill === 'earnings_session')
139
137
  return finiteOr(finiteNumber(host?.earningsSession), fallback);
138
+ if (param.host_fill === 'option_multiplier')
139
+ return finiteOr(finiteNumber(host?.optionMultiplier), fallback);
140
140
  const raw = flat?.[param.name];
141
141
  switch (param.type) {
142
142
  case 'symbol':