@orangecharts/wrun-chart-host 0.9.0 → 0.10.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.
Files changed (170) hide show
  1. package/README.md +1 -0
  2. package/dist/constants/feature-flags.constants.d.ts +6 -1
  3. package/dist/constants/feature-flags.constants.js +67 -24
  4. package/dist/constants/opra-compliance.constants.d.ts +3 -2
  5. package/dist/constants/opra-compliance.constants.js +3 -2
  6. package/dist/constants/scriptEditor/builtin-script-snippets.d.ts +26 -0
  7. package/dist/constants/scriptEditor/builtin-script-snippets.js +6 -0
  8. package/dist/constants/scriptEditor/technicalIndicatorScriptKeys.constants.d.ts +15 -0
  9. package/dist/constants/scriptEditor/technicalIndicatorScriptKeys.constants.js +17 -0
  10. package/dist/constants/venue-presets.constants.d.ts +20 -20
  11. package/dist/constants/venue-presets.constants.js +24 -26
  12. package/dist/host-env.d.ts +29 -5
  13. package/dist/host-env.js +6 -0
  14. package/dist/host-ports.types.d.ts +69 -15
  15. package/dist/index.d.ts +13 -0
  16. package/dist/index.js +13 -0
  17. package/dist/interfaces/kscript-diagnostics.interface.d.ts +6 -0
  18. package/dist/interfaces/replay.interface.d.ts +8 -0
  19. package/dist/interfaces/wrun-runtime.interface.d.ts +18 -2
  20. package/dist/kscript-data/controls/live-trades-merge.util.d.ts +41 -4
  21. package/dist/kscript-data/controls/live-trades-merge.util.js +52 -7
  22. package/dist/kscript-data/controls/live-trades-order-gate.util.d.ts +56 -0
  23. package/dist/kscript-data/controls/live-trades-order-gate.util.js +107 -0
  24. package/dist/market-data/billing.interface.d.ts +95 -31
  25. package/dist/market-data/billing.interface.js +36 -5
  26. package/dist/market-data/venue.d.ts +88 -6
  27. package/dist/market-data/venues/cme.contract.copy.json +66 -0
  28. package/dist/market-data/venues/cme.d.ts +126 -0
  29. package/dist/market-data/venues/cme.js +133 -0
  30. package/dist/market-data/venues/index.d.ts +162 -5
  31. package/dist/market-data/venues/index.js +48 -6
  32. package/dist/settings-templates/index.js +7 -3
  33. package/dist/settings-templates/indicator-fields.d.ts +5 -4
  34. package/dist/settings-templates/indicator-fields.js +45 -6
  35. package/dist/settings-templates/tool-rules.d.ts +27 -17
  36. package/dist/settings-templates/tool-rules.js +27 -11
  37. package/dist/settings-templates/tool-tables.generated.js +91 -31
  38. package/dist/utility/chart/book-live-bucket.util.d.ts +15 -0
  39. package/dist/utility/chart/book-live-bucket.util.js +47 -0
  40. package/dist/utility/chart/index-mode-admission.util.js +15 -2
  41. package/dist/utility/chart/kscript-drawing-safe-area.util.d.ts +35 -11
  42. package/dist/utility/chart/kscript-drawing-safe-area.util.js +145 -35
  43. package/dist/utility/chart/kscript-live-coalesce.util.d.ts +7 -2
  44. package/dist/utility/chart/kscript-live-coalesce.util.js +9 -3
  45. package/dist/utility/chart/kscript-provenance-keys.util.js +6 -0
  46. package/dist/utility/chart/kscript-standin-identity.leaf.d.ts +3 -1
  47. package/dist/utility/chart/kscript-titancharts-render-keys.constants.d.ts +32 -2
  48. package/dist/utility/chart/kscript-titancharts-render-keys.constants.js +45 -0
  49. package/dist/utility/chart/kscript-venue-policy.util.d.ts +54 -35
  50. package/dist/utility/chart/kscript-venue-policy.util.js +78 -42
  51. package/dist/utility/chart/market-session-schedule.util.d.ts +10 -0
  52. package/dist/utility/chart/market-session-schedule.util.js +16 -0
  53. package/dist/utility/chart/opra-read-access.leaf.d.ts +5 -3
  54. package/dist/utility/chart/opra-read-access.leaf.js +5 -3
  55. package/dist/utility/chart/rth-session.util.d.ts +3 -2
  56. package/dist/utility/chart/rth-session.util.js +2 -1
  57. package/dist/utility/chart/window-geometry.leaf.d.ts +8 -0
  58. package/dist/utility/chart/window-geometry.leaf.js +22 -6
  59. package/dist/utility/chart/wrun-run-result.util.d.ts +12 -0
  60. package/dist/utility/chart/wrun-run-result.util.js +141 -6
  61. package/dist/utility/options/option-bar-anchor.util.d.ts +145 -0
  62. package/dist/utility/options/option-bar-anchor.util.js +340 -0
  63. package/dist/utility/options/option-venue.util.d.ts +18 -0
  64. package/dist/utility/options/option-venue.util.js +27 -0
  65. package/dist/utility/scriptEditor/wrun-runtime-diagnostics.leaf.js +2 -0
  66. package/dist/utility/wrun/derived-roots.util.d.ts +213 -0
  67. package/dist/utility/wrun/derived-roots.util.js +471 -0
  68. package/dist/utility/wrun/run-schedule/wrun-chart-gate-reader.util.d.ts +41 -6
  69. package/dist/utility/wrun/run-schedule/wrun-chart-gate-reader.util.js +89 -19
  70. package/dist/utility/wrun/run-schedule/wrun-gate-reader-warm.util.d.ts +9 -4
  71. package/dist/utility/wrun/run-schedule/wrun-gate-reader-warm.util.js +47 -6
  72. package/dist/utility/wrun/run-schedule/wrun-late-reads.util.d.ts +4 -2
  73. package/dist/utility/wrun/run-schedule/wrun-late-reads.util.js +4 -2
  74. package/dist/utility/wrun/sources/lanes/option_daily.js +5 -2
  75. package/dist/utility/wrun/sources/lanes/options_flow.js +5 -2
  76. package/dist/utility/wrun/sources/opra-option-lanes.util.d.ts +64 -19
  77. package/dist/utility/wrun/sources/opra-option-lanes.util.js +105 -35
  78. package/dist/utility/wrun/sources/row-lanes/option_contract_flow.js +2 -1
  79. package/dist/utility/wrun/sources/row-lanes/option_contract_state.js +2 -1
  80. package/dist/utility/wrun/sources/row-lanes/option_prints.d.ts +3 -0
  81. package/dist/utility/wrun/sources/row-lanes/option_prints.js +19 -4
  82. package/dist/utility/wrun/sources/row-lanes/option_strike_flow.js +17 -4
  83. package/dist/utility/wrun/sources/row-lanes/option_strikes.d.ts +52 -13
  84. package/dist/utility/wrun/sources/row-lanes/option_strikes.js +88 -19
  85. package/dist/utility/wrun/sources/row-lanes/option_surface.js +2 -1
  86. package/dist/utility/wrun/sources/wrun-poll-lane.types.d.ts +19 -0
  87. package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +24 -9
  88. package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +39 -10
  89. package/dist/utility/wrun/sources/wrun-row-lane-add-memo.util.d.ts +64 -0
  90. package/dist/utility/wrun/sources/wrun-row-lane-add-memo.util.js +89 -0
  91. package/dist/utility/wrun/sources/wrun-row-lane-first-paint.util.d.ts +15 -3
  92. package/dist/utility/wrun/sources/wrun-row-lane-first-paint.util.js +22 -3
  93. package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +31 -0
  94. package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +174 -13
  95. package/dist/utility/wrun/sources/wrun-row-lanes.util.js +685 -27
  96. package/dist/utility/wrun/wrun-builtin-twin.util.d.ts +12 -0
  97. package/dist/utility/wrun/wrun-builtin-twin.util.js +21 -0
  98. package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +53 -12
  99. package/dist/utility/wrun/wrun-chart-market-facts.util.js +101 -53
  100. package/dist/utility/wrun/wrun-download-meter.util.d.ts +15 -0
  101. package/dist/utility/wrun/wrun-download-meter.util.js +14 -2
  102. package/dist/utility/wrun/wrun-download-plan.util.d.ts +99 -0
  103. package/dist/utility/wrun/wrun-download-plan.util.js +118 -0
  104. package/dist/utility/wrun/wrun-draft-legend-note.util.d.ts +11 -3
  105. package/dist/utility/wrun/wrun-draft-legend-note.util.js +26 -4
  106. package/dist/utility/wrun/wrun-frames.d.ts +27 -6
  107. package/dist/utility/wrun/wrun-frames.js +73 -10
  108. package/dist/utility/wrun/wrun-hosted-wire.util.d.ts +7 -1
  109. package/dist/utility/wrun/wrun-hosted-wire.util.js +12 -2
  110. package/dist/utility/wrun/wrun-hud-looks.util.d.ts +18 -4
  111. package/dist/utility/wrun/wrun-hud-looks.util.js +45 -13
  112. package/dist/utility/wrun/wrun-latest-snapshot.d.ts +11 -0
  113. package/dist/utility/wrun/wrun-live-intake.util.d.ts +13 -7
  114. package/dist/utility/wrun/wrun-live-intake.util.js +82 -29
  115. package/dist/utility/wrun/wrun-live-tick.util.d.ts +4 -0
  116. package/dist/utility/wrun/wrun-live-tick.util.js +158 -14
  117. package/dist/utility/wrun/wrun-market-size-defaults.leaf.d.ts +49 -10
  118. package/dist/utility/wrun/wrun-market-size-defaults.leaf.js +65 -5
  119. package/dist/utility/wrun/wrun-market-size-defaults.util.js +31 -5
  120. package/dist/utility/wrun/wrun-opra-lane.util.d.ts +17 -4
  121. package/dist/utility/wrun/wrun-opra-lane.util.js +6 -4
  122. package/dist/utility/wrun/wrun-option-strike-flow-forecast.util.d.ts +31 -0
  123. package/dist/utility/wrun/wrun-option-strike-flow-forecast.util.js +119 -0
  124. package/dist/utility/wrun/wrun-option-strike-flow-lane.util.d.ts +23 -6
  125. package/dist/utility/wrun/wrun-option-strike-flow-lane.util.js +47 -11
  126. package/dist/utility/wrun/wrun-option-strike-flow.util.d.ts +86 -19
  127. package/dist/utility/wrun/wrun-option-strike-flow.util.js +168 -62
  128. package/dist/utility/wrun/wrun-option-views.util.d.ts +47 -13
  129. package/dist/utility/wrun/wrun-option-views.util.js +98 -26
  130. package/dist/utility/wrun/wrun-output-style.util.d.ts +6 -2
  131. package/dist/utility/wrun/wrun-output-style.util.js +20 -2
  132. package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +17 -0
  133. package/dist/utility/wrun/wrun-overlay-lifecycle.util.d.ts +10 -1
  134. package/dist/utility/wrun/wrun-overlay-lifecycle.util.js +52 -4
  135. package/dist/utility/wrun/wrun-overlay-run.util.d.ts +100 -31
  136. package/dist/utility/wrun/wrun-overlay-run.util.js +733 -114
  137. package/dist/utility/wrun/wrun-pane-format.util.d.ts +2 -1
  138. package/dist/utility/wrun/wrun-pane-format.util.js +7 -3
  139. package/dist/utility/wrun/wrun-panel-mount.util.d.ts +9 -0
  140. package/dist/utility/wrun/wrun-panel-mount.util.js +63 -13
  141. package/dist/utility/wrun/wrun-panel-style.util.d.ts +10 -9
  142. package/dist/utility/wrun/wrun-panel-style.util.js +58 -9
  143. package/dist/utility/wrun/wrun-param-map.util.d.ts +14 -11
  144. package/dist/utility/wrun/wrun-param-map.util.js +10 -5
  145. package/dist/utility/wrun/wrun-param-values.util.d.ts +14 -4
  146. package/dist/utility/wrun/wrun-param-values.util.js +4 -0
  147. package/dist/utility/wrun/wrun-pin-spelling.util.js +12 -11
  148. package/dist/utility/wrun/wrun-refusal-surface.util.d.ts +50 -0
  149. package/dist/utility/wrun/wrun-refusal-surface.util.js +68 -0
  150. package/dist/utility/wrun/wrun-refused-latest.util.d.ts +10 -0
  151. package/dist/utility/wrun/wrun-refused-latest.util.js +12 -0
  152. package/dist/utility/wrun/wrun-row-source.d.ts +11 -0
  153. package/dist/utility/wrun/wrun-run-interval.util.d.ts +4 -2
  154. package/dist/utility/wrun/wrun-run-interval.util.js +9 -6
  155. package/dist/utility/wrun/wrun-script-inputs.util.d.ts +45 -1
  156. package/dist/utility/wrun/wrun-script-inputs.util.js +112 -4
  157. package/dist/utility/wrun/wrun-setting-words.util.d.ts +7 -3
  158. package/dist/utility/wrun/wrun-setting-words.util.js +13 -5
  159. package/dist/utility/wrun/wrun-socket-row-source.d.ts +27 -2
  160. package/dist/utility/wrun/wrun-socket-row-source.js +113 -8
  161. package/dist/utility/wrun/wrun-source-rows.util.d.ts +5 -1
  162. package/dist/utility/wrun/wrun-source-rows.util.js +16 -3
  163. package/dist/utility/wrun/wrun-style-words.util.js +6 -4
  164. package/dist/utility/wrun/wrun-table-chrome.util.d.ts +3 -2
  165. package/dist/utility/wrun/wrun-table-chrome.util.js +19 -11
  166. package/dist/utility/wrun/wrun-tape-per-order.util.d.ts +2 -0
  167. package/dist/utility/wrun/wrun-tape-per-order.util.js +26 -0
  168. package/dist/utils/replay/replay-buffer-math.d.ts +53 -2
  169. package/dist/utils/replay/replay-buffer-math.js +227 -20
  170. package/package.json +11 -11
