@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
|
@@ -8,19 +8,26 @@
|
|
|
8
8
|
// while hidden, the clock starts at the first visible moment, so the callback only
|
|
9
9
|
// ever runs while the tab is visible.
|
|
10
10
|
//
|
|
11
|
+
// A host can suspend its chart while the page stays visible (an app backgrounded,
|
|
12
|
+
// or its chart tab blurred, in a web view that keeps `visible`): a deadline handed
|
|
13
|
+
// the host's watch (`watchSuspended`) also pauses while the host reads suspended,
|
|
14
|
+
// on the same edges as a hide.
|
|
15
|
+
//
|
|
11
16
|
// Deliberately no import: the chart boot path loads it (hidden-paced-loop.util says
|
|
12
17
|
// why a leaf here must not pull document-visibility.util in).
|
|
13
18
|
/**
|
|
14
19
|
* Runs `callback` once `budgetMs` of visible time has passed since the call. Outside a
|
|
15
20
|
* browser (no `document`) every millisecond counts, as with a plain timeout, and so it
|
|
16
21
|
* does for a document that reports no visibility state: only an explicit `hidden`
|
|
17
|
-
* pauses the clock, so a deadline can never be parked forever by a missing API.
|
|
18
|
-
*
|
|
19
|
-
*
|
|
22
|
+
* pauses the clock, so a deadline can never be parked forever by a missing API. A host's
|
|
23
|
+
* suspension (`options.watchSuspended`) pauses it too. Whatever a deadline armed is
|
|
24
|
+
* released by `clear()`, by its own fire, and so by a caller's re-arm (clear the old
|
|
25
|
+
* handle, start a new one).
|
|
20
26
|
*/
|
|
21
|
-
export function startVisibleTimeout(callback, budgetMs) {
|
|
27
|
+
export function startVisibleTimeout(callback, budgetMs, options) {
|
|
22
28
|
const doc = typeof document === 'undefined' ? null : document;
|
|
23
|
-
|
|
29
|
+
let hostSuspended = false;
|
|
30
|
+
const isVisible = () => doc?.visibilityState !== 'hidden' && !hostSuspended;
|
|
24
31
|
// Monotonic, like the timers themselves: a wall-clock jump must not bank visible time.
|
|
25
32
|
const now = () => performance.now();
|
|
26
33
|
const startedAt = now();
|
|
@@ -43,6 +50,7 @@ export function startVisibleTimeout(callback, budgetMs) {
|
|
|
43
50
|
pause();
|
|
44
51
|
stoppedAt = now();
|
|
45
52
|
doc?.removeEventListener?.('visibilitychange', onVisibilityChange);
|
|
53
|
+
unwatchSuspended?.();
|
|
46
54
|
};
|
|
47
55
|
const fire = () => {
|
|
48
56
|
timer = null;
|
|
@@ -53,8 +61,10 @@ export function startVisibleTimeout(callback, budgetMs) {
|
|
|
53
61
|
visibleSince = now();
|
|
54
62
|
timer = setTimeout(fire, Math.max(0, budgetMs - bankedVisibleMs));
|
|
55
63
|
};
|
|
56
|
-
// Acts on edges only: a repeated `visible` never stacks a second timer.
|
|
64
|
+
// Acts on edges only: a repeated `visible` never stacks a second timer, and a stopped deadline arms nothing.
|
|
57
65
|
function onVisibilityChange() {
|
|
66
|
+
if (stoppedAt !== null)
|
|
67
|
+
return;
|
|
58
68
|
const visible = isVisible();
|
|
59
69
|
if (visible && visibleSince === null)
|
|
60
70
|
resume();
|
|
@@ -62,8 +72,13 @@ export function startVisibleTimeout(callback, budgetMs) {
|
|
|
62
72
|
pause();
|
|
63
73
|
}
|
|
64
74
|
doc?.addEventListener?.('visibilitychange', onVisibilityChange);
|
|
65
|
-
|
|
66
|
-
|
|
75
|
+
// The host's watch answers its state at once (before the first arm) and on every change; its listener never stops
|
|
76
|
+
// the deadline, so `stop` reads the unwatch only once it is set.
|
|
77
|
+
const unwatchSuspended = options?.watchSuspended?.((suspended) => {
|
|
78
|
+
hostSuspended = suspended;
|
|
79
|
+
onVisibilityChange();
|
|
80
|
+
});
|
|
81
|
+
onVisibilityChange();
|
|
67
82
|
return {
|
|
68
83
|
clear: stop,
|
|
69
84
|
visibleElapsedMs: () => visibleAt(now()),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function formatExchangeDisplay(exchange: string, displayTransformations?: string): string;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A venue's display code (a leaf of utility/exchange-format.util.ts; P2/inventory.md section 1.1):
|
|
3
|
+
* `formatExchangeDisplay`, the exchange the chart header shows ("BINANCE.F", "OKX.F", "FRED"). The old module also
|
|
4
|
+
* reads the i18n plugin (formatExchangeName's suffix words), which keeps it out of the chart-host package; this leaf
|
|
5
|
+
* reads only the source delimiter (constants/data-source.constants, a package module) and moves with the phase 2
|
|
6
|
+
* closure. The old module re-exports it.
|
|
7
|
+
*/
|
|
8
|
+
import { delimiter } from '../constants/data-source.constants.js';
|
|
9
|
+
export function formatExchangeDisplay(exchange, displayTransformations) {
|
|
10
|
+
if (exchange.toUpperCase() === 'SOLANA_ONCHAIN')
|
|
11
|
+
return 'Solana';
|
|
12
|
+
const suffixMap = {
|
|
13
|
+
_FUTURE: '.F',
|
|
14
|
+
_FUTURES: '.F',
|
|
15
|
+
_PERPETUAL: '.F',
|
|
16
|
+
_OPTION: '.O',
|
|
17
|
+
_OPTIONS: '.O',
|
|
18
|
+
_DERIVATIVES: '.D',
|
|
19
|
+
_SWAP: '.S',
|
|
20
|
+
_SPOT: '',
|
|
21
|
+
};
|
|
22
|
+
const applyTransformations = (exchangeString) => {
|
|
23
|
+
const result = exchangeString
|
|
24
|
+
.replace('PYTH_NETWORK', 'PYTH')
|
|
25
|
+
.replace('GATE_IO', 'GATE.IO')
|
|
26
|
+
.replace('OKEX_SWAP', 'OKX.F')
|
|
27
|
+
.replace('OKEX', 'OKX');
|
|
28
|
+
for (const [suffix, replacement] of Object.entries(suffixMap)) {
|
|
29
|
+
if (result.endsWith(suffix)) {
|
|
30
|
+
return result.slice(0, -suffix.length) + replacement;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
// FRED is the St. Louis Fed's database, not the series' publisher (UNRATE is BLS data),
|
|
36
|
+
// so it always reads "FRED"; older picks stored "FEDERAL RESERVE" as the display venue.
|
|
37
|
+
if (exchange === 'FRED')
|
|
38
|
+
return 'FRED';
|
|
39
|
+
if (!displayTransformations) {
|
|
40
|
+
return applyTransformations(exchange);
|
|
41
|
+
}
|
|
42
|
+
if (delimiter && displayTransformations.includes(delimiter)) {
|
|
43
|
+
const exchangeDisplay = displayTransformations.split(delimiter)[0];
|
|
44
|
+
return applyTransformations(exchangeDisplay);
|
|
45
|
+
}
|
|
46
|
+
return applyTransformations(displayTransformations);
|
|
47
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The HTML escape of html-sanitizer.ts (which re-exports it) as a leaf with no import: the child mount
|
|
3
|
+
* (wrun-panel-mount.util) escapes its legend titles with it, and it moves into the wrun chart-host package, which the
|
|
4
|
+
* sanitizer's DOMPurify and app environment may not reach.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Escape a string for safe interpolation into HTML text or double-quoted
|
|
8
|
+
* attribute context. Use this when building HTML strings with template literals
|
|
9
|
+
* that later reach a v-html / innerHTML sink.
|
|
10
|
+
*/
|
|
11
|
+
export declare function escapeHtml(input: unknown): string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The HTML escape of html-sanitizer.ts (which re-exports it) as a leaf with no import: the child mount
|
|
3
|
+
* (wrun-panel-mount.util) escapes its legend titles with it, and it moves into the wrun chart-host package, which the
|
|
4
|
+
* sanitizer's DOMPurify and app environment may not reach.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Escape a string for safe interpolation into HTML text or double-quoted
|
|
8
|
+
* attribute context. Use this when building HTML strings with template literals
|
|
9
|
+
* that later reach a v-html / innerHTML sink.
|
|
10
|
+
*/
|
|
11
|
+
export function escapeHtml(input) {
|
|
12
|
+
if (input === null || input === undefined)
|
|
13
|
+
return '';
|
|
14
|
+
return String(input)
|
|
15
|
+
.replace(/&/g, '&')
|
|
16
|
+
.replace(/</g, '<')
|
|
17
|
+
.replace(/>/g, '>')
|
|
18
|
+
.replace(/"/g, '"')
|
|
19
|
+
.replace(/'/g, ''');
|
|
20
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { EarningsEventKind, MarketEventsCoverage } from '../../interfaces/market-event.interface.js';
|
|
2
|
+
export declare const DAY_MS: number;
|
|
3
|
+
/** What one slice holds: one kind, one ticker or every ticker, the major companies (impact >= 2) or all of them. */
|
|
4
|
+
export interface EarningsScope {
|
|
5
|
+
kind: EarningsEventKind;
|
|
6
|
+
ticker: string | null;
|
|
7
|
+
majorOnly: boolean;
|
|
8
|
+
/** Epoch ms; normalized down to its UTC day. */
|
|
9
|
+
from: number;
|
|
10
|
+
/** Epoch ms, exclusive; normalized up to a UTC midnight. */
|
|
11
|
+
to: number;
|
|
12
|
+
}
|
|
13
|
+
/** A half-open span of whole UTC days, [from, to). */
|
|
14
|
+
export interface EarningsWindow {
|
|
15
|
+
from: number;
|
|
16
|
+
to: number;
|
|
17
|
+
}
|
|
18
|
+
/** The ticker filter the backend accepts (`^[A-Z][A-Z0-9.\-]{0,9}$`, upper case). */
|
|
19
|
+
export declare const EARNINGS_TICKER_PATTERN: RegExp;
|
|
20
|
+
/** `YYYY-MM-DD` of the UTC day an instant falls in. */
|
|
21
|
+
export declare function utcDayKey(ms: number): string;
|
|
22
|
+
/** A ticker as the slices key it: trimmed, upper case, null for none. */
|
|
23
|
+
export declare function normalizeEarningsTicker(ticker: string | null | undefined): string | null;
|
|
24
|
+
/** The scope's window on whole UTC days: `from` down to its midnight, `to` up to the next one (at least one day). */
|
|
25
|
+
export declare function earningsWindow(scope: Pick<EarningsScope, 'from' | 'to'>): EarningsWindow;
|
|
26
|
+
/** The scope every reader agrees on: the ticker normalized, the window on whole UTC days. */
|
|
27
|
+
export declare function normalizeEarningsScope(scope: EarningsScope): EarningsScope;
|
|
28
|
+
/**
|
|
29
|
+
* `${kind}|${ticker ?? '*'}|${majorOnly ? 'major' : 'all'}|${fromDay}|${toDay}`,
|
|
30
|
+
* the days `YYYY-MM-DD` of the normalized window (`toDay` is its exclusive
|
|
31
|
+
* end): `earnings|*|major|2026-10-01|2026-10-22`.
|
|
32
|
+
*/
|
|
33
|
+
export declare function earningsScopeKey(scope: EarningsScope): string;
|
|
34
|
+
/** The kind an earnings scope key names; null for anything else (an asset class, a malformed key). */
|
|
35
|
+
export declare function earningsKeyKind(key: string): EarningsEventKind | null;
|
|
36
|
+
/**
|
|
37
|
+
* The list: the week behind today and the two ahead as days of the chart's
|
|
38
|
+
* zone, [today − 7 d, today + 14 d), rounded out to whole UTC days so no zone
|
|
39
|
+
* day is cut at either edge. In UTC that is exactly [today − 7 d, today + 14 d).
|
|
40
|
+
*/
|
|
41
|
+
export declare function listWindow(now: number, offsetMs?: number): EarningsWindow;
|
|
42
|
+
/**
|
|
43
|
+
* One calendar month of the chart's zone (`month` 0 to 11 as
|
|
44
|
+
* `Date#getUTCMonth()` reads it), rounded out to whole UTC days. A zone east
|
|
45
|
+
* of UTC starts its month before UTC midnight: a US after-close print on the
|
|
46
|
+
* zone's 1st would otherwise fall out of both months.
|
|
47
|
+
*/
|
|
48
|
+
export declare function monthWindow(year: number, month: number, offsetMs?: number): EarningsWindow;
|
|
49
|
+
/**
|
|
50
|
+
* One ticker's whole stored horizon, [today − 400 d, today + 90 d): 490 days,
|
|
51
|
+
* allowed because a ticker query is not held to the 92-day span of a broad one.
|
|
52
|
+
*/
|
|
53
|
+
export declare function tickerWindow(now: number): EarningsWindow;
|
|
54
|
+
/**
|
|
55
|
+
* Whether a span [from, to) lies inside the served coverage. The served `to`
|
|
56
|
+
* may be an exclusive midnight or the last instant of its day; both read the
|
|
57
|
+
* same. No coverage covers nothing: those days show as unavailable, which is
|
|
58
|
+
* not the same as a day with zero reports.
|
|
59
|
+
*/
|
|
60
|
+
export declare function coverageIncludes(coverage: MarketEventsCoverage | null, from: number, to: number): boolean;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
export const DAY_MS = 24 * 60 * 60 * 1000;
|
|
2
|
+
/** The ticker filter the backend accepts (`^[A-Z][A-Z0-9.\-]{0,9}$`, upper case). */
|
|
3
|
+
export const EARNINGS_TICKER_PATTERN = /^[A-Z][A-Z0-9.-]{0,9}$/;
|
|
4
|
+
const floorUtcDay = (ms) => Math.floor(ms / DAY_MS) * DAY_MS;
|
|
5
|
+
const ceilUtcDay = (ms) => Math.ceil(ms / DAY_MS) * DAY_MS;
|
|
6
|
+
const pad2 = (value) => String(value).padStart(2, '0');
|
|
7
|
+
/** `YYYY-MM-DD` of the UTC day an instant falls in. */
|
|
8
|
+
export function utcDayKey(ms) {
|
|
9
|
+
const day = new Date(ms);
|
|
10
|
+
return `${day.getUTCFullYear()}-${pad2(day.getUTCMonth() + 1)}-${pad2(day.getUTCDate())}`;
|
|
11
|
+
}
|
|
12
|
+
/** A ticker as the slices key it: trimmed, upper case, null for none. */
|
|
13
|
+
export function normalizeEarningsTicker(ticker) {
|
|
14
|
+
const value = (ticker ?? '').trim().toUpperCase();
|
|
15
|
+
return value.length > 0 ? value : null;
|
|
16
|
+
}
|
|
17
|
+
/** The scope's window on whole UTC days: `from` down to its midnight, `to` up to the next one (at least one day). */
|
|
18
|
+
export function earningsWindow(scope) {
|
|
19
|
+
const from = floorUtcDay(scope.from);
|
|
20
|
+
const ceiled = ceilUtcDay(scope.to);
|
|
21
|
+
return { from, to: ceiled > from ? ceiled : from + DAY_MS };
|
|
22
|
+
}
|
|
23
|
+
/** The scope every reader agrees on: the ticker normalized, the window on whole UTC days. */
|
|
24
|
+
export function normalizeEarningsScope(scope) {
|
|
25
|
+
return {
|
|
26
|
+
kind: scope.kind,
|
|
27
|
+
ticker: normalizeEarningsTicker(scope.ticker),
|
|
28
|
+
majorOnly: scope.majorOnly === true,
|
|
29
|
+
...earningsWindow(scope),
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* `${kind}|${ticker ?? '*'}|${majorOnly ? 'major' : 'all'}|${fromDay}|${toDay}`,
|
|
34
|
+
* the days `YYYY-MM-DD` of the normalized window (`toDay` is its exclusive
|
|
35
|
+
* end): `earnings|*|major|2026-10-01|2026-10-22`.
|
|
36
|
+
*/
|
|
37
|
+
export function earningsScopeKey(scope) {
|
|
38
|
+
const normalized = normalizeEarningsScope(scope);
|
|
39
|
+
return [
|
|
40
|
+
normalized.kind,
|
|
41
|
+
normalized.ticker ?? '*',
|
|
42
|
+
normalized.majorOnly ? 'major' : 'all',
|
|
43
|
+
utcDayKey(normalized.from),
|
|
44
|
+
utcDayKey(normalized.to),
|
|
45
|
+
].join('|');
|
|
46
|
+
}
|
|
47
|
+
/** The kind an earnings scope key names; null for anything else (an asset class, a malformed key). */
|
|
48
|
+
export function earningsKeyKind(key) {
|
|
49
|
+
if (key.startsWith('earnings|'))
|
|
50
|
+
return 'earnings';
|
|
51
|
+
if (key.startsWith('dividend|'))
|
|
52
|
+
return 'dividend';
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* The list: the week behind today and the two ahead as days of the chart's
|
|
57
|
+
* zone, [today − 7 d, today + 14 d), rounded out to whole UTC days so no zone
|
|
58
|
+
* day is cut at either edge. In UTC that is exactly [today − 7 d, today + 14 d).
|
|
59
|
+
*/
|
|
60
|
+
export function listWindow(now, offsetMs = 0) {
|
|
61
|
+
const today = Math.floor((now + offsetMs) / DAY_MS) * DAY_MS - offsetMs;
|
|
62
|
+
return { from: floorUtcDay(today - 7 * DAY_MS), to: ceilUtcDay(today + 14 * DAY_MS) };
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* One calendar month of the chart's zone (`month` 0 to 11 as
|
|
66
|
+
* `Date#getUTCMonth()` reads it), rounded out to whole UTC days. A zone east
|
|
67
|
+
* of UTC starts its month before UTC midnight: a US after-close print on the
|
|
68
|
+
* zone's 1st would otherwise fall out of both months.
|
|
69
|
+
*/
|
|
70
|
+
export function monthWindow(year, month, offsetMs = 0) {
|
|
71
|
+
return {
|
|
72
|
+
from: floorUtcDay(Date.UTC(year, month, 1) - offsetMs),
|
|
73
|
+
to: ceilUtcDay(Date.UTC(year, month + 1, 1) - offsetMs),
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* One ticker's whole stored horizon, [today − 400 d, today + 90 d): 490 days,
|
|
78
|
+
* allowed because a ticker query is not held to the 92-day span of a broad one.
|
|
79
|
+
*/
|
|
80
|
+
export function tickerWindow(now) {
|
|
81
|
+
const today = floorUtcDay(now);
|
|
82
|
+
return { from: today - 400 * DAY_MS, to: today + 90 * DAY_MS };
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Whether a span [from, to) lies inside the served coverage. The served `to`
|
|
86
|
+
* may be an exclusive midnight or the last instant of its day; both read the
|
|
87
|
+
* same. No coverage covers nothing: those days show as unavailable, which is
|
|
88
|
+
* not the same as a day with zero reports.
|
|
89
|
+
*/
|
|
90
|
+
export function coverageIncludes(coverage, from, to) {
|
|
91
|
+
return coverage !== null && from >= coverage.from && to <= coverage.to + 1;
|
|
92
|
+
}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import type { EarningsSlot, MarketAssetClass, MarketEvent, MarketEventImpact, MarketEventSeriesLink } from '../../interfaces/market-event.interface.js';
|
|
2
|
+
import { type VenueMarketKind } from '../chart/marketKind.util.js';
|
|
3
|
+
/** Chart-side market kind → the server's relevance bucket. */
|
|
4
|
+
export declare function assetClassForMarketKind(kind: VenueMarketKind): MarketAssetClass;
|
|
5
|
+
export declare function assetClassForExchange(exchange: string | null | undefined): MarketAssetClass;
|
|
6
|
+
/**
|
|
7
|
+
* Whether a row may count down: earnings reports and dividends never do. They
|
|
8
|
+
* never become the NEXT EVENT cell, the footer chip, the countdown line or a
|
|
9
|
+
* fast poll, whatever list they are merged into.
|
|
10
|
+
*/
|
|
11
|
+
export declare function countsDown(event: Pick<MarketEvent, 'kind'>): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* The actual printed (an exact row past its instant with a value, or any row
|
|
14
|
+
* past its instant). A dividend is released only once its ex-date passed: its
|
|
15
|
+
* amount rides the dividend block, never `actual`.
|
|
16
|
+
*/
|
|
17
|
+
export declare function isReleased(event: MarketEvent, now: number): boolean;
|
|
18
|
+
export declare function isRecentlyReleased(event: MarketEvent, now: number, holdMs?: number): boolean;
|
|
19
|
+
/** The next exact print at or above `minImpact` after `now`; never an earnings report or a dividend (`countsDown`). */
|
|
20
|
+
export declare function nextEvent(events: MarketEvent[], now: number, minImpact?: MarketEventImpact): MarketEvent | null;
|
|
21
|
+
/**
|
|
22
|
+
* The most recent print (exact, at or above `minImpact`) still inside the
|
|
23
|
+
* hold window, so the surfaces can show "CPI 3.1% ▲" for a while. Earnings
|
|
24
|
+
* reports and dividends never hold the surfaces (`countsDown`).
|
|
25
|
+
*/
|
|
26
|
+
export declare function recentlyReleasedEvent(events: MarketEvent[], now: number, minImpact?: MarketEventImpact, holdMs?: number): MarketEvent | null;
|
|
27
|
+
export interface ReleaseGroup {
|
|
28
|
+
id: string;
|
|
29
|
+
at: number;
|
|
30
|
+
/** Highest impact first, then title; the first is the group representative. */
|
|
31
|
+
events: MarketEvent[];
|
|
32
|
+
}
|
|
33
|
+
/** Rows that print at the same instant, sorted by release time. */
|
|
34
|
+
export declare function groupByRelease(events: MarketEvent[]): ReleaseGroup[];
|
|
35
|
+
/** Short name for tight surfaces: "US CPI (YoY)" → "CPI", "US FOMC rate decision" → "FOMC". */
|
|
36
|
+
export declare function shortTitle(event: MarketEvent): string;
|
|
37
|
+
/** Unit labels for a duration; the English defaults are what specs and dev tooling see. */
|
|
38
|
+
export interface CountdownUnits {
|
|
39
|
+
day: string;
|
|
40
|
+
hour: string;
|
|
41
|
+
minute: string;
|
|
42
|
+
lessThanMinute: string;
|
|
43
|
+
}
|
|
44
|
+
/** Wraps a duration into the "in …" phrase; the English default is replaced by a localized one in components. */
|
|
45
|
+
export type CountdownWrap = (duration: string) => string;
|
|
46
|
+
/** "in 18m", "in 4h 48m", "in 6d 5h"; null once the instant has passed. */
|
|
47
|
+
export declare function formatCountdown(msLeft: number, units?: CountdownUnits, wrap?: CountdownWrap): string | null;
|
|
48
|
+
/**
|
|
49
|
+
* The Events tab's countdown: "17:04" under an hour, "2h 17m" under a day,
|
|
50
|
+
* "2d 3h" beyond. No "in": the column header already says so.
|
|
51
|
+
*/
|
|
52
|
+
export declare function formatCompactCountdown(msLeft: number, units?: CountdownUnits): string | null;
|
|
53
|
+
/** "42m ago", "3h ago", "2d ago" for a print behind us. */
|
|
54
|
+
export declare function formatCompactAgo(msAgo: number, units?: CountdownUnits): string | null;
|
|
55
|
+
/** "18:22" for the ticker cell inside the last hour, else the coarse countdown. */
|
|
56
|
+
export declare function formatTickerCountdown(msLeft: number, units?: CountdownUnits, wrap?: CountdownWrap): string | null;
|
|
57
|
+
/** "08:30" in a fixed UTC-offset zone (the chart's time zone). */
|
|
58
|
+
export declare function formatClock(at: number, offsetMs: number): string;
|
|
59
|
+
/**
|
|
60
|
+
* Rows that carry a number once released: macro and central-bank prints from
|
|
61
|
+
* a vendor, and earnings reports (the EPS). Expiries, auctions, holidays and
|
|
62
|
+
* dividends only ever pass, and an official agency calendar row never carries
|
|
63
|
+
* a value either (the chart reads its linked series), so no surface may show
|
|
64
|
+
* it as pending a number.
|
|
65
|
+
*/
|
|
66
|
+
export declare function printsValue(event: Pick<MarketEvent, 'kind' | 'source'>): boolean;
|
|
67
|
+
/**
|
|
68
|
+
* When an earnings row reports against the US session: the served slot, else
|
|
69
|
+
* (a slot the row lacks) the one its Eastern clock gives; `unknown` for a
|
|
70
|
+
* date-only row, whose instant is an ordering placeholder. Null for every
|
|
71
|
+
* other kind.
|
|
72
|
+
*/
|
|
73
|
+
export declare function earningsSlot(event: Pick<MarketEvent, 'kind' | 'timing' | 'at' | 'earnings'>): EarningsSlot | null;
|
|
74
|
+
/**
|
|
75
|
+
* The equity ticker a pane shows, synchronously: a US stock pane (POLYGON,
|
|
76
|
+
* its US_STOCKS alias, or a legacy listing venue NYSE / NASDAQ / CBOE) names
|
|
77
|
+
* it before the slash (`JPM/USD` → `JPM`). Null for any other market, and for
|
|
78
|
+
* a symbol the calendar could not be asked about. HIP-3 panes resolve through
|
|
79
|
+
* `usePaneTicker`.
|
|
80
|
+
*/
|
|
81
|
+
export declare function paneTicker(metadata: {
|
|
82
|
+
exchange?: string | null;
|
|
83
|
+
symbol?: string | null;
|
|
84
|
+
} | null | undefined): string | null;
|
|
85
|
+
/** The first series an event links, the headline of the release; null when nothing is linked. */
|
|
86
|
+
export declare function headlineSeriesLink(event: Pick<MarketEvent, 'seriesLinks'>): MarketEventSeriesLink | null;
|
|
87
|
+
/** The agencies the release map names; each has a short form in the locale bundles (`marketEvents.publishers.*`). */
|
|
88
|
+
export type AgencyPublisherId = 'bls' | 'bea' | 'census' | 'dol' | 'fed' | 'ecb' | 'eurostat' | 'ons';
|
|
89
|
+
/** The agency behind a served publisher name, or null for one the map does not know. */
|
|
90
|
+
export declare function publisherId(publisher: string | null | undefined): AgencyPublisherId | null;
|
|
91
|
+
/** How long a value-bearing print past its instant reads as "printing now" before it is just pending. */
|
|
92
|
+
export declare const PRINTING_HOLD_MS: number;
|
|
93
|
+
export declare function surpriseGlyph(event: MarketEvent): string;
|
|
94
|
+
/** Escape vendor text before it rides an HTML-capable tooltip. */
|
|
95
|
+
export declare function escapeHtml(text: string): string;
|
|
96
|
+
export declare function isSourceFresh(lastSyncAt: number | null | undefined, now: number): boolean;
|
|
97
|
+
/** Day bucket in a fixed UTC-offset zone (the chart's time zone), for list headers. */
|
|
98
|
+
export declare function dayKey(at: number, offsetMs: number): string;
|
|
99
|
+
/**
|
|
100
|
+
* The calendar day a row belongs to in the zone. A date-only row (every
|
|
101
|
+
* dividend, a report with no announced time) carries a 09:30 Eastern
|
|
102
|
+
* placeholder instant that only orders the day: it keeps its US date in every
|
|
103
|
+
* zone, instead of sliding to the next day east of UTC+10.
|
|
104
|
+
*/
|
|
105
|
+
export declare function rowDayKey(event: Pick<MarketEvent, 'at'> & {
|
|
106
|
+
timing?: MarketEvent['timing'];
|
|
107
|
+
}, offsetMs: number): string;
|
|
108
|
+
/** Where a day sits relative to today; the panels localize it ("Today", "Tomorrow", else the date). */
|
|
109
|
+
export type DayGroupKey = 'today' | 'tomorrow' | 'date';
|
|
110
|
+
export interface DayGroup<T extends Pick<MarketEvent, 'at'> = MarketEvent> {
|
|
111
|
+
key: DayGroupKey;
|
|
112
|
+
/** `YYYY-MM-DD` in the zone. */
|
|
113
|
+
dateKey: string;
|
|
114
|
+
/** The instant the day starts in the zone, epoch ms. */
|
|
115
|
+
dayStartMs: number;
|
|
116
|
+
/** The day's rows, in the order given. */
|
|
117
|
+
events: T[];
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Rows by calendar day in a fixed UTC-offset zone (the chart's time zone), in
|
|
121
|
+
* order of first appearance (pass rows sorted by time). Raw keys only: the
|
|
122
|
+
* panels word them.
|
|
123
|
+
*/
|
|
124
|
+
export declare function dayGroups<T extends Pick<MarketEvent, 'at'> & {
|
|
125
|
+
timing?: MarketEvent['timing'];
|
|
126
|
+
} = MarketEvent>(events: readonly T[], nowMs: number, offsetMs: number): DayGroup<T>[];
|
|
127
|
+
/** Whether an exact print is close enough that surfaces should poll fast; earnings and dividends never count. */
|
|
128
|
+
export declare function isNearRelease(events: MarketEvent[], now: number, beforeMs: number, afterMs: number): boolean;
|
|
129
|
+
export interface ChartReach {
|
|
130
|
+
/** The instant sits within CHART_REACH_BARS of now on this interval (or behind us). */
|
|
131
|
+
ok: boolean;
|
|
132
|
+
/** The chart's interval label ("1h"), for the note. */
|
|
133
|
+
interval: string;
|
|
134
|
+
barsAhead: number;
|
|
135
|
+
/** The smallest interval that brings the instant within reach, when this one cannot. */
|
|
136
|
+
suggested: string | null;
|
|
137
|
+
}
|
|
138
|
+
export declare function chartReach(at: number, now: number, intervalMs: number, interval: string): ChartReach;
|
|
139
|
+
/**
|
|
140
|
+
* The visible range that frames an instant: a printed one is centred; a
|
|
141
|
+
* coming one keeps the latest candles on screen and the marker just inside
|
|
142
|
+
* the right edge, so the chart never opens on empty space with a lone line.
|
|
143
|
+
*/
|
|
144
|
+
export declare function frameWindow(at: number, now: number, intervalMs: number): {
|
|
145
|
+
start: number;
|
|
146
|
+
end: number;
|
|
147
|
+
};
|