@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,74 @@
1
+ /**
2
+ * OPRA's venue card (US equity and index options): the frontend descriptor of the OPRA deal
3
+ * (docs/features/market-data/plane.md). The OPRA interface's constants are re-exports of these values
4
+ * (interfaces/opra-realtime.interface.ts), so every OPRA surface reads this one card. Pinned against the backend's
5
+ * contract export (`opra.contract.copy.json` beside this file, a byte copy of orange's opra.contract.json) and the
6
+ * gate's release mirror (`gate-mirror.copy.yaml` beside the spec) by
7
+ * tests/packages/wrun-chart-host/market-data/venues/opra.contract.spec.ts.
8
+ */
9
+ import { FeatureFlag } from '../../constants/feature-flags.constants.js';
10
+ export const OPRA_VENUE = {
11
+ key: 'opra',
12
+ displayName: 'OPRA',
13
+ productGroups: ['OPRA'],
14
+ basePath: '/opra',
15
+ // The one plan: real-time top of book, billed monthly, for non-professional subscribers only.
16
+ products: [{ name: 'opra_rt_1m', plan: 'p1', classifications: ['non_professional'], interval: '1m', priceUsd: 4.95 }],
17
+ planCard: { name: 'OPRA real-time', level: 'TOP OF BOOK', market: 'OPRA', region: '🇺🇸 USA' },
18
+ paymentItemPrefix: 'opra_',
19
+ professionalPolicy: 'refuse',
20
+ internalRolePolicy: 'refuse',
21
+ payFirst: true,
22
+ questionnaire: {
23
+ // v2 asks questions 3 to 5 as one group and adds the subscriber's country and address. Bump on any change to the
24
+ // question set, its order, its grouping or its wording (src/components/dialogs/market-data/questionnaires/opra.ts).
25
+ formVersion: 'opra-v2',
26
+ questions: [
27
+ { id: 'natural_person', qualifying: true },
28
+ { id: 'personal_use_only', qualifying: true },
29
+ { id: 'securities_registered', qualifying: false },
30
+ { id: 'investment_adviser', qualifying: false },
31
+ { id: 'exempt_institution_role', qualifying: false },
32
+ ],
33
+ groups: [
34
+ {
35
+ id: 'professional-group',
36
+ questions: ['securities_registered', 'investment_adviser', 'exempt_institution_role'],
37
+ },
38
+ ],
39
+ identityFields: ['legalName', 'employer', 'occupation', 'country', 'address'],
40
+ identityLimits: { legalName: 200, employer: 200, occupation: 200, country: 2, address: 300 },
41
+ validityDays: 365,
42
+ renewalWindowDays: 30,
43
+ },
44
+ // RELEASE BLOCKER (named, do not bury): the agreement text, its version id and the link need the compliance
45
+ // sign-off before the `opra` flag is lit.
46
+ agreement: { version: 'opra-subscriber-2026-10', url: 'https://www.opraplan.com/', delayedRequiresAcceptance: false },
47
+ // OPRA defines delayed data as at least 15 minutes old; the gate's delayed window matches (900 s).
48
+ delayMinutes: 15,
49
+ // The Vendor Agreement's exact phrase (Exhibit A section 14): OPRA_DELAY_NOTICE in
50
+ // src/constants/opra-compliance.constants.ts.
51
+ disclosure: { kind: 'verbatim' },
52
+ flagKey: FeatureFlag.Opra,
53
+ i18nNamespace: 'opraRealtimeData',
54
+ storeId: 'opraRealtime',
55
+ surfaces: [
56
+ 'chain-page-subtitle',
57
+ 'chain-price-pill',
58
+ 'chain-table-marker',
59
+ 'chain-strike-preview',
60
+ 'chain-index-notice',
61
+ 'flow-tape',
62
+ 'terminal-options-tab',
63
+ 'options-overlay-legends',
64
+ 'indicator-legend-notes',
65
+ 'contract-chart-delay-chip',
66
+ 'contract-chart-delay-card',
67
+ 'chart-source-line',
68
+ 'watchlist-panel',
69
+ 'watchlist-cell-tooltip',
70
+ 'board',
71
+ 'purchase-live-price',
72
+ ],
73
+ contractRevision: '2026-10-20.1',
74
+ };
@@ -0,0 +1,31 @@
1
+ export interface ReplayIndicatorRowLane {
2
+ buffer: ReadonlyArray<ReadonlyArray<unknown>>;
3
+ bufTs: ReadonlyArray<number>;
4
+ /** Gap cell for an array field, when the consumer needs its own absent
5
+ * shape (the CVD walk reads `[buy, sell, cum]` cells and a bare `[]` NaNs
6
+ * every later cumulative bar). Default: an empty array. */
7
+ gapArrayCell?: (source: ReadonlyArray<unknown>) => unknown[];
8
+ }
9
+ /** kScript side-output plot types, lowercased: tables, stats rows, block
10
+ * displays and mini-chart grids. */
11
+ export declare const REPLAY_SIDE_OUTPUT_PLOT_TYPES: ReadonlySet<string>;
12
+ /** A nested plot (`plotType`, else `plot`; the engine's camelCase names
13
+ * compare lowercased) of the side-output family. */
14
+ export declare const isReplaySideOutputPlot: (plot: {
15
+ plotType?: unknown;
16
+ plot?: unknown;
17
+ } | null | undefined) => boolean;
18
+ /** A row stamped with a bar time: a finite number in slot 0. The engine's
19
+ * singleton side-output row `[null, payload]` is not (Number(null) is 0). */
20
+ export declare const replayRowHasTs: (row: unknown) => boolean;
21
+ export declare const replayIndicatorBufferIndexForTs: (bufTs: ReadonlyArray<number>, ts: number) => number;
22
+ /**
23
+ * Whether sorted rows (the engine's main series) hold a row stamped `ts`. The
24
+ * replay indicator lanes ask this for the playhead's bucket every tick, which
25
+ * is nearly always the tail: read the tail, then binary-search the rest
26
+ * instead of scanning every revealed bar.
27
+ */
28
+ export declare const sortedReplayRowsHaveTs: (rows: ReadonlyArray<ReadonlyArray<unknown> | undefined>, ts: number) => boolean;
29
+ export declare const mergeRowsByTs: <T extends ReadonlyArray<unknown>>(base: readonly T[], incoming: readonly T[]) => T[];
30
+ /** Buffer row as-of ts, restamped onto the main row's timestamp. */
31
+ export declare const rowForReplayIndicator: (lane: ReplayIndicatorRowLane, ts: number, maxStaleMs?: number) => unknown[];
@@ -0,0 +1,117 @@
1
+ /** kScript side-output plot types, lowercased: tables, stats rows, block
2
+ * displays and mini-chart grids. */
3
+ export const REPLAY_SIDE_OUTPUT_PLOT_TYPES = new Set([
4
+ 'table',
5
+ 'statsrow',
6
+ 'blockdisplay',
7
+ 'viewportminichartgrid',
8
+ ]);
9
+ /** A nested plot (`plotType`, else `plot`; the engine's camelCase names
10
+ * compare lowercased) of the side-output family. */
11
+ export const isReplaySideOutputPlot = (plot) => {
12
+ const plotType = plot?.plotType ?? plot?.plot;
13
+ return typeof plotType === 'string' && REPLAY_SIDE_OUTPUT_PLOT_TYPES.has(plotType.trim().toLowerCase());
14
+ };
15
+ /** A row stamped with a bar time: a finite number in slot 0. The engine's
16
+ * singleton side-output row `[null, payload]` is not (Number(null) is 0). */
17
+ export const replayRowHasTs = (row) => Array.isArray(row) && typeof row[0] === 'number' && Number.isFinite(row[0]);
18
+ const lastIndexLE = (arr, ts) => {
19
+ let lo = 0;
20
+ let hi = arr.length;
21
+ while (lo < hi) {
22
+ const mid = (lo + hi) >>> 1;
23
+ if (arr[mid] <= ts)
24
+ lo = mid + 1;
25
+ else
26
+ hi = mid;
27
+ }
28
+ return lo - 1;
29
+ };
30
+ export const replayIndicatorBufferIndexForTs = (bufTs, ts) => lastIndexLE(bufTs, ts);
31
+ const replayIndicatorBufferIndexAt = (lane, ts) => replayIndicatorBufferIndexForTs(lane.bufTs, ts);
32
+ /**
33
+ * Whether sorted rows (the engine's main series) hold a row stamped `ts`. The
34
+ * replay indicator lanes ask this for the playhead's bucket every tick, which
35
+ * is nearly always the tail: read the tail, then binary-search the rest
36
+ * instead of scanning every revealed bar.
37
+ */
38
+ export const sortedReplayRowsHaveTs = (rows, ts) => {
39
+ const lastIndex = rows.length - 1;
40
+ if (lastIndex < 0)
41
+ return false;
42
+ if (Number(rows[lastIndex]?.[0]) === ts)
43
+ return true;
44
+ let lo = 0;
45
+ let hi = lastIndex;
46
+ while (lo < hi) {
47
+ const mid = (lo + hi) >>> 1;
48
+ if (Number(rows[mid]?.[0]) < ts)
49
+ lo = mid + 1;
50
+ else
51
+ hi = mid;
52
+ }
53
+ return lo < lastIndex && Number(rows[lo]?.[0]) === ts;
54
+ };
55
+ export const mergeRowsByTs = (base, incoming) => {
56
+ const merged = [];
57
+ let baseIndex = 0;
58
+ let incomingIndex = 0;
59
+ const cloneRow = (row) => row.slice();
60
+ while (baseIndex < base.length && incomingIndex < incoming.length) {
61
+ const baseRow = base[baseIndex];
62
+ const incomingRow = incoming[incomingIndex];
63
+ const baseTs = baseRow[0];
64
+ const incomingTs = incomingRow[0];
65
+ if (baseTs < incomingTs) {
66
+ merged.push(cloneRow(baseRow));
67
+ baseIndex += 1;
68
+ }
69
+ else if (incomingTs < baseTs) {
70
+ merged.push(cloneRow(incomingRow));
71
+ incomingIndex += 1;
72
+ }
73
+ else {
74
+ merged.push(cloneRow(incomingRow));
75
+ baseIndex += 1;
76
+ incomingIndex += 1;
77
+ }
78
+ }
79
+ while (baseIndex < base.length) {
80
+ merged.push(cloneRow(base[baseIndex]));
81
+ baseIndex += 1;
82
+ }
83
+ while (incomingIndex < incoming.length) {
84
+ merged.push(cloneRow(incoming[incomingIndex]));
85
+ incomingIndex += 1;
86
+ }
87
+ return merged;
88
+ };
89
+ const gapValueForReplayIndicatorField = (value, gapArrayCell) => {
90
+ if (Array.isArray(value))
91
+ return gapArrayCell ? gapArrayCell(value) : [];
92
+ if (value === null || typeof value === 'object')
93
+ return null;
94
+ return NaN;
95
+ };
96
+ const gapRowForReplayIndicator = (source, ts, gapArrayCell) => {
97
+ if (!source) {
98
+ return [ts];
99
+ }
100
+ const gap = source.slice();
101
+ gap[0] = ts;
102
+ for (let i = 1; i < gap.length; i++) {
103
+ gap[i] = gapValueForReplayIndicatorField(source[i], gapArrayCell);
104
+ }
105
+ return gap;
106
+ };
107
+ /** Buffer row as-of ts, restamped onto the main row's timestamp. */
108
+ export const rowForReplayIndicator = (lane, ts, maxStaleMs = Infinity) => {
109
+ const idx = replayIndicatorBufferIndexAt(lane, ts);
110
+ const src = idx >= 0 ? lane.buffer[idx] : lane.buffer[0];
111
+ if (idx < 0 || ts - lane.bufTs[idx] >= maxStaleMs) {
112
+ return gapRowForReplayIndicator(src, ts, lane.gapArrayCell);
113
+ }
114
+ const row = src.slice();
115
+ row[0] = ts;
116
+ return row;
117
+ };
@@ -0,0 +1,85 @@
1
+ import type { RailTf, ReplayDisplayLane, ReplayLane, ReplayRailDomain, ReplayReachLimitedBy, ReplayResolution, ReplayStepTf } from '../interfaces/replay.interface.js';
2
+ import { type Tier } from '../constants/feature-limits.constants.js';
3
+ export declare function bucketMsForTf(tf: RailTf | ReplayStepTf): number;
4
+ export declare function nearestReplayStepTfForIntervalMs(chartIntervalMs: number): ReplayStepTf;
5
+ export declare function replayChartIntervalBookEdgeSec(chartIntervalMs: number): number;
6
+ /**
7
+ * How far back the chart's own bars are retained, in seconds: the deepest start
8
+ * replay can make on this chart. The main candles always come at the chart
9
+ * interval whatever the replay step, so a coarser step cannot reach past this.
10
+ * Sub-minute charts form on the tick lane; a custom interval's bars come from
11
+ * its standard at or below (the same mapping as the book edge above).
12
+ */
13
+ export declare function replayChartIntervalEdgeSec(chartIntervalMs: number): number;
14
+ export declare function replayResolutionCandidatesForChartInterval(chartIntervalMs: number): ReplayResolution[];
15
+ /**
16
+ * The first offered step at least as coarse as the chart interval, so it plays
17
+ * whole chart bars: the chart's own step when offered (`available` runs fine to
18
+ * coarse). Null when every offered step is finer than the chart interval.
19
+ */
20
+ export declare function firstCoarserAvailableResolution(available: ReplayResolution[], chartIntervalMs: number): ReplayResolution | null;
21
+ export declare function tfLabelForMs(ms: number): string;
22
+ export declare function railTfAtLeastMs(ms: number): RailTf;
23
+ export declare function coarseRailTfForAge(ageSec: number, userIntervalMs: number): RailTf;
24
+ export declare function replayResolutionStepMs(resolution: ReplayResolution): number;
25
+ export declare function replayResolutionFitsChartInterval(resolution: ReplayResolution, chartIntervalMs: number): boolean;
26
+ export declare function replayResolutionBookEdgeSec(resolution: ReplayResolution): number;
27
+ export type ReplayReachIntent = 'anchor' | 'scrub' | 'warmup' | 'forward';
28
+ export interface ReplayReachDecision {
29
+ requestedMs: number;
30
+ targetMs: number;
31
+ wallMs: number;
32
+ clamped: boolean;
33
+ /** True when a plan or gateway wall binds tighter than backend retention. */
34
+ limited: boolean;
35
+ limitedBy: ReplayReachLimitedBy;
36
+ }
37
+ export declare function gatewayTierMaxBars(tier: Tier, resolution: ReplayResolution): number;
38
+ /**
39
+ * Whether upgrading would move a replay reach wall at `resolution`: only a
40
+ * free session is ever sold Plus, and only while Plus reaches deeper, by plan
41
+ * reach or by the gateway bar limit. Free got both on 2026-09-29, so a free
42
+ * wall now explains itself the way a paid one does.
43
+ */
44
+ export declare function replayPlusReachesFurther(tier: Tier, reachBars: number, resolution: ReplayResolution): boolean;
45
+ export declare function gatewayTierReachMs(tier: Tier, resolution: ReplayResolution): number;
46
+ /**
47
+ * Session-bound venues only (callers pass it for isSessionBoundMarketKind
48
+ * exchanges, never for 24/7 venues): re-anchors the plan/gateway BAR-COUNT
49
+ * walls at the newest bar that actually exists instead of wall-clock now.
50
+ * Without it a closure spends the whole reach on closed hours: on a Saturday
51
+ * the free plan's 500 x 1m reach ends Sat 03:40 while every bar in existence
52
+ * is at or before Fri 16:00 CT, so the entire scrubber sits behind the lock
53
+ * shade. Retention stays wall-clock anchored: data ages out by real time
54
+ * regardless of sessions.
55
+ */
56
+ export interface ReplayReachBarAnchor {
57
+ /** Newest REAL bar (last traded bar) of the venue. */
58
+ lastTradedBarMs: number;
59
+ /**
60
+ * Ascending real-row timestamps when the loaded row set is available: the
61
+ * wall then walks back maxBars ACTUAL rows (bar-true) instead of converting
62
+ * the bar entitlement into wall time.
63
+ */
64
+ rowTimestamps?: ArrayLike<number>;
65
+ }
66
+ /** Reach of one resolution option under plan and gateway walls, in ms. */
67
+ export declare function replayResolutionTierReachMs(resolution: ReplayResolution, maxBars: number, tier: Tier, chartIntervalMs?: number): number;
68
+ export declare function replayReachWallMs(domain: {
69
+ startMs: number;
70
+ endMs: number;
71
+ }, resolution: ReplayResolution, maxBars: number, tier?: Tier, chartIntervalMs?: number, barAnchor?: ReplayReachBarAnchor): number;
72
+ export declare function clampReplayReach(requestedMs: number, domain: {
73
+ startMs: number;
74
+ endMs: number;
75
+ }, resolution: ReplayResolution, maxBars: number, intent: ReplayReachIntent, tier?: Tier, chartIntervalMs?: number, barAnchor?: ReplayReachBarAnchor): ReplayReachDecision;
76
+ export declare function reconcileReplayResolution(ageSec: number, chartIntervalMs: number, exchange?: string): {
77
+ available: ReplayResolution[];
78
+ autoSelect: ReplayResolution;
79
+ playbackTf: RailTf;
80
+ bookOk: boolean;
81
+ };
82
+ export declare function displayLaneForAge(ageSec: number, userIntervalMs: number): ReplayDisplayLane;
83
+ export declare function finestRailCoveringAge(ageSec: number): RailTf | null;
84
+ export declare function laneForAge(ageSec: number): ReplayLane;
85
+ export declare function railTfsFor(domain: ReplayRailDomain | number): RailTf[];