@@ -0,0 +1,47 @@
1
+ /**
2
+ * The bar a live order book row belongs to: ONE key for every writer of per-bar book rows (the
3
+ * heatmap's live and replay columns, the K_ORDERBOOK source rows of a kScript, the wrun book lane
4
+ * and the heatmap riders' projected rows), keyed the way the history those rows extend is keyed.
5
+ *
6
+ * A book frame is stamped at its observation, an END label: the snapshot stamped exactly on a bar
7
+ * boundary is the closing snapshot of the bar before it (`roundObTimestamp`). tsdb-gateway rolls a
8
+ * CME Group market's per-symbol BLOCK_BOOK_SNAPSHOT_AGG onto the 17:00 America/Chicago session
9
+ * lattice and end-stamps each bar (pkg/tsdb/selects/cme.go `usesCMESessionRollup`,
10
+ * `cmeBlockBookResultBucket`); the history shift (`bookBarStartMs`) lands each row on its lattice
11
+ * start, so GC 4h history in CDT sits at 22/02/06/10/14/18Z. A live row floored on the UTC grid
12
+ * landed an 11:00Z snapshot at 08:00Z, a key no history row and no candle has.
13
+ *
14
+ * `venue` is the SERIES' own market (its exchange and symbol), never the chart's: a book source on
15
+ * another market keys its own grid. It is a required argument, so no writer keys a book row without
16
+ * naming the market it belongs to.
17
+ */
18
+ import { Intervals } from '../../constants/interval.constants.js';
19
+ import { roundObTimestamp } from '../common/data-processing.util.js';
20
+ import { cmeSessionLatticeBucketMs } from './live-bucket.util.js';
21
+ /**
22
+ * The lattice bar an END-stamped book frame closes, or null off the lattice (another venue, a
23
+ * coin-aggregated book that passes no venue, an interval the gateway does not roll): the stamp is
24
+ * read one millisecond early, so a stamp exactly on a boundary closes the bar before it whatever
25
+ * the width (45m bars open on the quarter hour, not only on whole hours). A weekly stamp keeps its
26
+ * own week, as in `roundObTimestamp`.
27
+ */
28
+ export function cmeLatticeBookBucketMs(stampMs, intervalMs, venue) {
29
+ const closingMs = intervalMs === Intervals.WEEK ? stampMs : stampMs - 1;
30
+ return cmeSessionLatticeBucketMs(closingMs, intervalMs, venue);
31
+ }
32
+ /** The bar a live book row is keyed on: the CME session lattice bar on a CME Group market, else
33
+ * `roundObTimestamp`'s END reading of the plain grid. */
34
+ export function bookLiveBucketMs(stampMs, intervalMs, venue) {
35
+ return cmeLatticeBookBucketMs(stampMs, intervalMs, venue) ?? roundObTimestamp(stampMs, intervalMs);
36
+ }
37
+ /** Copies of book rows `[stamp, ...levels]`, each keyed on its bar (`bookLiveBucketMs`). An unknown
38
+ * interval keeps every row's own stamp; the inputs are never written. */
39
+ export function bookLiveBucketRows(rows, intervalMs, venue) {
40
+ const keyed = Number.isFinite(intervalMs) && intervalMs > 0;
41
+ return rows.map((row) => {
42
+ const copy = Float64Array.from(row);
43
+ if (keyed && copy.length > 0)
44
+ copy[0] = bookLiveBucketMs(copy[0], intervalMs, venue);
45
+ return copy;
46
+ });
47
+ }
@@ -14,7 +14,11 @@
14
14
  * Two market facts narrow it for a browser-run Indicator's lanes (`wrunLaneServiceOnMarket`):
