@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.
- package/README.md +23 -6
- package/dist/constants/exchange-names.leaf.d.ts +8 -0
- package/dist/constants/exchange-names.leaf.js +101 -0
- package/dist/constants/kscript-data-interval-restrictions.constants.d.ts +15 -0
- package/dist/constants/kscript-data-interval-restrictions.constants.js +40 -0
- package/dist/constants/opra-compliance.constants.d.ts +19 -0
- package/dist/constants/opra-compliance.constants.js +19 -0
- package/dist/constants/replay-ladder.leaf.d.ts +30 -0
- package/dist/constants/replay-ladder.leaf.js +99 -0
- package/dist/constants/scriptEditor/builtin-script-snippets.d.ts +133 -0
- package/dist/constants/scriptEditor/builtin-script-snippets.js +451 -0
- package/dist/constants/scriptEditor/cme-official-scripts.constants.d.ts +168 -0
- package/dist/constants/scriptEditor/cme-official-scripts.constants.js +398 -0
- package/dist/constants/scriptEditor/converted-script-id.leaf.d.ts +8 -0
- package/dist/constants/scriptEditor/converted-script-id.leaf.js +10 -0
- package/dist/constants/scriptEditor/execution.constants.d.ts +4 -0
- package/dist/constants/scriptEditor/execution.constants.js +14 -0
- package/dist/constants/wrun-prefix-safe.constants.d.ts +23 -0
- package/dist/constants/wrun-prefix-safe.constants.js +26 -0
- package/dist/host-env.d.ts +321 -24
- package/dist/host-env.js +15 -0
- package/dist/host-ports.types.d.ts +857 -35
- package/dist/index.d.ts +149 -2
- package/dist/index.js +149 -2
- package/dist/instances/script-engine-worker-ohlcv-transfer.d.ts +31 -0
- package/dist/instances/script-engine-worker-ohlcv-transfer.js +164 -0
- package/dist/interfaces/market-event.interface.d.ts +231 -0
- package/dist/interfaces/market-event.interface.js +15 -0
- package/dist/interfaces/opra-realtime.interface.d.ts +70 -134
- package/dist/interfaces/opra-realtime.interface.js +34 -59
- package/dist/interfaces/replay.interface.d.ts +285 -0
- package/dist/interfaces/replay.interface.js +1 -0
- package/dist/kscript-data/controls/live-ohlcv-merge.util.d.ts +1 -0
- package/dist/kscript-data/controls/live-ohlcv-merge.util.js +93 -0
- package/dist/kscript-data/controls/live-trades-merge.util.d.ts +5 -1
- package/dist/kscript-data/controls/live-trades-merge.util.js +2 -2
- package/dist/market-data/billing.interface.d.ts +219 -0
- package/dist/market-data/billing.interface.js +58 -0
- package/dist/market-data/venue-governed.util.d.ts +2 -0
- package/dist/market-data/venue-governed.util.js +10 -0
- package/dist/market-data/venue.d.ts +122 -0
- package/dist/market-data/venue.js +1 -0
- package/dist/market-data/venues/index.d.ts +97 -0
- package/dist/market-data/venues/index.js +33 -0
- package/dist/market-data/venues/opra.contract.copy.json +35 -0
- package/dist/market-data/venues/opra.d.ts +70 -0
- package/dist/market-data/venues/opra.js +74 -0
- package/dist/replay/replayIndicatorRows.d.ts +31 -0
- package/dist/replay/replayIndicatorRows.js +117 -0
- package/dist/replay/replayLadder.d.ts +85 -0
- package/dist/replay/replayLadder.js +388 -0
- package/dist/utility/auth/server-clock.util.d.ts +81 -0
- package/dist/utility/auth/server-clock.util.js +238 -0
- package/dist/utility/chart/builtin-identity.util.d.ts +18 -0
- package/dist/utility/chart/builtin-identity.util.js +51 -0
- package/dist/utility/chart/cache-alignment.util.d.ts +454 -0
- package/dist/utility/chart/cache-alignment.util.js +926 -0
- package/dist/utility/chart/chart-data-fetch-generation.util.d.ts +15 -0
- package/dist/utility/chart/chart-data-fetch-generation.util.js +22 -0
- package/dist/utility/chart/chart-mount-epoch.util.d.ts +5 -0
- package/dist/utility/chart/chart-mount-epoch.util.js +29 -0
- package/dist/utility/chart/chart-time-domain.util.d.ts +12 -0
- package/dist/utility/chart/chart-time-domain.util.js +23 -0
- package/dist/utility/chart/color-customization.leaf.d.ts +10 -0
- package/dist/utility/chart/color-customization.leaf.js +16 -0
- package/dist/utility/chart/date-labelled-interval.leaf.d.ts +15 -0
- package/dist/utility/chart/date-labelled-interval.leaf.js +19 -0
- package/dist/utility/chart/footprint-tick-grid.util.d.ts +106 -0
- package/dist/utility/chart/footprint-tick-grid.util.js +167 -0
- package/dist/utility/chart/gesture-timing.leaf.d.ts +29 -0
- package/dist/utility/chart/gesture-timing.leaf.js +29 -0
- package/dist/utility/chart/governed-contract-coin.util.d.ts +22 -0
- package/dist/utility/chart/governed-contract-coin.util.js +39 -0
- package/dist/utility/chart/host-bar-placement.util.d.ts +107 -0
- package/dist/utility/chart/host-bar-placement.util.js +447 -0
- package/dist/utility/chart/index-host-tier.util.d.ts +31 -0
- package/dist/utility/chart/index-host-tier.util.js +118 -0
- package/dist/utility/chart/index-mode-admission.util.d.ts +34 -0
- package/dist/utility/chart/index-mode-admission.util.js +67 -0
- package/dist/utility/chart/indicator-error-message.util.d.ts +35 -0
- package/dist/utility/chart/indicator-error-message.util.js +44 -0
- package/dist/utility/chart/indicator-run-interval.util.d.ts +130 -0
- package/dist/utility/chart/indicator-run-interval.util.js +268 -0
- package/dist/utility/chart/kscript-apply-fingerprint.util.d.ts +65 -0
- package/dist/utility/chart/kscript-apply-fingerprint.util.js +357 -0
- package/dist/utility/chart/kscript-chart-flush.leaf.d.ts +22 -0
- package/dist/utility/chart/kscript-chart-flush.leaf.js +13 -0
- package/dist/utility/chart/kscript-data-interval-restriction.leaf.d.ts +6 -0
- package/dist/utility/chart/kscript-data-interval-restriction.leaf.js +27 -0
- package/dist/utility/chart/kscript-integration-decision.leaf.d.ts +89 -0
- package/dist/utility/chart/kscript-integration-decision.leaf.js +80 -0
- package/dist/utility/chart/kscript-live-coalesce.util.d.ts +76 -0
- package/dist/utility/chart/kscript-live-coalesce.util.js +156 -0
- package/dist/utility/chart/kscript-live-rest-pace.util.d.ts +34 -0
- package/dist/utility/chart/kscript-live-rest-pace.util.js +134 -0
- package/dist/utility/chart/kscript-live-source-identity.util.d.ts +98 -0
- package/dist/utility/chart/kscript-live-source-identity.util.js +121 -0
- package/dist/utility/chart/kscript-mounted-plot-set.leaf.d.ts +48 -0
- package/dist/utility/chart/kscript-mounted-plot-set.leaf.js +145 -0
- package/dist/utility/chart/kscript-perf-tracker.util.d.ts +243 -0
- package/dist/utility/chart/kscript-perf-tracker.util.js +522 -0
- package/dist/utility/chart/kscript-run-interval-projection.util.d.ts +43 -0
- package/dist/utility/chart/kscript-run-interval-projection.util.js +471 -0
- package/dist/utility/chart/kscript-run-result-equality.util.d.ts +38 -0
- package/dist/utility/chart/kscript-run-result-equality.util.js +89 -0
- package/dist/utility/chart/kscript-settings-revision.leaf.d.ts +2 -0
- package/dist/utility/chart/kscript-settings-revision.leaf.js +12 -0
- package/dist/utility/chart/kscript-source-degrade.leaf.d.ts +63 -0
- package/dist/utility/chart/kscript-source-degrade.leaf.js +68 -0
- package/dist/utility/chart/kscript-source-retention.util.d.ts +134 -0
- package/dist/utility/chart/kscript-source-retention.util.js +218 -0
- package/dist/utility/chart/kscript-standin-identity.leaf.d.ts +57 -0
- package/dist/utility/chart/kscript-standin-identity.leaf.js +61 -0
- package/dist/utility/chart/kscript-titancharts-preparation.util.d.ts +15 -0
- package/dist/utility/chart/kscript-titancharts-preparation.util.js +376 -0
- package/dist/utility/chart/kscript-titancharts-render-keys.constants.d.ts +9 -0
- package/dist/utility/chart/kscript-titancharts-render-keys.constants.js +130 -0
- package/dist/utility/chart/kscript-venue-policy.util.d.ts +217 -0
- package/dist/utility/chart/kscript-venue-policy.util.js +324 -0
- package/dist/utility/chart/live-cadence.util.d.ts +38 -0
- package/dist/utility/chart/live-cadence.util.js +37 -0
- package/dist/utility/chart/live-feed-series-match.leaf.d.ts +13 -0
- package/dist/utility/chart/live-feed-series-match.leaf.js +21 -0
- package/dist/utility/chart/local-engine-self-heal-backoff.util.d.ts +46 -0
- package/dist/utility/chart/local-engine-self-heal-backoff.util.js +46 -0
- package/dist/utility/chart/local-engine-uninit.leaf.d.ts +21 -0
- package/dist/utility/chart/local-engine-uninit.leaf.js +22 -0
- package/dist/utility/chart/local-kscript-source-revalidation.util.d.ts +62 -0
- package/dist/utility/chart/local-kscript-source-revalidation.util.js +123 -0
- package/dist/utility/chart/local-kscript-warmup-depth.util.d.ts +214 -0
- package/dist/utility/chart/local-kscript-warmup-depth.util.js +376 -0
- package/dist/utility/chart/local-technical-script-live-apply-coalescer.util.d.ts +85 -0
- package/dist/utility/chart/local-technical-script-live-apply-coalescer.util.js +197 -0
- package/dist/utility/chart/local-technical-script-range.leaf.d.ts +72 -0
- package/dist/utility/chart/local-technical-script-range.leaf.js +126 -0
- package/dist/utility/chart/mixed-mode.util.d.ts +167 -0
- package/dist/utility/chart/mixed-mode.util.js +139 -0
- package/dist/utility/chart/ohlcv-row-readiness.util.d.ts +36 -0
- package/dist/utility/chart/ohlcv-row-readiness.util.js +90 -0
- package/dist/utility/chart/opra-user-scripts-gate.util.d.ts +19 -0
- package/dist/utility/chart/opra-user-scripts-gate.util.js +32 -0
- package/dist/utility/chart/overlay-execution-guard-key.leaf.d.ts +8 -0
- package/dist/utility/chart/overlay-execution-guard-key.leaf.js +10 -0
- package/dist/utility/chart/price-precision.util.d.ts +40 -0
- package/dist/utility/chart/price-precision.util.js +70 -0
- package/dist/utility/chart/profile-block-size.util.d.ts +64 -0
- package/dist/utility/chart/profile-block-size.util.js +141 -0
- package/dist/utility/chart/protected-kscript-degenerate-rows.leaf.d.ts +11 -0
- package/dist/utility/chart/protected-kscript-degenerate-rows.leaf.js +29 -0
- package/dist/utility/chart/protected-kscript-empty-output.util.d.ts +28 -0
- package/dist/utility/chart/protected-kscript-empty-output.util.js +84 -0
- package/dist/utility/chart/run-interval-unservable.leaf.d.ts +9 -0
- package/dist/utility/chart/run-interval-unservable.leaf.js +20 -0
- package/dist/utility/chart/run-interval-warmup.leaf.d.ts +19 -0
- package/dist/utility/chart/run-interval-warmup.leaf.js +35 -0
- package/dist/utility/chart/titan-constants.pin.d.ts +9 -5
- package/dist/utility/chart/titan-constants.pin.js +18 -5
- package/dist/utility/chart/warmup-backfill-retry.leaf.d.ts +9 -0
- package/dist/utility/chart/warmup-backfill-retry.leaf.js +9 -0
- package/dist/utility/chart/window-geometry.leaf.d.ts +119 -0
- package/dist/utility/chart/window-geometry.leaf.js +391 -0
- package/dist/utility/chart/window-owner.leaf.d.ts +19 -0
- package/dist/utility/chart/window-owner.leaf.js +24 -0
- package/dist/utility/chart/wrun-bar-session-facts.util.d.ts +11 -2
- package/dist/utility/chart/wrun-bar-session-facts.util.js +10 -3
- package/dist/utility/chart/wrun-run-result.util.d.ts +5 -1
- package/dist/utility/chart/wrun-run-result.util.js +20 -14
- package/dist/utility/common/data-processing.util.d.ts +138 -0
- package/dist/utility/common/data-processing.util.js +346 -0
- package/dist/utility/common/visible-timeout.util.d.ts +13 -4
- package/dist/utility/common/visible-timeout.util.js +23 -8
- package/dist/utility/exchange-format.leaf.d.ts +1 -0
- package/dist/utility/exchange-format.leaf.js +47 -0
- package/dist/utility/html-escape.leaf.d.ts +11 -0
- package/dist/utility/html-escape.leaf.js +20 -0
- package/dist/utility/market-events/earnings-scope.util.d.ts +60 -0
- package/dist/utility/market-events/earnings-scope.util.js +92 -0
- package/dist/utility/market-events/market-events.util.d.ts +147 -0
- package/dist/utility/market-events/market-events.util.js +392 -0
- package/dist/utility/market-events/zoned-clock.util.d.ts +1 -0
- package/dist/utility/market-events/zoned-clock.util.js +11 -0
- package/dist/utility/options/option-venue-disclosure.util.d.ts +43 -0
- package/dist/utility/options/option-venue-disclosure.util.js +56 -0
- package/dist/utility/scriptEditor/package-semver.util.d.ts +51 -0
- package/dist/utility/scriptEditor/package-semver.util.js +120 -0
- package/dist/utility/scriptEditor/temp-script-id.util.d.ts +18 -0
- package/dist/utility/scriptEditor/temp-script-id.util.js +25 -0
- package/dist/utility/symbol-selection/markets-request-from-symbols.leaf.d.ts +20 -0
- package/dist/utility/symbol-selection/markets-request-from-symbols.leaf.js +81 -0
- package/dist/utility/v2/governed-tier.leaf.d.ts +103 -0
- package/dist/utility/v2/governed-tier.leaf.js +113 -0
- package/dist/utility/watchlist/import/import-request.leaf.d.ts +10 -0
- package/dist/utility/watchlist/import/import-request.leaf.js +10 -0
- package/dist/utility/wrun/sources/lanes/option_daily.d.ts +43 -15
- package/dist/utility/wrun/sources/lanes/option_daily.js +78 -20
- package/dist/utility/wrun/sources/lanes/option_stats_10m.d.ts +14 -10
- package/dist/utility/wrun/sources/lanes/option_stats_10m.js +5 -4
- package/dist/utility/wrun/sources/lanes/series.js +2 -2
- package/dist/utility/wrun/sources/opra-option-lanes.util.d.ts +22 -3
- package/dist/utility/wrun/sources/opra-option-lanes.util.js +38 -7
- package/dist/utility/wrun/sources/registry.js +31 -1
- package/dist/utility/wrun/sources/row-lane-registry.js +5 -5
- package/dist/utility/wrun/sources/row-lanes/option_contract_state.d.ts +49 -0
- package/dist/utility/wrun/sources/row-lanes/option_contract_state.js +75 -20
- package/dist/utility/wrun/sources/row-lanes/option_strikes.d.ts +49 -0
- package/dist/utility/wrun/sources/row-lanes/option_strikes.js +57 -47
- package/dist/utility/wrun/sources/row-lanes/option_surface.d.ts +36 -4
- package/dist/utility/wrun/sources/row-lanes/option_surface.js +6 -12
- package/dist/utility/wrun/sources/wrun-poll-lane.types.d.ts +37 -3
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +128 -2
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +233 -51
- package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +0 -8
- package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +26 -24
- package/dist/utility/wrun/sources/wrun-row-lanes.util.js +85 -104
- package/dist/utility/wrun/wrun-alert-outputs.registry.d.ts +166 -0
- package/dist/utility/wrun/wrun-alert-outputs.registry.js +219 -0
- package/dist/utility/wrun/wrun-bar-count.util.d.ts +83 -0
- package/dist/utility/wrun/wrun-bar-count.util.js +259 -0
- package/dist/utility/wrun/wrun-chart-context-names.util.d.ts +84 -0
- package/dist/utility/wrun/wrun-chart-context-names.util.js +186 -0
- package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +253 -0
- package/dist/utility/wrun/wrun-chart-market-facts.util.js +731 -0
- package/dist/utility/wrun/wrun-cloud-opra-stamp.util.d.ts +28 -0
- package/dist/utility/wrun/wrun-cloud-opra-stamp.util.js +45 -0
- package/dist/utility/wrun/wrun-coin-lane-live.util.d.ts +18 -0
- package/dist/utility/wrun/wrun-coin-lane-live.util.js +47 -0
- package/dist/utility/wrun/wrun-deadline.util.js +2 -1
- package/dist/utility/wrun/wrun-debug-output.util.d.ts +39 -0
- package/dist/utility/wrun/wrun-debug-output.util.js +63 -0
- package/dist/utility/wrun/wrun-declared-warmup.util.d.ts +113 -0
- package/dist/utility/wrun/wrun-declared-warmup.util.js +181 -0
- package/dist/utility/wrun/wrun-draft-legend-note.util.d.ts +43 -0
- package/dist/utility/wrun/wrun-draft-legend-note.util.js +158 -0
- package/dist/utility/wrun/wrun-draft-overlay.util.d.ts +181 -0
- package/dist/utility/wrun/wrun-draft-overlay.util.js +357 -0
- package/dist/utility/wrun/wrun-draw-skipped.leaf.d.ts +16 -0
- package/dist/utility/wrun/wrun-draw-skipped.leaf.js +16 -0
- package/dist/utility/wrun/wrun-earnings-facts.util.d.ts +42 -0
- package/dist/utility/wrun/wrun-earnings-facts.util.js +131 -0
- package/dist/utility/wrun/wrun-first-run-depth.util.d.ts +32 -0
- package/dist/utility/wrun/wrun-first-run-depth.util.js +118 -0
- package/dist/utility/wrun/wrun-gate-plane-readers.util.d.ts +24 -0
- package/dist/utility/wrun/wrun-gate-plane-readers.util.js +31 -0
- package/dist/utility/wrun/wrun-held-lanes.util.d.ts +32 -0
- package/dist/utility/wrun/wrun-held-lanes.util.js +94 -0
- package/dist/utility/wrun/wrun-host-visible-clock.util.d.ts +2 -0
- package/dist/utility/wrun/wrun-host-visible-clock.util.js +17 -0
- package/dist/utility/wrun/wrun-host.service.d.ts +266 -0
- package/dist/utility/wrun/wrun-host.service.js +655 -0
- package/dist/utility/wrun/wrun-inert-legend.util.d.ts +33 -0
- package/dist/utility/wrun/wrun-inert-legend.util.js +125 -0
- package/dist/utility/wrun/wrun-input-requirements.leaf.d.ts +155 -0
- package/dist/utility/wrun/wrun-input-requirements.leaf.js +450 -0
- package/dist/utility/wrun/wrun-integration-route.util.d.ts +51 -0
- package/dist/utility/wrun/wrun-integration-route.util.js +59 -0
- package/dist/utility/wrun/wrun-latest-history.leaf.d.ts +8 -0
- package/dist/utility/wrun/wrun-latest-history.leaf.js +8 -0
- package/dist/utility/wrun/wrun-legend-hover.lazy.d.ts +12 -0
- package/dist/utility/wrun/wrun-legend-hover.lazy.js +96 -0
- package/dist/utility/wrun/wrun-lifecycle-runtime.util.d.ts +21 -0
- package/dist/utility/wrun/wrun-lifecycle-runtime.util.js +21 -0
- package/dist/utility/wrun/wrun-live-hidden-hold.util.d.ts +23 -0
- package/dist/utility/wrun/wrun-live-hidden-hold.util.js +13 -0
- package/dist/utility/wrun/wrun-live-intake.util.d.ts +374 -0
- package/dist/utility/wrun/wrun-live-intake.util.js +2027 -0
- package/dist/utility/wrun/wrun-live-patch.util.d.ts +116 -0
- package/dist/utility/wrun/wrun-live-patch.util.js +523 -0
- package/dist/utility/wrun/wrun-live-tick.util.d.ts +619 -0
- package/dist/utility/wrun/wrun-live-tick.util.js +4974 -0
- package/dist/utility/wrun/wrun-loading-owner.util.d.ts +58 -0
- package/dist/utility/wrun/wrun-loading-owner.util.js +89 -0
- package/dist/utility/wrun/wrun-official-scope.leaf.d.ts +29 -0
- package/dist/utility/wrun/wrun-official-scope.leaf.js +36 -0
- package/dist/utility/wrun/wrun-oi-lane.util.d.ts +27 -0
- package/dist/utility/wrun/wrun-oi-lane.util.js +42 -0
- package/dist/utility/wrun/wrun-opra-stats.leaf.d.ts +29 -10
- package/dist/utility/wrun/wrun-opra-stats.leaf.js +29 -10
- package/dist/utility/wrun/wrun-options-stop.util.d.ts +52 -0
- package/dist/utility/wrun/wrun-options-stop.util.js +123 -0
- package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +719 -0
- package/dist/utility/wrun/wrun-overlay-drivers.util.js +1180 -0
- package/dist/utility/wrun/wrun-overlay-lifecycle.lazy.d.ts +50 -0
- package/dist/utility/wrun/wrun-overlay-lifecycle.lazy.js +131 -0
- package/dist/utility/wrun/wrun-overlay-lifecycle.util.d.ts +118 -0
- package/dist/utility/wrun/wrun-overlay-lifecycle.util.js +466 -0
- package/dist/utility/wrun/wrun-overlay-metadata.util.d.ts +45 -0
- package/dist/utility/wrun/wrun-overlay-metadata.util.js +112 -0
- package/dist/utility/wrun/wrun-overlay-recovery.util.d.ts +114 -0
- package/dist/utility/wrun/wrun-overlay-recovery.util.js +971 -0
- package/dist/utility/wrun/wrun-overlay-run.util.d.ts +858 -0
- package/dist/utility/wrun/wrun-overlay-run.util.js +11013 -0
- package/dist/utility/wrun/wrun-panel-mount.lazy.d.ts +10 -0
- package/dist/utility/wrun/wrun-panel-mount.lazy.js +68 -0
- package/dist/utility/wrun/wrun-panel-mount.util.d.ts +392 -0
- package/dist/utility/wrun/wrun-panel-mount.util.js +2346 -0
- package/dist/utility/wrun/wrun-param-map.util.d.ts +19 -4
- package/dist/utility/wrun/wrun-param-map.util.js +40 -47
- package/dist/utility/wrun/wrun-param-values.util.d.ts +9 -3
- package/dist/utility/wrun/wrun-param-values.util.js +5 -5
- package/dist/utility/wrun/wrun-pause-dim.util.d.ts +52 -0
- package/dist/utility/wrun/wrun-pause-dim.util.js +153 -0
- package/dist/utility/wrun/wrun-plot-gate.types.d.ts +23 -0
- package/dist/utility/wrun/wrun-plot-gate.types.js +7 -0
- package/dist/utility/wrun/wrun-prefix-cohort.util.d.ts +93 -0
- package/dist/utility/wrun/wrun-prefix-cohort.util.js +484 -0
- package/dist/utility/wrun/wrun-prefix-lanes.util.d.ts +114 -0
- package/dist/utility/wrun/wrun-prefix-lanes.util.js +486 -0
- package/dist/utility/wrun/wrun-prefix-proof.util.d.ts +317 -0
- package/dist/utility/wrun/wrun-prefix-proof.util.js +630 -0
- package/dist/utility/wrun/wrun-refusal-surface.util.d.ts +73 -0
- package/dist/utility/wrun/wrun-refusal-surface.util.js +380 -0
- package/dist/utility/wrun/wrun-refusal-text.util.d.ts +15 -0
- package/dist/utility/wrun/wrun-refusal-text.util.js +40 -0
- package/dist/utility/wrun/wrun-replay-lane.util.d.ts +139 -0
- package/dist/utility/wrun/wrun-replay-lane.util.js +520 -0
- package/dist/utility/wrun/wrun-replay-rows.util.d.ts +21 -0
- package/dist/utility/wrun/wrun-replay-rows.util.js +172 -0
- package/dist/utility/wrun/wrun-row-source-factory.d.ts +53 -0
- package/dist/utility/wrun/wrun-row-source-factory.js +435 -0
- package/dist/utility/wrun/wrun-run-cells.util.d.ts +36 -0
- package/dist/utility/wrun/wrun-run-cells.util.js +46 -0
- package/dist/utility/wrun/wrun-run-interval-projection.types.d.ts +14 -0
- package/dist/utility/wrun/wrun-run-interval-projection.types.js +1 -0
- package/dist/utility/wrun/wrun-run-interval-session.util.d.ts +133 -0
- package/dist/utility/wrun/wrun-run-interval-session.util.js +121 -0
- package/dist/utility/wrun/wrun-run-interval.util.d.ts +98 -0
- package/dist/utility/wrun/wrun-run-interval.util.js +207 -0
- package/dist/utility/wrun/wrun-run-retained.util.d.ts +122 -0
- package/dist/utility/wrun/wrun-run-retained.util.js +255 -0
- package/dist/utility/wrun/wrun-sandbox-row-source.d.ts +184 -0
- package/dist/utility/wrun/wrun-sandbox-row-source.js +444 -0
- package/dist/utility/wrun/wrun-script-inputs.util.js +4 -4
- package/dist/utility/wrun/wrun-series-stream.util.d.ts +86 -0
- package/dist/utility/wrun/wrun-series-stream.util.js +537 -0
- package/dist/utility/wrun/wrun-sheet-remembered.util.d.ts +21 -0
- package/dist/utility/wrun/wrun-sheet-remembered.util.js +36 -0
- package/dist/utility/wrun/wrun-signal-sound-reasons.leaf.d.ts +7 -0
- package/dist/utility/wrun/wrun-signal-sound-reasons.leaf.js +12 -0
- package/dist/utility/wrun/wrun-socket-row-source.js +4 -2
- package/dist/utility/wrun/wrun-source-rows.util.d.ts +175 -3
- package/dist/utility/wrun/wrun-source-rows.util.js +294 -8
- package/dist/utility/wrun/wrun-stats-strip.util.d.ts +46 -0
- package/dist/utility/wrun/wrun-stats-strip.util.js +87 -0
- package/dist/utility/wrun/wrun-table-chrome.util.d.ts +163 -0
- package/dist/utility/wrun/wrun-table-chrome.util.js +557 -0
- package/dist/utility/wrun/wrun-text-params.util.d.ts +11 -6
- package/dist/utility/wrun/wrun-text-params.util.js +19 -30
- package/dist/utility/wrun/wrun-transient-rerun.util.d.ts +64 -0
- package/dist/utility/wrun/wrun-transient-rerun.util.js +317 -0
- package/dist/utility/wrun/wrun-twin-lookback.util.d.ts +10 -0
- package/dist/utility/wrun/wrun-twin-lookback.util.js +43 -0
- package/dist/utility/wrun/wrun-warmup-head-store.util.d.ts +41 -0
- package/dist/utility/wrun/wrun-warmup-head-store.util.js +120 -0
- package/dist/utility/wrun-alert-params.leaf.d.ts +24 -0
- package/dist/utility/wrun-alert-params.leaf.js +24 -0
- package/dist/utils/replay/replay-buffer-math.d.ts +148 -0
- package/dist/utils/replay/replay-buffer-math.js +684 -0
- package/dist/workers/wrun/wrun-abi-host.d.ts +190 -0
- package/dist/workers/wrun/wrun-abi-host.js +1201 -0
- package/dist/workers/wrun/wrun-engine-handler.d.ts +37 -0
- package/dist/workers/wrun/wrun-engine-handler.js +211 -0
- package/package.json +3 -3
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-chart data-fetch generation counter, in a leaf module on purpose: the
|
|
3
|
+
* counter is read by chart-context tokens (chart-context.util) and by every
|
|
4
|
+
* generation-scoped continuation, and importing it from data-fetching.util
|
|
5
|
+
* dragged that module's whole graph into each consumer. No imports here.
|
|
6
|
+
*/
|
|
7
|
+
/** Bumped by every cancelFetchDataOfChart (symbol/interval switch, refetch, teardown). */
|
|
8
|
+
export declare function bumpChartDataFetchGeneration(chartIndex: number): number;
|
|
9
|
+
/**
|
|
10
|
+
* Current data-fetch generation for a chart. Exported for callers that
|
|
11
|
+
* dispatch generation-scoped child fetches (an `IndicatorDataOptions.
|
|
12
|
+
* chartDataFetchGeneration` captured here is invalidated by the next
|
|
13
|
+
* `cancelFetchDataOfChart`) and for the transition-supersede specs.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getChartDataFetchGeneration(chartIndex: number): number;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-chart data-fetch generation counter, in a leaf module on purpose: the
|
|
3
|
+
* counter is read by chart-context tokens (chart-context.util) and by every
|
|
4
|
+
* generation-scoped continuation, and importing it from data-fetching.util
|
|
5
|
+
* dragged that module's whole graph into each consumer. No imports here.
|
|
6
|
+
*/
|
|
7
|
+
const chartDataFetchGenerations = new Map();
|
|
8
|
+
/** Bumped by every cancelFetchDataOfChart (symbol/interval switch, refetch, teardown). */
|
|
9
|
+
export function bumpChartDataFetchGeneration(chartIndex) {
|
|
10
|
+
const nextGeneration = (chartDataFetchGenerations.get(chartIndex) ?? 0) + 1;
|
|
11
|
+
chartDataFetchGenerations.set(chartIndex, nextGeneration);
|
|
12
|
+
return nextGeneration;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Current data-fetch generation for a chart. Exported for callers that
|
|
16
|
+
* dispatch generation-scoped child fetches (an `IndicatorDataOptions.
|
|
17
|
+
* chartDataFetchGeneration` captured here is invalidated by the next
|
|
18
|
+
* `cancelFetchDataOfChart`) and for the transition-supersede specs.
|
|
19
|
+
*/
|
|
20
|
+
export function getChartDataFetchGeneration(chartIndex) {
|
|
21
|
+
return chartDataFetchGenerations.get(chartIndex) ?? 0;
|
|
22
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function getChartMountEpoch(): number;
|
|
2
|
+
/** Makes every run or continuation that captured the epoch before this call stale at its next check. */
|
|
3
|
+
export declare function bumpChartMountEpoch(): number;
|
|
4
|
+
/** Captures the epoch now; the returned check reads false once a workspace switch moved it. */
|
|
5
|
+
export declare function captureMountEpochOwner(): () => boolean;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mount epoch (warm workspace switch seam). The switch teardown bumps it
|
|
3
|
+
* (destroyChartsForWorkspaceSwitch), and so does a newer click that cancels
|
|
4
|
+
* the incoming mount. Work started for a pane captures it and re-reads it
|
|
5
|
+
* after each await: initializeChart returns there instead of constructing,
|
|
6
|
+
* destroying or painting over the incoming document, and a continuation
|
|
7
|
+
* started for the outgoing layout's pane (the interval switch's hook pass,
|
|
8
|
+
* the overlay's Retry, a journal navigation) writes nothing to the incoming
|
|
9
|
+
* pane at the same index. The instance checks (`tcGroup[i] !== tc`) cannot see
|
|
10
|
+
* work that owns no instance. Nothing else moves it, so an ordinary boot,
|
|
11
|
+
* rebuild or grid change never observes a change.
|
|
12
|
+
*
|
|
13
|
+
* Its own module so a continuation outside the engine host reads it without
|
|
14
|
+
* importing titan-charts (which re-exports both functions for its callers).
|
|
15
|
+
*/
|
|
16
|
+
let chartMountEpoch = 0;
|
|
17
|
+
export function getChartMountEpoch() {
|
|
18
|
+
return chartMountEpoch;
|
|
19
|
+
}
|
|
20
|
+
/** Makes every run or continuation that captured the epoch before this call stale at its next check. */
|
|
21
|
+
export function bumpChartMountEpoch() {
|
|
22
|
+
chartMountEpoch += 1;
|
|
23
|
+
return chartMountEpoch;
|
|
24
|
+
}
|
|
25
|
+
/** Captures the epoch now; the returned check reads false once a workspace switch moved it. */
|
|
26
|
+
export function captureMountEpochOwner() {
|
|
27
|
+
const epoch = chartMountEpoch;
|
|
28
|
+
return () => epoch === chartMountEpoch;
|
|
29
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const MIN_REAL_CHART_TIME_MS: number;
|
|
2
|
+
export declare function isRealChartTimestampMs(value: unknown): value is number;
|
|
3
|
+
export declare function isRealChartTimeRangeMs(start: unknown, end: unknown): start is number;
|
|
4
|
+
/**
|
|
5
|
+
* A calendar chart's window start clamped up to the floor. A month, quarter, half-year or year
|
|
6
|
+
* chart (1M 3M 6M 1Y) zoomed out far enough asks for bars before 1971 (55 bars back on 1Y, 110 on
|
|
7
|
+
* 6M), a time no backend serves: the window starts at `MIN_REAL_CHART_TIME_MS` instead (itself a
|
|
8
|
+
* calendar bar's open, January 1) while it still ends after it. Undefined for every other window:
|
|
9
|
+
* a real one keeps its start, and anything else stays the caller's refusal (on a fixed interval a
|
|
10
|
+
* pre-1971 start is a placeholder or index-domain range, never a real chart's).
|
|
11
|
+
*/
|
|
12
|
+
export declare function calendarRangeStartAtFloorMs(interval: unknown, start: unknown, end: unknown): number | undefined;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { isCalendarIntervalLabel } from './calendar-interval.util.js';
|
|
2
|
+
export const MIN_REAL_CHART_TIME_MS = Date.UTC(1971, 0, 1);
|
|
3
|
+
export function isRealChartTimestampMs(value) {
|
|
4
|
+
return typeof value === 'number' && Number.isFinite(value) && value >= MIN_REAL_CHART_TIME_MS;
|
|
5
|
+
}
|
|
6
|
+
export function isRealChartTimeRangeMs(start, end) {
|
|
7
|
+
return isRealChartTimestampMs(start) && isRealChartTimestampMs(end) && start < end;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* A calendar chart's window start clamped up to the floor. A month, quarter, half-year or year
|
|
11
|
+
* chart (1M 3M 6M 1Y) zoomed out far enough asks for bars before 1971 (55 bars back on 1Y, 110 on
|
|
12
|
+
* 6M), a time no backend serves: the window starts at `MIN_REAL_CHART_TIME_MS` instead (itself a
|
|
13
|
+
* calendar bar's open, January 1) while it still ends after it. Undefined for every other window:
|
|
14
|
+
* a real one keeps its start, and anything else stays the caller's refusal (on a fixed interval a
|
|
15
|
+
* pre-1971 start is a placeholder or index-domain range, never a real chart's).
|
|
16
|
+
*/
|
|
17
|
+
export function calendarRangeStartAtFloorMs(interval, start, end) {
|
|
18
|
+
if (!isCalendarIntervalLabel(interval))
|
|
19
|
+
return undefined;
|
|
20
|
+
if (typeof start !== 'number' || !Number.isFinite(start) || start >= MIN_REAL_CHART_TIME_MS)
|
|
21
|
+
return undefined;
|
|
22
|
+
return isRealChartTimeRangeMs(MIN_REAL_CHART_TIME_MS, end) ? MIN_REAL_CHART_TIME_MS : undefined;
|
|
23
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The cleared colour customization flags (a leaf of utility/chart/color-customization.util.ts; P2/inventory.md section
|
|
3
|
+
* 1.1): the patch that hands colour ownership back to the theme, which the wrun executor stamps beside the theme's
|
|
4
|
+
* colours. Pure, no imports, so it moves into the chart-host package with the phase 2 closure; the colour
|
|
5
|
+
* customization module re-exports it.
|
|
6
|
+
*/
|
|
7
|
+
export declare function clearedColorCustomizationFlags(): {
|
|
8
|
+
colorsCustomized: false;
|
|
9
|
+
customizedColorIndices: never[];
|
|
10
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The cleared colour customization flags (a leaf of utility/chart/color-customization.util.ts; P2/inventory.md section
|
|
3
|
+
* 1.1): the patch that hands colour ownership back to the theme, which the wrun executor stamps beside the theme's
|
|
4
|
+
* colours. Pure, no imports, so it moves into the chart-host package with the phase 2 closure; the colour
|
|
5
|
+
* customization module re-exports it.
|
|
6
|
+
*/
|
|
7
|
+
// When a settings dialog re-stamps theme-default colors (plot-type or
|
|
8
|
+
// leg-count changes rebuild the color layout), color ownership returns to the
|
|
9
|
+
// theme. The customization flags must be cleared in the same write: a stale
|
|
10
|
+
// `colorsCustomized` makes every future theme pass skip the overlay, freezing
|
|
11
|
+
// it on the defaults of whatever theme was active at stamp time (mirrors the
|
|
12
|
+
// CvdBySizeSettings precedent). Spread the returned patch into the same
|
|
13
|
+
// settings update that stamps the default colors.
|
|
14
|
+
export function clearedColorCustomizationFlags() {
|
|
15
|
+
return { colorsCustomized: false, customizedColorIndices: [] };
|
|
16
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The date-labelled bar rule of chart-display-timezone.util.ts (which re-exports it and reads it for the display
|
|
3
|
+
* offset) as a leaf with no import: the child mount (wrun-panel-mount.util) reads it, and it moves into the wrun
|
|
4
|
+
* chart-host package, which the offset's user store may not reach.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Whether a chart at this BAR interval labels its bars by their date: daily
|
|
8
|
+
* and longer, the TradingView rule. Those bars are stamped 00:00 UTC of their
|
|
9
|
+
* date (crypto, the CME trade date, Monday for weeks), so any negative display
|
|
10
|
+
* offset printed the day before: on New York (-4) the 1 Oct daily bar read
|
|
11
|
+
* "Wed, 30 Sep 2026 20:00" and the 1 Sep month tick read "31". Their dates
|
|
12
|
+
* render from the raw UTC timestamp instead. False without an interval (an
|
|
13
|
+
* event or clock time).
|
|
14
|
+
*/
|
|
15
|
+
export declare function isDateLabelledBarInterval(barIntervalMs?: number): boolean;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The date-labelled bar rule of chart-display-timezone.util.ts (which re-exports it and reads it for the display
|
|
3
|
+
* offset) as a leaf with no import: the child mount (wrun-panel-mount.util) reads it, and it moves into the wrun
|
|
4
|
+
* chart-host package, which the offset's user store may not reach.
|
|
5
|
+
*/
|
|
6
|
+
const HOUR_MS = 3_600_000;
|
|
7
|
+
const DAY_MS = 24 * HOUR_MS;
|
|
8
|
+
/**
|
|
9
|
+
* Whether a chart at this BAR interval labels its bars by their date: daily
|
|
10
|
+
* and longer, the TradingView rule. Those bars are stamped 00:00 UTC of their
|
|
11
|
+
* date (crypto, the CME trade date, Monday for weeks), so any negative display
|
|
12
|
+
* offset printed the day before: on New York (-4) the 1 Oct daily bar read
|
|
13
|
+
* "Wed, 30 Sep 2026 20:00" and the 1 Sep month tick read "31". Their dates
|
|
14
|
+
* render from the raw UTC timestamp instead. False without an interval (an
|
|
15
|
+
* event or clock time).
|
|
16
|
+
*/
|
|
17
|
+
export function isDateLabelledBarInterval(barIntervalMs) {
|
|
18
|
+
return typeof barIntervalMs === 'number' && barIntervalMs >= DAY_MS;
|
|
19
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The tick-grid fold for sparse-block venues (field case 2026-09-14).
|
|
3
|
+
*
|
|
4
|
+
* The gateway derives crypto VOLUME_PROFILE_AGG block sizes from price and
|
|
5
|
+
* snaps them to the exchange tick only for CME, so some venues bucket their
|
|
6
|
+
* profiles on a block FINER than the tick (Binance PUMPUSDT: 3.28125e-7 under
|
|
7
|
+
* a 1e-6 tick; Hyperliquid HIP-3 xyz:SNDK: 0.06 under 0.1). Rows are keyed
|
|
8
|
+
* FLOOR(price / block) * block, so every served level is one traded tick with
|
|
9
|
+
* empty blocks between. The live feed (a separate service) buckets the same
|
|
10
|
+
* trades with integer math at 1e9, so ITS block is truncated (3.28e-7) and its
|
|
11
|
+
* levels drift a fraction of a block BELOW the gateway's exact lows: floored
|
|
12
|
+
* onto the catalog block they land one block low, and the next poll's exact
|
|
13
|
+
* row then merges beside them, doubling every cell (Brian's clip, ring event
|
|
14
|
+
* footprint-forming-max-merge with heldTotal == fetchedTotal, mergedTotal 2x).
|
|
15
|
+
*
|
|
16
|
+
* The tick is the only lattice both lanes can agree on: whichever block a
|
|
17
|
+
* level was bucketed with, its own bucket [level, level + block) holds exactly
|
|
18
|
+
* ONE tick multiple, the price that traded (block < tick). So on these venues
|
|
19
|
+
* both footprint workers and the live fold map every level to that tick price
|
|
20
|
+
* (`tickPriceOfServedLevel`) and fold on the tick instead of the block
|
|
21
|
+
* (`resolveFootprintTickGrid`): "Ticks per bar" then means ticks, which is
|
|
22
|
+
* what the UI says. Two venue classes stay exactly as they were: a block that
|
|
23
|
+
* is a whole fraction of the tick (NEARUSDT 0.0002 under 0.001: per-tick
|
|
24
|
+
* levels already sit on the block lattice, and the live feed's block is exact
|
|
25
|
+
* at 9 decimals) and a block at or above the tick (Binance BTCUSDT 3.0 over
|
|
26
|
+
* 0.1, CME after the exchange-tick move).
|
|
27
|
+
*
|
|
28
|
+
* DOM-free on purpose: imported by the main-thread controls, the worker fetch
|
|
29
|
+
* lane, the worker live fold (aggregated-volume-profile-storage.service) and
|
|
30
|
+
* the settings readout (profileRowSizeField), which is why the anchor identity
|
|
31
|
+
* helpers live here and footprint-anchor-tick.util re-exports them.
|
|
32
|
+
*/
|
|
33
|
+
/**
|
|
34
|
+
* True when the served block is FINER than the exchange tick and the tick is
|
|
35
|
+
* not a whole number of blocks: the venue serves one level per traded tick on
|
|
36
|
+
* a lattice the tick prices do not sit on. Unknown or invalid inputs are never
|
|
37
|
+
* sparse (block anchoring, the pre-existing convention).
|
|
38
|
+
*/
|
|
39
|
+
export declare function isSparseTickVenue(blockSize: unknown, priceTick: unknown): boolean;
|
|
40
|
+
/**
|
|
41
|
+
* The tick price a served level holds: the unique multiple of `priceTick`
|
|
42
|
+
* inside the level's own bucket [level, level + blockSize), snapped to the
|
|
43
|
+
* tick's decimals. Defensive: a level whose bucket holds no tick multiple (not
|
|
44
|
+
* a per-tick level, or a bucket wider than the block it is tested with) is
|
|
45
|
+
* returned unchanged, never thrown on.
|
|
46
|
+
*/
|
|
47
|
+
export declare function tickPriceOfServedLevel(level: number, blockSize: number, priceTick: number): number;
|
|
48
|
+
/** The unit the rows fold on: the exchange tick on a sparse-block venue, the served block elsewhere. */
|
|
49
|
+
export declare function resolveFootprintGridUnit(blockSize: number, priceTick: number | null | undefined): number;
|
|
50
|
+
/**
|
|
51
|
+
* What a persisted anchor is scoped to. The single-venue footprint anchors per
|
|
52
|
+
* instrument (venue + symbol); the aggregated footprint anchors per coin, and
|
|
53
|
+
* ONLY per coin: its settings also carry a `symbol` the shared fetch path
|
|
54
|
+
* stamps on every switch, which must never enter the identity.
|
|
55
|
+
*/
|
|
56
|
+
export type FootprintAnchorScope = 'instrument' | 'coin';
|
|
57
|
+
interface FootprintIdentitySettings {
|
|
58
|
+
exchange?: unknown;
|
|
59
|
+
symbol?: unknown;
|
|
60
|
+
coin?: unknown;
|
|
61
|
+
anchorTick?: unknown;
|
|
62
|
+
anchorTickIdentity?: unknown;
|
|
63
|
+
}
|
|
64
|
+
/** The identity a persisted anchor (and an auto row size) belongs to under `scope`. */
|
|
65
|
+
export declare function footprintAnchorIdentity(settings: FootprintIdentitySettings | undefined, scope?: FootprintAnchorScope): string;
|
|
66
|
+
/** The persisted anchor tick when it was inferred for THIS identity, else undefined. */
|
|
67
|
+
export declare function persistedFootprintAnchorTick(settings: FootprintIdentitySettings | undefined, scope?: FootprintAnchorScope): number | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* The tick the footprint workers fold on for these settings (the fetch payload
|
|
70
|
+
* and the live SUBSCRIBE carry the persisted anchor): the anchor when it names
|
|
71
|
+
* the settings' own instrument (Volume Footprint) or coin (Agg. Volume
|
|
72
|
+
* Footprint), else undefined (block fold). Profile overlays carry no anchor.
|
|
73
|
+
*/
|
|
74
|
+
export declare function footprintDrawnTick(settings: FootprintIdentitySettings | null | undefined): number | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* The row height a "Ticks per bar" multiplier draws: the tick times the
|
|
77
|
+
* multiplier on a sparse-tick venue (`resolveFootprintTickGrid`, the workers'
|
|
78
|
+
* and the live fold's rule), the block times the multiplier everywhere else.
|
|
79
|
+
* Null for missing or degenerate inputs.
|
|
80
|
+
*/
|
|
81
|
+
export declare function footprintDrawnRowHeight(blockSize: unknown, multiplier: unknown, priceTick: unknown): number | null;
|
|
82
|
+
export interface FootprintTickGrid {
|
|
83
|
+
/** The fold unit: the exchange tick. */
|
|
84
|
+
minimumBarHeight: number;
|
|
85
|
+
/** The render height: tick x "Ticks per bar", snapped to 9 significant digits. */
|
|
86
|
+
barHeight: number;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* The tick-based grid a sparse-block venue folds on, or null on every other
|
|
90
|
+
* venue (whose grid stays the block and its raw settings product, byte for
|
|
91
|
+
* byte). "Ticks per bar" is read back from the requested heights
|
|
92
|
+
* (`barHeight / minimumBarHeight`, the block times the integer multiplier the
|
|
93
|
+
* settings hold) and rounded back to that integer, which also kills the dust
|
|
94
|
+
* a settings product carries through a division; the render height is never
|
|
95
|
+
* finer than one tick. Both footprint workers and the live fold derive their
|
|
96
|
+
* grid from the same three inputs through this function, which is what keeps
|
|
97
|
+
* the fetched rows, the staged handoff grid, and the live fold on ONE lattice.
|
|
98
|
+
*/
|
|
99
|
+
export declare function resolveFootprintTickGrid(minimumBarHeight: unknown, barHeight: unknown, priceTick: unknown): FootprintTickGrid | null;
|
|
100
|
+
/**
|
|
101
|
+
* The same points with every served level replaced by the tick price it holds
|
|
102
|
+
* (`tickPriceOfServedLevel`); volumes, counts, and timestamps ride untouched.
|
|
103
|
+
* Rebuilds rather than mutates: the input is the transport's own buffer.
|
|
104
|
+
*/
|
|
105
|
+
export declare function mapServedPointsToTickGrid(points: unknown[], blockSize: number, priceTick: number): unknown[];
|
|
106
|
+
export {};
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The tick-grid fold for sparse-block venues (field case 2026-09-14).
|
|
3
|
+
*
|
|
4
|
+
* The gateway derives crypto VOLUME_PROFILE_AGG block sizes from price and
|
|
5
|
+
* snaps them to the exchange tick only for CME, so some venues bucket their
|
|
6
|
+
* profiles on a block FINER than the tick (Binance PUMPUSDT: 3.28125e-7 under
|
|
7
|
+
* a 1e-6 tick; Hyperliquid HIP-3 xyz:SNDK: 0.06 under 0.1). Rows are keyed
|
|
8
|
+
* FLOOR(price / block) * block, so every served level is one traded tick with
|
|
9
|
+
* empty blocks between. The live feed (a separate service) buckets the same
|
|
10
|
+
* trades with integer math at 1e9, so ITS block is truncated (3.28e-7) and its
|
|
11
|
+
* levels drift a fraction of a block BELOW the gateway's exact lows: floored
|
|
12
|
+
* onto the catalog block they land one block low, and the next poll's exact
|
|
13
|
+
* row then merges beside them, doubling every cell (Brian's clip, ring event
|
|
14
|
+
* footprint-forming-max-merge with heldTotal == fetchedTotal, mergedTotal 2x).
|
|
15
|
+
*
|
|
16
|
+
* The tick is the only lattice both lanes can agree on: whichever block a
|
|
17
|
+
* level was bucketed with, its own bucket [level, level + block) holds exactly
|
|
18
|
+
* ONE tick multiple, the price that traded (block < tick). So on these venues
|
|
19
|
+
* both footprint workers and the live fold map every level to that tick price
|
|
20
|
+
* (`tickPriceOfServedLevel`) and fold on the tick instead of the block
|
|
21
|
+
* (`resolveFootprintTickGrid`): "Ticks per bar" then means ticks, which is
|
|
22
|
+
* what the UI says. Two venue classes stay exactly as they were: a block that
|
|
23
|
+
* is a whole fraction of the tick (NEARUSDT 0.0002 under 0.001: per-tick
|
|
24
|
+
* levels already sit on the block lattice, and the live feed's block is exact
|
|
25
|
+
* at 9 decimals) and a block at or above the tick (Binance BTCUSDT 3.0 over
|
|
26
|
+
* 0.1, CME after the exchange-tick move).
|
|
27
|
+
*
|
|
28
|
+
* DOM-free on purpose: imported by the main-thread controls, the worker fetch
|
|
29
|
+
* lane, the worker live fold (aggregated-volume-profile-storage.service) and
|
|
30
|
+
* the settings readout (profileRowSizeField), which is why the anchor identity
|
|
31
|
+
* helpers live here and footprint-anchor-tick.util re-exports them.
|
|
32
|
+
*/
|
|
33
|
+
/** Relative tolerance for "the tick is a whole number of blocks" (float dust on the ratio). */
|
|
34
|
+
const WHOLE_RATIO_TOLERANCE = 1e-6;
|
|
35
|
+
/** Slack on the bucket window, as a fraction of the block: absorbs float dust on the served level. */
|
|
36
|
+
const WINDOW_SLACK = 1e-6;
|
|
37
|
+
function positiveFinite(value) {
|
|
38
|
+
return typeof value === 'number' && Number.isFinite(value) && value > 0;
|
|
39
|
+
}
|
|
40
|
+
// Local, exponent-aware decimal counter (mirrors footprint-band.util.ts): a
|
|
41
|
+
// micro tick stringifies as "1e-7", and an exponent-blind count would snap the
|
|
42
|
+
// tick price to 0 decimals.
|
|
43
|
+
function decimalPlaces(value) {
|
|
44
|
+
if (!Number.isFinite(value))
|
|
45
|
+
return 0;
|
|
46
|
+
const text = String(value);
|
|
47
|
+
const eIndex = text.indexOf('e') !== -1 ? text.indexOf('e') : text.indexOf('E');
|
|
48
|
+
if (eIndex === -1) {
|
|
49
|
+
const dot = text.indexOf('.');
|
|
50
|
+
return dot === -1 ? 0 : text.length - dot - 1;
|
|
51
|
+
}
|
|
52
|
+
const mantissa = text.slice(0, eIndex);
|
|
53
|
+
const exponent = Number(text.slice(eIndex + 1));
|
|
54
|
+
const dot = mantissa.indexOf('.');
|
|
55
|
+
const mantissaDecimals = dot === -1 ? 0 : mantissa.length - dot - 1;
|
|
56
|
+
return Math.max(0, mantissaDecimals - exponent);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* True when the served block is FINER than the exchange tick and the tick is
|
|
60
|
+
* not a whole number of blocks: the venue serves one level per traded tick on
|
|
61
|
+
* a lattice the tick prices do not sit on. Unknown or invalid inputs are never
|
|
62
|
+
* sparse (block anchoring, the pre-existing convention).
|
|
63
|
+
*/
|
|
64
|
+
export function isSparseTickVenue(blockSize, priceTick) {
|
|
65
|
+
if (!positiveFinite(blockSize) || !positiveFinite(priceTick))
|
|
66
|
+
return false;
|
|
67
|
+
if (!(blockSize < priceTick))
|
|
68
|
+
return false;
|
|
69
|
+
const blocksPerTick = priceTick / blockSize;
|
|
70
|
+
return Math.abs(blocksPerTick - Math.round(blocksPerTick)) > blocksPerTick * WHOLE_RATIO_TOLERANCE;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* The tick price a served level holds: the unique multiple of `priceTick`
|
|
74
|
+
* inside the level's own bucket [level, level + blockSize), snapped to the
|
|
75
|
+
* tick's decimals. Defensive: a level whose bucket holds no tick multiple (not
|
|
76
|
+
* a per-tick level, or a bucket wider than the block it is tested with) is
|
|
77
|
+
* returned unchanged, never thrown on.
|
|
78
|
+
*/
|
|
79
|
+
export function tickPriceOfServedLevel(level, blockSize, priceTick) {
|
|
80
|
+
if (!Number.isFinite(level) || !positiveFinite(blockSize) || !positiveFinite(priceTick))
|
|
81
|
+
return level;
|
|
82
|
+
const slack = blockSize * WINDOW_SLACK;
|
|
83
|
+
const tickPrice = Number((Math.ceil((level - slack) / priceTick) * priceTick).toFixed(decimalPlaces(priceTick)));
|
|
84
|
+
if (!Number.isFinite(tickPrice))
|
|
85
|
+
return level;
|
|
86
|
+
if (tickPrice < level - slack || tickPrice > level + blockSize * (1 + WINDOW_SLACK))
|
|
87
|
+
return level;
|
|
88
|
+
return tickPrice;
|
|
89
|
+
}
|
|
90
|
+
/** The unit the rows fold on: the exchange tick on a sparse-block venue, the served block elsewhere. */
|
|
91
|
+
export function resolveFootprintGridUnit(blockSize, priceTick) {
|
|
92
|
+
return isSparseTickVenue(blockSize, priceTick) ? priceTick : blockSize;
|
|
93
|
+
}
|
|
94
|
+
/** The identity a persisted anchor (and an auto row size) belongs to under `scope`. */
|
|
95
|
+
export function footprintAnchorIdentity(settings, scope = 'instrument') {
|
|
96
|
+
if (scope === 'coin')
|
|
97
|
+
return `coin|${String(settings?.coin ?? '')}`;
|
|
98
|
+
return `${String(settings?.exchange ?? '')}|${String(settings?.symbol ?? '')}`;
|
|
99
|
+
}
|
|
100
|
+
/** The persisted anchor tick when it was inferred for THIS identity, else undefined. */
|
|
101
|
+
export function persistedFootprintAnchorTick(settings, scope = 'instrument') {
|
|
102
|
+
const tick = settings?.anchorTick;
|
|
103
|
+
if (!positiveFinite(tick))
|
|
104
|
+
return undefined;
|
|
105
|
+
return settings?.anchorTickIdentity === footprintAnchorIdentity(settings, scope) ? tick : undefined;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* The tick the footprint workers fold on for these settings (the fetch payload
|
|
109
|
+
* and the live SUBSCRIBE carry the persisted anchor): the anchor when it names
|
|
110
|
+
* the settings' own instrument (Volume Footprint) or coin (Agg. Volume
|
|
111
|
+
* Footprint), else undefined (block fold). Profile overlays carry no anchor.
|
|
112
|
+
*/
|
|
113
|
+
export function footprintDrawnTick(settings) {
|
|
114
|
+
if (!settings)
|
|
115
|
+
return undefined;
|
|
116
|
+
return persistedFootprintAnchorTick(settings, 'instrument') ?? persistedFootprintAnchorTick(settings, 'coin');
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* The row height a "Ticks per bar" multiplier draws: the tick times the
|
|
120
|
+
* multiplier on a sparse-tick venue (`resolveFootprintTickGrid`, the workers'
|
|
121
|
+
* and the live fold's rule), the block times the multiplier everywhere else.
|
|
122
|
+
* Null for missing or degenerate inputs.
|
|
123
|
+
*/
|
|
124
|
+
export function footprintDrawnRowHeight(blockSize, multiplier, priceTick) {
|
|
125
|
+
if (!positiveFinite(blockSize) || !positiveFinite(multiplier))
|
|
126
|
+
return null;
|
|
127
|
+
return resolveFootprintTickGrid(blockSize, blockSize * multiplier, priceTick)?.barHeight ?? blockSize * multiplier;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* The tick-based grid a sparse-block venue folds on, or null on every other
|
|
131
|
+
* venue (whose grid stays the block and its raw settings product, byte for
|
|
132
|
+
* byte). "Ticks per bar" is read back from the requested heights
|
|
133
|
+
* (`barHeight / minimumBarHeight`, the block times the integer multiplier the
|
|
134
|
+
* settings hold) and rounded back to that integer, which also kills the dust
|
|
135
|
+
* a settings product carries through a division; the render height is never
|
|
136
|
+
* finer than one tick. Both footprint workers and the live fold derive their
|
|
137
|
+
* grid from the same three inputs through this function, which is what keeps
|
|
138
|
+
* the fetched rows, the staged handoff grid, and the live fold on ONE lattice.
|
|
139
|
+
*/
|
|
140
|
+
export function resolveFootprintTickGrid(minimumBarHeight, barHeight, priceTick) {
|
|
141
|
+
if (!isSparseTickVenue(minimumBarHeight, priceTick))
|
|
142
|
+
return null;
|
|
143
|
+
const tick = priceTick;
|
|
144
|
+
const ratio = positiveFinite(barHeight) ? barHeight / minimumBarHeight : 1;
|
|
145
|
+
const multiplier = Math.max(1, Math.round(ratio));
|
|
146
|
+
return { minimumBarHeight: tick, barHeight: Number((tick * multiplier).toPrecision(9)) };
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* The same points with every served level replaced by the tick price it holds
|
|
150
|
+
* (`tickPriceOfServedLevel`); volumes, counts, and timestamps ride untouched.
|
|
151
|
+
* Rebuilds rather than mutates: the input is the transport's own buffer.
|
|
152
|
+
*/
|
|
153
|
+
export function mapServedPointsToTickGrid(points, blockSize, priceTick) {
|
|
154
|
+
return points.map((point) => {
|
|
155
|
+
const aggregation = point?.volumeProfileAggregation;
|
|
156
|
+
const profile = aggregation?.profile;
|
|
157
|
+
if (!aggregation || !Array.isArray(profile))
|
|
158
|
+
return point;
|
|
159
|
+
const mapped = profile.slice();
|
|
160
|
+
for (let i = 0; i < mapped.length; i += 3) {
|
|
161
|
+
const level = mapped[i];
|
|
162
|
+
if (typeof level === 'number')
|
|
163
|
+
mapped[i] = tickPriceOfServedLevel(level, blockSize, priceTick);
|
|
164
|
+
}
|
|
165
|
+
return { ...point, volumeProfileAggregation: { ...aggregation, profile: mapped } };
|
|
166
|
+
});
|
|
167
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The gesture timing constants (a leaf of utility/chart/viewport-pan-tracking.util.ts; P2/inventory.md section 1.1):
|
|
3
|
+
* the linger that keeps a gesture live between segments and the ceiling of a heavy apply's pan-idle wait, the two
|
|
4
|
+
* numbers the wrun executor's warm-up ask reads. Constants only, no imports, so it moves into the chart-host package
|
|
5
|
+
* with the phase 2 closure; the pan tracking module imports and re-exports both.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Recency window that keeps a gesture "live" between segments. A real
|
|
9
|
+
* pan-back is multi-segment (drag, reversal micro-pause, drag again) and the
|
|
10
|
+
* titan `isGestureActive` getter reads false inside those pauses, so the
|
|
11
|
+
* live-gesture signal below must bridge them: a herd of held applies flushing
|
|
12
|
+
* into a reversal pause is the exact failure the 400ms idle wait allows.
|
|
13
|
+
* Production constant; deliberately NOT coupled to the debug-only
|
|
14
|
+
* PAN_GESTURE_IDLE_MS bracket in lazy-load-debug.util.
|
|
15
|
+
*/
|
|
16
|
+
export declare const GESTURE_LINGER_MS = 600;
|
|
17
|
+
/**
|
|
18
|
+
* `maxWaitMs` for HEAVY apply deferrals: heatmap chunk merges, indicator
|
|
19
|
+
* backfill applies, protected result integrations. A real wide-pan gesture
|
|
20
|
+
* runs 10-15s (2026-07-12 dump: 13.8s, 422 pan notes), so the earlier 3-5s
|
|
21
|
+
* caps expired mid-gesture and force-applied wide-span layer mutations; the
|
|
22
|
+
* next frame's first full re-raster of that content then stalled presentation
|
|
23
|
+
* for 5-11 vsyncs with the main thread idle (10 render-bound gaps, worst
|
|
24
|
+
* 184ms, jsBusyMs 0). Holding longer is safe: every call site re-validates
|
|
25
|
+
* request staleness and supersession after the wait, and `idleMs` stays 400
|
|
26
|
+
* so calm-path and post-gesture backfill latency are unchanged. The ceiling
|
|
27
|
+
* exists only to bound a pathological never-idle viewport.
|
|
28
|
+
*/
|
|
29
|
+
export declare const HEAVY_APPLY_GESTURE_CEILING_MS = 20000;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The gesture timing constants (a leaf of utility/chart/viewport-pan-tracking.util.ts; P2/inventory.md section 1.1):
|
|
3
|
+
* the linger that keeps a gesture live between segments and the ceiling of a heavy apply's pan-idle wait, the two
|
|
4
|
+
* numbers the wrun executor's warm-up ask reads. Constants only, no imports, so it moves into the chart-host package
|
|
5
|
+
* with the phase 2 closure; the pan tracking module imports and re-exports both.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Recency window that keeps a gesture "live" between segments. A real
|
|
9
|
+
* pan-back is multi-segment (drag, reversal micro-pause, drag again) and the
|
|
10
|
+
* titan `isGestureActive` getter reads false inside those pauses, so the
|
|
11
|
+
* live-gesture signal below must bridge them: a herd of held applies flushing
|
|
12
|
+
* into a reversal pause is the exact failure the 400ms idle wait allows.
|
|
13
|
+
* Production constant; deliberately NOT coupled to the debug-only
|
|
14
|
+
* PAN_GESTURE_IDLE_MS bracket in lazy-load-debug.util.
|
|
15
|
+
*/
|
|
16
|
+
export const GESTURE_LINGER_MS = 600;
|
|
17
|
+
/**
|
|
18
|
+
* `maxWaitMs` for HEAVY apply deferrals: heatmap chunk merges, indicator
|
|
19
|
+
* backfill applies, protected result integrations. A real wide-pan gesture
|
|
20
|
+
* runs 10-15s (2026-07-12 dump: 13.8s, 422 pan notes), so the earlier 3-5s
|
|
21
|
+
* caps expired mid-gesture and force-applied wide-span layer mutations; the
|
|
22
|
+
* next frame's first full re-raster of that content then stalled presentation
|
|
23
|
+
* for 5-11 vsyncs with the main thread idle (10 render-bound gaps, worst
|
|
24
|
+
* 184ms, jsBusyMs 0). Holding longer is safe: every call site re-validates
|
|
25
|
+
* request staleness and supersession after the wait, and `idleMs` stays 400
|
|
26
|
+
* so calm-path and post-gesture backfill latency are unchanged. The ceiling
|
|
27
|
+
* exists only to bound a pathological never-idle viewport.
|
|
28
|
+
*/
|
|
29
|
+
export const HEAVY_APPLY_GESTURE_CEILING_MS = 20_000;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Coin identity of a CME-governed contract code: the product root ("CLV6" ->
|
|
3
|
+
* "CL", "MNQZ6" -> "MNQ", "CL1!" -> "CL"), or null when the code carries no
|
|
4
|
+
* delivery month. The live-feed stamps every governed frame's `coin` with the
|
|
5
|
+
* root (normalized-symbol prefix), and the VP-family live fold
|
|
6
|
+
* (aggregated-volume-profile-storage) admits a frame only on
|
|
7
|
+
* `subscription.coin === series.coin`, so the chart coin MUST be the root. The
|
|
8
|
+
* crypto prefix guess in getCoin is meaningless on a contract code: "CLV6"
|
|
9
|
+
* matched the Clover token (CLV) and every NYMEX CL profile froze live while
|
|
10
|
+
* candles kept ticking (Delta Profile reports, 2026-08 ticket 305 / 2026-09).
|
|
11
|
+
* The registry also lists contract codes themselves as coins (NQZ6, ESU6: the
|
|
12
|
+
* option underlyings), so a search row's pre-resolved coin can be the contract
|
|
13
|
+
* code; on a governed venue the root always wins over it.
|
|
14
|
+
*/
|
|
15
|
+
export declare function governedContractCoin(symbol: string | undefined | null): string | null;
|
|
16
|
+
/**
|
|
17
|
+
* The governed contract root when `exchange` is CME-governed, else null (the
|
|
18
|
+
* caller falls through to its own coin source). One rung for every writer of
|
|
19
|
+
* a chart or cell coin, so a multimode cell and a single chart on the same
|
|
20
|
+
* contract fold live frames on the same identity.
|
|
21
|
+
*/
|
|
22
|
+
export declare function governedVenueCoin(exchange: string | undefined | null, symbol: string | undefined | null): string | null;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { isCmeGoverned } from './cme-realtime.util.js';
|
|
2
|
+
import { continuousRootOf } from './continuous-contracts.util.js';
|
|
3
|
+
import { parseCmeContractExpiry } from '../symbol-selection/contract-expiry.util.js';
|
|
4
|
+
// Light, store-free module: the governed rung of the chart coin resolver, shared
|
|
5
|
+
// by `getCoin` (symbol-resolve.util, store-coupled) and the multimode cell
|
|
6
|
+
// writers, which must resolve the same coin synchronously without pulling the
|
|
7
|
+
// chart store, the metadata service or the icon composable into the store graph.
|
|
8
|
+
/**
|
|
9
|
+
* Coin identity of a CME-governed contract code: the product root ("CLV6" ->
|
|
10
|
+
* "CL", "MNQZ6" -> "MNQ", "CL1!" -> "CL"), or null when the code carries no
|
|
11
|
+
* delivery month. The live-feed stamps every governed frame's `coin` with the
|
|
12
|
+
* root (normalized-symbol prefix), and the VP-family live fold
|
|
13
|
+
* (aggregated-volume-profile-storage) admits a frame only on
|
|
14
|
+
* `subscription.coin === series.coin`, so the chart coin MUST be the root. The
|
|
15
|
+
* crypto prefix guess in getCoin is meaningless on a contract code: "CLV6"
|
|
16
|
+
* matched the Clover token (CLV) and every NYMEX CL profile froze live while
|
|
17
|
+
* candles kept ticking (Delta Profile reports, 2026-08 ticket 305 / 2026-09).
|
|
18
|
+
* The registry also lists contract codes themselves as coins (NQZ6, ESU6: the
|
|
19
|
+
* option underlyings), so a search row's pre-resolved coin can be the contract
|
|
20
|
+
* code; on a governed venue the root always wins over it.
|
|
21
|
+
*/
|
|
22
|
+
export function governedContractCoin(symbol) {
|
|
23
|
+
if (!symbol)
|
|
24
|
+
return null;
|
|
25
|
+
const continuousRoot = continuousRootOf(symbol);
|
|
26
|
+
if (continuousRoot)
|
|
27
|
+
return continuousRoot;
|
|
28
|
+
const parsed = parseCmeContractExpiry(symbol);
|
|
29
|
+
return parsed?.root || null;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The governed contract root when `exchange` is CME-governed, else null (the
|
|
33
|
+
* caller falls through to its own coin source). One rung for every writer of
|
|
34
|
+
* a chart or cell coin, so a multimode cell and a single chart on the same
|
|
35
|
+
* contract fold live frames on the same identity.
|
|
36
|
+
*/
|
|
37
|
+
export function governedVenueCoin(exchange, symbol) {
|
|
38
|
+
return isCmeGoverned(exchange) ? governedContractCoin(symbol) : null;
|
|
39
|
+
}
|