@orangecharts/wrun-chart-host 0.10.0 → 0.11.1
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 +9 -0
- package/dist/constants/feature-flags.constants.js +67 -4
- package/dist/constants/governed-exchanges.constants.d.ts +12 -0
- package/dist/constants/governed-exchanges.constants.js +16 -0
- package/dist/constants/option-venues.constants.d.ts +2 -2
- package/dist/host-env.d.ts +1 -9
- package/dist/host-ports.types.d.ts +36 -7
- package/dist/index.d.ts +7 -1
- package/dist/index.js +7 -1
- package/dist/indicators/controls/tpo-session.util.d.ts +36 -13
- package/dist/indicators/controls/tpo-session.util.js +217 -236
- package/dist/interfaces/cancel-reason.interface.d.ts +1 -1
- package/dist/interfaces/cme-realtime.interface.d.ts +16 -9
- package/dist/interfaces/cme-realtime.interface.js +6 -3
- package/dist/interfaces/kscript-diagnostics.interface.d.ts +6 -0
- package/dist/interfaces/opra-realtime.interface.d.ts +1 -5
- package/dist/interfaces/prediction-market.interface.d.ts +7 -0
- package/dist/interfaces/stocks-realtime.interface.d.ts +57 -0
- package/dist/interfaces/stocks-realtime.interface.js +32 -0
- package/dist/kscript-data/controls/live-trades-merge.util.d.ts +48 -117
- package/dist/kscript-data/controls/live-trades-merge.util.js +97 -207
- package/dist/market-data/billing.interface.d.ts +86 -12
- package/dist/market-data/billing.interface.js +23 -4
- package/dist/market-data/venue.d.ts +65 -2
- package/dist/market-data/venues/index.d.ts +135 -5
- package/dist/market-data/venues/index.js +2 -1
- package/dist/market-data/venues/opra.contract.copy.json +3 -2
- package/dist/market-data/venues/opra.d.ts +2 -2
- package/dist/market-data/venues/opra.js +5 -2
- package/dist/market-data/venues/stocks.contract.copy.json +64 -0
- package/dist/market-data/venues/stocks.d.ts +130 -0
- package/dist/market-data/venues/stocks.js +117 -0
- package/dist/settings-templates/footprint-rows.js +35 -2
- package/dist/settings-templates/form-rows.d.ts +2 -1
- package/dist/settings-templates/indicator-fields.js +34 -4
- package/dist/settings-templates/tool-rules.d.ts +12 -5
- package/dist/settings-templates/tool-rules.js +11 -5
- package/dist/settings-templates/tool-tables.generated.js +4 -0
- package/dist/utility/chart/cme-cache-context.util.d.ts +5 -3
- package/dist/utility/chart/cme-cache-context.util.js +10 -6
- package/dist/utility/chart/cme-realtime.util.js +10 -0
- package/dist/utility/chart/cme-user-scripts-gate.util.d.ts +83 -0
- package/dist/utility/chart/cme-user-scripts-gate.util.js +142 -0
- package/dist/utility/chart/effective-chart-session.util.d.ts +14 -0
- package/dist/utility/chart/effective-chart-session.util.js +39 -0
- package/dist/utility/chart/host-bar-placement.util.d.ts +28 -0
- package/dist/utility/chart/host-bar-placement.util.js +170 -30
- package/dist/utility/chart/index-host-tier.util.d.ts +3 -1
- package/dist/utility/chart/index-host-tier.util.js +7 -2
- package/dist/utility/chart/index-mode-admission.util.js +25 -11
- package/dist/utility/chart/kscript-apply-fingerprint.util.js +1 -1
- package/dist/utility/chart/kscript-live-coalesce.util.d.ts +6 -9
- package/dist/utility/chart/kscript-live-coalesce.util.js +8 -9
- package/dist/utility/chart/kscript-live-source-identity.util.d.ts +9 -0
- package/dist/utility/chart/kscript-live-source-identity.util.js +10 -1
- package/dist/utility/chart/kscript-provenance-keys.util.js +7 -0
- package/dist/utility/chart/kscript-standin-identity.leaf.d.ts +3 -1
- package/dist/utility/chart/kscript-venue-policy.util.d.ts +115 -21
- package/dist/utility/chart/kscript-venue-policy.util.js +194 -40
- package/dist/utility/chart/live-bucket.util.d.ts +24 -8
- package/dist/utility/chart/live-bucket.util.js +85 -27
- 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/marketKind.util.js +5 -0
- package/dist/utility/chart/mixed-mode.util.d.ts +7 -0
- package/dist/utility/chart/mixed-mode.util.js +14 -0
- package/dist/utility/chart/opra-user-scripts-gate.util.d.ts +11 -16
- package/dist/utility/chart/opra-user-scripts-gate.util.js +12 -28
- package/dist/utility/chart/rth-session.util.d.ts +9 -8
- package/dist/utility/chart/rth-session.util.js +23 -20
- 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/trading-day.util.d.ts +17 -0
- package/dist/utility/chart/trading-day.util.js +59 -0
- package/dist/utility/chart/window-owner.leaf.d.ts +23 -2
- package/dist/utility/chart/window-owner.leaf.js +45 -3
- package/dist/utility/chart/wrun-bar-session-facts.util.d.ts +33 -15
- package/dist/utility/chart/wrun-bar-session-facts.util.js +70 -20
- package/dist/utility/intl-locale.util.js +5 -0
- package/dist/utility/scriptEditor/wrun-runtime-diagnostics.leaf.js +2 -0
- package/dist/utility/v2/gate-plane.util.d.ts +12 -3
- package/dist/utility/v2/gate-plane.util.js +30 -4
- package/dist/utility/v2/gate-session-latch.util.js +1 -1
- package/dist/utility/v2/stocks-governed.util.d.ts +16 -0
- package/dist/utility/v2/stocks-governed.util.js +34 -0
- package/dist/utility/wrun/derived-roots.leaf.d.ts +13 -0
- package/dist/utility/wrun/derived-roots.leaf.js +27 -0
- package/dist/utility/wrun/derived-roots.util.d.ts +1 -9
- package/dist/utility/wrun/derived-roots.util.js +3 -23
- package/dist/utility/wrun/run-schedule/wrun-chart-gate-reader.util.d.ts +4 -3
- package/dist/utility/wrun/run-schedule/wrun-own-candles.util.d.ts +24 -3
- package/dist/utility/wrun/run-schedule/wrun-own-candles.util.js +46 -10
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +2 -0
- package/dist/utility/wrun/sources/wrun-row-lane-add-memo.util.d.ts +63 -16
- package/dist/utility/wrun/sources/wrun-row-lane-add-memo.util.js +58 -14
- package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +34 -11
- package/dist/utility/wrun/sources/wrun-row-lanes.util.js +106 -30
- package/dist/utility/wrun/wrun-browser-sources.leaf.js +1 -2
- package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +7 -4
- package/dist/utility/wrun/wrun-chart-market-facts.util.js +12 -8
- package/dist/utility/wrun/wrun-color-settings.util.d.ts +9 -0
- package/dist/utility/wrun/wrun-color-settings.util.js +33 -0
- package/dist/utility/wrun/wrun-handles.util.d.ts +7 -3
- package/dist/utility/wrun/wrun-handles.util.js +9 -8
- package/dist/utility/wrun/wrun-input-requirements.leaf.d.ts +68 -0
- package/dist/utility/wrun/wrun-input-requirements.leaf.js +163 -7
- package/dist/utility/wrun/wrun-leg-close.util.d.ts +59 -23
- package/dist/utility/wrun/wrun-leg-close.util.js +186 -28
- package/dist/utility/wrun/wrun-live-intake.util.d.ts +26 -12
- package/dist/utility/wrun/wrun-live-intake.util.js +219 -155
- package/dist/utility/wrun/wrun-live-tick.util.d.ts +9 -5
- package/dist/utility/wrun/wrun-live-tick.util.js +130 -94
- package/dist/utility/wrun/wrun-market-facts.util.d.ts +13 -3
- package/dist/utility/wrun/wrun-market-facts.util.js +13 -3
- package/dist/utility/wrun/wrun-market-size-defaults.leaf.d.ts +20 -10
- package/dist/utility/wrun/wrun-market-size-defaults.leaf.js +10 -5
- package/dist/utility/wrun/wrun-option-book-rows.util.d.ts +56 -0
- package/dist/utility/wrun/wrun-option-book-rows.util.js +96 -0
- package/dist/utility/wrun/wrun-option-views.util.d.ts +281 -20
- package/dist/utility/wrun/wrun-option-views.util.js +391 -50
- package/dist/utility/wrun/wrun-options-chain.util.d.ts +3 -3
- package/dist/utility/wrun/wrun-options-chain.util.js +2 -0
- package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +15 -2
- package/dist/utility/wrun/wrun-overlay-drivers.util.js +13 -3
- package/dist/utility/wrun/wrun-overlay-recovery.util.js +3 -1
- package/dist/utility/wrun/wrun-overlay-run.util.d.ts +60 -11
- package/dist/utility/wrun/wrun-overlay-run.util.js +529 -113
- package/dist/utility/wrun/wrun-panel-mount.util.js +51 -6
- package/dist/utility/wrun/wrun-pin-spelling.util.d.ts +15 -2
- package/dist/utility/wrun/wrun-pin-spelling.util.js +27 -3
- package/dist/utility/wrun/wrun-refusal.util.d.ts +3 -2
- package/dist/utility/wrun/wrun-refusal.util.js +22 -0
- package/dist/utility/wrun/wrun-registry-errors.util.d.ts +26 -0
- package/dist/utility/wrun/wrun-registry-errors.util.js +34 -0
- package/dist/utility/wrun/wrun-replay-lane.util.js +3 -2
- package/dist/utility/wrun/wrun-run-interval-session.util.d.ts +20 -6
- package/dist/utility/wrun/wrun-run-interval-session.util.js +22 -7
- package/dist/utility/wrun/wrun-run-interval.util.d.ts +39 -7
- package/dist/utility/wrun/wrun-run-interval.util.js +49 -9
- package/dist/utility/wrun/wrun-socket-row-source.js +7 -2
- package/dist/utility/wrun/wrun-source-rows.util.d.ts +29 -22
- package/dist/utility/wrun/wrun-source-rows.util.js +62 -41
- package/dist/utility/wrun/wrun-tape-per-order.util.js +1 -20
- package/dist/utility/wrun/wrun-tape-source.util.d.ts +17 -9
- package/dist/utility/wrun/wrun-tape-source.util.js +20 -12
- package/dist/utility/wrun/wrun-volume-profile.util.js +37 -29
- package/dist/workers/constants/socket-slots.d.ts +91 -6
- package/dist/workers/constants/socket-slots.js +85 -6
- package/package.json +5 -5
- package/dist/kscript-data/controls/live-trades-order-gate.util.d.ts +0 -56
- package/dist/kscript-data/controls/live-trades-order-gate.util.js +0 -107
|
@@ -317,6 +317,10 @@ export interface WrunOverlayLiveContext {
|
|
|
317
317
|
/** The session reads OPRA data (the console provenance of the run that installed it, `computed.opra`; a cloud
|
|
318
318
|
* frame carrying the OPRA mark raises it): every debug line its ticks and reseeds publish states it. */
|
|
319
319
|
opraRead?: true;
|
|
320
|
+
/** The session reads CME data (the console provenance of the run that installed it, `computed.cme`: a run on a CME
|
|
321
|
+
* chart, or one whose lanes read the CME plane): every debug line its ticks and reseeds publish states it. No
|
|
322
|
+
* cloud frame raises it (the Cloud lane never reads CME). */
|
|
323
|
+
cmeRead?: true;
|
|
320
324
|
/** The carry-forward state after every input row strictly before
|
|
321
325
|
* `lastRowTs` (the seed the tail builder resumes from): the forward-fill
|
|
322
326
|
* scalars, the forming buckets and the pinned legs' confirmed cursors. */
|
|
@@ -551,14 +555,23 @@ export declare function onWrunOverlayLiveTeardown(fn: (indicatorId: string, caus
|
|
|
551
555
|
export declare function withWrunOverlaySessionLock<T>(indicatorId: string, fn: () => Promise<T> | T): Promise<T>;
|
|
552
556
|
/**
|
|
553
557
|
* The market identity a wrun run is bound to: exchange, symbol, interval and
|
|
554
|
-
* transformations of the chart's main series
|
|
555
|
-
*
|
|
558
|
+
* transformations of the chart's main series, then the session the chart
|
|
559
|
+
* rides (`effectiveChartSessionType`), appended so the leading terms keep
|
|
560
|
+
* their positions. A session flip is an identity change: a run in flight
|
|
561
|
+
* across it drops its old-session rows at the identity-left check, and the
|
|
562
|
+
* live tick rebuilds its context instead of folding into the old one. A
|
|
563
|
+
* spelled default (an absent word stamped with the market's default) and a
|
|
564
|
+
* 'regular' a future keeps at daily and higher (it rides ETH there) change
|
|
565
|
+
* nothing. Read from the chart metadata the caller hands in (the store stays
|
|
566
|
+
* out of this registry's eager graph); metadata without the word reads as
|
|
567
|
+
* the market's default.
|
|
556
568
|
*/
|
|
557
569
|
export declare function wrunChartMarketIdentity(metadata: {
|
|
558
570
|
exchange?: unknown;
|
|
559
571
|
symbol?: unknown;
|
|
560
572
|
interval?: unknown;
|
|
561
573
|
transformations?: unknown;
|
|
574
|
+
sessionType?: unknown;
|
|
562
575
|
} | null | undefined): string;
|
|
563
576
|
export declare function registerWrunOverlayDriver(indicatorId: string, driver: WrunOverlayDriver): void;
|
|
564
577
|
export declare function hasWrunOverlayDriver(indicatorId: string): boolean;
|
|
@@ -81,6 +81,7 @@ import { WrunChartGoneError, WrunDeadlineError } from './wrun-registry-errors.ut
|
|
|
81
81
|
import { closeWrunRefusalAttempts, concludeWrunRefusalAttempt, liveWrunRefusalAttempt, openWrunRefusalAttempt, wrunRefusalAttemptOrigin, } from './wrun-refusal-surface.util.js';
|
|
82
82
|
import { attachWrunRefusal, stampWrunRefusalTelemetry } from './wrun-refusal.util.js';
|
|
83
83
|
import { wrunRunFailedIdentityOf } from './wrun-cap-notice.util.js';
|
|
84
|
+
import { effectiveChartSessionType } from '../chart/effective-chart-session.util.js';
|
|
84
85
|
import { wrunChartHostEnv } from '../../host-env.js';
|
|
85
86
|
const drivers = new Map();
|
|
86
87
|
/** The executor's merge rank (wrun-lifecycle.contract.ts): settings > switch
|
|
@@ -359,13 +360,22 @@ export function withWrunOverlaySessionLock(indicatorId, fn) {
|
|
|
359
360
|
}
|
|
360
361
|
/**
|
|
361
362
|
* The market identity a wrun run is bound to: exchange, symbol, interval and
|
|
362
|
-
* transformations of the chart's main series
|
|
363
|
-
*
|
|
363
|
+
* transformations of the chart's main series, then the session the chart
|
|
364
|
+
* rides (`effectiveChartSessionType`), appended so the leading terms keep
|
|
365
|
+
* their positions. A session flip is an identity change: a run in flight
|
|
366
|
+
* across it drops its old-session rows at the identity-left check, and the
|
|
367
|
+
* live tick rebuilds its context instead of folding into the old one. A
|
|
368
|
+
* spelled default (an absent word stamped with the market's default) and a
|
|
369
|
+
* 'regular' a future keeps at daily and higher (it rides ETH there) change
|
|
370
|
+
* nothing. Read from the chart metadata the caller hands in (the store stays
|
|
371
|
+
* out of this registry's eager graph); metadata without the word reads as
|
|
372
|
+
* the market's default.
|
|
364
373
|
*/
|
|
365
374
|
export function wrunChartMarketIdentity(metadata) {
|
|
366
375
|
if (!metadata)
|
|
367
376
|
return '';
|
|
368
|
-
|
|
377
|
+
const session = effectiveChartSessionType(metadata.exchange, metadata.symbol, metadata.interval, metadata.sessionType);
|
|
378
|
+
return [metadata.exchange, metadata.symbol, metadata.interval, metadata.transformations, session]
|
|
369
379
|
.map((part) => (part === undefined || part === null ? '' : String(part)))
|
|
370
380
|
.join('|');
|
|
371
381
|
}
|
|
@@ -11,6 +11,7 @@ import { KSCRIPT_SECONDARY_SOURCE_MAX_RECOVERY_ATTEMPTS, KSCRIPT_SECONDARY_SOURC
|
|
|
11
11
|
import { __resetWrunLateReadsForTests, forgetWrunLateReads, onWrunLateReadSettled, wrunLateReadsAnswered, wrunLateReadsOut, } from './run-schedule/wrun-late-reads.util.js';
|
|
12
12
|
import { isKScriptDisplayBlockedOnExchange, } from '../chart/kscript-venue-policy.util.js';
|
|
13
13
|
import { wrunRunFailedIdentityOf, wrunRunIdentityOf } from './wrun-cap-notice.util.js';
|
|
14
|
+
import { wrunChartCandleVenue } from './run-schedule/wrun-own-candles.util.js';
|
|
14
15
|
import { wrunChartHostEnv } from '../../host-env.js';
|
|
15
16
|
import { WRUN_RUN_FAILURE_ROW_CODES, wrunAbortRuntimeDiagnostic, wrunRunFailureRuntimeDiagnostic, } from '../scriptEditor/wrun-runtime-diagnostics.leaf.js';
|
|
16
17
|
import { bindWrunTransientRerunAdmission, claimWrunTransientRerun, isWrunTransientGracePending, isWrunTransientRerunOwed, oweWrunTransientRerun, requestWrunTransientRerun, takeWrunTransientOwedRerun, WRUN_SESSION_LOSS_TRIGGERS, } from './wrun-transient-rerun.util.js';
|
|
@@ -133,7 +134,8 @@ candidate = {}) {
|
|
|
133
134
|
// The run head's reading: the workspace's exchange against the mounted
|
|
134
135
|
// meta's settings (the persisted overlay's when the meta is not up yet).
|
|
135
136
|
const settings = (meta?.settings ?? overlay?.settings);
|
|
136
|
-
|
|
137
|
+
// The market its candles came from, as the head reads it (a chart riding a tape is held where the tape walls).
|
|
138
|
+
if (isKScriptDisplayBlockedOnExchange(wrunChartCandleVenue(workspace?.metadata), settings))
|
|
137
139
|
return 'venue-blocked';
|
|
138
140
|
return failedDeterministicHold(indicatorId, reason, {
|
|
139
141
|
window: candidate.window,
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
*/
|
|
64
64
|
import type { WrunDegradedLane, WrunRunReason, WrunRunWindow } from './wrun-lifecycle.contract.js';
|
|
65
65
|
import { type WrunIntegrationRoute } from './wrun-integration-route.util.js';
|
|
66
|
-
import type
|
|
66
|
+
import { type OverlayRunInterval, type RunBarCalendar } from '../chart/indicator-run-interval.util.js';
|
|
67
67
|
import { type WrunPrefixFeedClause } from './run-schedule/wrun-prefix-feeds.util.js';
|
|
68
68
|
import { type WrunCandleGroup, type WrunFillPair, type WrunRunResult } from '../chart/wrun-run-result.util.js';
|
|
69
69
|
import { type WrunRowLaneBudgetCut } from './sources/wrun-row-lanes.util.js';
|
|
@@ -77,7 +77,9 @@ import { type WrunHostFillContext } from './wrun-script-inputs.util.js';
|
|
|
77
77
|
import { type WrunDownloadSummary } from './wrun-download-meter.util.js';
|
|
78
78
|
import type { WrunLatestSnapshot } from './wrun-latest-snapshot.js';
|
|
79
79
|
import { wrunChartMarketIdentity, type WrunOverlayLiveContext, type WrunWarmupMiss } from './wrun-overlay-drivers.util.js';
|
|
80
|
+
import { type KScriptProvenanceSettingsLike } from '../chart/kscript-venue-policy.util.js';
|
|
80
81
|
import type { WrunLegCandleClose } from '@orangecharts/indicator-kit/host';
|
|
82
|
+
import { type WrunPassRowSource } from './wrun-row-source-factory.js';
|
|
81
83
|
import { type WrunPinnedLeg, type WrunPinnedWire } from './wrun-source-rows.util.js';
|
|
82
84
|
import { type WrunOptionsChainRefusal } from './wrun-options-chain.util.js';
|
|
83
85
|
import { type WrunRunIntervalProjection } from './wrun-run-interval-session.util.js';
|
|
@@ -110,6 +112,14 @@ export declare const WRUN_ODDS_SEED_LEG_BARS = 1440;
|
|
|
110
112
|
* Cold, the gateway answered a 290-bar Polymarket window in 2.6 to 4.6 s and
|
|
111
113
|
* the serial 1440-bar seed that followed it in up to 12.5 s. */
|
|
112
114
|
export declare const WRUN_ODDS_SHORT_SEED_LEG_BARS = 250;
|
|
115
|
+
/** A candle ask's rows market when the chart's rows came from another (the full run's door and the tick's agree). */
|
|
116
|
+
export declare function wrunCandleAskSource(chartMetadata: unknown, provenance: KScriptProvenanceSettingsLike | undefined): {
|
|
117
|
+
source: {
|
|
118
|
+
exchange: string;
|
|
119
|
+
symbol: string;
|
|
120
|
+
} | null;
|
|
121
|
+
walled: boolean;
|
|
122
|
+
};
|
|
113
123
|
/**
|
|
114
124
|
* A pinned leg's fetch payload extras over the current-market placeholders:
|
|
115
125
|
* its market (absent = the chart's own), plus the K_OHLCV prediction flag
|
|
@@ -248,6 +258,8 @@ export declare function surfaceWrunRunFailureOnLegend(chartIndex: number, indica
|
|
|
248
258
|
outputNames?: readonly string[];
|
|
249
259
|
/** The run's console provenance (`computed.opra`): its runtime trap row carries the row mark. */
|
|
250
260
|
opra?: boolean;
|
|
261
|
+
/** The same for the CME plane (`computed.cme`): its runtime trap row carries the CME mark. */
|
|
262
|
+
cme?: boolean;
|
|
251
263
|
/** The run's refusal context (the run pass builds it from the chart it ran on). */
|
|
252
264
|
refusalContext?: WrunRefusalContext;
|
|
253
265
|
/** The attempt token the run resolved before its first await; absent or null: no toast. */
|
|
@@ -475,8 +487,9 @@ export declare function wrunRowSourcePatchOf(previous: Readonly<Record<string, u
|
|
|
475
487
|
* the session its batch came from went with it.
|
|
476
488
|
*/
|
|
477
489
|
export declare function holdWrunSocketSessionLost(chartIndex: number, indicatorId: string, status: 'reconnected' | 'session-swept'): void;
|
|
478
|
-
/**
|
|
479
|
-
*
|
|
490
|
+
/** Spec seam: hold `source` as the overlay's row source (as a landed cloud run does), so a spec can reach what
|
|
491
|
+
* reads the held source without running one. */
|
|
492
|
+
export declare function __holdWrunRowSourceForTests(indicatorId: string, source: WrunPassRowSource): void;
|
|
480
493
|
export declare function __resetWrunHeldRowSourcesForTests(): void;
|
|
481
494
|
/** One overlay's row-source retention as the memory census reads it (memory spec 4.4). */
|
|
482
495
|
export interface WrunRowSourceCensusEntry {
|
|
@@ -510,14 +523,17 @@ interface WrunRunChartOwner {
|
|
|
510
523
|
/**
|
|
511
524
|
* A replay run's run bars as of its cutoff (WRUN-PARITY-REST B1): the run
|
|
512
525
|
* bars the window fetched hold every bucket in full, the one the playhead is
|
|
513
|
-
* in included.
|
|
514
|
-
*
|
|
515
|
-
*
|
|
516
|
-
*
|
|
517
|
-
*
|
|
518
|
-
* as
|
|
519
|
-
|
|
520
|
-
|
|
526
|
+
* in included. It keeps the bars open by the cutoff bar (the newest completed
|
|
527
|
+
* chart bar), none after, each span read on the run's calendar (runBarSpan:
|
|
528
|
+
* an RTH hour opens at its session-anchored stamp, a CME trade date at the
|
|
529
|
+
* evening open before its 00:00Z stamp). The newest one is folded from the
|
|
530
|
+
* completed chart bars inside its span until the cutoff bar closes it, and
|
|
531
|
+
* the bars before it stay as fetched: a run bar shows only what the replay
|
|
532
|
+
* revealed, the live rule (live, the forming run bar folds the candles as
|
|
533
|
+
* they trade and the closed one is the fetched one). A forming bar with no
|
|
534
|
+
* revealed chart bar is left out, as live opens one on its first trade.
|
|
535
|
+
*/
|
|
536
|
+
export declare function wrunReplayRunBars(runBars: ReadonlyArray<ArrayLike<number>>, chartRows: ReadonlyArray<ArrayLike<number>>, cutoffTs: number, run: RunBarCalendar, chartIntervalMs: number): ArrayLike<number>[];
|
|
521
537
|
/** The candles of a pinned leg that have CLOSED by `nowMs` (a candle
|
|
522
538
|
* stamped `ts` closes at `ts + legMs`, or where its host's `closeMs` puts
|
|
523
539
|
* it: a CME session bar, `wrunLegCandleClose`), in the answer's order; the
|
|
@@ -813,6 +829,35 @@ export declare function wrunSessionCanvasFillOf(session: object | undefined): Wr
|
|
|
813
829
|
* times the apply inside it for the breaker alone (`sample: false`). The
|
|
814
830
|
* slow verdict reaches the existing toast with cause `apply`. */
|
|
815
831
|
export declare function recordWrunHostBuildMs(chartIndex: number | undefined, indicatorId: string, ms: number, live?: boolean): void;
|
|
832
|
+
/**
|
|
833
|
+
* A repaint of the mounted session under a new sheet: the style-only save's
|
|
834
|
+
* door (wrun-style-patch.util) for the paint its in-place plot patch cannot
|
|
835
|
+
* reach. A `skip` target's Visible row (the selection builds the target again
|
|
836
|
+
* from the session's rows, whose frames the module writes whatever the sheet
|
|
837
|
+
* hides, or leaves it out), the colour of a level, a renderer or a batched
|
|
838
|
+
* section, a band, a fill, a box, a segment, and every look the adapter
|
|
839
|
+
* derives from an output's colour. The caller swaps the new sheet into the
|
|
840
|
+
* context first (`context.metadata`); this integrates the session's own rows
|
|
841
|
+
* and buffers under it with the canvas fill the session was drawn with (no
|
|
842
|
+
* worker call, no fetch: reintegrateWrunSession) and presents the result as
|
|
843
|
+
* a republish, under the overlay's session lock. A full run in flight
|
|
844
|
+
* replaces the session when it lands, so the repaint stands down and the
|
|
845
|
+
* save's rerun joins that run. False (the save keeps its rerun): no live
|
|
846
|
+
* session, the context replaced or suspended, a full run in flight, the
|
|
847
|
+
* reseed's gates refuse the chart (replay, protection, the pane budget, the
|
|
848
|
+
* pause, the market), no candle to land on, or a failed integrate (the
|
|
849
|
+
* session then owes its repaint, as after a failed tick). `preview` (a
|
|
850
|
+
* settings gesture's frame, under the previewed sheet) writes nothing to the
|
|
851
|
+
* overlay's settings. A replay session stands down too: only its lane bounds
|
|
852
|
+
* its candles at the replay's cutoff (the run and the tick paths), so the save
|
|
853
|
+
* reruns there. A session whose row source holds its own session (a cloud
|
|
854
|
+
* run) repaints with the cells that source keeps (`cellRowsOf`, as its full
|
|
855
|
+
* run and its frames read them); a sheet drawing price canvases whose cells
|
|
856
|
+
* neither such a source nor the context's lane buffers hold stands down.
|
|
857
|
+
*/
|
|
858
|
+
export declare function repaintWrunSessionUnderSheet(indicatorId: string, context: WrunOverlayLiveContext, options?: {
|
|
859
|
+
preview?: boolean;
|
|
860
|
+
}): Promise<boolean>;
|
|
816
861
|
/** Drop an overlay's canvas run state (its refine latches, its run serial):
|
|
817
862
|
* called from the live tick lane's teardown hook beside the canvas cache. */
|
|
818
863
|
export declare function forgetWrunOverlayCanvasState(indicatorId: string): void;
|
|
@@ -939,6 +984,10 @@ export type WrunIntegrateOptions = WrunOverlayResultOptions & {
|
|
|
939
984
|
window?: WrunRunWindow;
|
|
940
985
|
/** The full run's route facts; absent, the result remounts (a reseed, a direct caller). */
|
|
941
986
|
integration?: WrunIntegrationFacts;
|
|
987
|
+
/** A settings gesture's preview (the style patch's session repaint, wrun-style-preview.util): the overlay's
|
|
988
|
+
* settings are never written (no legend palette, no stats strip stamp), so nothing a preview paints reaches its
|
|
989
|
+
* engine copy; the gesture's commit or the cancel's repaint stamps them. */
|
|
990
|
+
keepOverlaySettings?: boolean;
|
|
942
991
|
};
|
|
943
992
|
export interface WrunIntegrateOutcome {
|
|
944
993
|
/** The result (its tables placed when it applied). */
|