15
15
  * - the market-kind table: forex and commodities trade no volume the chart can split, keep no
16
16
  * book and list no options, so they serve no volume profile, buy/sell volume, order book,
17
- * implied volatility or skew, whatever the index-mode admission lets through; a crypto index
17
+ * implied volatility or skew, whatever the index-mode admission lets through; a US equity
18
+ * market (the tradfi kind: the listing venues, the consolidated tape, Polygon under both enum
19
+ * names) prints no aggressor side, so it serves no buy/sell volume either (the gateway writes
20
+ * every stock trade row as side 0 and the lane keeps BUY and SELL rows only, so the lane is
21
+ * empty and a recipe's zero fill would draw that as flat flow); a crypto index
18
22
  * (CRYPTOCAP, not index-mode: it fetches by period like crypto) serves its value candles and no
19
23
  * other lane at all; a quote-priced perpetual market (Variational, also period-fetched) serves its
20
24
  * quote candles, funding and open interest, and no trade, volume, book, profile or options lane;
@@ -25,7 +29,7 @@
25
29
  import { checkIsCryptoIndex } from './crypto-index.leaf.js';
26
30
  import { checkIsQuotePerp } from './quote-perp.leaf.js';
27
31
  import { checkIsIndexMode } from './index-mode.util.js';
28
- import { checkIsForexOrCommodity } from './marketKind.util.js';
32
+ import { checkIsForexOrCommodity, getMarketKind } from './marketKind.util.js';
29
33
  import { WRUN_OPTION_SUMMARY_COINS, WRUN_OPTION_SUMMARY_LANES } from '../wrun/wrun-option-summary-lane.util.js';
30
34
  /** The kScript source types the dispatcher serves on an index-mode payload exchange. */
31
35
  export function isKScriptTypeServedOnIndexMode(kScriptType) {
@@ -39,6 +43,10 @@ const FOREX_COMMODITY_UNSERVED_TYPES = new Set([
39
43
  WRUN_OPTION_SUMMARY_LANES.implied_volatility.type,
40
44
  WRUN_OPTION_SUMMARY_LANES.skew.type,
41
45
  ]);
46
+ /** The lane fetch types a US equity market never serves (the market-kind table): buy/sell volume. A stock print
47
+ * carries no aggressor side, so the lane's BUY/SELL split is empty there; it is the one lane needing a side that
48
+ * the index-mode admission lets through on a stock chart. */
49
+ const US_EQUITY_UNSERVED_TYPES = new Set(['buy_sell_volume']);
42
50
  /** The one lane fetch type a crypto index market serves (the market-kind table): its value candles. */
43
51
  const CRYPTO_INDEX_SERVED_TYPES = new Set(['ohlcv']);
44
52
  /** The lane fetch types a quote-priced perpetual market serves (the market-kind table): its quote candles and the
@@ -65,6 +73,11 @@ export function wrunLaneServiceOnMarket({ type, exchange, coin, nativeRows, }) {
65
73
  if (FOREX_COMMODITY_UNSERVED_TYPES.has(type) && checkIsForexOrCommodity(exchange)) {
66
74
  return { served: false, reason: 'market-kind' };
67
75
  }
76
+ // By the kind, not the index-mode set: a stock print carries no side whichever US venue code names the market (the
77
+ // consolidated tape and the listing venues outside that set included).
78
+ if (US_EQUITY_UNSERVED_TYPES.has(type) && getMarketKind(exchange) === 'tradfi') {
79
+ return { served: false, reason: 'market-kind' };
80
+ }
68
81
  if (!CRYPTO_INDEX_SERVED_TYPES.has(type) && checkIsCryptoIndex(exchange)) {
69
82
  return { served: false, reason: 'market-kind' };
70
83
  }
@@ -63,6 +63,14 @@ export interface LegendPane {
63
63
  }
64
64
  export declare function legendPaneOf(tc: LegendSafeAreaChart): LegendPane | null;
65
65
  export declare function legendRowsOf(pane: LegendPane): Element[];
66
+ /**
67
+ * Registers on `observer` what moves a host row of the legend without resizing one, for every tracker that measures
68
+ * the legend (this door, the wrun table chrome): the rows come and go as the cell's children (the quick-trade pill
69
+ * mounts with a wallet), and a row placed by its inline style moves with it (the pill rides `top`, a frame after the
70
+ * legend's rows change). `cell` adds the tracker's own options for the cell, since a second `observe` of one target
71
+ * replaces the first. Call it again after the rows change, so a row that just mounted is watched too.
72
+ */
73
+ export declare function observeLegendHostRows(observer: MutationObserver, pane: LegendPane, cell?: MutationObserverInit): void;
66
74
  export declare function measureLegendBox(pane: LegendPane): LegendBox | null;
67
75
  /**
68
76
  * One fresh measure of the chart's pane chrome (DW06): the price pane's
@@ -80,16 +88,32 @@ export declare function measureChartChromeSafeArea(tc: LegendSafeAreaChart): Cha
80
88
  */
81
89
  export declare function watchChartChromeSafeArea(tc: LegendSafeAreaChart, listener: ChartChromeSafeAreaListener): () => void;
82
90
  /**
83
- * The set to hand `updateDrawings`: the `top_left` group moved under the
84
- * chart's legend when they meet, a stacking overlay's corner groups moved
85
- * clear of the earlier groups at the same corner, `safeArea` handles stepped
86
- * past the axis tags and the action bar, and plain `top_right` / `top_center`
87
- * groups dropped under their pane's button strip. Every push of an overlay's
88
- * drawings goes through here (a full apply, a replay-lane reveal, a clear), so
89
- * the tracker always holds the mounted set of each overlay that owns a corner
90
- * group, a handle under a button strip or a `safeArea` record (a card's
91
- * insets ride the engine door) and can re-mount it when the chrome or an
92
- * earlier group changes; a set without one (the clear included) drops the
93
- * overlay from the tracker, and the overlays stacked on it follow.
91
+ * Keeps the chart's chrome tracker running for `holderId`, a record the chart
92
+ * holds that the engine places by the chrome without a drawing here (DW06):
93
+ * the tracker starts (and hands every measured pane's insets to the engine)
94
+ * on the chart's first hold, listener or tracked set, and pushes again as the
95
+ * chrome moves. A second hold of the same id is no change.
96
+ */
97
+ export declare function holdChartChromeSafeArea(tc: LegendSafeAreaChart, holderId: string): void;
98
+ /**
99
+ * Lets go of `holderId`'s hold (none held: no change). The chart's last hold,
100
+ * listener and tracked set gone, the tracker stops and the engine's insets go
101
+ * back to null.
102
+ */
103
+ export declare function releaseChartChromeSafeArea(tc: LegendSafeAreaChart, holderId: string): void;
104
+ /**
105
+ * The set to hand `updateDrawings`: each top group (`top_left`,
106
+ * `top_center`, `top_right`) moved under the chart's legend when they meet, a
107
+ * stacking overlay's corner groups moved clear of the earlier groups at the
108
+ * same corner, `safeArea` handles stepped past the axis tags and the action
109
+ * bar, and plain `top_right` / `top_center` groups dropped under their pane's
110
+ * button strip (the deeper line when the legend reaches them too). Every
111
+ * push of an overlay's drawings goes through here (a full apply, a
112
+ * replay-lane reveal, a clear), so the tracker always holds the mounted set of
113
+ * each overlay that owns a corner group, a handle under a button strip or a
114
+ * `safeArea` record (a card's insets ride the engine door) and can re-mount it
115
+ * when the chrome or an earlier group changes; a set without one (the clear
116
+ * included) drops the overlay from the tracker, and the overlays stacked on it
117
+ * follow.
94
118
  */
95
119
  export declare function mountWithLegendSafeArea(tc: LegendSafeAreaChart, overlayId: string, drawings: unknown[]): unknown[];
@@ -5,13 +5,21 @@
5
5
  * in CSS pixels from the plot's top-left corner, exactly where the chart's own
6
6
  * legend stack lives: the symbol row, the OHLC row, Vol, the "N indicators"
7
7
  * summary and one row per indicator (about 145 px tall with one indicator,
8
- * growing with each). TitanCharts resolves pane anchors with no inset
8
+ * growing with each), and under the last row the quick-trade pill while it
9
+ * shows. TitanCharts resolves pane anchors with no inset
9
10
  * (`paneAnchorOffset`), so the adapter shifts the overlay's `top_left` group
10
11
  * below the legend when the two boxes intersect, at the door to
11
12
  * `updateDrawings`. The remembered records keep the author's coordinates, so
12
13
  * a re-apply never stacks a second shift, and the whole group moves by one
13
14
  * amount, so the HUD's own layout is untouched. The legend is watched
14
- * (rows resize, rows come and go) and the mounted set follows it.
15
+ * (rows resize, rows come and go, a host row moves) and the mounted set
16
+ * follows it.
17
+ *
18
+ * One rule holds for the three top anchors (OPRA QA 2026-10-22: a recipe's
19
+ * `top_center` caption drew behind the chart title): a `top_center` or
20
+ * `top_right` group whose box meets the legend's moves under it the same way,
21
+ * its box placed in the plot by the plot's width; a group clear of the legend
22
+ * keeps its place.
15
23
  *
16
24
  * The same door measures the rest of the pane chrome (DW06): the pane action
17
25
  * bar and the compare strip along the top right, the price-axis tags along
@@ -23,6 +31,14 @@
23
31
  * step under the pane's buttons. The HUD layer reads the same measure
24
32
  * (`hudTopLeft`) for its top-left inset.
25
33
  *
34
+ * The engine reads those insets for records with no drawing here too (the
35
+ * docked price matrix seats its title and header under them, a note label
36
+ * flagged for the chrome shifts by them), so a chart that holds a wrun record
37
+ * keeps the tracker running while the record stands
38
+ * (`holdChartChromeSafeArea`, from the wrun lifecycle door): one tracker per
39
+ * chart serves the mounted sets, the listeners and the holds, and the insets
40
+ * go back to null once the last of them lets go.
41
+ *
26
42
  * A notice or label that did not opt in clears the buttons too (template QA
27
43
  * A17, B10): on a pane with a measured button strip (the price pane's action
28
44
  * bar, a lower pane's move buttons), a plain `top_right` or `top_center` group
@@ -61,6 +77,9 @@ const ACTION_BAR_SELECTOR = '.chart-pane-action-bar';
61
77
  /** An offchart pane's button strip: titan's move buttons, top right of the pane's legend section (only while the pane can move). */
62
78
  const PANE_CONTROLS_SELECTOR = '.titan-charts-pane-controls';
63
79
  const LEGEND_ANCHOR = 'top_left';
80
+ /** The anchors whose y counts down from the plot's top edge, where the legend stack sits: one rule moves each one's
81
+ * group under the legend when the two boxes meet. */
82
+ const TOP_ANCHORS = new Set(['top_left', 'top_center', 'top_right']);
64
83
  /** The corners a stacking overlay's groups stack at (DW35). */
65
84
  const STACK_CORNERS = new Set([
66
85
  'top_left',
@@ -82,11 +101,14 @@ const LABEL_LINE_EM = 1.4;
82
101
  const LABEL_PAD_PX = 4;
83
102
  const DEFAULT_LABEL_SIZE = 12;
84
103
  // The pane's top-left stack. Host rows are children of the tc-container (the
85
- // symbol row, the prediction-venue rows); titan's rows live in the main
104
+ // symbol row, the prediction-venue rows, and the quick-trade pill's anchor,
105
+ // HLQuickTradePill's root, which seats itself one gap under the legend's last
106
+ // row on a Hyperliquid pane with a wallet: measured without it, a top-left seat
107
+ // landed on the pill's chips, OPRA QA 2026-10-22); titan's rows live in the main
86
108
  // section's legend section (`.titan-charts-legend-area` per plotted overlay,
87
109
  // the "N indicators" summary's indicator). All are content-sized, and hover
88
110
  // fades them by opacity, so the measured box holds still under the pointer.
89
- const HOST_ROW_SELECTOR = '.symbol-interval-row, .polymarket-row-1, .polymarket-row-2, .polymarket-row-3';
111
+ const HOST_ROW_SELECTOR = '.symbol-interval-row, .polymarket-row-1, .polymarket-row-2, .polymarket-row-3, .hlqt-anchor';
90
112
  const PLOT_SELECTOR = '.titan-charts-main-section .titan-charts-legend-section';
91
113
  const TITAN_ROW_SELECTOR = '.titan-charts-legend-area, .titan-charts-legend-collapse-indicator';
92
114
  const SECTION_PREFIX = '.titan-charts-';
@@ -186,7 +208,8 @@ function cornerGroups(drawings) {
186
208
  }
187
209
  return groups;
188
210
  }
189
- /** How far down a `top_left` group must move to sit one gap under the legend: 0 when the two boxes do not meet. */
211
+ /** How far down a top group (its box in plot px) must move to sit one gap under the legend: 0 when the two boxes do
212
+ * not meet. */
190
213
  function legendShiftOf(group, legend) {
191
214
  if (!group || !legend)
192
215
  return 0;
@@ -198,6 +221,52 @@ function legendShiftOf(group, legend) {
198
221
  return 0;
199
222
  return Math.max(0, Math.round(legend.bottom + LEGEND_SAFE_AREA_GAP_PX - group.top));
200
223
  }
224
+ /**
225
+ * A top-anchored member's box in plot px (origin: the plot's top-left corner, where the legend is measured), `width`
226
+ * the plot's. Titan resolves a centre anchor's x from the plot's middle and a right anchor's inward from its right
227
+ * edge, then runs a label's text from that point the way its `align` says: a right label's point mirrors, its text
228
+ * does not.
229
+ */
230
+ function plotBoundsOf(member, width) {
231
+ const bounds = memberBounds(member.kind, member.props, false);
232
+ if (!bounds || member.anchor === LEGEND_ANCHOR)
233
+ return bounds;
234
+ if (member.anchor === 'top_center')
235
+ return { ...bounds, left: bounds.left + width / 2, right: bounds.right + width / 2 };
236
+ const { x } = member.props;
237
+ if (member.kind === 'label' && finite(x)) {
238
+ const offset = width - 2 * x;
239
+ return { ...bounds, left: bounds.left + offset, right: bounds.right + offset };
240
+ }
241
+ return { ...bounds, left: width - bounds.right, right: width - bounds.left };
242
+ }
243
+ /**
244
+ * Per top anchor of the price pane, how far down the set's group there moves to sit one gap under the legend; an
245
+ * anchor whose group the legend does not meet is left out. A centre or right group needs the plot's width to stand
246
+ * where the legend is measured, so without a measured plot only the `top_left` group moves.
247
+ */
248
+ function legendDropsOf(drawings, legend, plot) {
249
+ const drops = new Map();
250
+ if (!legend)
251
+ return drops;
252
+ const groups = new Map();
253
+ for (const drawing of drawings) {
254
+ const member = memberOf(drawing);
255
+ if (!member || member.pane !== 'onchart' || !TOP_ANCHORS.has(member.anchor))
256
+ continue;
257
+ if (!plot && member.anchor !== LEGEND_ANCHOR)
258
+ continue;
259
+ const bounds = plotBoundsOf(member, plot?.width ?? 0);
260
+ if (bounds)
261
+ groups.set(member.anchor, union(groups.get(member.anchor) ?? null, bounds));
262
+ }
263
+ for (const [anchor, group] of groups) {
264
+ const drop = legendShiftOf(group, legend);
265
+ if (drop > 0)
266
+ drops.set(anchor, drop);
267
+ }
268
+ return drops;
269
+ }
201
270
  /** The room (CSS px) a group has before its far edge leaves the pane, never negative. */
202
271
  function roomPast(far, size) {
203
272
  return Math.max(0, Math.floor(size - far));
@@ -225,23 +294,21 @@ function shiftClassOf(member) {
225
294
  return `${member.pane}|${member.anchor}|${member.props.safeArea === true ? 'safe' : 'plain'}`;
226
295
  }
227
296
  /**
228
- * A class's shift before the cap: the legend and stacking shifts of a
229
- * price-pane corner group, the inset steps of a safeArea handle, and for a
297
+ * A class's shift before the cap: the inset steps of a safeArea handle, for a
230
298
  * plain top_right / top_center class the drop that puts its top on the pane's
231
- * strip line (A17). The drop reads the class's own box before any stacking:
232
- * every group that starts above the line starts on it, so a stacking group
233
- * still lands one gap under the earlier group it stacks on.
299
+ * strip line (A17), and on the price pane the legend drop of its anchor's
300
+ * group and the stacking shift over earlier overlays' groups. The legend drop
301
+ * is one rule for the three top anchors, and a class under a button strip too
302
+ * takes the deeper of the two lines, never their sum. The drops read the
303
+ * author's boxes before any stacking: every group that starts above a line
304
+ * starts on it, so a stacking group still lands one gap under the earlier
305
+ * group it stacks on.
234
306
  */
235
307
  function rawShiftOf(placement, cls) {
236
308
  const { pane, anchor } = cls;
237
309
  const offchart = pane === 'offchart';
238
310
  let dx = 0;
239
311
  let dy = 0;
240
- if (pane === 'onchart') {
241
- if (anchor === LEGEND_ANCHOR)
242
- dy += placement.legendDy;
243
- dy += placement.stack.get(anchor) ?? 0;
244
- }
245
312
  if (cls.safeArea) {
246
313
  const insets = offchart ? placement.insets.pane : placement.insets.main;
247
314
  if (insets) {
@@ -256,6 +323,8 @@ function rawShiftOf(placement, cls) {
256
323
  if (line !== null)
257
324
  dy += Math.max(0, Math.ceil(line - cls.bounds.top));
258
325
  }
326
+ if (pane === 'onchart')
327
+ dy = Math.max(dy, placement.legend.get(anchor) ?? 0) + (placement.stack.get(anchor) ?? 0);
259
328
  return { dx, dy };
260
329
  }
261
330
  /**
@@ -369,7 +438,7 @@ export function shiftLegendSafeArea(drawings, dy) {
369
438
  if (dy === 0)
370
439
  return drawings;
371
440
  return placeDrawings(drawings, {
372
- legendDy: dy,
441
+ legend: new Map([[LEGEND_ANCHOR, dy]]),
373
442
  stack: NO_STACK,
374
443
  insets: NO_INSETS,
375
444
  boxes: NO_BOXES,
@@ -400,6 +469,20 @@ export function legendPaneOf(tc) {
400
469
  export function legendRowsOf(pane) {
401
470
  return [...pane.root.querySelectorAll(HOST_ROW_SELECTOR), ...pane.plot.querySelectorAll(TITAN_ROW_SELECTOR)];
402
471
  }
472
+ /**
473
+ * Registers on `observer` what moves a host row of the legend without resizing one, for every tracker that measures
474
+ * the legend (this door, the wrun table chrome): the rows come and go as the cell's children (the quick-trade pill
475
+ * mounts with a wallet), and a row placed by its inline style moves with it (the pill rides `top`, a frame after the
476
+ * legend's rows change). `cell` adds the tracker's own options for the cell, since a second `observe` of one target
477
+ * replaces the first. Call it again after the rows change, so a row that just mounted is watched too.
478
+ */
479
+ export function observeLegendHostRows(observer, pane, cell = {}) {
480
+ if (pane.root === pane.main)
481
+ return;
482
+ observer.observe(pane.root, { ...cell, childList: true });
483
+ for (const row of pane.root.querySelectorAll(HOST_ROW_SELECTOR))
484
+ observer.observe(row, { attributes: true, attributeFilter: ['style'] });
485
+ }
403
486
  /** The rows' box relative to `origin`'s top-left corner, rounded; null when no row has a size. */
404
487
  function measureRows(origin, rows) {
405
488
  const base = origin.getBoundingClientRect();
@@ -593,12 +676,13 @@ function dropTracker(tc, tracker) {
593
676
  tracker.pushed.clear();
594
677
  }
595
678
  function idle(tracker) {
596
- return tracker.overlays.size === 0 && tracker.listeners.size === 0;
679
+ return tracker.overlays.size === 0 && tracker.listeners.size === 0 && tracker.holds.size === 0;
597
680
  }
598
681
  /**
599
- * Places every tracked set in `tc.metadata` order: the legend shift, the
600
- * stacking shift over the earlier groups at the same corner, the safe-area
601
- * insets and the strip drop of the plain top_right / top_center groups.
682
+ * Places every tracked set in `tc.metadata` order: the legend drop of each
683
+ * top group, the stacking shift over the earlier groups at the same corner,
684
+ * the safe-area insets and the strip drop of the plain top_right / top_center
685
+ * groups.
602
686
  * Overlays the chart no longer holds are forgotten (`current`, the set
603
687
  * being mounted, is kept whatever the metadata says). Every set other than
604
688
  * `current` whose placement changed is re-mounted; `current`'s placed set is
@@ -628,7 +712,7 @@ function placeAll(tc, tracker, current) {
628
712
  const panes = tracker.measure?.panes;
629
713
  const ownPaneId = hostPaneIdOf(tc, overlayId);
630
714
  const placement = {
631
- legendDy: legendShiftOf(entry.groups.get(LEGEND_ANCHOR), tracker.legend),
715
+ legend: legendDropsOf(entry.drawings, tracker.legend, tracker.paneBoxes[MAIN_PANE_ID] ?? null),
632
716
  stack,
633
717
  // Only a safeArea class reads the insets (rawShiftOf), so every set can carry them.
634
718
  insets: panes ? { main: panes[MAIN_PANE_ID] ?? null, pane: panes[ownPaneId] ?? null } : NO_INSETS,
@@ -659,6 +743,7 @@ function startTracker(tc) {
659
743
  strips: {},
660
744
  overlays: new Map(),
661
745
  listeners: new Set(),
746
+ holds: new Set(),
662
747
  pushed: new Set(),
663
748
  stop: () => { },
664
749
  };
@@ -728,12 +813,13 @@ function startTracker(tc) {
728
813
  // The move buttons come and go with the pane order (direct children of the section, caught below).
729
814
  rows?.observe(section, { childList: true });
730
815
  }
731
- // Panes come and go (sections are direct children of the sections pane); the compare strip rides the cell's style.
816
+ // Panes come and go (sections are direct children of the sections pane); the compare strip rides the cell's
817
+ // style, and the host rows come, go and move with the cell's children and their own style.
732
818
  const sectionsPane = pane.plot.parentElement?.parentElement;
733
819
  if (sectionsPane)
734
820
  rows?.observe(sectionsPane, { childList: true });
735
- if (pane.root !== pane.main)
736
- rows?.observe(pane.root, { attributes: true, attributeFilter: ['style'] });
821
+ if (rows)
822
+ observeLegendHostRows(rows, pane, { attributes: true, attributeFilter: ['style'] });
737
823
  };
738
824
  if (typeof MutationObserver === 'function')
739
825
  rows = new MutationObserver(() => {
@@ -770,23 +856,47 @@ export function watchChartChromeSafeArea(tc, listener) {
770
856
  dropTracker(tc, tracker);
771
857
  };
772
858
  }
859
+ /**
860
+ * Keeps the chart's chrome tracker running for `holderId`, a record the chart
861
+ * holds that the engine places by the chrome without a drawing here (DW06):
862
+ * the tracker starts (and hands every measured pane's insets to the engine)
863
+ * on the chart's first hold, listener or tracked set, and pushes again as the
864
+ * chrome moves. A second hold of the same id is no change.
865
+ */
866
+ export function holdChartChromeSafeArea(tc, holderId) {
867
+ trackerFor(tc).holds.add(holderId);
868
+ }
869
+ /**
870
+ * Lets go of `holderId`'s hold (none held: no change). The chart's last hold,
871
+ * listener and tracked set gone, the tracker stops and the engine's insets go
872
+ * back to null.
873
+ */
874
+ export function releaseChartChromeSafeArea(tc, holderId) {
875
+ const tracker = trackers.get(tc);
876
+ if (!tracker || !tracker.holds.delete(holderId))
877
+ return;
878
+ if (idle(tracker))
879
+ dropTracker(tc, tracker);
880
+ }
773
881
  /** A pane-pixel handle at an anchor the pane's buttons sit over (top_right, top_center), in any pane. */
774
882
  function meetsButtonStrip(drawing) {
775
883
  const member = memberOf(drawing);
776
884
  return member !== null && ACTION_BAR_ANCHORS.has(member.anchor);
777
885
  }
778
886
  /**
779
- * The set to hand `updateDrawings`: the `top_left` group moved under the
780
- * chart's legend when they meet, a stacking overlay's corner groups moved
781
- * clear of the earlier groups at the same corner, `safeArea` handles stepped
782
- * past the axis tags and the action bar, and plain `top_right` / `top_center`
783
- * groups dropped under their pane's button strip. Every push of an overlay's
784
- * drawings goes through here (a full apply, a replay-lane reveal, a clear), so
785
- * the tracker always holds the mounted set of each overlay that owns a corner
786
- * group, a handle under a button strip or a `safeArea` record (a card's
787
- * insets ride the engine door) and can re-mount it when the chrome or an
788
- * earlier group changes; a set without one (the clear included) drops the
789
- * overlay from the tracker, and the overlays stacked on it follow.
887
+ * The set to hand `updateDrawings`: each top group (`top_left`,
888
+ * `top_center`, `top_right`) moved under the chart's legend when they meet, a
889
+ * stacking overlay's corner groups moved clear of the earlier groups at the
890
+ * same corner, `safeArea` handles stepped past the axis tags and the action
891
+ * bar, and plain `top_right` / `top_center` groups dropped under their pane's
892
+ * button strip (the deeper line when the legend reaches them too). Every
893
+ * push of an overlay's drawings goes through here (a full apply, a
894
+ * replay-lane reveal, a clear), so the tracker always holds the mounted set of
895
+ * each overlay that owns a corner group, a handle under a button strip or a
896
+ * `safeArea` record (a card's insets ride the engine door) and can re-mount it
897
+ * when the chrome or an earlier group changes; a set without one (the clear
898
+ * included) drops the overlay from the tracker, and the overlays stacked on it
899
+ * follow.
790
900
  */
791
901
  export function mountWithLegendSafeArea(tc, overlayId, drawings) {
792
902
  const groups = cornerGroups(drawings);
@@ -22,13 +22,18 @@ export declare function shouldAccumulateV2LiveDataPoints(sourceType: unknown): b
22
22
  * The size floor a raw TRADE print must clear to fold into ANY `trades`
23
23
  * source of an engine: the smallest declared minSize (0 when a source has
24
24
  * none). Applied at intake, before the pending queue, so a busy feed's small
25
- * prints cannot push a qualifying print out of the 1,024-message window.
25
+ * prints cannot push a qualifying print out of the 1,024-message window. On a
26
+ * tape judged per aggressor order (wrun-tape-per-order.util `wrunTapePerOrder`)
27
+ * the fan-out judges it per order instead (live-trades-order-gate.util), so the
28
+ * small fills of an order that reached it still fold.
26
29
  */
27
30
  export declare function v2LiveTradesSizeFloor(snapshots: ReadonlyArray<{
28
31
  sourceType?: string;
29
32
  payload?: unknown;
30
33
  }> | undefined): number;
31
- /** True when a raw TRADE message carries a print below `floor` (a non-print message never is). */
34
+ /** True when a live trade message carries a print below `floor` (a non-print message never is). The print is read on
35
+ * either case the fold reads (live-trades-merge.util `liveTradeOfPoint`: the raw TRADE `trade`, the TRADE_LARGE
36
+ * `tradeLarge`), so the floor never passes a print the fold would judge. */
32
37
  export declare function v2LiveTradePrintBelowFloor(data: unknown, floor: number): boolean;
33
38
  /**
34
39
  * One coalesce key's pending live points, oldest first, bounded by the cap.
@@ -42,7 +42,10 @@ export function shouldAccumulateV2LiveDataPoints(sourceType) {
42
42
  * The size floor a raw TRADE print must clear to fold into ANY `trades`
43
43
  * source of an engine: the smallest declared minSize (0 when a source has
44
44
  * none). Applied at intake, before the pending queue, so a busy feed's small
45
- * prints cannot push a qualifying print out of the 1,024-message window.
45
+ * prints cannot push a qualifying print out of the 1,024-message window. On a
46
+ * tape judged per aggressor order (wrun-tape-per-order.util `wrunTapePerOrder`)
47
+ * the fan-out judges it per order instead (live-trades-order-gate.util), so the
48
+ * small fills of an order that reached it still fold.
46
49
  */
47
50
  export function v2LiveTradesSizeFloor(snapshots) {
48
51
  let floor = Number.POSITIVE_INFINITY;
@@ -56,11 +59,14 @@ export function v2LiveTradesSizeFloor(snapshots) {
56
59
  }
57
60
  return any && Number.isFinite(floor) ? floor : 0;
58
61
  }
59
- /** True when a raw TRADE message carries a print below `floor` (a non-print message never is). */
62
+ /** True when a live trade message carries a print below `floor` (a non-print message never is). The print is read on
63
+ * either case the fold reads (live-trades-merge.util `liveTradeOfPoint`: the raw TRADE `trade`, the TRADE_LARGE
64
+ * `tradeLarge`), so the floor never passes a print the fold would judge. */
60
65
  export function v2LiveTradePrintBelowFloor(data, floor) {
61
66
  if (!(floor > 0))
62
67
  return false;
63
- const amount = Number(data?.trade?.amount);
68
+ const point = data;
69
+ const amount = Number((point?.trade ?? point?.tradeLarge)?.amount);
64
70
  return Number.isFinite(amount) && amount < floor;
65
71
  }
66
72
  /**
@@ -38,6 +38,12 @@ export const KSCRIPT_RESERVED_PROVENANCE_KEYS = new Set([
38
38
  // The saved split beside them (window-geometry.util): a package param of
39
39
  // this name must never size its own window's panes.
40
40
  'wrunWindowSplit',
41
+ // A window's projection stamps (window-cell.util): a package param of these
42
+ // names must never make its overlay project another Indicator, nor turn its
43
+ // window into one that shows its tables alone. The control keeps both by
44
+ // name through every rebuild.
45
+ 'wrunWindowSourceId',
46
+ 'wrunWindowTablesOnly',
41
47
  'isProtectedScript',
42
48
  'codeVisibility',
43
49
  'hasGuide',
@@ -27,7 +27,9 @@ export interface KScriptStandInRow {
27
27
  /** The workspace side the row is saved under (`onchart` or `offchart`): the pane it paints on. */
28
28
  side?: unknown;
29
29
  }
30
- export type KScriptStandInWriteOutcome = 'written' | 'throttled' | 'no-row' | 'no-key' | 'no-candles' | 'no-rows' | 'not-live-edge' | 'not-template' | 'incomplete' | `ineligible:${string}`;
30
+ export type KScriptStandInWriteOutcome = 'written' | 'throttled' | 'no-row' | 'no-key' | 'no-candles' | 'no-rows' | 'not-live-edge' | 'not-template' | 'incomplete'
31
+ /** A whole write stamped older than the one the key already holds or has queued: the newer picture stays. */
32
+ | 'stamp-older' | `ineligible:${string}`;
31
33
  /**
32
34
  * Why a row's wrun identity names no package a stand-in can key, or null (also for a row with no
33
35
  * wrun identity at all): a draft is the author's session-only run, a dev-local run serves bytes no
@@ -3,7 +3,37 @@ export declare const KSCRIPT_PARENT_OUTPUT_RENDER_META_KEYS: readonly ["color",
3
3
  export declare const KSCRIPT_PARENT_OUTPUT_RENDER_SETTING_KEYS: readonly ["fill", "fillGradient", "glow", "lineStyle", "opacity", "showPriceDisplay", "smooth", "width"];
4
4
  export declare const KSCRIPT_PARENT_OUTPUT_RENDER_SETTING_INITIALIZER_DEFAULTS: Partial<Record<(typeof KSCRIPT_PARENT_OUTPUT_RENDER_SETTING_KEYS)[number], unknown>>;
5
5
  export declare const KSCRIPT_NESTED_PARENT_PROMOTION_KEYS: readonly ["activeData", "batched", "data", "extractors", "high", "low", "multiValue", "plot", "plotType", "rawData", "showIndependentYAxis", "startTime", "subsetRange", "color", "colors", "fill", "fillGradient", "forceOnChart", "glow", "lineStyle", "opacity", "series1", "series2", "showPriceDisplay", "smooth", "styleDataOffset", "styleProperties", "width", "widths"];
6
- export declare const KSCRIPT_LIVE_REFRESH_RENDER_META_KEYS: readonly ["activeData", "batched", "color", "colors", "data", "extractors", "fill", "fillGradient", "forceOnChart", "getMultiLineLabels", "glow", "high", "lineStyle", "low", "mainPlotKey", "multiValue", "opacity", "outputKey", "plot", "plotKey", "plotType", "series1", "series2", "showIndependentYAxis", "showPriceDisplay", "smooth", "startTime", "styleDataOffset", "styleProperties", "subsetRange", "type", "width", "widths"];
7
- export declare const KSCRIPT_LIVE_REFRESH_DELETE_IF_ABSENT_KEYS: readonly ["color", "colors", "styleDataOffset", "styleProperties", "widths"];
6
+ /**
7
+ * The live refresh's field contract (contract R, EM-LOOK). A mount writes each plot on two records the engine
8
+ * draws from: its nested meta (the engine's `applyPlotOutputs` copies the run output's fields onto it) and its
9
+ * stored run output (`applyRunResult` keeps the whole result; an hline draws its line from it through
10
+ * `getPlotOutput`). The live lanes patch mounted plots in place and never call that apply
11
+ * (`patchMountedOutputRenderMetadata`), so every field the mount writes is either refreshed (this list: written
12
+ * when the output carries it, deleted when it drops a key of KSCRIPT_LIVE_REFRESH_DELETE_IF_ABSENT_KEYS, and a
13
+ * changed value is a render change, which claims a full repaint; a nested plot's settings by
14
+ * KSCRIPT_LIVE_REFRESH_RUN_SETTINGS_KEYS) or a declaration word a live run cannot move (a settings run remounts),
15
+ * declared static with its reason in the contract spec
16
+ * tests/packages/wrun-chart-host/utility/chart/kscript-titancharts-render-keys.constants.spec.ts, which reads the
17
+ * installed engine's write set and the guide fields the host mounts, and fails on a field that is neither.
18
+ */
19
+ export declare const KSCRIPT_LIVE_REFRESH_RENDER_META_KEYS: readonly ["activeData", "axisLabel", "axisTagLook", "batched", "color", "colors", "data", "extractors", "fill", "fillGradient", "forceOnChart", "getMultiLineLabels", "glow", "high", "label", "lineStyle", "low", "mainPlotKey", "multiValue", "opacity", "outputKey", "plot", "plotKey", "plotType", "series1", "series2", "showIndependentYAxis", "showPriceDisplay", "smooth", "startTime", "styleDataOffset", "styleProperties", "subsetRange", "type", "value", "width", "widths"];
20
+ /**
21
+ * An hline's level and axis tag (a kScript hline, a wrun guide): the engine's apply copies them onto an hline's
22
+ * nested meta only and deletes them from it when the output drops them (its `NESTED_HLINE_META_KEYS`), and the hline
23
+ * draws its line from the same fields on its stored run output. The live refresh owns them on an hline alone, on both
24
+ * records, and never writes them on another plot kind (a text plot's own `label` is not a level).
25
+ */
26
+ export declare const KSCRIPT_LIVE_REFRESH_HLINE_META_KEYS: readonly ["axisLabel", "axisTagLook", "label", "value"];
27
+ export declare const KSCRIPT_LIVE_REFRESH_DELETE_IF_ABSENT_KEYS: readonly ["axisLabel", "axisTagLook", "color", "colors", "label", "styleDataOffset", "styleProperties", "value", "widths"];
28
+ /**
29
+ * The nested plot settings the engine's apply rebuilds from a run output that a live run can move (its
30
+ * `applyPlotOutputs` settings literal; the engine's renderers read a nested plot's style there, never at the top
31
+ * level): the palette (a slot palette's rows index it, so it only grows and is never synced), the width (a width
32
+ * binding) and the marker size it feeds, the value tag (a tag binding), the fill flag (a band's zero-baseline rule)
33
+ * and the fill gradient. The live refresh writes them on a nested plot as the engine would and keeps every other
34
+ * settings key as mounted (the Style page's stamps, the host's price markers). The settings the engine rebuilds from
35
+ * declaration words are static; the contract spec lists each with its reason.
36
+ */
37
+ export declare const KSCRIPT_LIVE_REFRESH_RUN_SETTINGS_KEYS: readonly ["colors", "fillGradient", "fillMode", "markerSize", "showPriceDisplay", "width"];
8
38
  export declare const KSCRIPT_LIVE_REFRESH_RENDER_CONTRACT_SCALAR_KEYS: readonly ["styleDataOffset"];
9
39
  export declare const KSCRIPT_LIVE_REFRESH_RENDER_CONTRACT_ARRAY_KEYS: readonly ["color", "colors", "styleProperties"];