@orangecharts/wrun-chart-host 0.1.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 +72 -0
- package/dist/constants/governed-exchanges.constants.d.ts +11 -0
- package/dist/constants/governed-exchanges.constants.js +11 -0
- package/dist/constants/indicator-sets.constants.d.ts +8 -0
- package/dist/constants/indicator-sets.constants.js +8 -0
- package/dist/constants/interval.constants.d.ts +34 -0
- package/dist/constants/interval.constants.js +121 -0
- package/dist/constants/scriptEditor/technicalIndicatorScriptKeys.constants.d.ts +28 -0
- package/dist/constants/scriptEditor/technicalIndicatorScriptKeys.constants.js +65 -0
- package/dist/constants/tpo-color-schemes.constants.d.ts +30 -0
- package/dist/constants/tpo-color-schemes.constants.js +32 -0
- package/dist/host-env.d.ts +102 -0
- package/dist/host-env.js +26 -0
- package/dist/index.d.ts +93 -0
- package/dist/index.js +96 -0
- package/dist/indicators/controls/tpo-letter.util.d.ts +2 -0
- package/dist/indicators/controls/tpo-letter.util.js +13 -0
- package/dist/indicators/controls/tpo-session.util.d.ts +99 -0
- package/dist/indicators/controls/tpo-session.util.js +389 -0
- package/dist/interfaces/kscript-diagnostics.interface.d.ts +64 -0
- package/dist/interfaces/kscript-diagnostics.interface.js +1 -0
- package/dist/interfaces/om-panel-data.interface.d.ts +103 -0
- package/dist/interfaces/om-panel-data.interface.js +7 -0
- package/dist/interfaces/wrun-runtime.interface.d.ts +2659 -0
- package/dist/interfaces/wrun-runtime.interface.js +55 -0
- package/dist/utility/chart/calendar-interval.util.d.ts +24 -0
- package/dist/utility/chart/calendar-interval.util.js +81 -0
- package/dist/utility/chart/candle-bar-end.util.d.ts +15 -0
- package/dist/utility/chart/candle-bar-end.util.js +23 -0
- package/dist/utility/chart/cme-realtime.util.d.ts +24 -0
- package/dist/utility/chart/cme-realtime.util.js +53 -0
- package/dist/utility/chart/interval-ladder.util.d.ts +27 -0
- package/dist/utility/chart/interval-ladder.util.js +92 -0
- package/dist/utility/chart/kscript-drawing-prep.util.d.ts +40 -0
- package/dist/utility/chart/kscript-drawing-prep.util.js +184 -0
- package/dist/utility/chart/kscript-drawing-safe-area.util.d.ts +95 -0
- package/dist/utility/chart/kscript-drawing-safe-area.util.js +805 -0
- package/dist/utility/chart/kscript-legend-entries.util.d.ts +166 -0
- package/dist/utility/chart/kscript-legend-entries.util.js +538 -0
- package/dist/utility/chart/kscript-output-role.util.d.ts +32 -0
- package/dist/utility/chart/kscript-output-role.util.js +215 -0
- package/dist/utility/chart/kscript-provenance-keys.util.d.ts +22 -0
- package/dist/utility/chart/kscript-provenance-keys.util.js +56 -0
- package/dist/utility/chart/kscript-run-result-normalize.util.d.ts +53 -0
- package/dist/utility/chart/kscript-run-result-normalize.util.js +476 -0
- package/dist/utility/chart/kscript-run-result-shape.util.d.ts +14 -0
- package/dist/utility/chart/kscript-run-result-shape.util.js +66 -0
- package/dist/utility/chart/kscript-titancharts-container.util.d.ts +29 -0
- package/dist/utility/chart/kscript-titancharts-container.util.js +151 -0
- package/dist/utility/chart/kscript-viewport-overlays.util.d.ts +83 -0
- package/dist/utility/chart/kscript-viewport-overlays.util.js +443 -0
- package/dist/utility/chart/om-panel-push-style.util.d.ts +78 -0
- package/dist/utility/chart/om-panel-push-style.util.js +301 -0
- package/dist/utility/chart/om-panel.util.d.ts +166 -0
- package/dist/utility/chart/om-panel.util.js +815 -0
- package/dist/utility/chart/om-series.util.d.ts +42 -0
- package/dist/utility/chart/om-series.util.js +330 -0
- package/dist/utility/chart/om-target.util.d.ts +11 -0
- package/dist/utility/chart/om-target.util.js +24 -0
- package/dist/utility/chart/om-widget.util.d.ts +148 -0
- package/dist/utility/chart/om-widget.util.js +413 -0
- package/dist/utility/chart/overlay-output-budget.util.d.ts +16 -0
- package/dist/utility/chart/overlay-output-budget.util.js +109 -0
- package/dist/utility/chart/overlay-paint-flags.util.d.ts +24 -0
- package/dist/utility/chart/overlay-paint-flags.util.js +55 -0
- package/dist/utility/chart/profile-row-height.util.d.ts +21 -0
- package/dist/utility/chart/profile-row-height.util.js +110 -0
- package/dist/utility/chart/session-interval.util.d.ts +1 -0
- package/dist/utility/chart/session-interval.util.js +35 -0
- package/dist/utility/chart/technical-script-legend-value.util.d.ts +18 -0
- package/dist/utility/chart/technical-script-legend-value.util.js +53 -0
- package/dist/utility/chart/trading-day.util.d.ts +70 -0
- package/dist/utility/chart/trading-day.util.js +238 -0
- package/dist/utility/chart/wrun-legend-name.util.d.ts +25 -0
- package/dist/utility/chart/wrun-legend-name.util.js +87 -0
- package/dist/utility/chart/wrun-run-result.util.d.ts +977 -0
- package/dist/utility/chart/wrun-run-result.util.js +5179 -0
- package/dist/utility/chart/wrun-visibility-chart.util.d.ts +25 -0
- package/dist/utility/chart/wrun-visibility-chart.util.js +22 -0
- package/dist/utility/indicators/heatmap-sensitivity.util.d.ts +62 -0
- package/dist/utility/indicators/heatmap-sensitivity.util.js +82 -0
- package/dist/utility/number-format.util.d.ts +68 -0
- package/dist/utility/number-format.util.js +188 -0
- package/dist/utility/v2/opra-governed.util.d.ts +1 -0
- package/dist/utility/v2/opra-governed.util.js +13 -0
- package/dist/utility/wrun/wrun-auto-row.util.d.ts +54 -0
- package/dist/utility/wrun/wrun-auto-row.util.js +96 -0
- package/dist/utility/wrun/wrun-batched-marks.util.d.ts +341 -0
- package/dist/utility/wrun/wrun-batched-marks.util.js +938 -0
- package/dist/utility/wrun/wrun-batched-readout.util.d.ts +75 -0
- package/dist/utility/wrun/wrun-batched-readout.util.js +171 -0
- package/dist/utility/wrun/wrun-box-segment.util.d.ts +185 -0
- package/dist/utility/wrun/wrun-box-segment.util.js +570 -0
- package/dist/utility/wrun/wrun-build-memo.util.d.ts +133 -0
- package/dist/utility/wrun/wrun-build-memo.util.js +301 -0
- package/dist/utility/wrun/wrun-builtin-twin-ports.util.d.ts +25 -0
- package/dist/utility/wrun/wrun-builtin-twin-ports.util.js +75 -0
- package/dist/utility/wrun/wrun-builtin-twin.util.d.ts +9 -0
- package/dist/utility/wrun/wrun-builtin-twin.util.js +40 -0
- package/dist/utility/wrun/wrun-canvas-cache.util.d.ts +28 -0
- package/dist/utility/wrun/wrun-canvas-cache.util.js +56 -0
- package/dist/utility/wrun/wrun-canvas-readout.util.d.ts +69 -0
- package/dist/utility/wrun/wrun-canvas-readout.util.js +53 -0
- package/dist/utility/wrun/wrun-canvases.util.d.ts +295 -0
- package/dist/utility/wrun/wrun-canvases.util.js +1432 -0
- package/dist/utility/wrun/wrun-cap-notice.util.d.ts +77 -0
- package/dist/utility/wrun/wrun-cap-notice.util.js +296 -0
- package/dist/utility/wrun/wrun-card-style.util.d.ts +154 -0
- package/dist/utility/wrun/wrun-card-style.util.js +539 -0
- package/dist/utility/wrun/wrun-chart-context.util.d.ts +89 -0
- package/dist/utility/wrun/wrun-chart-context.util.js +213 -0
- package/dist/utility/wrun/wrun-chart-names.util.d.ts +23 -0
- package/dist/utility/wrun/wrun-chart-names.util.js +33 -0
- package/dist/utility/wrun/wrun-chart-time.util.d.ts +12 -0
- package/dist/utility/wrun/wrun-chart-time.util.js +23 -0
- package/dist/utility/wrun/wrun-child-overlay-id.util.d.ts +13 -0
- package/dist/utility/wrun/wrun-child-overlay-id.util.js +44 -0
- package/dist/utility/wrun/wrun-color-facts.util.d.ts +40 -0
- package/dist/utility/wrun/wrun-color-facts.util.js +88 -0
- package/dist/utility/wrun/wrun-color-settings.lazy.d.ts +26 -0
- package/dist/utility/wrun/wrun-color-settings.lazy.js +9 -0
- package/dist/utility/wrun/wrun-color-settings.util.d.ts +351 -0
- package/dist/utility/wrun/wrun-color-settings.util.js +1363 -0
- package/dist/utility/wrun/wrun-footprint-modes.util.d.ts +23 -0
- package/dist/utility/wrun/wrun-footprint-modes.util.js +24 -0
- package/dist/utility/wrun/wrun-frames.d.ts +217 -0
- package/dist/utility/wrun/wrun-frames.js +1021 -0
- package/dist/utility/wrun/wrun-handles.util.d.ts +792 -0
- package/dist/utility/wrun/wrun-handles.util.js +2050 -0
- package/dist/utility/wrun/wrun-heatmap-cell-budget.util.d.ts +156 -0
- package/dist/utility/wrun/wrun-heatmap-cell-budget.util.js +342 -0
- package/dist/utility/wrun/wrun-hosted-wire-caps.d.ts +218 -0
- package/dist/utility/wrun/wrun-hosted-wire-caps.js +667 -0
- package/dist/utility/wrun/wrun-hosted-wire.util.d.ts +40 -0
- package/dist/utility/wrun/wrun-hosted-wire.util.js +27 -0
- package/dist/utility/wrun/wrun-hover.util.d.ts +182 -0
- package/dist/utility/wrun/wrun-hover.util.js +534 -0
- package/dist/utility/wrun/wrun-hud-looks.util.d.ts +246 -0
- package/dist/utility/wrun/wrun-hud-looks.util.js +587 -0
- package/dist/utility/wrun/wrun-integration-budget.util.d.ts +47 -0
- package/dist/utility/wrun/wrun-integration-budget.util.js +122 -0
- package/dist/utility/wrun/wrun-latest-snapshot.d.ts +19 -0
- package/dist/utility/wrun/wrun-latest-snapshot.js +7 -0
- package/dist/utility/wrun/wrun-levels-child.util.d.ts +131 -0
- package/dist/utility/wrun/wrun-levels-child.util.js +514 -0
- package/dist/utility/wrun/wrun-lifecycle.contract.d.ts +75 -0
- package/dist/utility/wrun/wrun-lifecycle.contract.js +9 -0
- package/dist/utility/wrun/wrun-market-facts.util.d.ts +116 -0
- package/dist/utility/wrun/wrun-market-facts.util.js +238 -0
- package/dist/utility/wrun/wrun-output-style.util.d.ts +344 -0
- package/dist/utility/wrun/wrun-output-style.util.js +1239 -0
- package/dist/utility/wrun/wrun-overlay-identity.util.d.ts +84 -0
- package/dist/utility/wrun/wrun-overlay-identity.util.js +142 -0
- package/dist/utility/wrun/wrun-overlay-result.util.d.ts +120 -0
- package/dist/utility/wrun/wrun-overlay-result.util.js +219 -0
- package/dist/utility/wrun/wrun-pack.util.d.ts +70 -0
- package/dist/utility/wrun/wrun-pack.util.js +301 -0
- package/dist/utility/wrun/wrun-pane-format.util.d.ts +180 -0
- package/dist/utility/wrun/wrun-pane-format.util.js +299 -0
- package/dist/utility/wrun/wrun-panel-style.lazy.d.ts +25 -0
- package/dist/utility/wrun/wrun-panel-style.lazy.js +15 -0
- package/dist/utility/wrun/wrun-panel-style.util.d.ts +174 -0
- package/dist/utility/wrun/wrun-panel-style.util.js +726 -0
- package/dist/utility/wrun/wrun-param-values.util.d.ts +69 -0
- package/dist/utility/wrun/wrun-param-values.util.js +230 -0
- package/dist/utility/wrun/wrun-refusal.util.d.ts +263 -0
- package/dist/utility/wrun/wrun-refusal.util.js +1259 -0
- package/dist/utility/wrun/wrun-registry-errors.util.d.ts +199 -0
- package/dist/utility/wrun/wrun-registry-errors.util.js +257 -0
- package/dist/utility/wrun/wrun-render-select.util.d.ts +336 -0
- package/dist/utility/wrun/wrun-render-select.util.js +1157 -0
- package/dist/utility/wrun/wrun-script-inputs.util.d.ts +434 -0
- package/dist/utility/wrun/wrun-script-inputs.util.js +1971 -0
- package/dist/utility/wrun/wrun-setting-words.lazy.d.ts +20 -0
- package/dist/utility/wrun/wrun-setting-words.lazy.js +9 -0
- package/dist/utility/wrun/wrun-setting-words.util.d.ts +79 -0
- package/dist/utility/wrun/wrun-setting-words.util.js +176 -0
- package/dist/utility/wrun/wrun-socket-row-store.d.ts +98 -0
- package/dist/utility/wrun/wrun-socket-row-store.js +417 -0
- package/dist/utility/wrun/wrun-style-flags.util.d.ts +18 -0
- package/dist/utility/wrun/wrun-style-flags.util.js +21 -0
- package/dist/utility/wrun/wrun-style-words.util.d.ts +148 -0
- package/dist/utility/wrun/wrun-style-words.util.js +439 -0
- package/dist/utility/wrun/wrun-table-look.util.d.ts +125 -0
- package/dist/utility/wrun/wrun-table-look.util.js +225 -0
- package/dist/utility/wrun/wrun-text-look.util.d.ts +51 -0
- package/dist/utility/wrun/wrun-text-look.util.js +227 -0
- package/dist/utility/wrun/wrun-text-params.util.d.ts +106 -0
- package/dist/utility/wrun/wrun-text-params.util.js +171 -0
- package/dist/utility/wrun/wrun-tpo-rows.util.d.ts +71 -0
- package/dist/utility/wrun/wrun-tpo-rows.util.js +438 -0
- package/dist/utility/wrun/wrun-twin-compute-inputs.util.d.ts +14 -0
- package/dist/utility/wrun/wrun-twin-compute-inputs.util.js +58 -0
- package/dist/utility/wrun/wrun-visibility-table.d.ts +437 -0
- package/dist/utility/wrun/wrun-visibility-table.js +237 -0
- package/dist/utility/wrun/wrun-volume-profile.util.d.ts +37 -0
- package/dist/utility/wrun/wrun-volume-profile.util.js +278 -0
- package/package.json +38 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The price canvases' fold memo (WRUN guardrails G3b): what a host fold of a
|
|
3
|
+
* canvas child (today the TPO, `buildWrunTpoRows` with a `cacheKey`) keeps
|
|
4
|
+
* between runs and ticks so a live tick folds only what changed (the forming
|
|
5
|
+
* period) instead of every loaded bar on the main thread. The entries are
|
|
6
|
+
* opaque here: each builder owns its own entry shape and its validation.
|
|
7
|
+
*
|
|
8
|
+
* Keys are `<overlayId>::<kind>:<name>` (the TPO's `<overlayId>::tpo:<name>`),
|
|
9
|
+
* so forgetWrunCanvasCache with the prefix `<overlayId>::` drops every canvas
|
|
10
|
+
* of one overlay: the live tick lane calls it from its teardown hook (overlay
|
|
11
|
+
* removed, found unmounted, chart torn down). The store is also bounded: past
|
|
12
|
+
* WRUN_CANVAS_CACHE_MAX_KEYS the least recently used key goes, so an overlay
|
|
13
|
+
* that leaves without a teardown never pins its rows.
|
|
14
|
+
*/
|
|
15
|
+
/** The most canvas keys held at once (least recently used evicted first). */
|
|
16
|
+
export const WRUN_CANVAS_CACHE_MAX_KEYS = 64;
|
|
17
|
+
const entries = new Map();
|
|
18
|
+
/** The entry under `key` (marked most recently used), undefined when none. */
|
|
19
|
+
export function readWrunCanvasCache(key) {
|
|
20
|
+
if (!entries.has(key))
|
|
21
|
+
return undefined;
|
|
22
|
+
const entry = entries.get(key);
|
|
23
|
+
entries.delete(key);
|
|
24
|
+
entries.set(key, entry);
|
|
25
|
+
return entry;
|
|
26
|
+
}
|
|
27
|
+
/** Store `entry` under `key` as the most recently used, evicting the least recently used past the bound. */
|
|
28
|
+
export function writeWrunCanvasCache(key, entry) {
|
|
29
|
+
entries.delete(key);
|
|
30
|
+
entries.set(key, entry);
|
|
31
|
+
while (entries.size > WRUN_CANVAS_CACHE_MAX_KEYS) {
|
|
32
|
+
const oldest = entries.keys().next().value;
|
|
33
|
+
if (oldest === undefined)
|
|
34
|
+
break;
|
|
35
|
+
entries.delete(oldest);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/** Drop the entry under `key`, if any. */
|
|
39
|
+
export function dropWrunCanvasCache(key) {
|
|
40
|
+
entries.delete(key);
|
|
41
|
+
}
|
|
42
|
+
/** Drop every entry whose key starts with `prefix` (an overlay's canvases: `${overlayId}::`). */
|
|
43
|
+
export function forgetWrunCanvasCache(prefix) {
|
|
44
|
+
for (const key of [...entries.keys()]) {
|
|
45
|
+
if (key.startsWith(prefix))
|
|
46
|
+
entries.delete(key);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
/** Spec probe: the held keys, least recently used first. */
|
|
50
|
+
export function wrunCanvasCacheKeys() {
|
|
51
|
+
return [...entries.keys()];
|
|
52
|
+
}
|
|
53
|
+
/** Spec reset: drop every entry. */
|
|
54
|
+
export function __resetWrunCanvasCacheForTests() {
|
|
55
|
+
entries.clear();
|
|
56
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The hover readout of a wrun heatmap or matrix cell (WRUN-STYLE g6), and of a batched record
|
|
3
|
+
* (WRUN-BATCHED-MARKS: a `marks`, `spans` or `rays` record): the registry the canvas mounts write
|
|
4
|
+
* (wrun-canvases.util and wrun-batched-marks.util remember a child's readout at its mount and
|
|
5
|
+
* forget it with the child) and the tooltip text the profile-cell hover inspector prints. A
|
|
6
|
+
* batched readout carries its own `text` (wrun-batched-readout.util, off the boot path).
|
|
7
|
+
*
|
|
8
|
+
* A thin fact (docs/features/kscript/wrun/wrun-browser-runtime.md, "Boot doors"): the inspector
|
|
9
|
+
* reads it synchronously on every hover and sits on the boot path, the canvas mount does not, so
|
|
10
|
+
* this module imports the number words alone. An empty registry answers what the inspector
|
|
11
|
+
* already answers for a cell without a readout: no card.
|
|
12
|
+
*/
|
|
13
|
+
import type { WrunBatchedMarksKind } from '../../interfaces/wrun-runtime.interface.js';
|
|
14
|
+
import { type WrunNumberFormatSpec } from './wrun-style-words.util.js';
|
|
15
|
+
/** A hover readout (a heatmap or matrix with a `tooltip`, or a batched section with one): the
|
|
16
|
+
* title, the template and the number format the inspector prints the cell or record with. */
|
|
17
|
+
export interface WrunCanvasReadout {
|
|
18
|
+
kind: 'heatmap' | 'matrix' | WrunBatchedMarksKind;
|
|
19
|
+
label: string;
|
|
20
|
+
tooltip: string;
|
|
21
|
+
format: WrunNumberFormatSpec;
|
|
22
|
+
/** Matrices: the column labels `{{column}}` reads. */
|
|
23
|
+
columns?: string[];
|
|
24
|
+
/** Spans and rays: the words `{{word}}` names by the record's word index. */
|
|
25
|
+
words?: string[];
|
|
26
|
+
/** Spans and rays at stride 5: `[top|y1, bottom|y2, startTs, endTs, meta]`, times in ms. */
|
|
27
|
+
timed?: true;
|
|
28
|
+
/** The display offset (ms) a timed record's `{{start}}` and `{{end}}` print in, stamped by the mount door. */
|
|
29
|
+
timeOffsetMs?: number;
|
|
30
|
+
/** A batched record's tooltip text, registered with the readout by its mount. */
|
|
31
|
+
text?: (record: WrunBatchedHoverRecord, formatters: {
|
|
32
|
+
formatPrice: (value: number) => string;
|
|
33
|
+
formatTime?: (ms: number) => string;
|
|
34
|
+
}) => string;
|
|
35
|
+
}
|
|
36
|
+
/** A batched record under the pointer: its bar's time, its slot, its fields in stride order. */
|
|
37
|
+
export interface WrunBatchedHoverRecord {
|
|
38
|
+
ts: number;
|
|
39
|
+
slot: number;
|
|
40
|
+
fields: ArrayLike<number>;
|
|
41
|
+
}
|
|
42
|
+
export declare function rememberWrunCanvasReadout(childId: string, readout: WrunCanvasReadout): void;
|
|
43
|
+
export declare function forgetWrunCanvasReadout(childId: string): void;
|
|
44
|
+
export declare function wrunCanvasReadoutOf(childId: string): WrunCanvasReadout | undefined;
|
|
45
|
+
export declare function __resetWrunCanvasReadoutsForTests(): void;
|
|
46
|
+
/** The cell a readout prints: a heatmap cell's band, time and value, a
|
|
47
|
+
* matrix cell's price, column, text and value. */
|
|
48
|
+
export interface WrunCanvasHoverCell {
|
|
49
|
+
value?: number | null;
|
|
50
|
+
text?: string;
|
|
51
|
+
price?: number;
|
|
52
|
+
priceLow?: number;
|
|
53
|
+
priceHigh?: number;
|
|
54
|
+
time?: number;
|
|
55
|
+
column?: number;
|
|
56
|
+
}
|
|
57
|
+
/** The tooltip grammar (the hover util's): `{{name}}` / `{{name:format}}`. */
|
|
58
|
+
export declare const CANVAS_PLACEHOLDER: RegExp;
|
|
59
|
+
/**
|
|
60
|
+
* The readout's tooltip over a cell: `{{value}}` / `{{value:<format>}}`
|
|
61
|
+
* (the declared format, else the placeholder's word; a hole prints '-'),
|
|
62
|
+
* `{{price}}` (the band's mid, or the matrix row's price), `{{price_low}}`,
|
|
63
|
+
* `{{price_high}}`, `{{time}}`, `{{text}}`, `{{column}}` and `{{label}}`;
|
|
64
|
+
* an unknown placeholder stays as written.
|
|
65
|
+
*/
|
|
66
|
+
export declare function wrunCanvasReadoutText(readout: WrunCanvasReadout, cell: WrunCanvasHoverCell, formatters: {
|
|
67
|
+
formatPrice: (value: number) => string;
|
|
68
|
+
formatTime: (ms: number) => string;
|
|
69
|
+
}): string;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { formatWrunNumber } from './wrun-style-words.util.js';
|
|
2
|
+
const readouts = new Map();
|
|
3
|
+
export function rememberWrunCanvasReadout(childId, readout) {
|
|
4
|
+
readouts.set(childId, readout);
|
|
5
|
+
}
|
|
6
|
+
export function forgetWrunCanvasReadout(childId) {
|
|
7
|
+
readouts.delete(childId);
|
|
8
|
+
}
|
|
9
|
+
export function wrunCanvasReadoutOf(childId) {
|
|
10
|
+
return readouts.get(childId);
|
|
11
|
+
}
|
|
12
|
+
export function __resetWrunCanvasReadoutsForTests() {
|
|
13
|
+
readouts.clear();
|
|
14
|
+
}
|
|
15
|
+
function finite(value) {
|
|
16
|
+
return typeof value === 'number' && Number.isFinite(value);
|
|
17
|
+
}
|
|
18
|
+
/** The tooltip grammar (the hover util's): `{{name}}` / `{{name:format}}`. */
|
|
19
|
+
export const CANVAS_PLACEHOLDER = /\{\{\s*([A-Za-z_][A-Za-z0-9_]*)(?:\s*:\s*([^}\s]+))?\s*\}\}/g;
|
|
20
|
+
/**
|
|
21
|
+
* The readout's tooltip over a cell: `{{value}}` / `{{value:<format>}}`
|
|
22
|
+
* (the declared format, else the placeholder's word; a hole prints '-'),
|
|
23
|
+
* `{{price}}` (the band's mid, or the matrix row's price), `{{price_low}}`,
|
|
24
|
+
* `{{price_high}}`, `{{time}}`, `{{text}}`, `{{column}}` and `{{label}}`;
|
|
25
|
+
* an unknown placeholder stays as written.
|
|
26
|
+
*/
|
|
27
|
+
export function wrunCanvasReadoutText(readout, cell, formatters) {
|
|
28
|
+
const price = cell.price ?? (finite(cell.priceLow) && finite(cell.priceHigh) ? (cell.priceLow + cell.priceHigh) / 2 : undefined);
|
|
29
|
+
return readout.tooltip.replace(CANVAS_PLACEHOLDER, (literal, name, format) => {
|
|
30
|
+
switch (name) {
|
|
31
|
+
case 'value':
|
|
32
|
+
return finite(cell.value)
|
|
33
|
+
? formatWrunNumber(cell.value, format !== undefined ? { ...readout.format, format } : readout.format)
|
|
34
|
+
: '-';
|
|
35
|
+
case 'text':
|
|
36
|
+
return cell.text ?? '';
|
|
37
|
+
case 'price':
|
|
38
|
+
return price !== undefined ? formatters.formatPrice(price) : literal;
|
|
39
|
+
case 'price_low':
|
|
40
|
+
return finite(cell.priceLow) ? formatters.formatPrice(cell.priceLow) : literal;
|
|
41
|
+
case 'price_high':
|
|
42
|
+
return finite(cell.priceHigh) ? formatters.formatPrice(cell.priceHigh) : literal;
|
|
43
|
+
case 'time':
|
|
44
|
+
return finite(cell.time) ? formatters.formatTime(cell.time) : literal;
|
|
45
|
+
case 'column':
|
|
46
|
+
return finite(cell.column) ? (readout.columns?.[cell.column] ?? String(cell.column + 1)) : literal;
|
|
47
|
+
case 'label':
|
|
48
|
+
return readout.label;
|
|
49
|
+
default:
|
|
50
|
+
return literal;
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
import type { RuntimeDiagnostic } from '../../interfaces/kscript-diagnostics.interface.js';
|
|
2
|
+
import type { WrunHeatmap, WrunIndicatorMetadata, WrunMatrix, WrunOutputRow, WrunPanel } from '../../interfaces/wrun-runtime.interface.js';
|
|
3
|
+
import { type WrunColorTheme, type WrunNumberFormatSpec } from './wrun-style-words.util.js';
|
|
4
|
+
import { type WrunMatrixFrame } from './wrun-frames.js';
|
|
5
|
+
import { type WrunCanvasReadout } from './wrun-canvas-readout.util.js';
|
|
6
|
+
/** The run's celled source rows the canvases draw from: the book lane's
|
|
7
|
+
* rows (`[ts, price, signedSize, ...]`, asks negative), the volume profile
|
|
8
|
+
* lane's (`[ts, [low, high, buy, sell], ...]`), an intrabar leg's candles
|
|
9
|
+
* and the chart's own candles (`[ts, o, h, l, c, v]`). `intrabarRows` is
|
|
10
|
+
* the first intrabar input's leg; `intrabarRowsByInput` keys every
|
|
11
|
+
* intrabar leg by the input that reads it (with its bar interval). */
|
|
12
|
+
export interface WrunCellRows {
|
|
13
|
+
bookRows?: ReadonlyArray<unknown>;
|
|
14
|
+
volumeProfileRows?: ReadonlyArray<unknown>;
|
|
15
|
+
intrabarRows?: ReadonlyArray<unknown>;
|
|
16
|
+
ohlcvRows?: ReadonlyArray<unknown>;
|
|
17
|
+
intrabarRowsByInput?: Readonly<Record<string, ReadonlyArray<unknown>>>;
|
|
18
|
+
intrabarIntervalMsByInput?: Readonly<Record<string, number>>;
|
|
19
|
+
}
|
|
20
|
+
export type WrunCanvasChildKind = 'heatmap' | 'profile' | 'matrix';
|
|
21
|
+
/** A price-canvas child of the indicator (the child union's heatmap,
|
|
22
|
+
* profile and matrix variants): the rows (the engine wire) and the settings
|
|
23
|
+
* with colour words unresolved. `readout` and `matrix` are the extras the
|
|
24
|
+
* mount door reads (3.0: optional fields on a frozen shape). */
|
|
25
|
+
export interface WrunCanvasChildOverlay {
|
|
26
|
+
kind: WrunCanvasChildKind;
|
|
27
|
+
name: string;
|
|
28
|
+
data: unknown[];
|
|
29
|
+
settings: Record<string, unknown>;
|
|
30
|
+
/** A live tick's heatmap built from the newest rows only (`tailRows`):
|
|
31
|
+
* no colour scale was sampled, so the mount only merges its rows (the
|
|
32
|
+
* newest, or those since the painted bar on a tick over several bars)
|
|
33
|
+
* into a mounted canvas and never mounts one or swaps rows from it. */
|
|
34
|
+
tailOnly?: true;
|
|
35
|
+
readout?: WrunCanvasReadout;
|
|
36
|
+
/** Matrices: the inputs the mount re-resolves the cell colours from. */
|
|
37
|
+
matrix?: {
|
|
38
|
+
declaration: WrunMatrix;
|
|
39
|
+
frame: WrunMatrixFrame;
|
|
40
|
+
};
|
|
41
|
+
/** Heatmaps the Sensitivity row rule admits: what the mount re-picks the
|
|
42
|
+
* bounds from (JSON-safe, like the rest of the child). */
|
|
43
|
+
scale?: WrunHeatmapScaleInputs;
|
|
44
|
+
/** Author-facing lines about how the host drew the child (plain English,
|
|
45
|
+
* the register of the refusal texts, never i18n): a TPO whose rows were
|
|
46
|
+
* coarsened under the rows-per-period cap. The child still draws; the run
|
|
47
|
+
* result gathers every child's lines (`notices`). */
|
|
48
|
+
notices?: string[];
|
|
49
|
+
}
|
|
50
|
+
/** A heatmap's scale inputs (heatmapChild's own): the cell layout and value
|
|
51
|
+
* word the sample reads, the diverging and zero-floor rule, and the
|
|
52
|
+
* author's scale words as declared. */
|
|
53
|
+
export interface WrunHeatmapScaleInputs {
|
|
54
|
+
layout: 'book' | 'profile' | 'grid';
|
|
55
|
+
valueField: NonNullable<WrunHeatmap['value']>;
|
|
56
|
+
diverging: boolean;
|
|
57
|
+
zeroFloor: boolean;
|
|
58
|
+
words: WrunCanvasScaleWords;
|
|
59
|
+
}
|
|
60
|
+
export interface WrunProfileChildrenContext {
|
|
61
|
+
/** The chart interval in ms (the bars the footprint columns and the TPO letters ride). */
|
|
62
|
+
intervalMs: number;
|
|
63
|
+
outputRows: ReadonlyArray<WrunOutputRow>;
|
|
64
|
+
exchange?: string;
|
|
65
|
+
/** The instrument tick the engine holds (CME venues), a served TPO unit when no block is known. */
|
|
66
|
+
priceTick?: number;
|
|
67
|
+
/** The served TPO block for the chart market (TPO_AGG, else VOLUME_PROFILE_AGG: the native TPO's catalog mirror); absent on a mirror miss. */
|
|
68
|
+
tpoBlockSize?: number;
|
|
69
|
+
/** The mounted overlay id (the run's `overlayId` option), the key the row fold caches under. */
|
|
70
|
+
overlayId?: string;
|
|
71
|
+
}
|
|
72
|
+
export interface WrunCanvasChildConfigContext {
|
|
73
|
+
overlayId: string;
|
|
74
|
+
theme: WrunColorTheme;
|
|
75
|
+
/** The user's theme name (the TPO scheme key); absent reads the default scheme. */
|
|
76
|
+
themeMode?: string;
|
|
77
|
+
/** The viewer's Sensitivity for this heatmap (0..100, a drag preview or the
|
|
78
|
+
* saved row); absent draws the author's bounds. */
|
|
79
|
+
heatmapSensitivity?: number;
|
|
80
|
+
/** The label formatters the mount keeps per mounted child (wrun-panel-mount.util):
|
|
81
|
+
* absent builds a fresh one on every config. */
|
|
82
|
+
formatters?: WrunCanvasFormatterCache;
|
|
83
|
+
}
|
|
84
|
+
/** A heatmap child's cell label formatter as the mount keeps it: the function the
|
|
85
|
+
* engine holds and a frozen copy of the format words it prints. */
|
|
86
|
+
export interface WrunCanvasFormatterEntry {
|
|
87
|
+
words: Readonly<WrunNumberFormatSpec>;
|
|
88
|
+
formatValue: (value: number) => string;
|
|
89
|
+
}
|
|
90
|
+
/** One kept formatter per child id. The engine signs a heatmap's cached cells with
|
|
91
|
+
* its formatter by identity, so a rerun whose format words are equal hands back the
|
|
92
|
+
* kept function instead of a new closure that would re-sign every cell. */
|
|
93
|
+
export type WrunCanvasFormatterCache = Map<string, WrunCanvasFormatterEntry>;
|
|
94
|
+
export interface WrunCanvasChildConfig {
|
|
95
|
+
id: string;
|
|
96
|
+
plot: 'heatmapCells' | 'profile' | 'priceMatrix';
|
|
97
|
+
type: 'onchart';
|
|
98
|
+
settings: Record<string, unknown>;
|
|
99
|
+
extractors?: unknown;
|
|
100
|
+
mergeLiveDataPoint?: unknown;
|
|
101
|
+
/** The child is a tick's heatmap tail (`WrunCanvasChildOverlay.tailOnly`). */
|
|
102
|
+
tailOnly?: true;
|
|
103
|
+
/** Matrices: the rows with every cell colour resolved against the theme
|
|
104
|
+
* (wins over the child's own rows). */
|
|
105
|
+
data?: unknown[];
|
|
106
|
+
}
|
|
107
|
+
/** The default dark palette (wrun-style-words.util 2.3): what a child's own
|
|
108
|
+
* rows resolve against before the mount hands the chart's theme over. */
|
|
109
|
+
export declare const WRUN_CANVAS_FALLBACK_THEME: Readonly<WrunColorTheme>;
|
|
110
|
+
/** The colour-scale defaults (PT-heatmap): the sequential ramp, the
|
|
111
|
+
* diverging ramp around a centre, the quantile of the auto bounds. */
|
|
112
|
+
export declare const WRUN_HEATMAP_DEFAULT_PALETTE: readonly string[];
|
|
113
|
+
export declare const WRUN_HEATMAP_DIVERGING_PALETTE: readonly string[];
|
|
114
|
+
export declare const WRUN_CANVAS_DEFAULT_QUANTILE = 0.98;
|
|
115
|
+
/** The deterministic stride sample's cap over a run's cells. */
|
|
116
|
+
export declare const WRUN_CANVAS_SCALE_SAMPLE_CELLS = 65536;
|
|
117
|
+
/** The side strip's default panel width (MX-side-panel). */
|
|
118
|
+
export declare const WRUN_SIDE_PANEL_DEFAULT_WIDTH_PX = 280;
|
|
119
|
+
/** The sheet name read as words, the legend's own rule ("book_heat" -> "Book heat", "gex_board" -> "GEX board"). */
|
|
120
|
+
export declare function wrunCanvasNameWords(name: string): string;
|
|
121
|
+
export declare function wrunCanvasChildId(overlayId: string, kind: WrunCanvasChildKind, name: string): string;
|
|
122
|
+
/** A colour's own alpha times `factor` (conventions 3); an unparseable colour passes unchanged. */
|
|
123
|
+
export declare function wrunCanvasMultiplyAlpha(color: string, factor: number): string;
|
|
124
|
+
/** The colour at position `t` (0..1) along resolved palette stops. */
|
|
125
|
+
export declare function wrunCanvasPaletteColor(stops: ReadonlyArray<string>, t: number): string | undefined;
|
|
126
|
+
export interface WrunCanvasScale {
|
|
127
|
+
min: number;
|
|
128
|
+
max: number;
|
|
129
|
+
center?: number;
|
|
130
|
+
scale: 'linear' | 'sqrt' | 'log';
|
|
131
|
+
}
|
|
132
|
+
export interface WrunCanvasScaleWords {
|
|
133
|
+
min?: number;
|
|
134
|
+
max?: number;
|
|
135
|
+
center?: number;
|
|
136
|
+
auto_quantile?: number;
|
|
137
|
+
scale?: 'linear' | 'sqrt' | 'log';
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* The colour-scale bounds (PT-heatmap `min` / `max` / `center` /
|
|
141
|
+
* `auto_quantile`): declared bounds win; the rest comes from the sample of
|
|
142
|
+
* the run's cells (a deterministic stride sample of at most 65,536 cells).
|
|
143
|
+
* Sequential: [0 (`zeroFloor`, the size and volume words) else the (1 - q)
|
|
144
|
+
* quantile, the q quantile]; diverging (a declared centre, or a signed /
|
|
145
|
+
* delta word): centre +- the q quantile of |value - centre|.
|
|
146
|
+
*
|
|
147
|
+
* A bound is the value at the nearest rank of the finite values, picked by
|
|
148
|
+
* selection on a copy (no sort): exactly the value an ascending stable sort
|
|
149
|
+
* held at that rank. The one tie a selection can break differently is +0
|
|
150
|
+
* against -0 (they compare equal); the sort kept them in sample order, so a
|
|
151
|
+
* zero pick re-reads the zero at its rank in that order.
|
|
152
|
+
*/
|
|
153
|
+
export declare function wrunCanvasScaleOf(words: WrunCanvasScaleWords, values: ArrayLike<number>, options: {
|
|
154
|
+
diverging: boolean;
|
|
155
|
+
zeroFloor?: boolean;
|
|
156
|
+
}): WrunCanvasScale;
|
|
157
|
+
/** A value's position (0..1) on the scale: the diverging ramp sits its
|
|
158
|
+
* centre at 0.5, `sqrt` lifts the small values, `log` (sequential only)
|
|
159
|
+
* spreads a long tail. */
|
|
160
|
+
export declare function wrunCanvasScalePosition(value: number, scale: WrunCanvasScale): number;
|
|
161
|
+
/**
|
|
162
|
+
* The `WrunCellRows` of a run from its source rows: the book and volume
|
|
163
|
+
* profile lanes, the chart candles, and every intrabar leg keyed by the
|
|
164
|
+
* input that reads it (`legs`: the run's planned legs, `inputIndexes` by
|
|
165
|
+
* leg). Rows are shared, never copied.
|
|
166
|
+
*/
|
|
167
|
+
export declare function wrunCellRowsOf(metadata: Pick<WrunIndicatorMetadata, 'inputs' | 'inputSources'>, sourceRows: {
|
|
168
|
+
ohlcvRows?: ReadonlyArray<unknown>;
|
|
169
|
+
bookRows?: ReadonlyArray<unknown>;
|
|
170
|
+
volumeProfileRows?: ReadonlyArray<unknown>;
|
|
171
|
+
intrabarRows?: Readonly<Record<string, ReadonlyArray<unknown>>>;
|
|
172
|
+
}, legs?: ReadonlyArray<{
|
|
173
|
+
fetchKey: string;
|
|
174
|
+
kind?: string;
|
|
175
|
+
legMs: number;
|
|
176
|
+
inputIndexes: ReadonlyArray<number>;
|
|
177
|
+
}>): WrunCellRows;
|
|
178
|
+
/**
|
|
179
|
+
* A windowed landing (wrun-panel-mount.util: a pan-back page or a prefix run landed inside its history
|
|
180
|
+
* window) keeps the colour scale its heatmap was drawn with; only a full run samples again. The rows it lands
|
|
181
|
+
* take the sample the mounted rows' bounds were picked from, so a Sensitivity re-pick afterwards reads that
|
|
182
|
+
* sample instead of walking the landed rows into another basis. A child with no kept sample (one that
|
|
183
|
+
* crossed a copy or a trim) still walks its rows on the next re-pick, as before.
|
|
184
|
+
*/
|
|
185
|
+
export declare function keepWrunHeatmapScaleSample(from: object, to: object): void;
|
|
186
|
+
/** A canvas row as the engine reads it: a plain array. The live book lane
|
|
187
|
+
* hands typed rows (`Float64Array`, wrunLiveBookRows) the worker run wants,
|
|
188
|
+
* which the engine's row readers and live merge skip, so the bars fed live
|
|
189
|
+
* (the forming bar, a just-closed bar until history serves it) would draw no
|
|
190
|
+
* column. Plain rows pass through shared; only the few typed ones are copied. */
|
|
191
|
+
export declare function wrunPlainCanvasRow(row: unknown): unknown;
|
|
192
|
+
/** One child per `heatmaps[]` entry (PT-heatmap): book cells ride the book
|
|
193
|
+
* rows (`cellLayout: 'book'`), volume_profile cells the profile rows
|
|
194
|
+
* (`'profile'`), a grid the rows built from its outputs (`'grid'`).
|
|
195
|
+
* `tailRows` (a live tick) builds each child from the newest that many
|
|
196
|
+
* output rows (grid) or cell rows (book, profile) only, samples no colour
|
|
197
|
+
* scale and marks it `tailOnly`; the rows before the tail are never read. */
|
|
198
|
+
export declare function wrunHeatmapChildren(sheet: WrunIndicatorMetadata, cellRows: WrunCellRows | undefined, outputRows: ReadonlyArray<WrunOutputRow>, options?: {
|
|
199
|
+
tailRows?: number;
|
|
200
|
+
}): WrunCanvasChildOverlay[];
|
|
201
|
+
/** A heatmap's Sensitivity row on the Style page: the heatmap's name, its
|
|
202
|
+
* label in words, and where the slider sits untouched (the author's
|
|
203
|
+
* quantile on the 0..100 map; the drawing then keeps that quantile exactly). */
|
|
204
|
+
export interface WrunHeatmapSensitivityRow {
|
|
205
|
+
name: string;
|
|
206
|
+
label: string;
|
|
207
|
+
defaultPosition: number;
|
|
208
|
+
}
|
|
209
|
+
/** One row per heatmap the row rule admits (heatmapSensitivityRule), in sheet order. */
|
|
210
|
+
export declare function wrunHeatmapSensitivityRows(sheet: Pick<WrunIndicatorMetadata, 'heatmaps' | 'inputSources' | 'params'> | undefined): WrunHeatmapSensitivityRow[];
|
|
211
|
+
/**
|
|
212
|
+
* A heatmap child's colour bounds under the viewer's Sensitivity (0..100):
|
|
213
|
+
* re-picked from the child's own scale sample at the position's quantile
|
|
214
|
+
* (the options heatmap's map); the child's own bounds, the author's exactly,
|
|
215
|
+
* when no position is set or the child carries no scale words. The centre
|
|
216
|
+
* never depends on the quantile, so only `min` and `max` move.
|
|
217
|
+
*/
|
|
218
|
+
export declare function wrunHeatmapSensitivityBounds(child: WrunCanvasChildOverlay, sensitivity: number | undefined): {
|
|
219
|
+
min: number;
|
|
220
|
+
max: number;
|
|
221
|
+
};
|
|
222
|
+
/** The runtime row code of a canvas notice: a warning, the canvas still draws. */
|
|
223
|
+
export declare const WRUN_CANVAS_NOTICE_CODE = "WRUN_CANVAS_NOTICE";
|
|
224
|
+
/** The rows a run seam owns for its canvas notices: replaced by every full
|
|
225
|
+
* run (drafts and registry Indicators alike, a viewer of a published script
|
|
226
|
+
* sees them too), cleared by a run with none. */
|
|
227
|
+
export declare const WRUN_CANVAS_NOTICE_ROW_CODES: ReadonlySet<string>;
|
|
228
|
+
/**
|
|
229
|
+
* One warning row per notice (`wrunRunNoticesOf(runResult)`), the shape the
|
|
230
|
+
* chart store's diagnostics take: the editor console's Problems tab lists
|
|
231
|
+
* each line with warning severity, and the indicator's legend chip shows the
|
|
232
|
+
* warning glyph with the lines on hover (runtime-diagnostics.util
|
|
233
|
+
* `buildLegendErrorMessage`; a warning never toasts and never fails the run
|
|
234
|
+
* entry). The rows name no source line: the cap depends on the chart's
|
|
235
|
+
* prices, which only the running chart knows.
|
|
236
|
+
*/
|
|
237
|
+
export declare function wrunCanvasNoticeDiagnostics(notices: ReadonlyArray<string>): RuntimeDiagnostic[];
|
|
238
|
+
/** One child per `profiles[]` entry: a footprint column per bar from the
|
|
239
|
+
* volume_profile rows (PT-footprint), TPO period rows built from the bars
|
|
240
|
+
* (PT-tpo), and the time-anchored volume profile wrun-volume-profile.util
|
|
241
|
+
* builds (DL-time-anchored, X31). */
|
|
242
|
+
export declare function wrunProfileChildren(sheet: WrunIndicatorMetadata, cellRows: WrunCellRows | undefined, ctx: WrunProfileChildrenContext): WrunCanvasChildOverlay[];
|
|
243
|
+
/** The engine's matrix cell record (titan normalizePriceMatrixRows). */
|
|
244
|
+
export interface WrunMatrixCellRecord {
|
|
245
|
+
text: string;
|
|
246
|
+
fill?: string;
|
|
247
|
+
ink: string;
|
|
248
|
+
weight: string;
|
|
249
|
+
value: number | null;
|
|
250
|
+
}
|
|
251
|
+
/** The matrix rows `[price, ...cells]` with every cell resolved against
|
|
252
|
+
* `theme`: the cell's text (its own, else the formatted number), its fill
|
|
253
|
+
* (its colour, else the palette at the value over the bounds, times the
|
|
254
|
+
* opacity), its ink and weight. */
|
|
255
|
+
export declare function wrunMatrixRows(matrix: WrunMatrix, frame: WrunMatrixFrame, theme: WrunColorTheme): unknown[];
|
|
256
|
+
/** The matrix child of a selected matrix (MX-price-matrix): rows
|
|
257
|
+
* `[price, ...cells]` and the docked settings; `dock: "side"` places it in
|
|
258
|
+
* the side strip (MX-side-panel). Null without a written frame. */
|
|
259
|
+
export declare function wrunMatrixChild(matrix: WrunMatrix, frame: WrunMatrixFrame | null): WrunCanvasChildOverlay | null;
|
|
260
|
+
/** The budget charge of a parsed frame: 16 per cell, 8 per number, the
|
|
261
|
+
* strings' UTF-8 bytes (the om runtime's rule). */
|
|
262
|
+
export declare function wrunMatrixFrameBytes(frame: WrunMatrixFrame): number;
|
|
263
|
+
/**
|
|
264
|
+
* The matrix selection step (render select, MX-price-matrix): parse the
|
|
265
|
+
* written frame through the frame host (a refusal is `wrun_frame_invalid`),
|
|
266
|
+
* refuse a frame whose column count differs from the declared `columns`,
|
|
267
|
+
* and charge the frame on the shared budget. No frame = null, nothing charged.
|
|
268
|
+
*/
|
|
269
|
+
export declare function selectWrunMatrix(matrix: WrunMatrix, rawFrame: string | undefined, slot: string): {
|
|
270
|
+
frame: WrunMatrixFrame | null;
|
|
271
|
+
bytes: number;
|
|
272
|
+
};
|
|
273
|
+
/** The side-strip settings of a panel with `place: "side"` (MX-side-panel):
|
|
274
|
+
* `sideDock`, the declared width (default 280 px) and height; null for a
|
|
275
|
+
* panel below the chart. */
|
|
276
|
+
export declare function wrunSidePanelSettings(panel: Pick<WrunPanel, 'place' | 'width_px' | 'height_px'>): {
|
|
277
|
+
sideDock: true;
|
|
278
|
+
sideDockWidthPx: number;
|
|
279
|
+
sideDockHeightPx?: number;
|
|
280
|
+
} | null;
|
|
281
|
+
/** The live merge of a row-backed canvas (titan `mergeLiveDataPoint`): the
|
|
282
|
+
* incoming row replaces the forming row (same first cell) or appends a
|
|
283
|
+
* newer one; anything that is not a row keeps the last row. */
|
|
284
|
+
export declare function wrunCanvasMergeLive(lastDataPoint: unknown[], newPoint: unknown): unknown[];
|
|
285
|
+
/**
|
|
286
|
+
* The engine config of a canvas child at mount (and at every retranslate,
|
|
287
|
+
* X13): the child id, the plot, the settings with every colour word
|
|
288
|
+
* resolved against the chart's theme (and a heatmap's bounds at the viewer's
|
|
289
|
+
* Sensitivity), the profile extractor and the live merge for row-backed
|
|
290
|
+
* kinds, and (matrices) the rows re-resolved against the theme. A child with
|
|
291
|
+
* a readout registers it for the hover inspector; a tick's heatmap tail
|
|
292
|
+
* carries `tailOnly` over, so the mount knows its rows are not the canvas's.
|
|
293
|
+
*/
|
|
294
|
+
export declare function wrunCanvasChildConfig(child: WrunCanvasChildOverlay, ctx: WrunCanvasChildConfigContext): WrunCanvasChildConfig;
|
|
295
|
+
export { __resetWrunCanvasReadoutsForTests, forgetWrunCanvasReadout, rememberWrunCanvasReadout, wrunCanvasReadoutOf, wrunCanvasReadoutText, type WrunCanvasHoverCell, type WrunCanvasReadout, } from './wrun-canvas-readout.util.js';
|