@orangecharts/wrun-chart-host 0.4.0 → 0.6.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 +17 -5
- package/dist/constants/exchange-names.leaf.d.ts +8 -0
- package/dist/constants/exchange-names.leaf.js +101 -0
- package/dist/constants/feature-flags.constants.js +7 -2
- 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/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 +301 -22
- package/dist/host-env.js +15 -0
- package/dist/host-ports.types.d.ts +853 -29
- package/dist/index.d.ts +140 -2
- package/dist/index.js +140 -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/interfaces/wrun-runtime.interface.d.ts +88 -13
- package/dist/interfaces/wrun-runtime.interface.js +17 -3
- 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 +17 -0
- package/dist/utility/chart/chart-mount-epoch.util.js +61 -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/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/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/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/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/series.js +2 -2
- package/dist/utility/wrun/sources/row-lanes/option_contract_state.d.ts +4 -4
- package/dist/utility/wrun/sources/row-lanes/option_contract_state.js +5 -6
- 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 +94 -0
- package/dist/utility/wrun/wrun-bar-count.util.js +274 -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 +330 -0
- package/dist/utility/wrun/wrun-host.service.js +855 -0
- package/dist/utility/wrun/wrun-hover.util.d.ts +3 -0
- package/dist/utility/wrun/wrun-hover.util.js +25 -4
- 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-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-pack.util.d.ts +2 -1
- package/dist/utility/wrun/wrun-panel-mount.util.d.ts +24 -9
- package/dist/utility/wrun/wrun-panel-mount.util.js +138 -43
- 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-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-registry-errors.util.d.ts +5 -3
- 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-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-sha256.leaf.d.ts +13 -0
- package/dist/utility/wrun/wrun-sha256.leaf.js +84 -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 +203 -0
- package/dist/workers/wrun/wrun-abi-host.js +1220 -0
- package/dist/workers/wrun/wrun-engine-handler.d.ts +20 -0
- package/dist/workers/wrun/wrun-engine-handler.js +380 -0
- package/package.json +3 -3
|
@@ -49,7 +49,7 @@ export declare function wrunCellTupleWidths(): Readonly<Record<string, number>>;
|
|
|
49
49
|
export declare const WRUN_CELL_BLOCK_TOO_LARGE_CODE = "wrun_cell_block_too_large";
|
|
50
50
|
export declare function wrunAbiVersion(metadata: Pick<WrunIndicatorMetadata, 'abi_version'>): WrunAbiVersion;
|
|
51
51
|
export interface WrunPackRowsResult {
|
|
52
|
-
request: Omit<WrunPackedRunRequest, 'id' | '
|
|
52
|
+
request: Omit<WrunPackedRunRequest, 'id' | 'moduleKey' | 'moduleBytes' | 'mode'>;
|
|
53
53
|
transfer: ArrayBuffer[];
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
@@ -71,4 +71,5 @@ export declare function wrunFramesOf(rows: ReadonlyArray<WrunOutputRow>): (strin
|
|
|
71
71
|
* empty, preserving the ABI distinction. */
|
|
72
72
|
export declare function unpackWrunResponse(response: Extract<WrunWorkerResponse, {
|
|
73
73
|
ok: true;
|
|
74
|
+
outputs: Float64Array;
|
|
74
75
|
}>, ts: ArrayLike<number>, outputCount: number, stringSlotCount: number): WrunOutputRow[];
|
|
@@ -73,12 +73,19 @@ export interface WrunChildOverlayChart extends WrunPaneFormatChart {
|
|
|
73
73
|
data?: unknown;
|
|
74
74
|
}>;
|
|
75
75
|
isDestroyed?: boolean;
|
|
76
|
-
/** The chart canvas in CSS px sizes a table pane to its rows. */
|
|
76
|
+
/** The chart canvas in CSS px sizes a table pane to its rows; the focus mode names the expanded pane. */
|
|
77
77
|
canvasChartController?: {
|
|
78
78
|
canvasElement?: {
|
|
79
79
|
clientHeight?: number;
|
|
80
80
|
} | null;
|
|
81
|
+
focusMode?: {
|
|
82
|
+
focusedGridId?: string | null;
|
|
83
|
+
};
|
|
81
84
|
} | null;
|
|
85
|
+
/** titan's focus mode (one pane expanded to the whole chart). Its removeOverlay ends it whatever pane it removes,
|
|
86
|
+
* so a pass that takes a child off reads the focused pane first and enters it again after (keepFocusedPane). */
|
|
87
|
+
isFocusModeActive?(): boolean;
|
|
88
|
+
enterFocusMode?(paneId: string): void;
|
|
82
89
|
addOverlay(config: WrunOverlayConfig): void;
|
|
83
90
|
removeOverlay(id: string): void;
|
|
84
91
|
/** The engine's in-place row swap (rawData, process, render); a panel
|
|
@@ -121,13 +128,17 @@ export interface WrunChildOverlayChart extends WrunPaneFormatChart {
|
|
|
121
128
|
* layout, and the plan is reconciled onto the mounted panes when the mount
|
|
122
129
|
* settles. Absent, the parent's engine settings decide (the owner flag rides
|
|
123
130
|
* them); a parent without the flag is a normal cell, whose configs are byte
|
|
124
|
-
* for byte today's.
|
|
131
|
+
* for byte today's unless its host hands a plan.
|
|
125
132
|
*/
|
|
126
133
|
export interface WrunMountCell {
|
|
127
134
|
window: boolean;
|
|
128
135
|
/** The chart canvas in CSS px (read from the engine when absent). */
|
|
129
136
|
canvasHeightPx?: number;
|
|
130
|
-
/** A
|
|
137
|
+
/** A plan the host hands (child id to gridHeight), read on EVERY cell ahead of the series and panel defaults: a
|
|
138
|
+
* window's weights, or a normal cell's remembered pane heights (the heights its reader dragged, so a remounted
|
|
139
|
+
* pane comes back at them). The mount keeps it for the retranslate, and a child it names keeps its pane when only
|
|
140
|
+
* its height moved (the host owns that height). Absent: a window plans from the run's children, a normal cell
|
|
141
|
+
* keeps the shared heights. */
|
|
131
142
|
planned?: ReadonlyMap<string, number>;
|
|
132
143
|
}
|
|
133
144
|
/**
|
|
@@ -334,13 +345,17 @@ export declare function mountWrunChildOverlays({ tc, overlayId, runResult, repla
|
|
|
334
345
|
}): Promise<boolean>;
|
|
335
346
|
/** Re-resolve every mounted child of every Indicator on the chart against
|
|
336
347
|
* the chart's current palette, theme name and display timezone, without a
|
|
337
|
-
* rerun (X13; hosted runs follow too)
|
|
338
|
-
*
|
|
339
|
-
*
|
|
348
|
+
* rerun (X13; hosted runs follow too). A child that stays the child it was
|
|
349
|
+
* (the run's own keep rule: the same pane, canvas, strip or docked surface)
|
|
350
|
+
* is refreshed in place on the overlay it has (refreshRetranslatedChild:
|
|
351
|
+
* its settings, then its rows), so it keeps its place in the stack, its
|
|
352
|
+
* height, its legend row and the reader's expanded pane; only a child that
|
|
353
|
+
* cannot stay (another surface, an engine without the doors) is rebuilt
|
|
340
354
|
* from its unresolved input under the same id, in the chart's own order so
|
|
341
|
-
* the rebuilt ones keep their stacking
|
|
342
|
-
*
|
|
343
|
-
*
|
|
355
|
+
* the rebuilt ones keep their stacking, with the reader's expanded pane
|
|
356
|
+
* kept around the rebuild (keepFocusedPane). The series child's colours
|
|
357
|
+
* ride the adapter's own theme reguard. Called by the theme rerun when a
|
|
358
|
+
* packed colour moved and by the timezone sync per chart. */
|
|
344
359
|
export declare function retranslateWrunChildOverlays(tc: WrunChildOverlayChart): void;
|
|
345
360
|
/**
|
|
346
361
|
* Re-pick the colour bounds of an Indicator's mounted heatmaps for the
|
|
@@ -46,7 +46,6 @@ import { isWrunWindowOwner } from '../chart/window-owner.leaf.js';
|
|
|
46
46
|
import { planWindowWeights, reconcileWindowOwnerGeometry, savedWindowSplit, tableRowCountOf, } from '../chart/window-geometry.leaf.js';
|
|
47
47
|
import { wrunLegendName } from '../chart/wrun-legend-name.util.js';
|
|
48
48
|
import { wrunResultLegendColors, wrunSeriesChildId, } from '../chart/wrun-run-result.util.js';
|
|
49
|
-
import { escapeHtml } from '../html-escape.leaf.js';
|
|
50
49
|
import { budgetWrunBatchedRetained, budgetWrunBatchedRows, commitWrunBatchedPlan, currentWrunBatchedPlan, forgetWrunBatchedCells, isWrunBatchedMarksKind, noteWrunBatchedRowsCut, planWrunBatchedMerged, restoreWrunBatchedLedger, snapshotWrunBatchedLedger, wrunBatchedChargeOf, wrunBatchedChildConfig, wrunBatchedChildrenOverShare, wrunBatchedSiblingsToRebalance, } from './wrun-batched-marks.util.js';
|
|
51
50
|
import { forgetWrunCanvasReadout, keepWrunHeatmapScaleSample, rememberWrunCanvasReadout, wrunCanvasChildConfig, wrunHeatmapSensitivityBounds, wrunPlainCanvasRow, } from './wrun-canvases.util.js';
|
|
52
51
|
import { wrunChildHiddenRowKey } from './wrun-child-overlay-id.util.js';
|
|
@@ -191,6 +190,40 @@ function syncCanvasReadouts(mounted, built) {
|
|
|
191
190
|
forgetWrunCanvasReadout(id);
|
|
192
191
|
}
|
|
193
192
|
}
|
|
193
|
+
/** Whether the chart is in focus mode: false for a chart without a canvas (titan's own reader throws there) or one
|
|
194
|
+
* that answers nothing. */
|
|
195
|
+
function isFocusModeOn(tc) {
|
|
196
|
+
if (tc.isDestroyed || !tc.canvasChartController?.focusMode)
|
|
197
|
+
return false;
|
|
198
|
+
try {
|
|
199
|
+
return tc.isFocusModeActive?.() === true;
|
|
200
|
+
}
|
|
201
|
+
catch {
|
|
202
|
+
return false;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
/** The pane a chart holds expanded (titan's focus mode), or null when none is. */
|
|
206
|
+
function focusedPaneOf(tc) {
|
|
207
|
+
return isFocusModeOn(tc) ? (tc.canvasChartController?.focusMode?.focusedGridId ?? null) : null;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Keep the reader's expanded pane through a pass that takes children off the chart: titan's removeOverlay ends focus
|
|
211
|
+
* mode whatever pane it removes, so the pane the chart held before the pass is entered again after it, when it is
|
|
212
|
+
* still mounted and the focus is off. A pane the pass took away stays exited (there is nothing to expand). Runs on
|
|
213
|
+
* every pass that retires or rebuilds a child: a later run, the retranslate, an unmount that leaves the chart.
|
|
214
|
+
*/
|
|
215
|
+
function keepFocusedPane(tc, pass) {
|
|
216
|
+
const focused = focusedPaneOf(tc);
|
|
217
|
+
try {
|
|
218
|
+
return pass();
|
|
219
|
+
}
|
|
220
|
+
finally {
|
|
221
|
+
if (focused !== null && !tc.isDestroyed && !isFocusModeOn(tc)) {
|
|
222
|
+
if (focused === 'main' || overlayPresent(tc, focused))
|
|
223
|
+
tc.enterFocusMode?.(focused);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
194
227
|
/** Remove a child from the chart; its registrations go with it unless the
|
|
195
228
|
* same id is about to be mounted again (a replaced child keeps the rows and
|
|
196
229
|
* readout its new config already registered). */
|
|
@@ -251,7 +284,7 @@ function userThemeMode() {
|
|
|
251
284
|
}
|
|
252
285
|
/** A panel child's config (g1): the frame translated with the chart's
|
|
253
286
|
* theme, price digits and display timezone (SC08 SC16 SC37); the run's
|
|
254
|
-
* title and caption on the legend
|
|
287
|
+
* title and caption on the legend as text (SC17: titan renders both as text); the maximize
|
|
255
288
|
* button and stats row (SC10); the declared height share (SC09); every
|
|
256
289
|
* panel below the chart at its carved height, `place: "side"` included (a
|
|
257
290
|
* side panel's right-side home is the window, never a strip that narrows
|
|
@@ -274,7 +307,7 @@ function panelChildConfig(child, ctx) {
|
|
|
274
307
|
const ownAxis = panel.kind === 'table' || (panel.kind === 'line' && wrunPanelChrome(panel) !== 'box');
|
|
275
308
|
return {
|
|
276
309
|
id,
|
|
277
|
-
name:
|
|
310
|
+
name: translated.name,
|
|
278
311
|
plot: translated.plot,
|
|
279
312
|
type: 'offchart',
|
|
280
313
|
interval: ctx.interval,
|
|
@@ -293,7 +326,7 @@ function panelChildConfig(child, ctx) {
|
|
|
293
326
|
...(panel.maximize === true ? { showMaximizeBtn: true } : {}),
|
|
294
327
|
...(panel.stats_row === true ? { showStatsRow: true } : {}),
|
|
295
328
|
// The function form skips the engine's $token expansion of a title.
|
|
296
|
-
...(caption !== undefined ? { customTitle: () => ` · ${
|
|
329
|
+
...(caption !== undefined ? { customTitle: () => ` · ${caption}` } : {}),
|
|
297
330
|
// A pane below the chart takes the declared share, else the table's row
|
|
298
331
|
// height or the shared weight; on a window the plan's weight.
|
|
299
332
|
gridHeight: ctx.planned?.get(id) ?? panelGridHeight(panel, rows.length, ctx.chartHeightPx),
|
|
@@ -664,17 +697,20 @@ function integrateSeriesChild(tc, childId, result, mode, projection) {
|
|
|
664
697
|
}
|
|
665
698
|
/** The same pane, the shared rule (om-panel.util), for a panel and for the
|
|
666
699
|
* series child alike: side, species, axis ownership, chrome and the carved
|
|
667
|
-
* height the child was mounted with.
|
|
668
|
-
*
|
|
669
|
-
*
|
|
670
|
-
* sibling arrives never re-mounts
|
|
671
|
-
|
|
700
|
+
* height the child was mounted with. When the height is not the mount's to
|
|
701
|
+
* carve (`heightHeld`) only the other fields decide: on a window the height
|
|
702
|
+
* is the plan's and moves in place (reconcileWindowOwnerGeometry at the end
|
|
703
|
+
* of the mount), so a plan that shifts when a sibling arrives never re-mounts
|
|
704
|
+
* the panes that stay; a child a host's plan names on a normal cell holds the
|
|
705
|
+
* height its reader dragged (WrunMountCell.planned), which the engine pane
|
|
706
|
+
* already has, so a moved remembered height never re-mounts it either. */
|
|
707
|
+
function samePane(mounted, next, heightHeld = false) {
|
|
672
708
|
if (mounted.type !== next.type)
|
|
673
709
|
return false;
|
|
674
710
|
const shape = (config) => ({
|
|
675
711
|
plot: config.plot,
|
|
676
712
|
hidePriceScale: config.hidePriceScale,
|
|
677
|
-
gridHeight:
|
|
713
|
+
gridHeight: heightHeld ? 0 : Number(config.settings.gridHeight ?? CHILD_PANE_GRID_HEIGHT),
|
|
678
714
|
...(typeof config.settings.chromeStyle === 'string' ? { chromeStyle: config.settings.chromeStyle } : {}),
|
|
679
715
|
});
|
|
680
716
|
return samePanelPane(shape(mounted), shape(next));
|
|
@@ -1672,9 +1708,10 @@ export function mountWrunChildOverlays({ tc, overlayId, runResult, replaceFrames
|
|
|
1672
1708
|
// a flagged owner never enters that path: its configs are today's.
|
|
1673
1709
|
const windowCell = cell?.window ?? isWrunWindowOwner(parent);
|
|
1674
1710
|
current.chartHeightPx = cell?.canvasHeightPx ?? tc.canvasChartController?.canvasElement?.clientHeight;
|
|
1675
|
-
|
|
1711
|
+
// The host's plan sizes the children on any cell (a normal cell's remembered heights included); a window without
|
|
1712
|
+
// one plans its own.
|
|
1713
|
+
let planned = cell?.planned;
|
|
1676
1714
|
if (windowCell) {
|
|
1677
|
-
planned = cell?.planned;
|
|
1678
1715
|
if (!planned) {
|
|
1679
1716
|
const panes = windowPanesOfMount(parent, overlayId, children, replaceFrames ? [] : [...current.children.values()].map((mounted) => mounted.config));
|
|
1680
1717
|
// The reader's saved split (the parent's settings carry it,
|
|
@@ -1811,7 +1848,9 @@ export function mountWrunChildOverlays({ tc, overlayId, runResult, replaceFrames
|
|
|
1811
1848
|
switch (mounted.input.kind) {
|
|
1812
1849
|
case 'series':
|
|
1813
1850
|
case 'panel':
|
|
1814
|
-
return samePane(mounted.config, next.config, windowCell
|
|
1851
|
+
return samePane(mounted.config, next.config, windowCell || planned?.has(id) === true)
|
|
1852
|
+
? [[id, mounted]]
|
|
1853
|
+
: [];
|
|
1815
1854
|
case 'heatmap':
|
|
1816
1855
|
case 'profile':
|
|
1817
1856
|
case 'marks':
|
|
@@ -2020,7 +2059,8 @@ export function mountWrunChildOverlays({ tc, overlayId, runResult, replaceFrames
|
|
|
2020
2059
|
return false;
|
|
2021
2060
|
const applyingSince = mountClockMs();
|
|
2022
2061
|
try {
|
|
2023
|
-
|
|
2062
|
+
// A child this pass retires (removeOverlay) must not end the reader's expanded pane.
|
|
2063
|
+
return keepFocusedPane(tc, () => applyChildren(packs));
|
|
2024
2064
|
}
|
|
2025
2065
|
finally {
|
|
2026
2066
|
// Stopped here, before this mount settles: a sibling mount that waited on the same packs
|
|
@@ -2075,15 +2115,60 @@ async function wrunMountParentPaused(chartIndex, overlayId) {
|
|
|
2075
2115
|
function mountClockMs() {
|
|
2076
2116
|
return typeof performance !== 'undefined' ? performance.now() : Date.now();
|
|
2077
2117
|
}
|
|
2118
|
+
/**
|
|
2119
|
+
* A retranslated child refreshed on the overlay it has, by the rule a run keeps a child by (the same pane, canvas,
|
|
2120
|
+
* strip or docked surface, read with the run's own helpers, so the run and the retranslate never disagree on what
|
|
2121
|
+
* "unchanged" is): a panel through the shared panel refresh, a docked levels child, matrix or inset through the frame
|
|
2122
|
+
* refresh (its settings through the engine's settings door, then its rows through its row swap), a heatmap, profile
|
|
2123
|
+
* or batched canvas through the canvas refresh (budgeted as the rebuild was: the record's rows, no growth). False
|
|
2124
|
+
* when it cannot stay (another surface, an engine without the doors, the series child the adapter reguards): the
|
|
2125
|
+
* caller rebuilds it.
|
|
2126
|
+
*/
|
|
2127
|
+
function refreshRetranslatedChild(tc, mounted, next, ctx, heightHeld) {
|
|
2128
|
+
const kind = mounted.input.kind;
|
|
2129
|
+
if (kind === 'panel') {
|
|
2130
|
+
if (!samePane(mounted.config, next.config, heightHeld))
|
|
2131
|
+
return false;
|
|
2132
|
+
refreshPanelChild(tc, mounted.config, next.config);
|
|
2133
|
+
return true;
|
|
2134
|
+
}
|
|
2135
|
+
if (kind === 'levels' || kind === 'matrix' || kind === 'inset') {
|
|
2136
|
+
// Signed as a run signs its frame configs before the engine sees them (sameFrameSignature).
|
|
2137
|
+
frameSignatures.set(next.config, sameFrameSignature(next.config));
|
|
2138
|
+
if (kind === 'levels')
|
|
2139
|
+
return refreshLevelsChild(tc, mounted, next, ctx.theme);
|
|
2140
|
+
if (kind === 'matrix')
|
|
2141
|
+
return refreshMatrixChild(tc, mounted, next);
|
|
2142
|
+
if (!sameInset(mounted.config, next.config))
|
|
2143
|
+
return false;
|
|
2144
|
+
if (!refreshInsetChild(tc, mounted, next))
|
|
2145
|
+
refreshChildInPlace(tc, mounted.config, next.config);
|
|
2146
|
+
return true;
|
|
2147
|
+
}
|
|
2148
|
+
if ((kind === 'heatmap' || kind === 'profile' || isBatchedChild(mounted.input)) &&
|
|
2149
|
+
overlayPresent(tc, next.config.id)) {
|
|
2150
|
+
if (!sameCanvas(mounted.config, next.config))
|
|
2151
|
+
return false;
|
|
2152
|
+
budgetHeatmapChild(tc, ctx.overlayId, next, 'rebuild');
|
|
2153
|
+
budgetBatchedChild(tc, ctx.overlayId, next, 'rebuild');
|
|
2154
|
+
refreshChildInPlace(tc, mounted.config, next.config);
|
|
2155
|
+
return true;
|
|
2156
|
+
}
|
|
2157
|
+
return false;
|
|
2158
|
+
}
|
|
2078
2159
|
/** Re-resolve every mounted child of every Indicator on the chart against
|
|
2079
2160
|
* the chart's current palette, theme name and display timezone, without a
|
|
2080
|
-
* rerun (X13; hosted runs follow too)
|
|
2081
|
-
*
|
|
2082
|
-
*
|
|
2161
|
+
* rerun (X13; hosted runs follow too). A child that stays the child it was
|
|
2162
|
+
* (the run's own keep rule: the same pane, canvas, strip or docked surface)
|
|
2163
|
+
* is refreshed in place on the overlay it has (refreshRetranslatedChild:
|
|
2164
|
+
* its settings, then its rows), so it keeps its place in the stack, its
|
|
2165
|
+
* height, its legend row and the reader's expanded pane; only a child that
|
|
2166
|
+
* cannot stay (another surface, an engine without the doors) is rebuilt
|
|
2083
2167
|
* from its unresolved input under the same id, in the chart's own order so
|
|
2084
|
-
* the rebuilt ones keep their stacking
|
|
2085
|
-
*
|
|
2086
|
-
*
|
|
2168
|
+
* the rebuilt ones keep their stacking, with the reader's expanded pane
|
|
2169
|
+
* kept around the rebuild (keepFocusedPane). The series child's colours
|
|
2170
|
+
* ride the adapter's own theme reguard. Called by the theme rerun when a
|
|
2171
|
+
* packed colour moved and by the timezone sync per chart. */
|
|
2087
2172
|
export function retranslateWrunChildOverlays(tc) {
|
|
2088
2173
|
const owners = chartChildren.get(tc);
|
|
2089
2174
|
if (!owners || tc.isDestroyed)
|
|
@@ -2104,25 +2189,29 @@ export function retranslateWrunChildOverlays(tc) {
|
|
|
2104
2189
|
}
|
|
2105
2190
|
let moved = false;
|
|
2106
2191
|
const rebuilt = new Map();
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
const
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2192
|
+
const refreshed = new Set();
|
|
2193
|
+
keepFocusedPane(tc, () => {
|
|
2194
|
+
for (const { id } of [...tc.metadata]) {
|
|
2195
|
+
const owner = ownerOf.get(id);
|
|
2196
|
+
const mounted = owner?.state.children.get(id);
|
|
2197
|
+
if (owner === undefined || mounted === undefined)
|
|
2198
|
+
continue;
|
|
2199
|
+
const next = { input: mounted.input, config: childConfig(mounted.input, owner.ctx) };
|
|
2200
|
+
const heightHeld = (owner.state.windowCell ?? false) || owner.state.planned?.has(id) === true;
|
|
2201
|
+
if (refreshRetranslatedChild(tc, mounted, next, owner.ctx, heightHeld)) {
|
|
2202
|
+
refreshed.add(owner.state);
|
|
2203
|
+
}
|
|
2204
|
+
else {
|
|
2205
|
+
removeChild(tc, id);
|
|
2206
|
+
budgetHeatmapChild(tc, owner.ctx.overlayId, next, 'rebuild');
|
|
2207
|
+
budgetBatchedChild(tc, owner.ctx.overlayId, next, 'rebuild');
|
|
2208
|
+
installChild(tc, next, owner.ctx.theme);
|
|
2209
|
+
rebuilt.set(owner.state, [...(rebuilt.get(owner.state) ?? []), id]);
|
|
2210
|
+
}
|
|
2211
|
+
owner.state.children.set(id, next);
|
|
2212
|
+
moved = true;
|
|
2122
2213
|
}
|
|
2123
|
-
|
|
2124
|
-
moved = true;
|
|
2125
|
-
}
|
|
2214
|
+
});
|
|
2126
2215
|
if (!moved)
|
|
2127
2216
|
return;
|
|
2128
2217
|
// A rebuilt child comes back through addOverlay visible: it takes its
|
|
@@ -2131,13 +2220,15 @@ export function retranslateWrunChildOverlays(tc) {
|
|
|
2131
2220
|
// It also comes back with its own opacity and painting: a paused
|
|
2132
2221
|
// Indicator's rebuilt heatmaps take the pause dim again, and a paint-cost
|
|
2133
2222
|
// pause's suspension reaches its rebuilt canvases (once per owner, after
|
|
2134
|
-
// its rebuild).
|
|
2223
|
+
// its rebuild). A child refreshed in place keeps its overlay, its eye and
|
|
2224
|
+
// its painting, but its settings took the retranslated opacity: the pause
|
|
2225
|
+
// dim goes on again (it writes only what moved).
|
|
2135
2226
|
for (const { state, ctx } of new Set(ownerOf.values())) {
|
|
2136
2227
|
syncChildVisibility(tc, state.parent, state, rebuilt.get(state) ?? []);
|
|
2137
|
-
if (rebuilt.has(state))
|
|
2228
|
+
if (rebuilt.has(state) || refreshed.has(state))
|
|
2138
2229
|
reapplyWrunPauseDim(tc, ctx.overlayId);
|
|
2230
|
+
if (rebuilt.has(state))
|
|
2139
2231
|
wrunChartHostEnv().chart.reapplyPausedOverlayPaint(tc, ctx.overlayId);
|
|
2140
|
-
}
|
|
2141
2232
|
}
|
|
2142
2233
|
tc.processData?.();
|
|
2143
2234
|
tc.renderService?.renderOnce?.();
|
|
@@ -2242,8 +2333,12 @@ export function unmountWrunChildOverlays(tc, overlayId) {
|
|
|
2242
2333
|
owners?.delete(overlayId);
|
|
2243
2334
|
state.token = Symbol(overlayId);
|
|
2244
2335
|
state.unsubscribe?.();
|
|
2245
|
-
|
|
2246
|
-
|
|
2336
|
+
// The children leave; a pane the reader expanded elsewhere stays expanded (a removal of the parent itself ended
|
|
2337
|
+
// focus before this runs, so nothing is entered again then).
|
|
2338
|
+
keepFocusedPane(tc, () => {
|
|
2339
|
+
for (const [id, mounted] of state.children)
|
|
2340
|
+
retireChild(tc, id, mounted.input.kind, false);
|
|
2341
|
+
});
|
|
2247
2342
|
state.children.clear();
|
|
2248
2343
|
}
|
|
2249
2344
|
// The boot graph's door (wrun-panel-mount.lazy.ts): bound as this module evaluates, since it owns
|
|
@@ -74,6 +74,25 @@ export type WrunHostedParams = Record<string, number | string>;
|
|
|
74
74
|
* for a value the user cannot see. The arm identity stays consistent: the
|
|
75
75
|
* alerts engine mints over the string it receives. */
|
|
76
76
|
export declare function wrunHostedTextValue(param: Pick<WrunMetadataParam, 'text_default' | 'max_bytes' | 'multiline'>, raw: unknown): string;
|
|
77
|
+
/**
|
|
78
|
+
* The hosted lanes' ONE host-fill table: each `host_fill` word, the chart context key it packs from (paramRunValue's
|
|
79
|
+
* reads) and the hidden param the kit generates for it (`market.<word>()` declares `market_<word>`, `chart.<word>()`
|
|
80
|
+
* `chart_<word>`; the extractor refuses any other param under those names), in the kit's order: the market's tick
|
|
81
|
+
* size and decimals, the chart's interval seconds and five colours (the candle and grid colours since WRUN-STYLE
|
|
82
|
+
* TH-candle-colors), the market's five facts (WRUN-GAPS-1005, WRUN-SESSION), the issuer's three earnings facts and the
|
|
83
|
+
* option multiplier of the chart's options chain. Every hosted path reads it: the settings
|
|
84
|
+
* record's `hostFill` (wrunHostedHostFill), the declaration rebuild (WRUN_HOST_FILL_BY_GENERATED_NAME) and the kScript
|
|
85
|
+
* socket worker's read of the main thread's context (WRUN_HOST_FILL_CONTEXT_KEYS), so no hosted path drops a word
|
|
86
|
+
* another carries; wrun-param-values.util.spec holds the table to every word the kit's browser lane fills.
|
|
87
|
+
*/
|
|
88
|
+
export declare const WRUN_HOST_FILL_WORDS: readonly [readonly ["tick_size", "tickSize", "market_tick_size"], readonly ["price_precision", "pricePrecision", "market_price_precision"], readonly ["interval_sec", "intervalSec", "chart_interval_sec"], readonly ["bg_color", "bgColor", "chart_bg_color"], readonly ["fg_color", "fgColor", "chart_fg_color"], readonly ["up_color", "upColor", "chart_up_color"], readonly ["down_color", "downColor", "chart_down_color"], readonly ["grid_color", "gridColor", "chart_grid_color"], readonly ["kind", "kind", "market_kind"], readonly ["point_value", "pointValue", "market_point_value"], readonly ["zone", "zone", "market_zone"], readonly ["quote_is_usd", "quoteIsUsd", "market_quote_is_usd"], readonly ["session_open", "sessionOpen", "market_session_open"], readonly ["earnings_next_ms", "earningsNextMs", "market_earnings_next_ms"], readonly ["earnings_prev_ms", "earningsPrevMs", "market_earnings_prev_ms"], readonly ["earnings_session", "earningsSession", "market_earnings_session"], readonly ["option_multiplier", "optionMultiplier", "market_option_multiplier"]];
|
|
89
|
+
/** The host-filled params by the names the kit generates for them (WRUN_HOST_FILL_WORDS). A declaration row carries
|
|
90
|
+
* no `host_fill` word, so the rebuild recovers it here: without it the host context could not fill the param and a
|
|
91
|
+
* hosted lane would evaluate the declared 0 (unavailable). */
|
|
92
|
+
export declare const WRUN_HOST_FILL_BY_GENERATED_NAME: ReadonlyMap<string, WrunParamHostFill>;
|
|
93
|
+
/** The chart context keys the kScript socket worker reads off the `wrunHostFill` the main thread puts beside a hosted
|
|
94
|
+
* overlay's settings (finite numbers only), one per host-fill word (WRUN_HOST_FILL_WORDS). */
|
|
95
|
+
export declare const WRUN_HOST_FILL_CONTEXT_KEYS: ReadonlyArray<keyof WrunHostFillContext>;
|
|
77
96
|
/**
|
|
78
97
|
* A sheet's `params` slice rebuilt from an overlay's declared inputs
|
|
79
98
|
* (`settings.scriptInputs`, buildWrunScriptInputs' flat list): the lane
|
|
@@ -161,10 +180,6 @@ export declare function wrunHostedSettingsPatch(held: unknown, asked: unknown):
|
|
|
161
180
|
* context by the kit's host-fill word, the record the SDK's resolver fills `host_fill` params from
|
|
162
181
|
* (its `hostFills`). */
|
|
163
182
|
export type WrunHostedHostFill = Partial<Record<WrunParamHostFill, number>>;
|
|
164
|
-
/** Each host-fill word and the chart context key it packs from (paramRunValue's reads), in the kit's
|
|
165
|
-
* order: the market's tick size and decimals, the chart's interval seconds and five colours, the
|
|
166
|
-
* market's five facts. */
|
|
167
|
-
export declare const WRUN_HOST_FILL_WORDS: readonly [readonly ["tick_size", "tickSize"], readonly ["price_precision", "pricePrecision"], readonly ["interval_sec", "intervalSec"], readonly ["bg_color", "bgColor"], readonly ["fg_color", "fgColor"], readonly ["up_color", "upColor"], readonly ["down_color", "downColor"], readonly ["grid_color", "gridColor"], readonly ["kind", "kind"], readonly ["point_value", "pointValue"], readonly ["zone", "zone"], readonly ["quote_is_usd", "quoteIsUsd"], readonly ["session_open", "sessionOpen"]];
|
|
168
183
|
/** The host fills of a chart context (`wrunHostFill`, the pane's market and chart words, packed the
|
|
169
184
|
* way the browser run fills them) by host-fill word: finite numbers only, in the kit's order; none
|
|
170
185
|
* (undefined) for no context or a context holding none. */
|
|
@@ -97,34 +97,45 @@ function wrunHostedSymbolValue(param, settings) {
|
|
|
97
97
|
const picked = wrunHostParamSetting(param, settings);
|
|
98
98
|
return picked?.host === 'symbol' ? picked.text : 0;
|
|
99
99
|
}
|
|
100
|
-
/**
|
|
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':
|