@orangecharts/wrun-chart-host 0.11.0 → 0.14.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 +1 -0
- package/dist/constants/feature-flags.constants.d.ts +3 -4
- package/dist/constants/feature-flags.constants.js +34 -52
- package/dist/constants/feature-limits.constants.d.ts +1 -1
- package/dist/constants/feature-limits.constants.js +5 -4
- package/dist/constants/interval.constants.d.ts +7 -0
- package/dist/constants/interval.constants.js +7 -0
- package/dist/constants/scriptEditor/cme-official-scripts.constants.d.ts +20 -149
- package/dist/constants/scriptEditor/cme-official-scripts.constants.js +20 -309
- package/dist/constants/stocks-compliance.constants.d.ts +15 -0
- package/dist/constants/stocks-compliance.constants.js +15 -0
- package/dist/host-env.d.ts +55 -3
- package/dist/host-env.js +6 -0
- package/dist/host-ports.types.d.ts +36 -3
- package/dist/index.d.ts +18 -0
- package/dist/index.js +19 -0
- package/dist/indicators/controls/tpo-session.util.d.ts +78 -15
- package/dist/indicators/controls/tpo-session.util.js +320 -242
- package/dist/instances/script-engine-worker-ohlcv-transfer.d.ts +6 -0
- package/dist/instances/script-engine-worker-ohlcv-transfer.js +16 -0
- package/dist/interfaces/cme-realtime.interface.d.ts +8 -0
- package/dist/interfaces/cme-realtime.interface.js +2 -1
- package/dist/interfaces/feed.interface.d.ts +15 -1
- package/dist/interfaces/replay.interface.d.ts +5 -0
- package/dist/interfaces/stocks-realtime.interface.d.ts +4 -3
- package/dist/interfaces/stocks-realtime.interface.js +5 -4
- package/dist/interfaces/wrun-runtime.interface.d.ts +97 -19
- package/dist/kscript-data/controls/live-ohlcv-merge.util.d.ts +17 -0
- package/dist/kscript-data/controls/live-ohlcv-merge.util.js +22 -0
- package/dist/kscript-data/controls/live-trades-merge.util.d.ts +46 -40
- package/dist/kscript-data/controls/live-trades-merge.util.js +80 -107
- package/dist/market-data/billing.interface.d.ts +9 -1
- package/dist/market-data/venue.d.ts +1 -1
- package/dist/market-data/venues/index.d.ts +4 -4
- package/dist/market-data/venues/stocks.contract.copy.json +4 -4
- package/dist/market-data/venues/stocks.d.ts +4 -4
- package/dist/market-data/venues/stocks.js +15 -13
- package/dist/settings-templates/frvp-fields.d.ts +12 -1
- package/dist/settings-templates/frvp-fields.js +15 -4
- package/dist/settings-templates/index.js +12 -5
- package/dist/settings-templates/indicator-fields.js +28 -2
- package/dist/settings-templates/tool-rules.d.ts +17 -8
- package/dist/settings-templates/tool-rules.js +15 -8
- package/dist/settings-templates/tool-tables.generated.js +4 -2
- package/dist/utility/auth/server-clock.util.d.ts +3 -1
- package/dist/utility/auth/server-clock.util.js +3 -1
- package/dist/utility/chart/book-live-bucket.util.js +2 -2
- package/dist/utility/chart/cache-alignment.util.d.ts +15 -7
- package/dist/utility/chart/cache-alignment.util.js +14 -7
- package/dist/utility/chart/chart-data-fetch-generation.util.d.ts +2 -0
- package/dist/utility/chart/chart-data-fetch-generation.util.js +16 -0
- package/dist/utility/chart/cme-session-bucket.util.d.ts +18 -75
- package/dist/utility/chart/cme-session-bucket.util.js +25 -332
- package/dist/utility/chart/continuous-contracts.util.js +6 -5
- package/dist/utility/chart/display-offset.leaf.d.ts +24 -0
- package/dist/utility/chart/display-offset.leaf.js +41 -0
- package/dist/utility/chart/effective-chart-session.util.d.ts +2 -1
- package/dist/utility/chart/effective-chart-session.util.js +13 -5
- package/dist/utility/chart/feed-interval.util.d.ts +6 -20
- package/dist/utility/chart/feed-interval.util.js +13 -22
- package/dist/utility/chart/fetch-dedupe-policy.util.d.ts +27 -7
- package/dist/utility/chart/fetch-dedupe-policy.util.js +86 -11
- package/dist/utility/chart/host-bar-placement.util.d.ts +7 -4
- package/dist/utility/chart/host-bar-placement.util.js +8 -2
- package/dist/utility/chart/indicator-inflight-registry.util.d.ts +32 -0
- package/dist/utility/chart/indicator-inflight-registry.util.js +52 -0
- package/dist/utility/chart/indicator-run-interval.util.d.ts +10 -4
- package/dist/utility/chart/indicator-run-interval.util.js +21 -12
- package/dist/utility/chart/interval-registry.util.d.ts +1 -1
- package/dist/utility/chart/interval-registry.util.js +1 -1
- package/dist/utility/chart/kscript-legend-entries.util.d.ts +12 -0
- package/dist/utility/chart/kscript-legend-entries.util.js +16 -0
- package/dist/utility/chart/kscript-run-interval-projection.util.d.ts +1 -1
- package/dist/utility/chart/kscript-run-interval-projection.util.js +4 -2
- package/dist/utility/chart/kscript-venue-policy.util.d.ts +53 -62
- package/dist/utility/chart/kscript-venue-policy.util.js +85 -94
- package/dist/utility/chart/live-bucket.util.d.ts +39 -17
- package/dist/utility/chart/live-bucket.util.js +103 -57
- package/dist/utility/chart/local-kscript-source-revalidation.util.d.ts +58 -20
- package/dist/utility/chart/local-kscript-source-revalidation.util.js +98 -23
- package/dist/utility/chart/local-kscript-warmup-depth.util.d.ts +35 -11
- package/dist/utility/chart/local-kscript-warmup-depth.util.js +24 -3
- package/dist/utility/chart/market-session-schedule.util.d.ts +8 -0
- package/dist/utility/chart/market-session-schedule.util.js +39 -1
- package/dist/utility/chart/market-session.util.d.ts +136 -0
- package/dist/utility/chart/market-session.util.js +341 -0
- package/dist/utility/chart/market-sessions.util.d.ts +83 -0
- package/dist/utility/chart/market-sessions.util.js +220 -0
- package/dist/utility/chart/om-panel.util.d.ts +5 -3
- package/dist/utility/chart/om-panel.util.js +42 -7
- package/dist/utility/chart/om-target.util.d.ts +14 -1
- package/dist/utility/chart/om-target.util.js +22 -5
- package/dist/utility/chart/opra-read-access.leaf.d.ts +16 -1
- package/dist/utility/chart/opra-read-access.leaf.js +22 -0
- package/dist/utility/chart/profile-row-height.util.d.ts +49 -16
- package/dist/utility/chart/profile-row-height.util.js +74 -37
- package/dist/utility/chart/rth-session.util.d.ts +55 -20
- package/dist/utility/chart/rth-session.util.js +94 -46
- package/dist/utility/chart/session-interval.util.d.ts +2 -1
- package/dist/utility/chart/session-interval.util.js +1 -3
- package/dist/utility/chart/session-lattice.util.d.ts +150 -0
- package/dist/utility/chart/session-lattice.util.js +488 -0
- package/dist/utility/chart/trading-day.util.d.ts +40 -2
- package/dist/utility/chart/trading-day.util.js +84 -7
- package/dist/utility/chart/us-equities-session.util.d.ts +32 -11
- package/dist/utility/chart/us-equities-session.util.js +44 -15
- package/dist/utility/chart/window-geometry.leaf.d.ts +28 -7
- package/dist/utility/chart/window-geometry.leaf.js +57 -8
- package/dist/utility/chart/wrun-bar-session-facts.util.d.ts +21 -14
- package/dist/utility/chart/wrun-bar-session-facts.util.js +32 -38
- package/dist/utility/chart/wrun-run-result.util.d.ts +29 -12
- package/dist/utility/chart/wrun-run-result.util.js +89 -25
- package/dist/utility/common/time.util.js +5 -4
- package/dist/utility/market-events/earnings-scope.util.d.ts +10 -5
- package/dist/utility/market-events/earnings-scope.util.js +17 -9
- package/dist/utility/market-events/market-events.util.d.ts +14 -7
- package/dist/utility/market-events/market-events.util.js +30 -17
- package/dist/utility/number-format.util.d.ts +14 -21
- package/dist/utility/number-format.util.js +38 -24
- package/dist/utility/options/option-venue-disclosure.util.d.ts +40 -6
- package/dist/utility/options/option-venue-disclosure.util.js +71 -11
- package/dist/utility/options/option-venue.util.d.ts +1 -1
- package/dist/utility/options/option-venue.util.js +1 -1
- package/dist/utility/pool-symbol.leaf.d.ts +7 -0
- package/dist/utility/pool-symbol.leaf.js +50 -5
- package/dist/utility/stocks/stock-display.util.d.ts +15 -0
- package/dist/utility/stocks/stock-display.util.js +37 -0
- package/dist/utility/symbol-selection/contract-expiry.util.js +5 -4
- package/dist/utility/v2/gate-plane.util.d.ts +6 -0
- package/dist/utility/v2/gate-plane.util.js +11 -1
- package/dist/utility/v2/gate-session-latch.util.d.ts +1 -1
- package/dist/utility/v2/gate-session-latch.util.js +3 -3
- package/dist/utility/v2/governed-tier.leaf.d.ts +17 -16
- package/dist/utility/v2/governed-tier.leaf.js +17 -16
- package/dist/utility/v2/stocks-governed.util.d.ts +5 -0
- package/dist/utility/v2/stocks-governed.util.js +14 -0
- package/dist/utility/v2/v2-enums.leaf.d.ts +13 -0
- package/dist/utility/v2/v2-enums.leaf.js +458 -0
- package/dist/utility/wrun/derived-roots.leaf.d.ts +21 -1
- package/dist/utility/wrun/derived-roots.leaf.js +27 -1
- package/dist/utility/wrun/derived-roots.util.d.ts +44 -32
- package/dist/utility/wrun/derived-roots.util.js +97 -56
- package/dist/utility/wrun/run-schedule/wrun-late-reads.util.d.ts +4 -3
- package/dist/utility/wrun/run-schedule/wrun-late-reads.util.js +4 -3
- package/dist/utility/wrun/sources/lanes/option_daily.d.ts +2 -1
- package/dist/utility/wrun/sources/lanes/option_daily.js +2 -1
- package/dist/utility/wrun/sources/lanes/options_flow.d.ts +3 -0
- package/dist/utility/wrun/sources/lanes/options_flow.js +23 -5
- package/dist/utility/wrun/sources/opra-option-lanes.util.d.ts +3 -4
- package/dist/utility/wrun/sources/row-lane-registry.js +9 -4
- package/dist/utility/wrun/sources/row-lanes/dark_pool.d.ts +19 -0
- package/dist/utility/wrun/sources/row-lanes/dark_pool.js +104 -0
- package/dist/utility/wrun/sources/row-lanes/index.js +2 -0
- package/dist/utility/wrun/sources/wrun-lane-fetch-abort.util.d.ts +20 -0
- package/dist/utility/wrun/sources/wrun-lane-fetch-abort.util.js +103 -0
- package/dist/utility/wrun/sources/wrun-poll-lane.types.d.ts +19 -2
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +15 -13
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +49 -23
- package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +14 -9
- package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +75 -27
- package/dist/utility/wrun/sources/wrun-row-lanes.util.js +139 -82
- package/dist/utility/wrun/wrun-app-layer.leaf.d.ts +78 -0
- package/dist/utility/wrun/wrun-app-layer.leaf.js +89 -0
- package/dist/utility/wrun/wrun-bar-count.util.d.ts +11 -7
- package/dist/utility/wrun/wrun-bar-count.util.js +12 -8
- package/dist/utility/wrun/wrun-batched-kinds.leaf.d.ts +13 -0
- package/dist/utility/wrun/wrun-batched-kinds.leaf.js +18 -0
- package/dist/utility/wrun/wrun-batched-marks.util.d.ts +41 -22
- package/dist/utility/wrun/wrun-batched-marks.util.js +255 -59
- package/dist/utility/wrun/wrun-batched-readout.util.d.ts +26 -19
- package/dist/utility/wrun/wrun-batched-readout.util.js +81 -27
- package/dist/utility/wrun/wrun-book-bands.leaf.d.ts +8 -0
- package/dist/utility/wrun/wrun-book-bands.leaf.js +7 -0
- package/dist/utility/wrun/wrun-candle-equal.leaf.d.ts +19 -0
- package/dist/utility/wrun/wrun-candle-equal.leaf.js +40 -0
- package/dist/utility/wrun/wrun-canvas-readout.util.d.ts +4 -2
- package/dist/utility/wrun/wrun-canvases.util.js +7 -3
- package/dist/utility/wrun/wrun-chart-context-names.util.d.ts +6 -3
- package/dist/utility/wrun/wrun-chart-context-names.util.js +8 -4
- package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +47 -29
- package/dist/utility/wrun/wrun-chart-market-facts.util.js +201 -201
- package/dist/utility/wrun/wrun-child-overlay-id.util.js +2 -1
- package/dist/utility/wrun/wrun-cme-legs-note.util.d.ts +15 -0
- package/dist/utility/wrun/wrun-cme-legs-note.util.js +49 -0
- package/dist/utility/wrun/wrun-cme-root-specs.util.d.ts +38 -0
- package/dist/utility/wrun/wrun-cme-root-specs.util.js +81 -0
- package/dist/utility/wrun/wrun-coin-lane-live.util.js +3 -0
- package/dist/utility/wrun/wrun-color-settings.util.d.ts +6 -1
- package/dist/utility/wrun/wrun-color-settings.util.js +32 -7
- package/dist/utility/wrun/wrun-dark-pool.util.d.ts +50 -0
- package/dist/utility/wrun/wrun-dark-pool.util.js +127 -0
- package/dist/utility/wrun/wrun-declared-warmup.util.d.ts +67 -12
- package/dist/utility/wrun/wrun-declared-warmup.util.js +165 -13
- package/dist/utility/wrun/wrun-draft-legend-note.util.d.ts +18 -8
- package/dist/utility/wrun/wrun-draft-legend-note.util.js +57 -11
- package/dist/utility/wrun/wrun-draft-overlay.util.d.ts +14 -10
- package/dist/utility/wrun/wrun-draft-overlay.util.js +26 -14
- package/dist/utility/wrun/wrun-earnings-facts.util.js +3 -2
- package/dist/utility/wrun/wrun-etf-funds.util.d.ts +2 -0
- package/dist/utility/wrun/wrun-etf-funds.util.js +4 -0
- package/dist/utility/wrun/wrun-held-lanes.util.js +8 -2
- package/dist/utility/wrun/wrun-history-as-of.util.d.ts +77 -0
- package/dist/utility/wrun/wrun-history-as-of.util.js +108 -0
- package/dist/utility/wrun/wrun-host.service.d.ts +64 -14
- package/dist/utility/wrun/wrun-host.service.js +137 -27
- package/dist/utility/wrun/wrun-hosted-wire-caps.d.ts +3 -3
- package/dist/utility/wrun/wrun-hosted-wire-caps.js +12 -2
- package/dist/utility/wrun/wrun-inert-legend.util.d.ts +13 -0
- package/dist/utility/wrun/wrun-inert-legend.util.js +31 -3
- package/dist/utility/wrun/wrun-input-requirements.leaf.d.ts +7 -5
- package/dist/utility/wrun/wrun-input-requirements.leaf.js +16 -6
- package/dist/utility/wrun/wrun-install-pacer.util.d.ts +26 -0
- package/dist/utility/wrun/wrun-install-pacer.util.js +145 -0
- package/dist/utility/wrun/wrun-kit-refusal-stages.types.d.ts +22 -0
- package/dist/utility/wrun/wrun-kit-refusal-stages.types.js +1 -0
- package/dist/utility/wrun/wrun-lane-refusal.leaf.d.ts +12 -5
- package/dist/utility/wrun/wrun-lane-refusal.leaf.js +23 -5
- package/dist/utility/wrun/wrun-lane-warmup.util.js +22 -4
- package/dist/utility/wrun/wrun-leg-close.util.d.ts +6 -5
- package/dist/utility/wrun/wrun-leg-close.util.js +11 -9
- package/dist/utility/wrun/wrun-leg-fetch.util.d.ts +3 -1
- package/dist/utility/wrun/wrun-leg-fetch.util.js +9 -2
- package/dist/utility/wrun/wrun-levels-child.util.d.ts +2 -0
- package/dist/utility/wrun/wrun-levels-child.util.js +6 -0
- package/dist/utility/wrun/wrun-lifecycle.contract.d.ts +4 -0
- package/dist/utility/wrun/wrun-live-intake.util.d.ts +15 -6
- package/dist/utility/wrun/wrun-live-intake.util.js +167 -47
- package/dist/utility/wrun/wrun-live-tick.util.d.ts +52 -8
- package/dist/utility/wrun/wrun-live-tick.util.js +648 -97
- package/dist/utility/wrun/wrun-market-facts.util.d.ts +16 -2
- package/dist/utility/wrun/wrun-market-facts.util.js +32 -3
- package/dist/utility/wrun/wrun-market-size-defaults.leaf.d.ts +27 -27
- package/dist/utility/wrun/wrun-market-size-defaults.leaf.js +28 -16
- package/dist/utility/wrun/wrun-market-size-defaults.util.js +34 -5
- package/dist/utility/wrun/wrun-oi-lane.util.d.ts +10 -7
- package/dist/utility/wrun/wrun-oi-lane.util.js +16 -10
- package/dist/utility/wrun/wrun-option-strike-flow.util.js +1 -1
- package/dist/utility/wrun/wrun-option-views.util.d.ts +2 -2
- package/dist/utility/wrun/wrun-option-views.util.js +5 -2
- package/dist/utility/wrun/wrun-options-flow-underlying.leaf.d.ts +5 -0
- package/dist/utility/wrun/wrun-options-flow-underlying.leaf.js +16 -0
- package/dist/utility/wrun/wrun-options-stop.util.d.ts +3 -2
- package/dist/utility/wrun/wrun-options-stop.util.js +6 -4
- package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +75 -11
- package/dist/utility/wrun/wrun-overlay-drivers.util.js +176 -43
- package/dist/utility/wrun/wrun-overlay-lifecycle.util.js +20 -10
- package/dist/utility/wrun/wrun-overlay-park.util.d.ts +84 -0
- package/dist/utility/wrun/wrun-overlay-park.util.js +135 -0
- package/dist/utility/wrun/wrun-overlay-recovery.util.d.ts +37 -4
- package/dist/utility/wrun/wrun-overlay-recovery.util.js +26 -14
- package/dist/utility/wrun/wrun-overlay-run.util.d.ts +239 -24
- package/dist/utility/wrun/wrun-overlay-run.util.js +2204 -405
- package/dist/utility/wrun/wrun-pack.util.d.ts +8 -5
- package/dist/utility/wrun/wrun-panel-mount.util.d.ts +2 -1
- package/dist/utility/wrun/wrun-panel-mount.util.js +20 -14
- package/dist/utility/wrun/wrun-panel-style.util.d.ts +4 -2
- package/dist/utility/wrun/wrun-panel-style.util.js +3 -2
- package/dist/utility/wrun/wrun-pin-spelling.util.d.ts +7 -0
- package/dist/utility/wrun/wrun-pin-spelling.util.js +18 -4
- package/dist/utility/wrun/wrun-pin-venues.util.d.ts +26 -17
- package/dist/utility/wrun/wrun-pin-venues.util.js +43 -36
- package/dist/utility/wrun/wrun-pinned-lanes.util.d.ts +58 -0
- package/dist/utility/wrun/wrun-pinned-lanes.util.js +72 -0
- package/dist/utility/wrun/wrun-prefix-cohort.util.js +2 -1
- package/dist/utility/wrun/wrun-prefix-lanes.util.d.ts +22 -9
- package/dist/utility/wrun/wrun-prefix-lanes.util.js +145 -26
- package/dist/utility/wrun/wrun-prefix-proof.util.d.ts +29 -0
- package/dist/utility/wrun/wrun-prefix-proof.util.js +23 -5
- package/dist/utility/wrun/wrun-refusal-surface.util.d.ts +9 -1
- package/dist/utility/wrun/wrun-refusal-surface.util.js +15 -1
- package/dist/utility/wrun/wrun-refusal.util.d.ts +19 -1
- package/dist/utility/wrun/wrun-refusal.util.js +103 -16
- package/dist/utility/wrun/wrun-registry-errors.util.d.ts +20 -6
- package/dist/utility/wrun/wrun-registry-errors.util.js +20 -6
- package/dist/utility/wrun/wrun-replay-rows.util.js +6 -10
- package/dist/utility/wrun/wrun-run-health.util.d.ts +89 -2
- package/dist/utility/wrun/wrun-run-health.util.js +204 -1
- package/dist/utility/wrun/wrun-run-interval-session.util.d.ts +2 -2
- package/dist/utility/wrun/wrun-run-interval-session.util.js +2 -2
- package/dist/utility/wrun/wrun-run-interval.util.d.ts +9 -8
- package/dist/utility/wrun/wrun-run-interval.util.js +13 -11
- package/dist/utility/wrun/wrun-sandbox-row-source.js +5 -2
- package/dist/utility/wrun/wrun-script-inputs.util.d.ts +13 -3
- package/dist/utility/wrun/wrun-script-inputs.util.js +51 -13
- package/dist/utility/wrun/wrun-session-composition.util.d.ts +81 -0
- package/dist/utility/wrun/wrun-session-composition.util.js +169 -0
- package/dist/utility/wrun/wrun-setting-words.util.d.ts +10 -7
- package/dist/utility/wrun/wrun-setting-words.util.js +25 -7
- package/dist/utility/wrun/wrun-source-rows.util.d.ts +94 -28
- package/dist/utility/wrun/wrun-source-rows.util.js +738 -93
- package/dist/utility/wrun/wrun-stream-clock.util.d.ts +45 -0
- package/dist/utility/wrun/wrun-stream-clock.util.js +108 -0
- package/dist/utility/wrun/wrun-tape-coins.util.d.ts +116 -0
- package/dist/utility/wrun/wrun-tape-coins.util.js +110 -0
- package/dist/utility/wrun/wrun-tape-source.util.d.ts +62 -32
- package/dist/utility/wrun/wrun-tape-source.util.js +72 -34
- package/dist/utility/wrun/wrun-tier-grid.util.d.ts +13 -5
- package/dist/utility/wrun/wrun-tier-grid.util.js +23 -13
- package/dist/utility/wrun/wrun-tpo-rows.util.js +2 -1
- package/dist/utility/wrun/wrun-trades-lane.util.d.ts +73 -0
- package/dist/utility/wrun/wrun-trades-lane.util.js +82 -0
- package/dist/utility/wrun/wrun-twin-compute-inputs.util.d.ts +5 -0
- package/dist/utility/wrun/wrun-twin-compute-inputs.util.js +9 -2
- package/dist/utility/wrun/wrun-visibility-table.d.ts +13 -0
- package/dist/utility/wrun/wrun-visibility-table.js +9 -0
- package/dist/utility/wrun/wrun-volume-profile.util.js +44 -32
- package/dist/utils/replay/replay-buffer-math.d.ts +16 -6
- package/dist/utils/replay/replay-buffer-math.js +60 -30
- package/dist/workers/constants/socket-slots.d.ts +11 -7
- package/dist/workers/constants/socket-slots.js +6 -5
- package/package.json +11 -11
|
@@ -25,17 +25,20 @@
|
|
|
25
25
|
import type { WrunAbiVersion, WrunIndicatorMetadata, WrunOutputRow, WrunPackedRunRequest, WrunWorkerResponse } from '../../interfaces/wrun-runtime.interface.js';
|
|
26
26
|
export { registerWrunRowLaneTupleWidths } from './wrun-pack-widths.leaf.js';
|
|
27
27
|
export { WRUN_CELL_CAPACITY_INVALID_CODE, wrunCellBlockTuples, wrunCellCapacityIssue, wrunCellReadCapacity, wrunModuleCellCapacity, wrunSheetCellBlockTuples, } from './wrun-cell-capacity.leaf.js';
|
|
28
|
+
/** One bar's flat f64 cells of one celled input: an array, or a view of the book adapter's one f64 block
|
|
29
|
+
* (wrun-source-rows.util `wrunBookCellRows`, WRUN-PANBACK-2 S2: a book lane's cells are never spelled as arrays). */
|
|
30
|
+
export type WrunCellBlock = number[] | Float64Array;
|
|
28
31
|
/** One runtime input row: `values` is the positional scalar block (celled
|
|
29
32
|
* slots carry NaN placeholders); `cellBlocks` maps a celled input index to
|
|
30
|
-
* that bar's flat f64 cell
|
|
31
|
-
* (`wrun_arg_len` answers -1); an empty
|
|
33
|
+
* that bar's flat f64 cell block. An index with no entry is a missing block
|
|
34
|
+
* (`wrun_arg_len` answers -1); an empty block is a zero-cell bar (0).
|
|
32
35
|
* A block is read, never written: the row builder hands the shared host's
|
|
33
|
-
* own array through uncopied, and `packWrunRows`
|
|
34
|
-
* buffer is its one copy. */
|
|
36
|
+
* own array (or the book adapter's view) through uncopied, and `packWrunRows`
|
|
37
|
+
* copying it into the ABI buffer is its one copy. */
|
|
35
38
|
export interface WrunInputRow {
|
|
36
39
|
ts: number;
|
|
37
40
|
values: number[];
|
|
38
|
-
cellBlocks?: Map<number,
|
|
41
|
+
cellBlocks?: Map<number, WrunCellBlock>;
|
|
39
42
|
}
|
|
40
43
|
/** Cell tuple widths per celled source class (f64 cells per source tuple), the shared host's table
|
|
41
44
|
* (`WRUN_HOST_CELL_TUPLE_WIDTHS`): `volume_profile` = [low, high, buy, sell]; `book` = [price,
|
|
@@ -170,6 +170,7 @@ export declare const WRUN_CHILD_LEGEND_ROW: {
|
|
|
170
170
|
readonly marks: "parent";
|
|
171
171
|
readonly spans: "parent";
|
|
172
172
|
readonly rays: "parent";
|
|
173
|
+
readonly flags: "parent";
|
|
173
174
|
};
|
|
174
175
|
/** A save of the package overlay: every mounted series child takes the chart switches it carries,
|
|
175
176
|
* its container through the engine's settings door and its plots' price markers through the
|
|
@@ -266,7 +267,7 @@ export interface PreparedWrunWindowLanding {
|
|
|
266
267
|
* never samples colour bounds, a full run does. Rejects with `WrunStaleLandingError` when the mount holds no
|
|
267
268
|
* such child to land into, and with the pack error when a pack failed.
|
|
268
269
|
*
|
|
269
|
-
* A batched child (WRUN-BATCHED-MARKS: marks, spans, rays) lands through the same seam (round-2 fold 10:
|
|
270
|
+
* A batched child (WRUN-BATCHED-MARKS: marks, spans, rays, flags) lands through the same seam (round-2 fold 10:
|
|
270
271
|
* the row-backed canvas kinds prepend rows): its merged rows are budgeted on the batched ledger, each pass
|
|
271
272
|
* row that replaces a mounted bar charged its old copy too, and the ring logs `wrun-batched-prefix-landed`;
|
|
272
273
|
* a run's heatmap and batched landings commit as one transaction. `prepareWrunChildWindowLanding` names
|
|
@@ -55,7 +55,7 @@ import { isWrunWindowOwner } from '../chart/window-owner.leaf.js';
|
|
|
55
55
|
import { ownerPaneDrawsNothing, planWindowWeights, reconcileWindowOwnerGeometry, savedWindowSplit, tableRowCountOf, WRUN_WINDOW_TABLES_ONLY_SETTING, } from '../chart/window-geometry.leaf.js';
|
|
56
56
|
import { wrunLegendName } from '../chart/wrun-legend-name.util.js';
|
|
57
57
|
import { wrunResultLegendColors, wrunSeriesChildId, } from '../chart/wrun-run-result.util.js';
|
|
58
|
-
import { budgetWrunBatchedRetained, budgetWrunBatchedRows, commitWrunBatchedPlan, currentWrunBatchedPlan, forgetWrunBatchedCells, isWrunBatchedMarksKind, noteWrunBatchedRowsCut, planWrunBatchedMerged, restoreWrunBatchedLedger, snapshotWrunBatchedLedger, wrunBatchedChargeOf, wrunBatchedChildConfig, wrunBatchedChildrenOverShare, wrunBatchedSiblingsToRebalance, } from './wrun-batched-marks.util.js';
|
|
58
|
+
import { budgetWrunBatchedRetained, budgetWrunBatchedRows, commitWrunBatchedPlan, currentWrunBatchedPlan, forgetWrunBatchedCells, isWrunBatchedMarksKind, noteWrunBatchedRowsCut, planWrunBatchedMerged, restoreWrunBatchedLedger, snapshotWrunBatchedLedger, WRUN_BATCHED_MARKS_KINDS, wrunBatchedChargeOf, wrunBatchedChildConfig, wrunBatchedChildrenOverShare, wrunBatchedEngineVerdict, wrunBatchedSiblingsToRebalance, } from './wrun-batched-marks.util.js';
|
|
59
59
|
import { forgetWrunCanvasReadout, keepWrunHeatmapScaleSample, rememberWrunCanvasReadout, wrunCanvasChildConfig, wrunHeatmapSensitivityBounds, wrunPlainCanvasRow, } from './wrun-canvases.util.js';
|
|
60
60
|
import { wrunChildHiddenRowKey } from './wrun-child-overlay-id.util.js';
|
|
61
61
|
import { wrunHeatmapSensitivitySetting, wrunHeatmapSensitivityValue } from './wrun-color-settings.util.js';
|
|
@@ -106,6 +106,7 @@ export const WRUN_CHILD_LEGEND_ROW = {
|
|
|
106
106
|
marks: 'parent',
|
|
107
107
|
spans: 'parent',
|
|
108
108
|
rays: 'parent',
|
|
109
|
+
flags: 'parent',
|
|
109
110
|
};
|
|
110
111
|
/** The pane height panels and the series lower pane share below the chart. */
|
|
111
112
|
const CHILD_PANE_GRID_HEIGHT = 0.22;
|
|
@@ -127,9 +128,7 @@ const ROW_BACKED_KINDS = new Set([
|
|
|
127
128
|
'series',
|
|
128
129
|
'heatmap',
|
|
129
130
|
'profile',
|
|
130
|
-
|
|
131
|
-
'spans',
|
|
132
|
-
'rays',
|
|
131
|
+
...WRUN_BATCHED_MARKS_KINDS,
|
|
133
132
|
]);
|
|
134
133
|
function overlayPresent(tc, id) {
|
|
135
134
|
return tc.metadata.some((meta) => meta.id === id);
|
|
@@ -167,12 +166,12 @@ function rebuiltRecord(record, ctx) {
|
|
|
167
166
|
return record.blanked === true ? blankedRecord(rebuilt) : rebuilt;
|
|
168
167
|
}
|
|
169
168
|
/** The price canvases (g6: heatmap, profile and matrix children) and the
|
|
170
|
-
* batched marks drawn over the price pane like them (marks, spans, rays):
|
|
169
|
+
* batched marks drawn over the price pane like them (marks, spans, rays, flags):
|
|
171
170
|
* no price marker, a readout registered when the config is built. */
|
|
172
171
|
function isCanvasChild(child) {
|
|
173
172
|
return child.kind === 'heatmap' || child.kind === 'profile' || child.kind === 'matrix' || isBatchedChild(child);
|
|
174
173
|
}
|
|
175
|
-
/** A batched child (WRUN-BATCHED-MARKS): marks, spans or
|
|
174
|
+
/** A batched child (WRUN-BATCHED-MARKS): marks, spans, rays or flags. */
|
|
176
175
|
function isBatchedChild(child) {
|
|
177
176
|
return isWrunBatchedMarksKind(child.kind);
|
|
178
177
|
}
|
|
@@ -299,10 +298,10 @@ function resolveSettingsColorWords(settings, theme) {
|
|
|
299
298
|
}
|
|
300
299
|
return resolved;
|
|
301
300
|
}
|
|
302
|
-
/** The chart's display timezone offset for the panel translation (SC37)
|
|
303
|
-
*
|
|
304
|
-
* path) reads as UTC, the engine's own default. */
|
|
305
|
-
function
|
|
301
|
+
/** The chart's display timezone offset for the panel translation (SC37): a fixed shift, or the shift at each instant
|
|
302
|
+
* (the host's answer, read at each key and record time, never once for all of them). A chart mounted before the
|
|
303
|
+
* user store exists (a bare test chart, a boot path) reads as UTC, the engine's own default. */
|
|
304
|
+
function displayTimezoneOffset() {
|
|
306
305
|
try {
|
|
307
306
|
return wrunChartHostEnv().user.chartDisplayTimezoneOffsetMs();
|
|
308
307
|
}
|
|
@@ -600,6 +599,7 @@ function childKindConfig(child, ctx) {
|
|
|
600
599
|
case 'marks':
|
|
601
600
|
case 'spans':
|
|
602
601
|
case 'rays':
|
|
602
|
+
case 'flags':
|
|
603
603
|
return batchedChildConfig(child, ctx);
|
|
604
604
|
case 'inset':
|
|
605
605
|
// The docked door keeps the inset sender fields only (a colour word
|
|
@@ -1434,7 +1434,7 @@ function rollBackLandingGroup(group) {
|
|
|
1434
1434
|
* never samples colour bounds, a full run does. Rejects with `WrunStaleLandingError` when the mount holds no
|
|
1435
1435
|
* such child to land into, and with the pack error when a pack failed.
|
|
1436
1436
|
*
|
|
1437
|
-
* A batched child (WRUN-BATCHED-MARKS: marks, spans, rays) lands through the same seam (round-2 fold 10:
|
|
1437
|
+
* A batched child (WRUN-BATCHED-MARKS: marks, spans, rays, flags) lands through the same seam (round-2 fold 10:
|
|
1438
1438
|
* the row-backed canvas kinds prepend rows): its merged rows are budgeted on the batched ledger, each pass
|
|
1439
1439
|
* row that replaces a mounted bar charged its old copy too, and the ring logs `wrun-batched-prefix-landed`;
|
|
1440
1440
|
* a run's heatmap and batched landings commit as one transaction. `prepareWrunChildWindowLanding` names
|
|
@@ -1734,7 +1734,7 @@ function mountContext(tc, overlayId, parent, children, priceDigits, chartHeightP
|
|
|
1734
1734
|
priceDigits,
|
|
1735
1735
|
theme: wrunColorThemeOf(tc),
|
|
1736
1736
|
themeMode: userThemeMode(),
|
|
1737
|
-
timezoneOffsetMs:
|
|
1737
|
+
timezoneOffsetMs: displayTimezoneOffset(),
|
|
1738
1738
|
windowCell,
|
|
1739
1739
|
planned,
|
|
1740
1740
|
anchorPaneId: ownerTimePaneId(parent, overlayId, children),
|
|
@@ -1916,8 +1916,13 @@ export function mountWrunChildOverlays({ tc, overlayId, runResult, replaceFrames
|
|
|
1916
1916
|
forgetWrunCanvasReadout(entry.config.id);
|
|
1917
1917
|
return;
|
|
1918
1918
|
}
|
|
1919
|
-
const
|
|
1920
|
-
|
|
1919
|
+
const gated = entry.input.newer !== undefined ? 'old-engine' : batchedGateCause(tc, entry.config.plot, packs[at]);
|
|
1920
|
+
// The engine draws the kind: a look its kind renderer would draw as another (the diamond, the log size law
|
|
1921
|
+
// and its px bounds before the engine release that draws flags, wrunBatchedEngineVerdict) is refused by name
|
|
1922
|
+
// and reason like a layout newer than this chart, never drawn as another look.
|
|
1923
|
+
const engineShort = gated === null ? wrunBatchedEngineVerdict(entry.input, (type) => tc.hasPlotRenderer?.(type) === true) : null;
|
|
1924
|
+
const newer = entry.input.newer ?? engineShort ?? undefined;
|
|
1925
|
+
const cause = newer !== undefined ? 'old-engine' : gated;
|
|
1921
1926
|
if (cause === null)
|
|
1922
1927
|
return;
|
|
1923
1928
|
const refusal = {
|
|
@@ -1986,6 +1991,7 @@ export function mountWrunChildOverlays({ tc, overlayId, runResult, replaceFrames
|
|
|
1986
1991
|
case 'marks':
|
|
1987
1992
|
case 'spans':
|
|
1988
1993
|
case 'rays':
|
|
1994
|
+
case 'flags':
|
|
1989
1995
|
return sameCanvas(mounted.config, next.config) ? [[id, mounted]] : [];
|
|
1990
1996
|
// A frame that stays on its pane is refreshed in place right here and
|
|
1991
1997
|
// kept as this run's child (the engine keeps one overlay throughout);
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
* om-panel-push-style.util), so nothing here refuses.
|
|
25
25
|
*/
|
|
26
26
|
import type { WrunPanelSeriesStyle, WrunPanelStyle } from '../../interfaces/wrun-runtime.interface.js';
|
|
27
|
+
import type { DisplayOffset } from '../chart/display-offset.leaf.js';
|
|
27
28
|
import type { ParsedPanel } from '../chart/om-panel.util.js';
|
|
28
29
|
import { type WrunColorTheme } from './wrun-style-words.util.js';
|
|
29
30
|
import type { WrunPanelFrameChrome } from './wrun-frames.js';
|
|
@@ -46,11 +47,12 @@ export type WrunPanelValueRole = 'x' | 'axis' | 'value';
|
|
|
46
47
|
export type WrunPanelValueFormatter = (value: number, role: WrunPanelValueRole, index: number) => string;
|
|
47
48
|
/** What the wrun lane hands the mappers: the chart's palette (tokens resolve
|
|
48
49
|
* against it), its price digits (the "price" format) and the display
|
|
49
|
-
* timezone shift (time-keyed panels
|
|
50
|
+
* timezone shift (time-keyed panels: a fixed shift, or the shift at each
|
|
51
|
+
* instant, read at each key). The push lane passes none. */
|
|
50
52
|
export interface WrunPanelTranslateContext {
|
|
51
53
|
theme?: WrunColorTheme;
|
|
52
54
|
priceDigits?: number;
|
|
53
|
-
timezoneOffsetMs?:
|
|
55
|
+
timezoneOffsetMs?: DisplayOffset;
|
|
54
56
|
}
|
|
55
57
|
/** A settings patch: every key present is written, a `series` array merges
|
|
56
58
|
* per index. */
|
|
@@ -420,8 +420,9 @@ function titleLegendStyle(panel) {
|
|
|
420
420
|
}
|
|
421
421
|
/** The markers a line draws this run (SC04): the frame list replaces the
|
|
422
422
|
* declared one. `x` rides as is for "spot" and numeric lines, seconds become
|
|
423
|
-
* ms on a time line (
|
|
424
|
-
* category line (a key absent from the rows
|
|
423
|
+
* ms on a time line (its instant, as the curve's rows are, SC37), a category
|
|
424
|
+
* key becomes its row index on a category line (a key absent from the rows
|
|
425
|
+
* drops that marker). A point
|
|
425
426
|
* callout (C3) carries `labelPlacement: 'point'`, its `y` and the NAME of
|
|
426
427
|
* its declared series (`series`; absent = the engine's first series): the
|
|
427
428
|
* engine anchors a callout on the series whose `name` it names (titan
|
|
@@ -110,6 +110,13 @@ export declare function parseWrunPinSpelling(text: string): PinReading;
|
|
|
110
110
|
* `COINBASE:BTC-USD`, `FX_OTC:EUR/USD`, `POLYGON:AAPL/USD`, `CME:ES1!`), which run as written.
|
|
111
111
|
*/
|
|
112
112
|
export declare function isForeignSpelling(input: WrunPinInput, chartExchange?: string): boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Whether the pin step reads a pin as a CME Group market, read before it runs (no catalog, no shared host): as written,
|
|
115
|
+
* our key in its symbol half (`BINANCE` + `CME|ES1!`), our escape (`OPENMARKET:CME|ES1!`) or a TradingView CME prefix
|
|
116
|
+
* (`CME_MINI:ES1!`), the readings `cmeMarketOf` respells. The run head's reading (its flag wait, its authorisation);
|
|
117
|
+
* the venue judge reads the resolved market after the step. An expression's reading may say yes: its run refuses it.
|
|
118
|
+
*/
|
|
119
|
+
export declare function wrunPinSpellingReadsCme(input: WrunPinInput, chartExchange?: string): boolean;
|
|
113
120
|
/** The catalog identities a pin's spelling may name, in the order the resolver reads them (the asks a caller sends
|
|
114
121
|
* when the resolver answers `catalog-pending`). */
|
|
115
122
|
export declare function wrunPinCandidates(input: WrunPinInput, chartExchange?: string): WrunPinCandidate[];
|
|
@@ -27,7 +27,9 @@
|
|
|
27
27
|
* - Refused by name before any fetch: `wrun_pin_unresolvable` (a venue we know, or one the tables map, with no market
|
|
28
28
|
* of ours under that spelling) and `wrun_pin_venue_unknown` (a venue word no table maps, the venue judge's own
|
|
29
29
|
* words). A CME Group market (ours as written, or the one a TradingView CME prefix names, `CME_MINI:ES1!` read as
|
|
30
|
-
* `CME|ES1!`) and an expression go on to the venue judge, which
|
|
30
|
+
* `CME|ES1!`) and an expression go on to the venue judge, which judges a CME market by the run's CME facts (a run
|
|
31
|
+
* the data wall lets read CME pins it on any chart) and refuses the rest in its own words. A CME symbol no gateway
|
|
32
|
+
* serves is no spelling question: it reaches the fetch and ends as `legs-empty`, like a market on any served venue.
|
|
31
33
|
* - A respelled pin runs on the resolved market with a legend note (`WRUN_PIN_RESPELLED`, "Pinned COINBASE:BTCUSD runs
|
|
32
34
|
* as COINBASE|BTC-USD"); the SAVED value is never rewritten (the respelling lives on the run's copy only).
|
|
33
35
|
*
|
|
@@ -216,8 +218,20 @@ function cryptoCandidates(venue, symbol) {
|
|
|
216
218
|
out.push(cryptoCandidate(venue, `${alias}${pair.quote}`));
|
|
217
219
|
return out;
|
|
218
220
|
}
|
|
219
|
-
/**
|
|
220
|
-
*
|
|
221
|
+
/**
|
|
222
|
+
* Whether the pin step reads a pin as a CME Group market, read before it runs (no catalog, no shared host): as written,
|
|
223
|
+
* our key in its symbol half (`BINANCE` + `CME|ES1!`), our escape (`OPENMARKET:CME|ES1!`) or a TradingView CME prefix
|
|
224
|
+
* (`CME_MINI:ES1!`), the readings `cmeMarketOf` respells. The run head's reading (its flag wait, its authorisation);
|
|
225
|
+
* the venue judge reads the resolved market after the step. An expression's reading may say yes: its run refuses it.
|
|
226
|
+
*/
|
|
227
|
+
export function wrunPinSpellingReadsCme(input, chartExchange) {
|
|
228
|
+
const readings = readingsOf(input, chartExchange);
|
|
229
|
+
const named = (reading) => Object.hasOwn(CME_PREFIXES, upper(reading.exchange));
|
|
230
|
+
return isForeignSpelling(input, chartExchange) ? readings.some(named) : named(readings[0]);
|
|
231
|
+
}
|
|
232
|
+
/** The CME Group market a reading names, by its venue (the venue judge decides it by the run's CME facts, never the
|
|
233
|
+
* catalog): the written word on the shared host's CME Group list, or a TradingView CME prefix through the continuous
|
|
234
|
+
* root table. */
|
|
221
235
|
function cmeMarketOf(reading) {
|
|
222
236
|
if (reading.exchange === '' || reading.symbol === '')
|
|
223
237
|
return undefined;
|
|
@@ -291,7 +305,7 @@ export function resolveWrunPinMarket(input, lookup, chartExchange) {
|
|
|
291
305
|
const unchanged = { market: writtenKey, respelled: false };
|
|
292
306
|
if (!isForeignSpelling(input, chartExchange))
|
|
293
307
|
return unchanged;
|
|
294
|
-
// An expression or a CME Group venue is the venue judge's
|
|
308
|
+
// An expression or a CME Group venue is the venue judge's (its precedence stands): a CME market by the run's facts.
|
|
295
309
|
const literal = readings.filter((reading) => wrunPinMarketIsLiteral(reading.exchange, reading.symbol));
|
|
296
310
|
if (literal.length === 0)
|
|
297
311
|
return unchanged;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CmePinRefusalVariant } from '../chart/kscript-venue-policy.util.js';
|
|
1
2
|
import { type WrunRefusalSeed } from './wrun-refusal.util.js';
|
|
2
3
|
import type { WrunUnservedLeg } from './wrun-run-health.util.js';
|
|
3
4
|
import type { WrunPinnedLeg, WrunPinnedWire } from './wrun-source-rows.util.js';
|
|
@@ -29,6 +30,12 @@ export declare function wrunPinMarketsOf(exchange: string, symbol: string): Arra
|
|
|
29
30
|
* with the sheet contract's code (`WRUN_PIN_SYMBOL_LITERAL_CODE`, om owns it). */
|
|
30
31
|
export declare function wrunPinMarketIsLiteral(exchange: string, symbol: string): boolean;
|
|
31
32
|
export type WrunPinVenueVerdict = 'served' | 'refused' | 'unserved' | 'unknown';
|
|
33
|
+
/** The run's CME plane facts a pin's venue verdict reads (see the header): `cmeOpen` is `mayReadCmePin` of the run's
|
|
34
|
+
* head; `cmeClosed` the words a refusal takes while it is closed (`cmePinRefusalVariant`). */
|
|
35
|
+
export interface WrunPinVenueFacts {
|
|
36
|
+
cmeOpen: boolean;
|
|
37
|
+
cmeClosed?: CmePinRefusalVariant;
|
|
38
|
+
}
|
|
32
39
|
/** Whether the chart's lanes can ask a venue word: a member of the wire's exchange enum
|
|
33
40
|
* (`Exchange`, the table the symbol search derives its venues from and every series ask maps
|
|
34
41
|
* the word through; `getExchangeFromSymbol` hands the K_OHLCV worker an enum name), never a
|
|
@@ -36,12 +43,13 @@ export type WrunPinVenueVerdict = 'served' | 'refused' | 'unserved' | 'unknown';
|
|
|
36
43
|
* moves NASDAQ, NYSE, CBOE and their siblings to POLYGON on persisted records; a SAVED pin is never
|
|
37
44
|
* rewritten: wrun-pin-spelling.util respells the run's copy). Exact, as the wire reads the word. */
|
|
38
45
|
export declare function wrunPinVenueOnWire(exchange: string): boolean;
|
|
39
|
-
/** What the chart does with a pin on `exchange`: `refused` (a CME Group venue
|
|
40
|
-
* does not start), `unserved` (an index venue the gateway does not serve to
|
|
41
|
-
* leg soft-refused), `unknown` (a venue word the chart's lanes cannot ask,
|
|
42
|
-
* by name, the run does not start), `served` (everything else; an absent
|
|
43
|
-
* own market).
|
|
44
|
-
|
|
46
|
+
/** What the chart does with a pin on `exchange`: `refused` (a CME Group venue the run's facts do not
|
|
47
|
+
* open, by name, the run does not start), `unserved` (an index venue the gateway does not serve to
|
|
48
|
+
* scripts yet, the leg soft-refused), `unknown` (a venue word the chart's lanes cannot ask,
|
|
49
|
+
* `wrunPinVenueOnWire`: by name, the run does not start), `served` (everything else; an absent
|
|
50
|
+
* exchange is the chart's own market). No facts reads the CME family refused; `unserved` never
|
|
51
|
+
* depends on them. */
|
|
52
|
+
export declare function wrunPinVenueVerdict(exchange: string | undefined, facts?: WrunPinVenueFacts): WrunPinVenueVerdict;
|
|
45
53
|
/** The unknown venue's words: the input, then the sheet contract's own message (the text om's
|
|
46
54
|
* sheet check writes for the same word, `wrun_pin_venue_unknown: venue '<word>' ...`). */
|
|
47
55
|
export declare function wrunPinVenueUnknownMessage(inputName: string, exchange: string): string;
|
|
@@ -66,8 +74,9 @@ export declare function wrunPinVenueUnknownSeed(venue: string, settingBound: boo
|
|
|
66
74
|
* served; the one point the run pass judges every leg at (the tick's reconcile re-asks only legs
|
|
67
75
|
* that passed here):
|
|
68
76
|
* - every market the expression parser extracts from the pin's `exchange|symbol` gets the venue
|
|
69
|
-
* verdict (a CME Group market hidden behind a served exchange refuses by
|
|
70
|
-
* `pin-refused`, the refused market's
|
|
77
|
+
* verdict under the run's `facts` (a CME Group market hidden behind a served exchange refuses by
|
|
78
|
+
* the contract's words while the facts keep CME closed): `pin-refused`, the refused market's
|
|
79
|
+
* symbol as `pin` (its exchange when it names none), worded by `facts.cmeClosed`;
|
|
71
80
|
* - a pin that is not one literal market refuses (`WRUN_PIN_SYMBOL_LITERAL_CODE`): a failed run;
|
|
72
81
|
* - a literal market on a venue word the chart's lanes cannot ask refuses
|
|
73
82
|
* (`WRUN_PIN_VENUE_UNKNOWN_CODE`): a failed run, its way out the settings when `settingBound`
|
|
@@ -75,16 +84,16 @@ export declare function wrunPinVenueUnknownSeed(venue: string, settingBound: boo
|
|
|
75
84
|
* - a multi-day leg shorter than a week on a session venue, the pinned market's or the chart's
|
|
76
85
|
* own, refuses (`WRUN_PIN_SESSION_INTERVAL_UNSERVED_CODE`): a failed run.
|
|
77
86
|
* An own-market leg (no `market`) is the chart's own venue: never a pin for the first three rules. */
|
|
78
|
-
export declare function wrunPinnedLegRefusalOf(leg: Pick<WrunPinnedLeg, 'market' | 'intervalKey' | 'legMs'>, inputName: string, chartExchange: string | undefined, settingBound?: boolean): WrunPinnedLegRefusal | null;
|
|
79
|
-
/** The words of `wrunPinnedLegRefusalOf`, or null when the leg is served. */
|
|
80
|
-
export declare function wrunPinnedLegRefusal(leg: Pick<WrunPinnedLeg, 'market' | 'intervalKey' | 'legMs'>, inputName: string, chartExchange: string | undefined): string | null;
|
|
87
|
+
export declare function wrunPinnedLegRefusalOf(leg: Pick<WrunPinnedLeg, 'market' | 'intervalKey' | 'legMs'>, inputName: string, chartExchange: string | undefined, settingBound?: boolean, facts?: WrunPinVenueFacts): WrunPinnedLegRefusal | null;
|
|
88
|
+
/** The words of `wrunPinnedLegRefusalOf` under the run's `facts`, or null when the leg is served. */
|
|
89
|
+
export declare function wrunPinnedLegRefusal(leg: Pick<WrunPinnedLeg, 'market' | 'intervalKey' | 'legMs'>, inputName: string, chartExchange: string | undefined, facts?: WrunPinVenueFacts): string | null;
|
|
81
90
|
/** Refuse by name, before any fetch, the first pinned leg in declaration order that
|
|
82
|
-
* `wrunPinnedLegRefusalOf` refuses (a CME Group market
|
|
83
|
-
* symbol; a pin that is not one literal market; a venue
|
|
84
|
-
* multi-day leg on a session venue), the refusal's seed
|
|
85
|
-
* names the inputs a symbol setting pins (`symbol_param`):
|
|
86
|
-
* settings as its way out. */
|
|
87
|
-
export declare function assertWrunPinnedLegVenues(legs: ReadonlyArray<WrunPinnedLeg>, inputNameAt: (index: number) => string, chartExchange?: string, settingBoundAt?: (index: number) => boolean): void;
|
|
91
|
+
* `wrunPinnedLegRefusalOf` refuses under the run's `facts` (a CME Group market the facts keep
|
|
92
|
+
* closed, declared or hidden in an expression symbol; a pin that is not one literal market; a venue
|
|
93
|
+
* word the chart's lanes cannot ask; a multi-day leg on a session venue), the refusal's seed
|
|
94
|
+
* attached to the error. `settingBoundAt` names the inputs a symbol setting pins (`symbol_param`):
|
|
95
|
+
* a leg one of them reads offers the settings as its way out. */
|
|
96
|
+
export declare function assertWrunPinnedLegVenues(legs: ReadonlyArray<WrunPinnedLeg>, inputNameAt: (index: number) => string, chartExchange?: string, settingBoundAt?: (index: number) => boolean, facts?: WrunPinVenueFacts): void;
|
|
88
97
|
/** The inputs whose wire consumes THIS leg's fetched rows, by index, ascending: matched by the
|
|
89
98
|
* fetch key each wire reads against the leg's (`wrunWireFetchKey`). A foreign forming view counts
|
|
90
99
|
* for its grid leg only; an own-market forming view, a typed feed and an own-period view never
|
|
@@ -4,16 +4,19 @@
|
|
|
4
4
|
* fetch, and read again by the live tick's leg reconcile so the two asks cannot drift.
|
|
5
5
|
*
|
|
6
6
|
* - The CME Group family (`WRUN_PIN_REFUSED_EXCHANGES` in the shared host's sheet contract: CME, CBOT,
|
|
7
|
-
* NYMEX, COMEX, GLOBEX) is
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* contract's
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* `
|
|
7
|
+
* NYMEX, COMEX, GLOBEX) is judged by the run's CME plane facts (`WrunPinVenueFacts`, Kyle
|
|
8
|
+
* 2026-11-03): a run the data wall lets read CME (`mayReadCmePin`: an official run, or a browser
|
|
9
|
+
* run the `cme-user-scripts` gate opened the plane to) pins a CME market on ANY chart, the word
|
|
10
|
+
* then judged on the wire like every venue (GLOBEX, no wire venue, reads unknown); any other run is
|
|
11
|
+
* REFUSED by name with the contract's own words (`wrun_pin_venue_refused`), its record worded by
|
|
12
|
+
* why the gate is closed (`cmeClosed`: the flag dark, the CME data terms, a server lane). No facts
|
|
13
|
+
* is a run that may not read CME (the server lanes' answer). The verdict covers every market the
|
|
14
|
+
* chart's expression parser extracts from the pin's `exchange|symbol` (a CME market hidden behind
|
|
15
|
+
* a served exchange included). A pin that is not one literal market refuses too
|
|
16
|
+
* (`wrun_pin_symbol_literal`, the contract's code), and so does a multi-day leg shorter than a week
|
|
17
|
+
* on a session venue (`wrun_pin_session_interval_unserved`: a 3d candle there groups trading days
|
|
18
|
+
* and would be confirmed early). An own-market leg carries no `market` and is never a pin (the
|
|
19
|
+
* display wall decides the chart's own venue, `isKScriptDisplayBlockedOnExchange`).
|
|
17
20
|
* - An index venue (`WRUN_PIN_UNSERVED_EXCHANGES`: POLYGON_INDICES) is UNSERVED until the data
|
|
18
21
|
* service serves index series to scripts (WRUN-CAPS-BACKEND-REQUEST.md, ask 2a: the directory
|
|
19
22
|
* still holds the index rows out): the leg is soft-refused per input the way the lane refusals
|
|
@@ -39,10 +42,11 @@
|
|
|
39
42
|
* chart's own forex charts ride.
|
|
40
43
|
*
|
|
41
44
|
* Every refusal carries its record's seed (WRUN-REFUSALS, `attachWrunRefusal`): the CME family is
|
|
42
|
-
* `pin-refused` naming the refused market
|
|
43
|
-
* to fix), their words the technical details. Which
|
|
44
|
-
* (`wrunLegFetchedRowReaders`) is decided here once, by the fetch
|
|
45
|
-
* unserved rows name them, and the run pass's leg gate reads the same
|
|
45
|
+
* `pin-refused` naming the refused market (its variant the facts' `cmeClosed`), the literal and
|
|
46
|
+
* session rules a failed run (the author's to fix), their words the technical details. Which
|
|
47
|
+
* inputs read a leg's FETCHED rows (`wrunLegFetchedRowReaders`) is decided here once, by the fetch
|
|
48
|
+
* key each wire consumes: the unserved rows name them, and the run pass's leg gate reads the same
|
|
49
|
+
* set.
|
|
46
50
|
*
|
|
47
51
|
* Pure and store-free (the chart's venue predicates only): the run pass and the live tick share it.
|
|
48
52
|
*/
|
|
@@ -115,13 +119,14 @@ export function wrunPinVenueOnWire(exchange) {
|
|
|
115
119
|
const code = Exchange[exchange];
|
|
116
120
|
return (typeof code === 'number' && code !== Exchange.UNKNOWN_EXCHANGE && normalizeLegacyExchange(exchange) === exchange);
|
|
117
121
|
}
|
|
118
|
-
/** What the chart does with a pin on `exchange`: `refused` (a CME Group venue
|
|
119
|
-
* does not start), `unserved` (an index venue the gateway does not serve to
|
|
120
|
-
* leg soft-refused), `unknown` (a venue word the chart's lanes cannot ask,
|
|
121
|
-
* by name, the run does not start), `served` (everything else; an absent
|
|
122
|
-
* own market).
|
|
123
|
-
|
|
124
|
-
|
|
122
|
+
/** What the chart does with a pin on `exchange`: `refused` (a CME Group venue the run's facts do not
|
|
123
|
+
* open, by name, the run does not start), `unserved` (an index venue the gateway does not serve to
|
|
124
|
+
* scripts yet, the leg soft-refused), `unknown` (a venue word the chart's lanes cannot ask,
|
|
125
|
+
* `wrunPinVenueOnWire`: by name, the run does not start), `served` (everything else; an absent
|
|
126
|
+
* exchange is the chart's own market). No facts reads the CME family refused; `unserved` never
|
|
127
|
+
* depends on them. */
|
|
128
|
+
export function wrunPinVenueVerdict(exchange, facts) {
|
|
129
|
+
if (facts?.cmeOpen !== true && wrunChartHostEnv().sharedHost().wrunPinVenueRefused(exchange))
|
|
125
130
|
return 'refused';
|
|
126
131
|
if (exchange !== undefined && WRUN_PIN_UNSERVED_EXCHANGES.includes(exchange.toUpperCase())) {
|
|
127
132
|
return 'unserved';
|
|
@@ -165,8 +170,9 @@ export function wrunPinVenueUnknownSeed(venue, settingBound) {
|
|
|
165
170
|
* served; the one point the run pass judges every leg at (the tick's reconcile re-asks only legs
|
|
166
171
|
* that passed here):
|
|
167
172
|
* - every market the expression parser extracts from the pin's `exchange|symbol` gets the venue
|
|
168
|
-
* verdict (a CME Group market hidden behind a served exchange refuses by
|
|
169
|
-
* `pin-refused`, the refused market's
|
|
173
|
+
* verdict under the run's `facts` (a CME Group market hidden behind a served exchange refuses by
|
|
174
|
+
* the contract's words while the facts keep CME closed): `pin-refused`, the refused market's
|
|
175
|
+
* symbol as `pin` (its exchange when it names none), worded by `facts.cmeClosed`;
|
|
170
176
|
* - a pin that is not one literal market refuses (`WRUN_PIN_SYMBOL_LITERAL_CODE`): a failed run;
|
|
171
177
|
* - a literal market on a venue word the chart's lanes cannot ask refuses
|
|
172
178
|
* (`WRUN_PIN_VENUE_UNKNOWN_CODE`): a failed run, its way out the settings when `settingBound`
|
|
@@ -174,18 +180,19 @@ export function wrunPinVenueUnknownSeed(venue, settingBound) {
|
|
|
174
180
|
* - a multi-day leg shorter than a week on a session venue, the pinned market's or the chart's
|
|
175
181
|
* own, refuses (`WRUN_PIN_SESSION_INTERVAL_UNSERVED_CODE`): a failed run.
|
|
176
182
|
* An own-market leg (no `market`) is the chart's own venue: never a pin for the first three rules. */
|
|
177
|
-
export function wrunPinnedLegRefusalOf(leg, inputName, chartExchange, settingBound = false) {
|
|
183
|
+
export function wrunPinnedLegRefusalOf(leg, inputName, chartExchange, settingBound = false, facts) {
|
|
178
184
|
const pinned = leg.market;
|
|
179
185
|
if (pinned !== undefined) {
|
|
180
186
|
const exchange = pinned.exchange ?? '';
|
|
181
187
|
const symbol = pinned.symbol ?? '';
|
|
182
188
|
for (const market of wrunPinMarketsOf(exchange, symbol)) {
|
|
183
|
-
if (wrunPinVenueVerdict(market.exchange) === 'refused') {
|
|
189
|
+
if (wrunPinVenueVerdict(market.exchange, facts) === 'refused') {
|
|
184
190
|
const label = market.symbol !== '' ? market.symbol : market.exchange;
|
|
185
191
|
return {
|
|
186
192
|
message: wrunPinVenueRefusalMessage(inputName, market.exchange),
|
|
187
193
|
seed: {
|
|
188
194
|
cls: 'pin-refused',
|
|
195
|
+
...(facts?.cmeClosed !== undefined ? { variant: facts.cmeClosed } : {}),
|
|
189
196
|
market: { exchange: market.exchange, symbol: market.symbol, label },
|
|
190
197
|
params: { pin: label },
|
|
191
198
|
},
|
|
@@ -200,7 +207,7 @@ export function wrunPinnedLegRefusalOf(leg, inputName, chartExchange, settingBou
|
|
|
200
207
|
seed: wrunAuthorRuleSeed(wrunChartHostEnv().sharedHost().WRUN_PIN_SYMBOL_LITERAL_CODE),
|
|
201
208
|
};
|
|
202
209
|
}
|
|
203
|
-
if (wrunPinVenueVerdict(exchange) === 'unknown') {
|
|
210
|
+
if (wrunPinVenueVerdict(exchange, facts) === 'unknown') {
|
|
204
211
|
return {
|
|
205
212
|
message: wrunPinVenueUnknownMessage(inputName, exchange),
|
|
206
213
|
seed: wrunPinVenueUnknownSeed(exchange, settingBound),
|
|
@@ -219,23 +226,23 @@ export function wrunPinnedLegRefusalOf(leg, inputName, chartExchange, settingBou
|
|
|
219
226
|
}
|
|
220
227
|
return null;
|
|
221
228
|
}
|
|
222
|
-
/** The words of `wrunPinnedLegRefusalOf`, or null when the leg is served. */
|
|
223
|
-
export function wrunPinnedLegRefusal(leg, inputName, chartExchange) {
|
|
224
|
-
return wrunPinnedLegRefusalOf(leg, inputName, chartExchange)?.message ?? null;
|
|
229
|
+
/** The words of `wrunPinnedLegRefusalOf` under the run's `facts`, or null when the leg is served. */
|
|
230
|
+
export function wrunPinnedLegRefusal(leg, inputName, chartExchange, facts) {
|
|
231
|
+
return wrunPinnedLegRefusalOf(leg, inputName, chartExchange, false, facts)?.message ?? null;
|
|
225
232
|
}
|
|
226
233
|
/** Refuse by name, before any fetch, the first pinned leg in declaration order that
|
|
227
|
-
* `wrunPinnedLegRefusalOf` refuses (a CME Group market
|
|
228
|
-
* symbol; a pin that is not one literal market; a venue
|
|
229
|
-
* multi-day leg on a session venue), the refusal's seed
|
|
230
|
-
* names the inputs a symbol setting pins (`symbol_param`):
|
|
231
|
-
* settings as its way out. */
|
|
232
|
-
export function assertWrunPinnedLegVenues(legs, inputNameAt, chartExchange, settingBoundAt) {
|
|
234
|
+
* `wrunPinnedLegRefusalOf` refuses under the run's `facts` (a CME Group market the facts keep
|
|
235
|
+
* closed, declared or hidden in an expression symbol; a pin that is not one literal market; a venue
|
|
236
|
+
* word the chart's lanes cannot ask; a multi-day leg on a session venue), the refusal's seed
|
|
237
|
+
* attached to the error. `settingBoundAt` names the inputs a symbol setting pins (`symbol_param`):
|
|
238
|
+
* a leg one of them reads offers the settings as its way out. */
|
|
239
|
+
export function assertWrunPinnedLegVenues(legs, inputNameAt, chartExchange, settingBoundAt, facts) {
|
|
233
240
|
const byInput = [...legs]
|
|
234
241
|
.map((leg) => ({ leg, index: Math.min(...leg.inputIndexes) }))
|
|
235
242
|
.sort((a, b) => a.index - b.index);
|
|
236
243
|
for (const { leg, index } of byInput) {
|
|
237
244
|
const settingBound = settingBoundAt !== undefined && leg.inputIndexes.some(settingBoundAt);
|
|
238
|
-
const refusal = wrunPinnedLegRefusalOf(leg, inputNameAt(index), chartExchange, settingBound);
|
|
245
|
+
const refusal = wrunPinnedLegRefusalOf(leg, inputNameAt(index), chartExchange, settingBound, facts);
|
|
239
246
|
if (refusal !== null)
|
|
240
247
|
throw attachWrunRefusal(new Error(refusal.message), refusal.seed);
|
|
241
248
|
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Market pins on typed feeds and the order book (U9e, the chart half). A `book`, `oi`, `funding` or `liquidations`
|
|
3
|
+
* input pinned to one whole market (`symbol` AND `exchange`) reads a lane of its own on that market, the way a trades
|
|
4
|
+
* leg does (wrun-trades-lane.util): `book@COINBASE|BTC-USD`, `oi@BINANCE_FUTURES|BTCUSDT`. The lane id is its fetch
|
|
5
|
+
* key, its live lane, its acquisition record and its buffer key (`pinnedLaneRows`), so the full run, the push intake,
|
|
6
|
+
* the reconcile and a pan-back page each ask and keep it apart from the chart's own lane of the class:
|
|
7
|
+
*
|
|
8
|
+
* - history: one thunk per lane, its market in the payload extras (the book packed first, as the chart's own book);
|
|
9
|
+
* - live: book, funding and liquidations ride their push channels on the lane's market (a book its own
|
|
10
|
+
* BLOCK_BOOK_SNAPSHOT stream: the heatmap ride declines another market), open interest the poll (the reconcile
|
|
11
|
+
* re-asks the lane's acquisition over the forming bucket, as it does the chart's own oi);
|
|
12
|
+
* - the row builder answers the shared host's foreign ask of a class from the lane of the same class and market
|
|
13
|
+
* (`wrunPinnedLaneIdOf`), never from the chart's own lane: no stand-in.
|
|
14
|
+
*
|
|
15
|
+
* Which classes are served pinned is the one table every gate reads (wrun-input-requirements.leaf
|
|
16
|
+
* `WRUN_BROWSER_PINNED_LANE_CLASSES`): a class this module lanes but the table leaves out plans no lane here, and the
|
|
17
|
+
* row builder refuses its pin by name.
|
|
18
|
+
*/
|
|
19
|
+
import type { WrunInputSource } from '../../interfaces/wrun-runtime.interface.js';
|
|
20
|
+
/** The classes a pin moves onto a lane of their own (the candle classes and trades ride legs of their own). */
|
|
21
|
+
export declare const WRUN_PINNED_LANE_CLASSES: readonly ["book", "oi", "funding", "liquidations"];
|
|
22
|
+
export type WrunPinnedLaneClass = (typeof WRUN_PINNED_LANE_CLASSES)[number];
|
|
23
|
+
/** A pinned lane id: `<class>@<exchange>|<symbol>`. */
|
|
24
|
+
export type WrunPinnedLaneId = `${WrunPinnedLaneClass}@${string}`;
|
|
25
|
+
export interface WrunPinnedLane {
|
|
26
|
+
cls: WrunPinnedLaneClass;
|
|
27
|
+
exchange: string;
|
|
28
|
+
symbol: string;
|
|
29
|
+
}
|
|
30
|
+
/** How each pinned lane class is asked and kept live: the kScript source type its history and its reconcile ride
|
|
31
|
+
* (the K control that subscribes its channel), the chart's own lane it mirrors, and whether its live rows are pushed
|
|
32
|
+
* (`push`: the class's channel on the lane's market) or polled (`poll`: the reconcile re-asks the forming bucket). */
|
|
33
|
+
export declare const WRUN_PINNED_LANE_SPECS: Readonly<Record<WrunPinnedLaneClass, {
|
|
34
|
+
type: string;
|
|
35
|
+
live: 'push' | 'poll';
|
|
36
|
+
label: string;
|
|
37
|
+
}>>;
|
|
38
|
+
/** Whether a class is laned on a pinned market now: one of the lane classes, and in the one table every gate reads. */
|
|
39
|
+
export declare function isWrunPinnedLaneClass(cls: unknown): cls is WrunPinnedLaneClass;
|
|
40
|
+
/** The lane id of a class on a market, by the shared host's ask or a source's own pin. */
|
|
41
|
+
export declare function wrunPinnedLaneIdOf(cls: WrunPinnedLaneClass, exchange: string, symbol: string): WrunPinnedLaneId;
|
|
42
|
+
/** The pinned lane an input reads: a laned class pinned to one whole market (symbol AND exchange), else undefined (the
|
|
43
|
+
* chart's own lane, or a half pin, which the row builder refuses by name). */
|
|
44
|
+
export declare function wrunPinnedLaneOfSource(source: Pick<WrunInputSource, 'source' | 'symbol' | 'exchange'> | undefined): WrunPinnedLaneId | undefined;
|
|
45
|
+
/** A pinned lane id read apart (no exchange holds `|`, no class `@`), else undefined. */
|
|
46
|
+
export declare function wrunPinnedLaneOf(lane: unknown): WrunPinnedLane | undefined;
|
|
47
|
+
export declare function isWrunPinnedLaneId(value: unknown): value is WrunPinnedLaneId;
|
|
48
|
+
/** A pinned lane's payload extras: its market over the current-market placeholders (the K control reads the payload's
|
|
49
|
+
* exchange and symbol, so the history, the reconcile and a page ask that market). */
|
|
50
|
+
export declare function wrunPinnedLaneExtras(lane: WrunPinnedLaneId): {
|
|
51
|
+
exchange: string;
|
|
52
|
+
symbol: string;
|
|
53
|
+
};
|
|
54
|
+
/** The pinned lanes of one class among a lane list (a sheet's declared lanes, a context's buffers), in its order. */
|
|
55
|
+
export declare function wrunPinnedLanesOfClass(lanes: Iterable<string>, cls: WrunPinnedLaneClass): WrunPinnedLaneId[];
|
|
56
|
+
/** The refusal of a pinned class the browser does not lane yet (the residual: `implied_volatility`, `skew`,
|
|
57
|
+
* `volume_profile`, `tape` and every other class outside the table): the input's words, naming the class. */
|
|
58
|
+
export declare function wrunPinnedClassRefusal(name: string, cls: string, marketLabel: string): string;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { WRUN_BROWSER_PINNED_LANE_CLASSES } from './wrun-input-requirements.leaf.js';
|
|
2
|
+
/** The classes a pin moves onto a lane of their own (the candle classes and trades ride legs of their own). */
|
|
3
|
+
export const WRUN_PINNED_LANE_CLASSES = ['book', 'oi', 'funding', 'liquidations'];
|
|
4
|
+
/** How each pinned lane class is asked and kept live: the kScript source type its history and its reconcile ride
|
|
5
|
+
* (the K control that subscribes its channel), the chart's own lane it mirrors, and whether its live rows are pushed
|
|
6
|
+
* (`push`: the class's channel on the lane's market) or polled (`poll`: the reconcile re-asks the forming bucket). */
|
|
7
|
+
export const WRUN_PINNED_LANE_SPECS = Object.freeze({
|
|
8
|
+
book: { type: 'orderbook', live: 'push', label: 'Order book' },
|
|
9
|
+
oi: { type: 'open_interest', live: 'poll', label: 'Open interest' },
|
|
10
|
+
funding: { type: 'funding_rate', live: 'push', label: 'Funding rate' },
|
|
11
|
+
liquidations: { type: 'liquidations', live: 'push', label: 'Liquidations' },
|
|
12
|
+
});
|
|
13
|
+
/** Whether a class is laned on a pinned market now: one of the lane classes, and in the one table every gate reads. */
|
|
14
|
+
export function isWrunPinnedLaneClass(cls) {
|
|
15
|
+
return (typeof cls === 'string' &&
|
|
16
|
+
WRUN_PINNED_LANE_CLASSES.includes(cls) &&
|
|
17
|
+
WRUN_BROWSER_PINNED_LANE_CLASSES.has(cls));
|
|
18
|
+
}
|
|
19
|
+
/** The lane id of a class on a market, by the shared host's ask or a source's own pin. */
|
|
20
|
+
export function wrunPinnedLaneIdOf(cls, exchange, symbol) {
|
|
21
|
+
return `${cls}@${exchange}|${symbol}`;
|
|
22
|
+
}
|
|
23
|
+
/** The pinned lane an input reads: a laned class pinned to one whole market (symbol AND exchange), else undefined (the
|
|
24
|
+
* chart's own lane, or a half pin, which the row builder refuses by name). */
|
|
25
|
+
export function wrunPinnedLaneOfSource(source) {
|
|
26
|
+
if (source === undefined || !isWrunPinnedLaneClass(source.source))
|
|
27
|
+
return undefined;
|
|
28
|
+
const { exchange, symbol } = source;
|
|
29
|
+
if (typeof exchange !== 'string' || exchange === '' || typeof symbol !== 'string' || symbol === '')
|
|
30
|
+
return undefined;
|
|
31
|
+
return wrunPinnedLaneIdOf(source.source, exchange, symbol);
|
|
32
|
+
}
|
|
33
|
+
/** A pinned lane id read apart (no exchange holds `|`, no class `@`), else undefined. */
|
|
34
|
+
export function wrunPinnedLaneOf(lane) {
|
|
35
|
+
if (typeof lane !== 'string')
|
|
36
|
+
return undefined;
|
|
37
|
+
const at = lane.indexOf('@');
|
|
38
|
+
if (at <= 0)
|
|
39
|
+
return undefined;
|
|
40
|
+
const cls = lane.slice(0, at);
|
|
41
|
+
if (!WRUN_PINNED_LANE_CLASSES.includes(cls))
|
|
42
|
+
return undefined;
|
|
43
|
+
const market = lane.slice(at + 1);
|
|
44
|
+
const bar = market.indexOf('|');
|
|
45
|
+
if (bar <= 0 || bar === market.length - 1)
|
|
46
|
+
return undefined;
|
|
47
|
+
return { cls: cls, exchange: market.slice(0, bar), symbol: market.slice(bar + 1) };
|
|
48
|
+
}
|
|
49
|
+
export function isWrunPinnedLaneId(value) {
|
|
50
|
+
return wrunPinnedLaneOf(value) !== undefined;
|
|
51
|
+
}
|
|
52
|
+
/** A pinned lane's payload extras: its market over the current-market placeholders (the K control reads the payload's
|
|
53
|
+
* exchange and symbol, so the history, the reconcile and a page ask that market). */
|
|
54
|
+
export function wrunPinnedLaneExtras(lane) {
|
|
55
|
+
const pinned = wrunPinnedLaneOf(lane);
|
|
56
|
+
return { exchange: pinned.exchange, symbol: pinned.symbol };
|
|
57
|
+
}
|
|
58
|
+
/** The pinned lanes of one class among a lane list (a sheet's declared lanes, a context's buffers), in its order. */
|
|
59
|
+
export function wrunPinnedLanesOfClass(lanes, cls) {
|
|
60
|
+
const out = [];
|
|
61
|
+
for (const lane of lanes) {
|
|
62
|
+
if (wrunPinnedLaneOf(lane)?.cls === cls)
|
|
63
|
+
out.push(lane);
|
|
64
|
+
}
|
|
65
|
+
return out;
|
|
66
|
+
}
|
|
67
|
+
/** The refusal of a pinned class the browser does not lane yet (the residual: `implied_volatility`, `skew`,
|
|
68
|
+
* `volume_profile`, `tape` and every other class outside the table): the input's words, naming the class. */
|
|
69
|
+
export function wrunPinnedClassRefusal(name, cls, marketLabel) {
|
|
70
|
+
return (`Input '${name}' (${cls}) pins the market '${marketLabel}': ` +
|
|
71
|
+
`the chart reads ${cls} on its own market only; a market pin on it is not served yet`);
|
|
72
|
+
}
|