@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
|
@@ -74,6 +74,25 @@ export type WrunHostedParams = Record<string, number | string>;
|
|
|
74
74
|
* for a value the user cannot see. The arm identity stays consistent: the
|
|
75
75
|
* alerts engine mints over the string it receives. */
|
|
76
76
|
export declare function wrunHostedTextValue(param: Pick<WrunMetadataParam, 'text_default' | 'max_bytes' | 'multiline'>, raw: unknown): string;
|
|
77
|
+
/**
|
|
78
|
+
* The hosted lanes' ONE host-fill table: each `host_fill` word, the chart context key it packs from (paramRunValue's
|
|
79
|
+
* reads) and the hidden param the kit generates for it (`market.<word>()` declares `market_<word>`, `chart.<word>()`
|
|
80
|
+
* `chart_<word>`; the extractor refuses any other param under those names), in the kit's order: the market's tick
|
|
81
|
+
* size and decimals, the chart's interval seconds and five colours (the candle and grid colours since WRUN-STYLE
|
|
82
|
+
* TH-candle-colors), the market's five facts (WRUN-GAPS-1005, WRUN-SESSION), the issuer's three earnings facts and the
|
|
83
|
+
* option multiplier of the chart's options chain. Every hosted path reads it: the settings
|
|
84
|
+
* record's `hostFill` (wrunHostedHostFill), the declaration rebuild (WRUN_HOST_FILL_BY_GENERATED_NAME) and the kScript
|
|
85
|
+
* socket worker's read of the main thread's context (WRUN_HOST_FILL_CONTEXT_KEYS), so no hosted path drops a word
|
|
86
|
+
* another carries; wrun-param-values.util.spec holds the table to every word the kit's browser lane fills.
|
|
87
|
+
*/
|
|
88
|
+
export declare const WRUN_HOST_FILL_WORDS: readonly [readonly ["tick_size", "tickSize", "market_tick_size"], readonly ["price_precision", "pricePrecision", "market_price_precision"], readonly ["interval_sec", "intervalSec", "chart_interval_sec"], readonly ["bg_color", "bgColor", "chart_bg_color"], readonly ["fg_color", "fgColor", "chart_fg_color"], readonly ["up_color", "upColor", "chart_up_color"], readonly ["down_color", "downColor", "chart_down_color"], readonly ["grid_color", "gridColor", "chart_grid_color"], readonly ["kind", "kind", "market_kind"], readonly ["point_value", "pointValue", "market_point_value"], readonly ["zone", "zone", "market_zone"], readonly ["quote_is_usd", "quoteIsUsd", "market_quote_is_usd"], readonly ["session_open", "sessionOpen", "market_session_open"], readonly ["earnings_next_ms", "earningsNextMs", "market_earnings_next_ms"], readonly ["earnings_prev_ms", "earningsPrevMs", "market_earnings_prev_ms"], readonly ["earnings_session", "earningsSession", "market_earnings_session"], readonly ["option_multiplier", "optionMultiplier", "market_option_multiplier"]];
|
|
89
|
+
/** The host-filled params by the names the kit generates for them (WRUN_HOST_FILL_WORDS). A declaration row carries
|
|
90
|
+
* no `host_fill` word, so the rebuild recovers it here: without it the host context could not fill the param and a
|
|
91
|
+
* hosted lane would evaluate the declared 0 (unavailable). */
|
|
92
|
+
export declare const WRUN_HOST_FILL_BY_GENERATED_NAME: ReadonlyMap<string, WrunParamHostFill>;
|
|
93
|
+
/** The chart context keys the kScript socket worker reads off the `wrunHostFill` the main thread puts beside a hosted
|
|
94
|
+
* overlay's settings (finite numbers only), one per host-fill word (WRUN_HOST_FILL_WORDS). */
|
|
95
|
+
export declare const WRUN_HOST_FILL_CONTEXT_KEYS: ReadonlyArray<keyof WrunHostFillContext>;
|
|
77
96
|
/**
|
|
78
97
|
* A sheet's `params` slice rebuilt from an overlay's declared inputs
|
|
79
98
|
* (`settings.scriptInputs`, buildWrunScriptInputs' flat list): the lane
|
|
@@ -161,10 +180,6 @@ export declare function wrunHostedSettingsPatch(held: unknown, asked: unknown):
|
|
|
161
180
|
* context by the kit's host-fill word, the record the SDK's resolver fills `host_fill` params from
|
|
162
181
|
* (its `hostFills`). */
|
|
163
182
|
export type WrunHostedHostFill = Partial<Record<WrunParamHostFill, number>>;
|
|
164
|
-
/** Each host-fill word and the chart context key it packs from (paramRunValue's reads), in the kit's
|
|
165
|
-
* order: the market's tick size and decimals, the chart's interval seconds and five colours, the
|
|
166
|
-
* market's five facts. */
|
|
167
|
-
export declare const WRUN_HOST_FILL_WORDS: readonly [readonly ["tick_size", "tickSize"], readonly ["price_precision", "pricePrecision"], readonly ["interval_sec", "intervalSec"], readonly ["bg_color", "bgColor"], readonly ["fg_color", "fgColor"], readonly ["up_color", "upColor"], readonly ["down_color", "downColor"], readonly ["grid_color", "gridColor"], readonly ["kind", "kind"], readonly ["point_value", "pointValue"], readonly ["zone", "zone"], readonly ["quote_is_usd", "quoteIsUsd"], readonly ["session_open", "sessionOpen"]];
|
|
168
183
|
/** The host fills of a chart context (`wrunHostFill`, the pane's market and chart words, packed the
|
|
169
184
|
* way the browser run fills them) by host-fill word: finite numbers only, in the kit's order; none
|
|
170
185
|
* (undefined) for no context or a context holding none. */
|
|
@@ -97,34 +97,45 @@ function wrunHostedSymbolValue(param, settings) {
|
|
|
97
97
|
const picked = wrunHostParamSetting(param, settings);
|
|
98
98
|
return picked?.host === 'symbol' ? picked.text : 0;
|
|
99
99
|
}
|
|
100
|
-
/**
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
100
|
+
/**
|
|
101
|
+
* The hosted lanes' ONE host-fill table: each `host_fill` word, the chart context key it packs from (paramRunValue's
|
|
102
|
+
* reads) and the hidden param the kit generates for it (`market.<word>()` declares `market_<word>`, `chart.<word>()`
|
|
103
|
+
* `chart_<word>`; the extractor refuses any other param under those names), in the kit's order: the market's tick
|
|
104
|
+
* size and decimals, the chart's interval seconds and five colours (the candle and grid colours since WRUN-STYLE
|
|
105
|
+
* TH-candle-colors), the market's five facts (WRUN-GAPS-1005, WRUN-SESSION), the issuer's three earnings facts and the
|
|
106
|
+
* option multiplier of the chart's options chain. Every hosted path reads it: the settings
|
|
107
|
+
* record's `hostFill` (wrunHostedHostFill), the declaration rebuild (WRUN_HOST_FILL_BY_GENERATED_NAME) and the kScript
|
|
108
|
+
* socket worker's read of the main thread's context (WRUN_HOST_FILL_CONTEXT_KEYS), so no hosted path drops a word
|
|
109
|
+
* another carries; wrun-param-values.util.spec holds the table to every word the kit's browser lane fills.
|
|
110
|
+
*/
|
|
111
|
+
export const WRUN_HOST_FILL_WORDS = [
|
|
112
|
+
['tick_size', 'tickSize', 'market_tick_size'],
|
|
113
|
+
['price_precision', 'pricePrecision', 'market_price_precision'],
|
|
114
|
+
['interval_sec', 'intervalSec', 'chart_interval_sec'],
|
|
115
|
+
['bg_color', 'bgColor', 'chart_bg_color'],
|
|
116
|
+
['fg_color', 'fgColor', 'chart_fg_color'],
|
|
117
|
+
['up_color', 'upColor', 'chart_up_color'],
|
|
118
|
+
['down_color', 'downColor', 'chart_down_color'],
|
|
119
|
+
['grid_color', 'gridColor', 'chart_grid_color'],
|
|
120
|
+
['kind', 'kind', 'market_kind'],
|
|
121
|
+
['point_value', 'pointValue', 'market_point_value'],
|
|
122
|
+
['zone', 'zone', 'market_zone'],
|
|
123
|
+
['quote_is_usd', 'quoteIsUsd', 'market_quote_is_usd'],
|
|
124
|
+
['session_open', 'sessionOpen', 'market_session_open'],
|
|
125
|
+
// The issuer's earnings facts (UW-PARITY S8): they ride whenever the context carries them.
|
|
126
|
+
['earnings_next_ms', 'earningsNextMs', 'market_earnings_next_ms'],
|
|
127
|
+
['earnings_prev_ms', 'earningsPrevMs', 'market_earnings_prev_ms'],
|
|
128
|
+
['earnings_session', 'earningsSession', 'market_earnings_session'],
|
|
129
|
+
// The option multiplier of the chart's options chain (kit 0.87.0, wrun-chart-market-facts.util).
|
|
130
|
+
['option_multiplier', 'optionMultiplier', 'market_option_multiplier'],
|
|
131
|
+
];
|
|
132
|
+
/** The host-filled params by the names the kit generates for them (WRUN_HOST_FILL_WORDS). A declaration row carries
|
|
133
|
+
* no `host_fill` word, so the rebuild recovers it here: without it the host context could not fill the param and a
|
|
134
|
+
* hosted lane would evaluate the declared 0 (unavailable). */
|
|
135
|
+
export const WRUN_HOST_FILL_BY_GENERATED_NAME = new Map(WRUN_HOST_FILL_WORDS.map(([word, , name]) => [name, word]));
|
|
136
|
+
/** The chart context keys the kScript socket worker reads off the `wrunHostFill` the main thread puts beside a hosted
|
|
137
|
+
* overlay's settings (finite numbers only), one per host-fill word (WRUN_HOST_FILL_WORDS). */
|
|
138
|
+
export const WRUN_HOST_FILL_CONTEXT_KEYS = WRUN_HOST_FILL_WORDS.map(([, key]) => key);
|
|
128
139
|
/** A declaration's default as the sheet number: a toggle 1/0, a colour its
|
|
129
140
|
* packed number, a symbol or a text 0 (the module's slot), anything else
|
|
130
141
|
* Number(). */
|
|
@@ -203,7 +214,7 @@ export function wrunSheetParamsFromDeclarations(declarations) {
|
|
|
203
214
|
const labels = Array.isArray(row.optionLabels) && row.optionLabels.every((label) => typeof label === 'string')
|
|
204
215
|
? row.optionLabels
|
|
205
216
|
: undefined;
|
|
206
|
-
const hostFill =
|
|
217
|
+
const hostFill = WRUN_HOST_FILL_BY_GENERATED_NAME.get(row.name);
|
|
207
218
|
const symbolDefault = type === 'symbol' && typeof row.defaultValue === 'string' && row.defaultValue.trim() !== ''
|
|
208
219
|
? row.defaultValue
|
|
209
220
|
: undefined;
|
|
@@ -375,24 +386,6 @@ export function wrunHostedSettingsPatch(held, asked) {
|
|
|
375
386
|
}
|
|
376
387
|
return patch;
|
|
377
388
|
}
|
|
378
|
-
/** Each host-fill word and the chart context key it packs from (paramRunValue's reads), in the kit's
|
|
379
|
-
* order: the market's tick size and decimals, the chart's interval seconds and five colours, the
|
|
380
|
-
* market's five facts. */
|
|
381
|
-
export const WRUN_HOST_FILL_WORDS = [
|
|
382
|
-
['tick_size', 'tickSize'],
|
|
383
|
-
['price_precision', 'pricePrecision'],
|
|
384
|
-
['interval_sec', 'intervalSec'],
|
|
385
|
-
['bg_color', 'bgColor'],
|
|
386
|
-
['fg_color', 'fgColor'],
|
|
387
|
-
['up_color', 'upColor'],
|
|
388
|
-
['down_color', 'downColor'],
|
|
389
|
-
['grid_color', 'gridColor'],
|
|
390
|
-
['kind', 'kind'],
|
|
391
|
-
['point_value', 'pointValue'],
|
|
392
|
-
['zone', 'zone'],
|
|
393
|
-
['quote_is_usd', 'quoteIsUsd'],
|
|
394
|
-
['session_open', 'sessionOpen'],
|
|
395
|
-
];
|
|
396
389
|
/** The host fills of a chart context (`wrunHostFill`, the pane's market and chart words, packed the
|
|
397
390
|
* way the browser run fills them) by host-fill word: finite numbers only, in the kit's order; none
|
|
398
391
|
* (undefined) for no context or a context holding none. */
|
|
@@ -8,9 +8,9 @@ import type { WrunIndicatorMetadata, WrunMetadataParam } from '../../interfaces/
|
|
|
8
8
|
/** What the host fills into `host_fill` params at run time: the chart
|
|
9
9
|
* market's tick size and price precision, the chart's bar interval in
|
|
10
10
|
* seconds, its background / text / candle up / candle down / grid colour as
|
|
11
|
-
* the kit's packed signed i32 (wrun-chart-context.util),
|
|
12
|
-
* five facts as their codes
|
|
13
|
-
* declared default (0, unknown). */
|
|
11
|
+
* the kit's packed signed i32 (wrun-chart-context.util), the market's
|
|
12
|
+
* five facts as their codes and the option multiplier of its options chain
|
|
13
|
+
* (wrun-chart-market-facts.util); absent = the declared default (0, unknown). */
|
|
14
14
|
export interface WrunHostFillContext {
|
|
15
15
|
tickSize?: number;
|
|
16
16
|
pricePrecision?: number;
|
|
@@ -42,6 +42,12 @@ export interface WrunHostFillContext {
|
|
|
42
42
|
earningsNextMs?: number;
|
|
43
43
|
earningsPrevMs?: number;
|
|
44
44
|
earningsSession?: number;
|
|
45
|
+
/** `market.option_multiplier()` (kit 0.87.0, om WRUN_OPTION_FACT_FILLS): the
|
|
46
|
+
* US dollars one price unit times one size unit of an option on the
|
|
47
|
+
* chart's options chain is worth, 100 on OPRA, the root's point value on
|
|
48
|
+
* CME, 1 on a crypto chart (wrunChartOptionMultiplier); 0 where the chart
|
|
49
|
+
* has no options family, which a package reads as unknown (no premium). */
|
|
50
|
+
optionMultiplier?: number;
|
|
45
51
|
}
|
|
46
52
|
export declare function nonEmptyString(value: unknown): string | undefined;
|
|
47
53
|
export declare function finiteNumber(value: unknown): number | undefined;
|
|
@@ -129,14 +129,14 @@ function paramRunValue(param, flat, host) {
|
|
|
129
129
|
return finiteOr(finiteNumber(host?.quoteIsUsd), fallback);
|
|
130
130
|
if (param.host_fill === 'session_open')
|
|
131
131
|
return finiteOr(finiteNumber(host?.sessionOpen), fallback);
|
|
132
|
-
|
|
133
|
-
const fill = param.host_fill;
|
|
134
|
-
if (fill === 'earnings_next_ms')
|
|
132
|
+
if (param.host_fill === 'earnings_next_ms')
|
|
135
133
|
return finiteOr(finiteNumber(host?.earningsNextMs), fallback);
|
|
136
|
-
if (
|
|
134
|
+
if (param.host_fill === 'earnings_prev_ms')
|
|
137
135
|
return finiteOr(finiteNumber(host?.earningsPrevMs), fallback);
|
|
138
|
-
if (
|
|
136
|
+
if (param.host_fill === 'earnings_session')
|
|
139
137
|
return finiteOr(finiteNumber(host?.earningsSession), fallback);
|
|
138
|
+
if (param.host_fill === 'option_multiplier')
|
|
139
|
+
return finiteOr(finiteNumber(host?.optionMultiplier), fallback);
|
|
140
140
|
const raw = flat?.[param.name];
|
|
141
141
|
switch (param.type) {
|
|
142
142
|
case 'symbol':
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The paused picture: a paused browser-run Indicator keeps what it last drew, and its heatmap
|
|
3
|
+
* canvases dim so the reader sees at a glance that the picture is frozen. Pause = frozen
|
|
4
|
+
* computation and frozen content: nothing is unmounted, nothing recomputes, and a paused canvas
|
|
5
|
+
* still paints whenever the chart paints.
|
|
6
|
+
*
|
|
7
|
+
* Only HEATMAP children dim (`<parent>::heatmap:<name>`, whose engine settings carry a numeric
|
|
8
|
+
* `opacity`, wrun-canvases.util heatmap settings): a matrix bakes its alpha into its fill
|
|
9
|
+
* colours, and profile children and the parent's own plots keep their look. The write is the
|
|
10
|
+
* engine's settings door (`updateSettings`, the path `rescaleWrunHeatmapChildren` uses), and the
|
|
11
|
+
* original opacity is remembered per engine instance and child id, so Resume (and a removal)
|
|
12
|
+
* puts it back and a replaced engine instance starts clean.
|
|
13
|
+
*/
|
|
14
|
+
/** The share of its own opacity a paused heatmap keeps. */
|
|
15
|
+
export declare const WRUN_PAUSE_DIM_FACTOR = 0.35;
|
|
16
|
+
type DimChildMeta = {
|
|
17
|
+
id?: unknown;
|
|
18
|
+
settings?: object | null;
|
|
19
|
+
};
|
|
20
|
+
/** The engine surface the dim reads and writes (a TitanCharts instance in the app). */
|
|
21
|
+
export interface WrunPauseDimChart {
|
|
22
|
+
metadata?: ReadonlyArray<DimChildMeta> | null;
|
|
23
|
+
isDestroyed?: boolean;
|
|
24
|
+
updateSettings?(id: string, settings: Record<string, unknown>): unknown;
|
|
25
|
+
renderService?: {
|
|
26
|
+
renderOnce?(): void;
|
|
27
|
+
} | null;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Dim every mounted heatmap child of a paused Indicator. Idempotent: a child already dimmed by
|
|
31
|
+
* this pause is left as it is, and a child whose look a late mount rewrote (a mount the run
|
|
32
|
+
* started before the pause landed) is dimmed again from the look it has now. Returns how many
|
|
33
|
+
* children it dimmed.
|
|
34
|
+
*/
|
|
35
|
+
export declare function dimWrunOverlayForPause(chart: WrunPauseDimChart | null | undefined, overlayId: string): number;
|
|
36
|
+
/**
|
|
37
|
+
* Re-apply a pause's dim after its heatmap children were rebuilt (a theme or timezone retranslate
|
|
38
|
+
* removes and re-adds them from their own settings, at full opacity). A no-op unless the Indicator
|
|
39
|
+
* is dimmed on this engine instance. Each mounted heatmap child takes the dimmed share of the
|
|
40
|
+
* original the dim remembered for it (Resume keeps putting that original back); a child the memory
|
|
41
|
+
* does not know yet has its own opacity remembered as its original first.
|
|
42
|
+
*/
|
|
43
|
+
export declare function reapplyWrunPauseDim(tc: unknown, overlayId: string): void;
|
|
44
|
+
/** Put back the look of every child the pause dimmed (Resume, a removal) and forget it. Returns
|
|
45
|
+
* how many children took their opacity back. */
|
|
46
|
+
export declare function undimWrunOverlayForPause(chart: WrunPauseDimChart | null | undefined, overlayId: string): number;
|
|
47
|
+
/** Whether any child of the Indicator is dimmed on this engine instance. */
|
|
48
|
+
export declare function isWrunOverlayDimmedForPause(chart: WrunPauseDimChart | null | undefined, overlayId: string): boolean;
|
|
49
|
+
/** Chart teardown: the instance's dim memory goes with it (nothing is written: the engine is
|
|
50
|
+
* being destroyed, and a rebuilt chart mounts its children from their own settings). */
|
|
51
|
+
export declare function dropWrunPauseDimMemory(chart: WrunPauseDimChart | null | undefined): void;
|
|
52
|
+
export {};
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { wrunChildOverlayParentId } from './wrun-child-overlay-id.util.js';
|
|
2
|
+
/**
|
|
3
|
+
* The paused picture: a paused browser-run Indicator keeps what it last drew, and its heatmap
|
|
4
|
+
* canvases dim so the reader sees at a glance that the picture is frozen. Pause = frozen
|
|
5
|
+
* computation and frozen content: nothing is unmounted, nothing recomputes, and a paused canvas
|
|
6
|
+
* still paints whenever the chart paints.
|
|
7
|
+
*
|
|
8
|
+
* Only HEATMAP children dim (`<parent>::heatmap:<name>`, whose engine settings carry a numeric
|
|
9
|
+
* `opacity`, wrun-canvases.util heatmap settings): a matrix bakes its alpha into its fill
|
|
10
|
+
* colours, and profile children and the parent's own plots keep their look. The write is the
|
|
11
|
+
* engine's settings door (`updateSettings`, the path `rescaleWrunHeatmapChildren` uses), and the
|
|
12
|
+
* original opacity is remembered per engine instance and child id, so Resume (and a removal)
|
|
13
|
+
* puts it back and a replaced engine instance starts clean.
|
|
14
|
+
*/
|
|
15
|
+
/** The share of its own opacity a paused heatmap keeps. */
|
|
16
|
+
export const WRUN_PAUSE_DIM_FACTOR = 0.35;
|
|
17
|
+
// Engine instance -> heatmap child id -> the opacity it had before the pause dimmed it.
|
|
18
|
+
const dimmedOpacityByChart = new WeakMap();
|
|
19
|
+
const HEATMAP_CHILD_SEGMENT = '::heatmap:';
|
|
20
|
+
function heatmapChildOpacity(meta, overlayId) {
|
|
21
|
+
const id = meta?.id;
|
|
22
|
+
if (typeof id !== 'string' || wrunChildOverlayParentId(id) !== overlayId)
|
|
23
|
+
return null;
|
|
24
|
+
if (!id.startsWith(`${overlayId}${HEATMAP_CHILD_SEGMENT}`))
|
|
25
|
+
return null;
|
|
26
|
+
const opacity = meta?.settings?.opacity;
|
|
27
|
+
return typeof opacity === 'number' && Number.isFinite(opacity) ? opacity : null;
|
|
28
|
+
}
|
|
29
|
+
function sameOpacity(a, b) {
|
|
30
|
+
return Math.abs(a - b) < 1e-9;
|
|
31
|
+
}
|
|
32
|
+
/** One opacity write through the engine's settings door (it schedules its own paint); an engine
|
|
33
|
+
* without the door takes the value on its meta. True when the write needs a paint of its own. */
|
|
34
|
+
function writeChildOpacity(chart, id, meta, opacity) {
|
|
35
|
+
if (typeof chart.updateSettings === 'function') {
|
|
36
|
+
void chart.updateSettings(id, { opacity });
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
meta.settings = { ...(meta.settings ?? {}), opacity };
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
function liveChart(chart) {
|
|
43
|
+
return !!chart && chart.isDestroyed !== true && Array.isArray(chart.metadata);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Dim every mounted heatmap child of a paused Indicator. Idempotent: a child already dimmed by
|
|
47
|
+
* this pause is left as it is, and a child whose look a late mount rewrote (a mount the run
|
|
48
|
+
* started before the pause landed) is dimmed again from the look it has now. Returns how many
|
|
49
|
+
* children it dimmed.
|
|
50
|
+
*/
|
|
51
|
+
export function dimWrunOverlayForPause(chart, overlayId) {
|
|
52
|
+
if (!liveChart(chart))
|
|
53
|
+
return 0;
|
|
54
|
+
let memory = dimmedOpacityByChart.get(chart);
|
|
55
|
+
let dimmed = 0;
|
|
56
|
+
let paintOwed = false;
|
|
57
|
+
for (const meta of chart.metadata ?? []) {
|
|
58
|
+
const current = heatmapChildOpacity(meta, overlayId);
|
|
59
|
+
if (current === null)
|
|
60
|
+
continue;
|
|
61
|
+
const id = meta.id;
|
|
62
|
+
const original = memory?.get(id);
|
|
63
|
+
if (original !== undefined && sameOpacity(current, original * WRUN_PAUSE_DIM_FACTOR))
|
|
64
|
+
continue;
|
|
65
|
+
if (!memory) {
|
|
66
|
+
memory = new Map();
|
|
67
|
+
dimmedOpacityByChart.set(chart, memory);
|
|
68
|
+
}
|
|
69
|
+
memory.set(id, current);
|
|
70
|
+
paintOwed = writeChildOpacity(chart, id, meta, current * WRUN_PAUSE_DIM_FACTOR) || paintOwed;
|
|
71
|
+
dimmed += 1;
|
|
72
|
+
}
|
|
73
|
+
if (paintOwed)
|
|
74
|
+
chart.renderService?.renderOnce?.();
|
|
75
|
+
return dimmed;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Re-apply a pause's dim after its heatmap children were rebuilt (a theme or timezone retranslate
|
|
79
|
+
* removes and re-adds them from their own settings, at full opacity). A no-op unless the Indicator
|
|
80
|
+
* is dimmed on this engine instance. Each mounted heatmap child takes the dimmed share of the
|
|
81
|
+
* original the dim remembered for it (Resume keeps putting that original back); a child the memory
|
|
82
|
+
* does not know yet has its own opacity remembered as its original first.
|
|
83
|
+
*/
|
|
84
|
+
export function reapplyWrunPauseDim(tc, overlayId) {
|
|
85
|
+
const target = tc;
|
|
86
|
+
if (!liveChart(target))
|
|
87
|
+
return;
|
|
88
|
+
const memory = dimmedOpacityByChart.get(target);
|
|
89
|
+
if (!memory || !isWrunOverlayDimmedForPause(target, overlayId))
|
|
90
|
+
return;
|
|
91
|
+
let paintOwed = false;
|
|
92
|
+
for (const meta of target.metadata ?? []) {
|
|
93
|
+
const current = heatmapChildOpacity(meta, overlayId);
|
|
94
|
+
if (current === null)
|
|
95
|
+
continue;
|
|
96
|
+
const id = meta.id;
|
|
97
|
+
let original = memory.get(id);
|
|
98
|
+
if (original === undefined) {
|
|
99
|
+
original = current;
|
|
100
|
+
memory.set(id, original);
|
|
101
|
+
}
|
|
102
|
+
const dimmed = original * WRUN_PAUSE_DIM_FACTOR;
|
|
103
|
+
if (sameOpacity(current, dimmed))
|
|
104
|
+
continue;
|
|
105
|
+
paintOwed = writeChildOpacity(target, id, meta, dimmed) || paintOwed;
|
|
106
|
+
}
|
|
107
|
+
if (paintOwed)
|
|
108
|
+
target.renderService?.renderOnce?.();
|
|
109
|
+
}
|
|
110
|
+
/** Put back the look of every child the pause dimmed (Resume, a removal) and forget it. Returns
|
|
111
|
+
* how many children took their opacity back. */
|
|
112
|
+
export function undimWrunOverlayForPause(chart, overlayId) {
|
|
113
|
+
if (!chart)
|
|
114
|
+
return 0;
|
|
115
|
+
const memory = dimmedOpacityByChart.get(chart);
|
|
116
|
+
if (!memory)
|
|
117
|
+
return 0;
|
|
118
|
+
let restored = 0;
|
|
119
|
+
let paintOwed = false;
|
|
120
|
+
for (const [id, original] of [...memory]) {
|
|
121
|
+
if (wrunChildOverlayParentId(id) !== overlayId)
|
|
122
|
+
continue;
|
|
123
|
+
memory.delete(id);
|
|
124
|
+
if (!liveChart(chart))
|
|
125
|
+
continue;
|
|
126
|
+
const meta = chart.metadata?.find((candidate) => candidate?.id === id);
|
|
127
|
+
if (!meta)
|
|
128
|
+
continue;
|
|
129
|
+
paintOwed = writeChildOpacity(chart, id, meta, original) || paintOwed;
|
|
130
|
+
restored += 1;
|
|
131
|
+
}
|
|
132
|
+
if (memory.size === 0)
|
|
133
|
+
dimmedOpacityByChart.delete(chart);
|
|
134
|
+
if (paintOwed)
|
|
135
|
+
chart.renderService?.renderOnce?.();
|
|
136
|
+
return restored;
|
|
137
|
+
}
|
|
138
|
+
/** Whether any child of the Indicator is dimmed on this engine instance. */
|
|
139
|
+
export function isWrunOverlayDimmedForPause(chart, overlayId) {
|
|
140
|
+
const memory = chart ? dimmedOpacityByChart.get(chart) : undefined;
|
|
141
|
+
if (!memory)
|
|
142
|
+
return false;
|
|
143
|
+
for (const id of memory.keys())
|
|
144
|
+
if (wrunChildOverlayParentId(id) === overlayId)
|
|
145
|
+
return true;
|
|
146
|
+
return false;
|
|
147
|
+
}
|
|
148
|
+
/** Chart teardown: the instance's dim memory goes with it (nothing is written: the engine is
|
|
149
|
+
* being destroyed, and a rebuilt chart mounts its children from their own settings). */
|
|
150
|
+
export function dropWrunPauseDimMemory(chart) {
|
|
151
|
+
if (chart)
|
|
152
|
+
dimmedOpacityByChart.delete(chart);
|
|
153
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The engine gate's refusal types of wrun-plot-gate-notice.util.ts (which imports them back and re-exports them) as a
|
|
3
|
+
* type leaf: the child mount (wrun-panel-mount.util) judges its batched children with them, and it moves into the
|
|
4
|
+
* wrun chart-host package, which the notice's writers (the chart store, the chart group, i18n and the refusal
|
|
5
|
+
* surface) may not reach.
|
|
6
|
+
*/
|
|
7
|
+
/** The chart a notice is written for (any engine instance). */
|
|
8
|
+
export interface WrunPlotGateChart {
|
|
9
|
+
metadata: ReadonlyArray<{
|
|
10
|
+
id: string;
|
|
11
|
+
}>;
|
|
12
|
+
}
|
|
13
|
+
/** Why the engine gate refused a batched child: its pack failed to load, or the engine has no
|
|
14
|
+
* renderer for its kind (an older chart). */
|
|
15
|
+
export type WrunPlotGateCause = 'pack-failed' | 'old-engine';
|
|
16
|
+
/** One refused child: its kind, its section name and the cause (and, for a layout newer than this
|
|
17
|
+
* build, why: diagnostic text, never copy). */
|
|
18
|
+
export interface WrunPlotGateRefusal {
|
|
19
|
+
kind: string;
|
|
20
|
+
name: string;
|
|
21
|
+
cause: WrunPlotGateCause;
|
|
22
|
+
reason?: string;
|
|
23
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The engine gate's refusal types of wrun-plot-gate-notice.util.ts (which imports them back and re-exports them) as a
|
|
3
|
+
* type leaf: the child mount (wrun-panel-mount.util) judges its batched children with them, and it moves into the
|
|
4
|
+
* wrun chart-host package, which the notice's writers (the chart store, the chart group, i18n and the refusal
|
|
5
|
+
* surface) may not reach.
|
|
6
|
+
*/
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import type { WrunIndicatorMetadata } from '../../interfaces/wrun-runtime.interface.js';
|
|
2
|
+
/** One audited package on the prefix-safe roster (src/constants/wrun-prefix-safe.constants.ts). */
|
|
3
|
+
export interface WrunPrefixSafeEntry {
|
|
4
|
+
/** The registry package name, matched exactly (`@scope/name`), or a kit template's `template:<id>`, which only
|
|
5
|
+
* names the audit: a template mounts as a draft and is matched by `sourceDigest`, never by this name. */
|
|
6
|
+
packageName: string;
|
|
7
|
+
/** '*' (every version, an unknown one included) or a semver range: `||` between alternatives, spaces between
|
|
8
|
+
* the comparators of one alternative, each comparator a strict version with an optional `=`, `>`, `>=`, `<`,
|
|
9
|
+
* `<=`, `^` or `~` joined to it. A prerelease is admitted only by an exact pin of that prerelease. A draft has
|
|
10
|
+
* no version, so only '*' admits one. */
|
|
11
|
+
versions: string;
|
|
12
|
+
/** The audited builds' module sha256 (lowercase hex). Present = only these bytes ride the entry. */
|
|
13
|
+
wasmSha256?: string[];
|
|
14
|
+
/** The audited sources' sha256 (lowercase hex of the compiled entry's UTF-8 text: the draft lane's
|
|
15
|
+
* `wrunDraftRef.sourceDigest`). Present = a draft compiled from one of these sources rides the entry, whatever
|
|
16
|
+
* the entry's name; a registry identity (it carries no source digest) never does. Required on a template entry. */
|
|
17
|
+
sourceDigest?: string[];
|
|
18
|
+
/** The day of the audit, YYYY-MM-DD. */
|
|
19
|
+
auditedOn: string;
|
|
20
|
+
/** What the audit read, in plain words with file and line references. */
|
|
21
|
+
why: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The roster's verdict on a package identity: safe with the first entry (file order) that admits its version and,
|
|
25
|
+
* when the entry pins builds or sources, its module hash and its source digest; 'not-audited' when no well-formed
|
|
26
|
+
* entry names the package (a registry identity) or lists the draft's source digest (a draft: `sourceDigest` set,
|
|
27
|
+
* looked up by that digest alone, never by a name); 'version-outside-audit' when entries name it but none admits this
|
|
28
|
+
* version, build or source (an unknown version passes only a '*' entry, an unknown hash never passes a pinned one, a
|
|
29
|
+
* registry identity never passes a source-pinned one). `wasmSha256` is the sheet's `wasm_sha256`, which the host
|
|
30
|
+
* verifies against the module bytes before it compiles them (wrun-host.service compileModule); `sourceDigest` is a
|
|
31
|
+
* draft overlay's `wrunDraftRef.sourceDigest`, the compile pipeline's sha256 of the entry source's UTF-8 text, and
|
|
32
|
+
* null for every other overlay.
|
|
33
|
+
*/
|
|
34
|
+
export declare function isWrunPrefixSafePackage(identity: {
|
|
35
|
+
packageName: string;
|
|
36
|
+
version: string | null;
|
|
37
|
+
wasmSha256: string | null;
|
|
38
|
+
sourceDigest: string | null;
|
|
39
|
+
}): {
|
|
40
|
+
safe: true;
|
|
41
|
+
entry: WrunPrefixSafeEntry;
|
|
42
|
+
} | {
|
|
43
|
+
safe: false;
|
|
44
|
+
reason: 'not-audited' | 'version-outside-audit';
|
|
45
|
+
};
|
|
46
|
+
/** How a mounted output reached the chart, as the caller classifies it: `handle` is a drawing from the run's handle
|
|
47
|
+
* ledger (wrun-3 `wrun_h_<kind>_<id>`), `drawing` any other (a sheet drawing, a segment, a line's fill),
|
|
48
|
+
* `cornerLabel` a corner `label` renderer's plot output, `guide` a guide output's hline (`role: "guide"`). */
|
|
49
|
+
export type WrunPrefixMountedOutputKind = 'series' | 'guide' | 'priceLabel' | 'cornerLabel' | 'table' | 'drawing' | 'handle' | 'child' | 'other';
|
|
50
|
+
/** One output the overlay mounts: its key (an output name, a child's name, a drawing's id), its plot word (a
|
|
51
|
+
* handle's: its handle kind), its kind and, for a child, its cell layout (a heatmap's `cellLayout`); for a handle,
|
|
52
|
+
* its anchor word as its record carries it (absent: chart coordinates, a bar's time and a price). */
|
|
53
|
+
export interface WrunPrefixMountedOutput {
|
|
54
|
+
key: string;
|
|
55
|
+
plot: string;
|
|
56
|
+
kind: WrunPrefixMountedOutputKind;
|
|
57
|
+
childLayout?: string;
|
|
58
|
+
anchor?: string;
|
|
59
|
+
}
|
|
60
|
+
/** The nine pane corners a snapshot handle may be pinned to (the first nine of wrun-handles.util
|
|
61
|
+
* WRUN_DRAWING_ANCHORS, its WRUN_LABEL_POSITIONS; mirrored so this leaf never pulls the handle ledger's graph in,
|
|
62
|
+
* the cohort spec pins the two together): both coordinates in pane pixels, so the picture is the record's props and
|
|
63
|
+
* no bar's. The edge words follow a chart axis (`top` and `bottom`: x is a bar's time; `left` and `right`: y is a
|
|
64
|
+
* price) and a record with no anchor sits at a bar's time and a price. */
|
|
65
|
+
export declare const WRUN_PREFIX_SNAPSHOT_ANCHORS: ReadonlyArray<string>;
|
|
66
|
+
/**
|
|
67
|
+
* Whether every output the overlay mounts lands as an exact prepend: each mounted output a dense timestamped series
|
|
68
|
+
* (line, spline, bar, histogram, area, step and their fill variants), a guide's hline, a lower-pane `series` child, a
|
|
69
|
+
* child with cell layout 'book' or 'grid', or a batched marks child (`marks`, `spans`, `rays`); and nothing the sheet
|
|
70
|
+
* declares outside that cohort (guides, sparse declarations and last-row styles are in it, under the run lane's
|
|
71
|
+
* landing-time proofs). The one exception is a snapshot
|
|
72
|
+
* output, a label handle pinned to a pane corner (a sheet whose `handles` enable corner labels alone): admitted,
|
|
73
|
+
* and listed in `snapshotHandles` (positions in `mountedOutputs`, in order), whose payload the overlap proof must
|
|
74
|
+
* find equal on both runs because a landing replaces the mounted handle set whole. Unsupported answers carry the
|
|
75
|
+
* first offending key, mounted outputs first (in the order given), then the sheet's declarations (in sheet order),
|
|
76
|
+
* as `<key>: <why>`.
|
|
77
|
+
*/
|
|
78
|
+
export declare function wrunPrefixCohort(input: {
|
|
79
|
+
sheet: WrunIndicatorMetadata;
|
|
80
|
+
mountedOutputs: ReadonlyArray<{
|
|
81
|
+
key: string;
|
|
82
|
+
plot: string;
|
|
83
|
+
kind: WrunPrefixMountedOutputKind;
|
|
84
|
+
childLayout?: string;
|
|
85
|
+
anchor?: string;
|
|
86
|
+
}>;
|
|
87
|
+
}): {
|
|
88
|
+
supported: true;
|
|
89
|
+
snapshotHandles: number[];
|
|
90
|
+
} | {
|
|
91
|
+
supported: false;
|
|
92
|
+
reason: string;
|
|
93
|
+
};
|