@orangecharts/wrun-chart-host 0.14.0 → 0.16.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 (197) hide show
  1. package/README.md +1 -0
  2. package/dist/constants/economic.constants.d.ts +2 -0
  3. package/dist/constants/economic.constants.js +2 -0
  4. package/dist/constants/feature-flags.constants.d.ts +11 -0
  5. package/dist/constants/feature-flags.constants.js +56 -4
  6. package/dist/constants/feature-limits.constants.d.ts +72 -4
  7. package/dist/constants/feature-limits.constants.js +98 -20
  8. package/dist/constants/interval.constants.js +5 -0
  9. package/dist/constants/kscript-data-interval-restrictions.constants.d.ts +12 -0
  10. package/dist/constants/kscript-data-interval-restrictions.constants.js +14 -0
  11. package/dist/constants/typed-width-fold.leaf.d.ts +50 -0
  12. package/dist/constants/typed-width-fold.leaf.js +99 -0
  13. package/dist/constants/typed-width-source.leaf.d.ts +24 -0
  14. package/dist/constants/typed-width-source.leaf.js +126 -0
  15. package/dist/constants/typed-width.leaf.d.ts +57 -0
  16. package/dist/constants/typed-width.leaf.js +78 -0
  17. package/dist/host-env.d.ts +24 -0
  18. package/dist/host-env.js +22 -0
  19. package/dist/host-ports.types.d.ts +11 -0
  20. package/dist/index.d.ts +4 -0
  21. package/dist/index.js +4 -0
  22. package/dist/interfaces/kscript-diagnostics.interface.d.ts +28 -0
  23. package/dist/interfaces/wrun-runtime.interface.d.ts +107 -4
  24. package/dist/interfaces/wrun-runtime.interface.js +11 -0
  25. package/dist/kscript-data/controls/live-trades-merge.util.d.ts +13 -0
  26. package/dist/kscript-data/controls/live-trades-merge.util.js +16 -1
  27. package/dist/market-data/billing.interface.d.ts +12 -45
  28. package/dist/market-data/billing.interface.js +2 -2
  29. package/dist/market-data/venues/index.d.ts +2 -2
  30. package/dist/market-data/venues/opra.js +3 -3
  31. package/dist/market-data/venues/stocks.contract.copy.json +3 -2
  32. package/dist/market-data/venues/stocks.d.ts +2 -2
  33. package/dist/market-data/venues/stocks.js +10 -9
  34. package/dist/replay/replayLadder.js +7 -4
  35. package/dist/settings-templates/footprint-rows.d.ts +6 -0
  36. package/dist/settings-templates/footprint-rows.js +6 -0
  37. package/dist/settings-templates/frvp-fields.js +14 -0
  38. package/dist/settings-templates/indicator-fields.js +46 -0
  39. package/dist/settings-templates/tool-tables.generated.js +19 -1
  40. package/dist/utility/chart/__fixtures__/live-bucket-regular-golden.json +1706 -0
  41. package/dist/utility/chart/cache-alignment.util.d.ts +65 -0
  42. package/dist/utility/chart/cache-alignment.util.js +124 -24
  43. package/dist/utility/chart/calendar-interval.util.d.ts +83 -1
  44. package/dist/utility/chart/calendar-interval.util.js +152 -4
  45. package/dist/utility/chart/candle-bar-end.util.d.ts +11 -4
  46. package/dist/utility/chart/candle-bar-end.util.js +17 -6
  47. package/dist/utility/chart/chart-time-domain.util.d.ts +3 -0
  48. package/dist/utility/chart/chart-time-domain.util.js +13 -4
  49. package/dist/utility/chart/feed-interval.util.d.ts +4 -2
  50. package/dist/utility/chart/feed-interval.util.js +5 -2
  51. package/dist/utility/chart/fetch-dedupe-policy.util.d.ts +3 -1
  52. package/dist/utility/chart/fetch-dedupe-policy.util.js +19 -1
  53. package/dist/utility/chart/footprint-band.util.d.ts +21 -5
  54. package/dist/utility/chart/footprint-band.util.js +53 -14
  55. package/dist/utility/chart/footprint-display-mode.util.d.ts +2 -0
  56. package/dist/utility/chart/footprint-display-mode.util.js +5 -0
  57. package/dist/utility/chart/governed-lanes-gate.util.d.ts +46 -0
  58. package/dist/utility/chart/governed-lanes-gate.util.js +71 -0
  59. package/dist/utility/chart/governed-lanes-reader-seat.d.ts +14 -0
  60. package/dist/utility/chart/governed-lanes-reader-seat.js +14 -0
  61. package/dist/utility/chart/history-wall.util.d.ts +13 -2
  62. package/dist/utility/chart/history-wall.util.js +11 -4
  63. package/dist/utility/chart/interval-ladder.util.d.ts +5 -2
  64. package/dist/utility/chart/interval-ladder.util.js +44 -4
  65. package/dist/utility/chart/interval-registry.util.d.ts +22 -1
  66. package/dist/utility/chart/interval-registry.util.js +50 -2
  67. package/dist/utility/chart/kscript-data-interval-restriction.leaf.d.ts +32 -4
  68. package/dist/utility/chart/kscript-data-interval-restriction.leaf.js +22 -5
  69. package/dist/utility/chart/kscript-drawing-safe-area.util.d.ts +10 -0
  70. package/dist/utility/chart/kscript-drawing-safe-area.util.js +30 -3
  71. package/dist/utility/chart/kscript-legend-entries.util.d.ts +21 -4
  72. package/dist/utility/chart/kscript-legend-entries.util.js +27 -5
  73. package/dist/utility/chart/kscript-main-grid-stages.util.js +74 -24
  74. package/dist/utility/chart/kscript-row-name.leaf.d.ts +13 -0
  75. package/dist/utility/chart/kscript-row-name.leaf.js +18 -0
  76. package/dist/utility/chart/kscript-venue-policy.util.d.ts +61 -26
  77. package/dist/utility/chart/kscript-venue-policy.util.js +138 -37
  78. package/dist/utility/chart/live-bucket.util.d.ts +29 -4
  79. package/dist/utility/chart/live-bucket.util.js +45 -12
  80. package/dist/utility/chart/market-session.util.d.ts +62 -10
  81. package/dist/utility/chart/market-session.util.js +93 -13
  82. package/dist/utility/chart/marketKind.util.d.ts +1 -7
  83. package/dist/utility/chart/marketKind.util.js +6 -8
  84. package/dist/utility/chart/mixed-mode.util.d.ts +17 -0
  85. package/dist/utility/chart/om-target.util.js +6 -4
  86. package/dist/utility/chart/price-precision.util.d.ts +20 -6
  87. package/dist/utility/chart/price-precision.util.js +34 -7
  88. package/dist/utility/chart/profile-frame-window.util.d.ts +15 -0
  89. package/dist/utility/chart/profile-frame-window.util.js +12 -0
  90. package/dist/utility/chart/rth-session.util.d.ts +3 -1
  91. package/dist/utility/chart/rth-session.util.js +3 -1
  92. package/dist/utility/chart/script-source-session.util.d.ts +43 -0
  93. package/dist/utility/chart/script-source-session.util.js +61 -0
  94. package/dist/utility/chart/typed-width-grid.util.d.ts +23 -0
  95. package/dist/utility/chart/typed-width-grid.util.js +203 -0
  96. package/dist/utility/chart/wrun-run-result.util.d.ts +9 -1
  97. package/dist/utility/chart/wrun-run-result.util.js +8 -2
  98. package/dist/utility/common/transformations.util.d.ts +6 -0
  99. package/dist/utility/common/transformations.util.js +28 -4
  100. package/dist/utility/number-format.util.d.ts +14 -1
  101. package/dist/utility/number-format.util.js +22 -4
  102. package/dist/utility/scriptEditor/wrun-runtime-diagnostics.leaf.d.ts +24 -1
  103. package/dist/utility/scriptEditor/wrun-runtime-diagnostics.leaf.js +113 -0
  104. package/dist/utility/v2/v2-enums.leaf.js +3 -0
  105. package/dist/utility/wrun/wrun-batched-marks.util.d.ts +15 -5
  106. package/dist/utility/wrun/wrun-batched-marks.util.js +70 -20
  107. package/dist/utility/wrun/wrun-canvases.util.d.ts +28 -9
  108. package/dist/utility/wrun/wrun-canvases.util.js +99 -39
  109. package/dist/utility/wrun/wrun-cap-notice.util.d.ts +5 -0
  110. package/dist/utility/wrun/wrun-cap-notice.util.js +23 -0
  111. package/dist/utility/wrun/wrun-card-style.util.d.ts +1 -1
  112. package/dist/utility/wrun/wrun-card-style.util.js +2 -2
  113. package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +8 -0
  114. package/dist/utility/wrun/wrun-chart-market-facts.util.js +13 -1
  115. package/dist/utility/wrun/wrun-child-overlay-id.util.d.ts +10 -0
  116. package/dist/utility/wrun/wrun-child-overlay-id.util.js +24 -0
  117. package/dist/utility/wrun/wrun-cloud-cme-stamp.util.d.ts +72 -0
  118. package/dist/utility/wrun/wrun-cloud-cme-stamp.util.js +151 -0
  119. package/dist/utility/wrun/wrun-color-facts.util.d.ts +3 -3
  120. package/dist/utility/wrun/wrun-color-facts.util.js +8 -5
  121. package/dist/utility/wrun/wrun-colour-tone.lazy.d.ts +20 -0
  122. package/dist/utility/wrun/wrun-colour-tone.lazy.js +23 -0
  123. package/dist/utility/wrun/wrun-colour-tone.util.d.ts +14 -0
  124. package/dist/utility/wrun/wrun-colour-tone.util.js +119 -0
  125. package/dist/utility/wrun/wrun-dark-pool.util.d.ts +3 -2
  126. package/dist/utility/wrun/wrun-dark-pool.util.js +5 -4
  127. package/dist/utility/wrun/wrun-frames.d.ts +1 -1
  128. package/dist/utility/wrun/wrun-frames.js +2 -2
  129. package/dist/utility/wrun/wrun-handles.util.d.ts +1 -1
  130. package/dist/utility/wrun/wrun-handles.util.js +1 -1
  131. package/dist/utility/wrun/wrun-host.service.d.ts +32 -2
  132. package/dist/utility/wrun/wrun-host.service.js +44 -2
  133. package/dist/utility/wrun/wrun-hosted-wire-caps.d.ts +20 -0
  134. package/dist/utility/wrun/wrun-hosted-wire-caps.js +85 -2
  135. package/dist/utility/wrun/wrun-hosted-wire.util.d.ts +37 -0
  136. package/dist/utility/wrun/wrun-hosted-wire.util.js +54 -0
  137. package/dist/utility/wrun/wrun-hover.util.d.ts +8 -2
  138. package/dist/utility/wrun/wrun-hover.util.js +24 -13
  139. package/dist/utility/wrun/wrun-hud-looks.util.d.ts +1 -0
  140. package/dist/utility/wrun/wrun-hud-looks.util.js +6 -11
  141. package/dist/utility/wrun/wrun-integration-route.util.d.ts +24 -0
  142. package/dist/utility/wrun/wrun-integration-route.util.js +19 -0
  143. package/dist/utility/wrun/wrun-live-intake.util.js +17 -1
  144. package/dist/utility/wrun/wrun-live-patch.util.d.ts +6 -1
  145. package/dist/utility/wrun/wrun-live-patch.util.js +10 -4
  146. package/dist/utility/wrun/wrun-live-tick.util.js +81 -19
  147. package/dist/utility/wrun/wrun-output-words.util.d.ts +14 -0
  148. package/dist/utility/wrun/wrun-output-words.util.js +51 -0
  149. package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +41 -0
  150. package/dist/utility/wrun/wrun-overlay-drivers.util.js +35 -0
  151. package/dist/utility/wrun/wrun-overlay-result.util.d.ts +6 -1
  152. package/dist/utility/wrun/wrun-overlay-result.util.js +2 -0
  153. package/dist/utility/wrun/wrun-overlay-run.util.d.ts +23 -2
  154. package/dist/utility/wrun/wrun-overlay-run.util.js +305 -51
  155. package/dist/utility/wrun/wrun-panel-mount.util.d.ts +10 -2
  156. package/dist/utility/wrun/wrun-panel-mount.util.js +144 -18
  157. package/dist/utility/wrun/wrun-pin-venues.util.js +5 -1
  158. package/dist/utility/wrun/wrun-refusal.util.d.ts +4 -0
  159. package/dist/utility/wrun/wrun-refusal.util.js +102 -13
  160. package/dist/utility/wrun/wrun-registry-errors.util.d.ts +5 -3
  161. package/dist/utility/wrun/wrun-registry-errors.util.js +5 -3
  162. package/dist/utility/wrun/wrun-row-source-factory.js +17 -1
  163. package/dist/utility/wrun/wrun-row-source.d.ts +8 -1
  164. package/dist/utility/wrun/wrun-run-health.util.d.ts +6 -3
  165. package/dist/utility/wrun/wrun-run-health.util.js +5 -2
  166. package/dist/utility/wrun/wrun-sandbox-row-source.d.ts +1 -1
  167. package/dist/utility/wrun/wrun-sandbox-row-source.js +9 -0
  168. package/dist/utility/wrun/wrun-script-inputs.util.d.ts +25 -8
  169. package/dist/utility/wrun/wrun-script-inputs.util.js +145 -45
  170. package/dist/utility/wrun/wrun-setting-words.util.d.ts +12 -5
  171. package/dist/utility/wrun/wrun-setting-words.util.js +25 -8
  172. package/dist/utility/wrun/wrun-socket-row-source.d.ts +26 -1
  173. package/dist/utility/wrun/wrun-socket-row-source.js +125 -12
  174. package/dist/utility/wrun/wrun-source-rows.util.d.ts +3 -3
  175. package/dist/utility/wrun/wrun-source-rows.util.js +8 -7
  176. package/dist/utility/wrun/wrun-style-names.util.d.ts +23 -0
  177. package/dist/utility/wrun/wrun-style-names.util.js +74 -0
  178. package/dist/utility/wrun/wrun-style-words.util.d.ts +31 -9
  179. package/dist/utility/wrun/wrun-style-words.util.js +46 -15
  180. package/dist/utility/wrun/wrun-trades-lane.util.js +2 -1
  181. package/dist/utility/wrun/wrun-trap-replay.util.d.ts +42 -0
  182. package/dist/utility/wrun/wrun-trap-replay.util.js +63 -0
  183. package/dist/utility/wrun/wrun-volume-profile.util.js +6 -5
  184. package/dist/utility/wrun-display-name.util.d.ts +10 -0
  185. package/dist/utility/wrun-display-name.util.js +21 -0
  186. package/dist/utils/replay/replay-buffer-math.d.ts +2 -0
  187. package/dist/utils/replay/replay-buffer-math.js +2 -0
  188. package/dist/workers/constants/socket-slots.d.ts +1 -1
  189. package/dist/workers/utils/time.worker.util.js +2 -2
  190. package/dist/workers/utils/volume-profile.worker.util.d.ts +9 -0
  191. package/dist/workers/utils/volume-profile.worker.util.js +20 -0
  192. package/dist/workers/wrun/wrun-abi-host.d.ts +3 -0
  193. package/dist/workers/wrun/wrun-abi-host.js +82 -5
  194. package/dist/workers/wrun/wrun-engine-handler.js +53 -4
  195. package/dist/workers/wrun/wrun-trap-frames.leaf.d.ts +28 -0
  196. package/dist/workers/wrun/wrun-trap-frames.leaf.js +108 -0
  197. package/package.json +11 -11
@@ -199,7 +199,17 @@ export interface WrunLiveEndRequest {
199
199
  }
200
200
  /** Everything the sandbox worker accepts. A bare WrunPackedRunRequest (no
201
201
  * `kind`) stays the classic one-shot run. */
202
- export type WrunWorkerRequest = WrunPackedRunRequest | WrunLiveStartRequest | WrunLiveRowsRequest | WrunLiveEndRequest | WrunModuleLoadRequest;
202
+ /** The editor's trap replay (a private host's worker only): one whole run of a TRACE build (unoptimised, with names
203
+ * and a source map), never a release module. It carries the trace bytes and their own sha256 (checked before
204
+ * anything compiles); the handler prepares them as it prepares a release module, never reads its module cache, a
205
+ * live session or a sheet pin, and answers a failure's trap record with the call frames (`trap.frames`, offsets in
206
+ * the trace build's own bytes). */
207
+ export interface WrunTraceRunRequest extends Omit<WrunPackedRunRequest, 'moduleKey' | 'moduleBytes'> {
208
+ kind: 'trace-run';
209
+ traceBytes: Uint8Array;
210
+ traceSha256: string;
211
+ }
212
+ export type WrunWorkerRequest = WrunPackedRunRequest | WrunLiveStartRequest | WrunLiveRowsRequest | WrunLiveEndRequest | WrunModuleLoadRequest | WrunTraceRunRequest;
203
213
  interface WrunPackedRunStrings {
204
214
  lens: Int32Array;
205
215
  offsets: Int32Array;
@@ -246,7 +256,54 @@ export type WrunWorkerResponse = {
246
256
  code?: 'live-order' | 'module-pin-mismatch' | 'module-compile-failed';
247
257
  /** `module-pin-mismatch` only: the hex sha256 the bytes hash to. */
248
258
  sha256?: string;
259
+ /** A guest trap or a host failure inside a guest call: where it happened (the ABI host's record,
260
+ * `wrunTrapOf`). `error` keeps the host's words unchanged beside it. */
261
+ trap?: WrunTrapContext;
249
262
  };
263
+ /** How the guest stopped: `abort` (env.abort: a throw, a std-lib check, the author's abort()), `native` (the engine
264
+ * trapped: `unreachable`, a bad memory access, a divide by zero) or `host` (a host import or a host check after a
265
+ * guest call refused). */
266
+ export type WrunTrapKind = 'abort' | 'native' | 'host';
267
+ /** The guest call that was running: `start` (the module's start section, during instantiation), `init`, `state`,
268
+ * `finalize`, or `row-check` (the host's checks after a row's guest call: memory, declared outputs). */
269
+ export type WrunTrapPhase = 'start' | 'init' | 'state' | 'finalize' | 'row-check';
270
+ /** One wasm call frame as an engine prints it; each field only when the engine printed it. */
271
+ export interface WrunTrapFrame {
272
+ index?: number;
273
+ name?: string;
274
+ offset?: number;
275
+ }
276
+ /** What the ABI host knew when a guest call failed, captured at the guest-call boundary before any text is
277
+ * formatted. A plain object: it crosses the worker boundary as is. */
278
+ export interface WrunTrapContext {
279
+ kind: WrunTrapKind;
280
+ phase: WrunTrapPhase;
281
+ /** The row being evaluated (0-based index in the run, epoch-ms timestamp); absent before bar processing starts. */
282
+ bar?: {
283
+ index: number;
284
+ ts: number;
285
+ };
286
+ /** env.abort's arguments as the guest passed them (null when the guest passed none; 0 for no position). */
287
+ abort?: {
288
+ message: string | null;
289
+ path: string | null;
290
+ line: number;
291
+ column: number;
292
+ };
293
+ /** `native` only: the engine's own words for the trap (`unreachable`, `memory access out of bounds`). */
294
+ native?: {
295
+ message: string;
296
+ };
297
+ /** The call frames at the trap, innermost first (the trace replay's: `wrun-trap-frames.leaf`), each with what the
298
+ * engine printed: the function index, its name, the byte offset in the trace build's own bytes. Absent on a
299
+ * release run. */
300
+ frames?: ReadonlyArray<WrunTrapFrame>;
301
+ }
302
+ /** The trap record rides beside the Error it explains (like `attachWrunLive`), so the Error's message stays the
303
+ * host's words every other reader matches on. Kept with the wire types so the worker and the main thread share one
304
+ * registry. */
305
+ export declare function attachWrunTrap(error: unknown, trap: WrunTrapContext): void;
306
+ export declare function wrunTrapOf(error: unknown): WrunTrapContext | undefined;
250
307
  /** One unpacked result row: `outputs` is null on a non-ready row; `strings`
251
308
  * entries are undefined for ABSENT slots and '' for present-empty writes. */
252
309
  export interface WrunOutputRow {
@@ -2541,7 +2598,8 @@ interface WrunBatchedSectionCommon {
2541
2598
  * number format, a word of WRUN_BATCHED_NUMBER_FORMATS (wrun-batched-readout.util:
2542
2599
  * `{{qty:units}}` prints a mark's quantity in the market's own unit, `{{qty:usd}}` in dollars). */
2543
2600
  tooltip?: string | null;
2544
- /** The readout title, 1..40 chars (absent = the name read as words). */
2601
+ /** The readout title and the Style line's, 1..40 chars, where the sheet's `style_names` table gives the section no
2602
+ * label (absent = the name read as words; wrun-style-names.util wrunStyleTitle). */
2545
2603
  label?: string;
2546
2604
  panel?: 'overlay';
2547
2605
  }
@@ -2563,7 +2621,8 @@ export interface WrunMarkSize {
2563
2621
  * (round-2 fold 1); the chart derives the pixels exactly as Big Trades 0.3.2 did. */
2564
2622
  export interface WrunMarksSection extends WrunBatchedSectionCommon {
2565
2623
  stride: 3;
2566
- /** 0 Bubble, 1 Soft dot, 2 Ring, 3 Square, 4 Diamond (hollow, a 1 px edge; the word `diamond`) (default 0). */
2624
+ /** 0 Bubble, 1 Soft dot, 2 Ring, 3 Square, 4 Diamond (hollow, a 1 px edge; the word `diamond`), 5 Glass, 6 Solid
2625
+ * (the words `glass`, `solid`: the Big Trades looks round) (default 0). */
2567
2626
  look?: number;
2568
2627
  size?: WrunMarkSize;
2569
2628
  /** 0 Candle center, 1 Trade time (the record's `offset_ms` inside the bar). */
@@ -2574,12 +2633,14 @@ export interface WrunMarksSection extends WrunBatchedSectionCommon {
2574
2633
  opacity_pct?: number;
2575
2634
  /** The caption: mode 0 Off, 1 Big bubbles (the largest a bar), 2 All (default 1, `compact`, 22 px); its
2576
2635
  * format a word of WRUN_BATCHED_NUMBER_FORMATS (`usd` dollars, `units` the market's own unit: Big Trades
2577
- * 0.7.0's Size shown as paints one of the two). */
2636
+ * 0.7.0's Size shown as paints one of the two); its place 0 `inside` the mark (default) or 1 `beside` it (the Big
2637
+ * Trades looks round). */
2578
2638
  text?: {
2579
2639
  mode?: number;
2580
2640
  field?: 'qty';
2581
2641
  format?: WrunBatchedNumberFormat;
2582
2642
  min_px?: number;
2643
+ place?: number | 'inside' | 'beside';
2583
2644
  };
2584
2645
  }
2585
2646
  /** One `spans[]` entry (`plot.spans`): per bar, `slots` records of `[top, bottom, length, meta]`
@@ -2647,6 +2708,42 @@ export interface WrunFlagsSection extends WrunBatchedSectionCommon {
2647
2708
  colors?: WrunBatchedColor[];
2648
2709
  }
2649
2710
  export type WrunBatchedSection = WrunMarksSection | WrunSpansSection | WrunRaysSection | WrunFlagsSection;
2711
+ /** The kinds of the sheet's `style_names` table whose entry titles a Style line: the four batched kinds, and a
2712
+ * renderer (any kind). */
2713
+ export type WrunStyleNameTitledKind = WrunBatchedMarksKind | 'renderer';
2714
+ /** The kinds of the table whose entry names colours only: an output and a heatmap keep their title in their own
2715
+ * `label` (one source per title), so the table names their swatches and never their line. */
2716
+ export type WrunStyleNameColorsKind = 'output' | 'heatmap';
2717
+ /** The drawn kinds the sheet's `style_names` table names. */
2718
+ export type WrunStyleNameKind = WrunStyleNameTitledKind | WrunStyleNameColorsKind;
2719
+ interface WrunStyleNameCommon {
2720
+ /** The section's, renderer's, output's or heatmap's own `name`. */
2721
+ name: string;
2722
+ /** One name per colour slot, in slot order, as long as that target's colour list (an output's: its two-tone pair or
2723
+ * its `color_by` ladder, one per rung; a heatmap's: its `palette`; a renderer's: its `colors`, the `color_by`
2724
+ * ladder): each names its swatch. Slots that share a name are one swatch that paints all of them. */
2725
+ colors?: string[];
2726
+ }
2727
+ /** A batched section's or a renderer's entry: the words its Style line is titled by, and its swatches' names. */
2728
+ export interface WrunStyleNameTitled extends WrunStyleNameCommon {
2729
+ kind: WrunStyleNameTitledKind;
2730
+ /** The words its Style line is titled by (absent: the section's own `label`, else its name read as words). */
2731
+ label?: string;
2732
+ }
2733
+ /** An output's or a heatmap's entry: its swatches' names alone (its title is its own `label`; a `label` here is read
2734
+ * as none). */
2735
+ export interface WrunStyleNameColors extends WrunStyleNameCommon {
2736
+ kind: WrunStyleNameColorsKind;
2737
+ label?: never;
2738
+ }
2739
+ /**
2740
+ * One entry of the sheet's `style_names` table (STYLE-PAGE-NAMES, frozen sheet contract, kit scaffold 118): the plain
2741
+ * words the settings box shows for one batched section, renderer, output or heatmap, named by its kind and `name`.
2742
+ * The table is a top-level key, never a section key, so a reader older than it strips it and the sections stay as
2743
+ * every kit wrote them (the sheet lists it in `ignorable` for the hosted extractor). wrun-style-names.util is its one
2744
+ * reader.
2745
+ */
2746
+ export type WrunStyleName = WrunStyleNameTitled | WrunStyleNameColors;
2650
2747
  export interface WrunIndicatorMetadata {
2651
2748
  id: string;
2652
2749
  name: string;
@@ -2811,6 +2908,12 @@ export interface WrunIndicatorMetadata {
2811
2908
  /** The dialog layout in source order (absent = today's `group` tabs). */
2812
2909
  layout?: WrunLayoutEntry[];
2813
2910
  presets?: WrunPreset[];
2911
+ /** The Style page's plain names for batched sections, renderers, outputs and heatmaps (WrunStyleName; absent = the
2912
+ * page titles each line by the section's own label or its name, and each swatch by what it paints or its place). */
2913
+ style_names?: WrunStyleName[];
2914
+ /** The word paths a reader older than them may skip (`inputs[].capacity`, `style_names`): the hosted extractor's
2915
+ * list, which the kit validates. The chart does not read it. */
2916
+ ignorable?: string[];
2814
2917
  /** The legend title template ({{name}} placeholders). */
2815
2918
  legend_title?: string;
2816
2919
  /** `render.legend` / `render.hud` declarations (never renderer kinds:
@@ -55,6 +55,17 @@ export class WrunLiveOrderError extends Error {
55
55
  this.name = 'WrunLiveOrderError';
56
56
  }
57
57
  }
58
+ const trapContextByError = new WeakMap();
59
+ /** The trap record rides beside the Error it explains (like `attachWrunLive`), so the Error's message stays the
60
+ * host's words every other reader matches on. Kept with the wire types so the worker and the main thread share one
61
+ * registry. */
62
+ export function attachWrunTrap(error, trap) {
63
+ if (typeof error === 'object' && error !== null)
64
+ trapContextByError.set(error, trap);
65
+ }
66
+ export function wrunTrapOf(error) {
67
+ return typeof error === 'object' && error !== null ? trapContextByError.get(error) : undefined;
68
+ }
58
69
  const liveBlockStatsByRows = new WeakMap();
59
70
  /** The live block's restore/snapshot accounting rides beside the rows it
60
71
  * belongs to (like the handle set and the strategy output), keeping each
@@ -82,6 +82,8 @@ export interface LiveTradesMergeOptions extends TradesTapeFloor {
82
82
  }
83
83
  /** One live print as the fold reads it: a raw TRADE fill, or a TRADE_LARGE row (one order). */
84
84
  export interface LiveTradePrint {
85
+ /** The stamp in ms exact to the microsecond (`tradeStampMs`, never rounded to the ms): one order's fills share it,
86
+ * and the history worker keys the same print on the same value (`TradeColumns.tsExact`). */
85
87
  tsMs: number;
86
88
  price: number;
87
89
  size: number;
@@ -166,6 +168,17 @@ export declare function tradesServedStartMs(nowMs: number, historySec: number, i
166
168
  exchange?: unknown;
167
169
  historyAsOfMs?: unknown;
168
170
  }): number;
171
+ /** The precision every tape stamp is keyed at, in ns: the gateway stores a trade's stamp in microseconds (a served
172
+ * row's nanoseconds always end in three zeros), while a live CME frame carries Databento's nanoseconds. */
173
+ export declare const TAPE_STAMP_PRECISION_NS = 1000;
174
+ /**
175
+ * A trade's stamp in ms as every tape reader keys it: exact to the microsecond, the stored precision. The fills of one
176
+ * aggressor order share it and no other order does (the gateway's `minAmountPerOrder` key), so the package joins an
177
+ * order on it alone; rounded to the millisecond, orders 0.5 ms apart read as one (Discord ticket #683). Floored to the
178
+ * microsecond, a live print and its served row land on the SAME double, so the reconcile matches them by offset; kept
179
+ * to the nanosecond, the live copy of an order would sit beside its history row and draw twice.
180
+ */
181
+ export declare function tradeStampMs(seconds: number, nanos: number): number;
169
182
  /** Null for a point the fold rejects, another channel's included; without `large`, either channel (stamp readers). */
170
183
  export declare function readLiveTradePrint(newPoint: unknown, large?: boolean): LiveTradePrint | null;
171
184
  /** Whether a quote asset's amounts are US dollars (`TRADES_LARGE_USD_QUOTES`). */
@@ -184,6 +184,20 @@ export function tradesServedStartMs(nowMs, historySec, intervalMs, options = {})
184
184
  ? Number.NEGATIVE_INFINITY
185
185
  : tradesBarLimitStartMs(options.windowEndMs ?? nowMs, options.barLimitSec, intervalMs, options.exchange));
186
186
  }
187
+ /** The precision every tape stamp is keyed at, in ns: the gateway stores a trade's stamp in microseconds (a served
188
+ * row's nanoseconds always end in three zeros), while a live CME frame carries Databento's nanoseconds. */
189
+ export const TAPE_STAMP_PRECISION_NS = 1_000;
190
+ /**
191
+ * A trade's stamp in ms as every tape reader keys it: exact to the microsecond, the stored precision. The fills of one
192
+ * aggressor order share it and no other order does (the gateway's `minAmountPerOrder` key), so the package joins an
193
+ * order on it alone; rounded to the millisecond, orders 0.5 ms apart read as one (Discord ticket #683). Floored to the
194
+ * microsecond, a live print and its served row land on the SAME double, so the reconcile matches them by offset; kept
195
+ * to the nanosecond, the live copy of an order would sit beside its history row and draw twice.
196
+ */
197
+ export function tradeStampMs(seconds, nanos) {
198
+ const micros = Number.isFinite(nanos) ? Math.floor(nanos / TAPE_STAMP_PRECISION_NS) : 0;
199
+ return seconds * 1000 + micros / 1000;
200
+ }
187
201
  /** Null for a point the fold rejects, another channel's included; without `large`, either channel (stamp readers). */
188
202
  export function readLiveTradePrint(newPoint, large) {
189
203
  if (!newPoint || typeof newPoint !== 'object')
@@ -198,7 +212,8 @@ export function readLiveTradePrint(newPoint, large) {
198
212
  return null;
199
213
  }
200
214
  const nanos = Number(trade?.timestamp?.nanoseconds ?? trade?.timestamp?.nanos ?? 0);
201
- const tsMs = seconds * 1000 + (Number.isFinite(nanos) ? Math.round(nanos / 1e6) : 0);
215
+ // The order key at the stored precision (tradeStampMs): the history worker keys the same print on the same value.
216
+ const tsMs = tradeStampMs(seconds, nanos);
202
217
  if (!Number.isFinite(tsMs))
203
218
  return null;
204
219
  const exchange = point.series?.exchange;
@@ -94,39 +94,15 @@ export interface MarketDataChangePlanDto {
94
94
  }
95
95
  /**
96
96
  * POST <basePath>/checkout -> 200: a Stripe redirect, or a refusal. 'professional_unavailable' is terminal (the UI
97
- * shows "not available"). 'review_held' and 'review_withdrawn': a review of the account's answers only an operator
98
- * resolves, or one that withdrew real-time (the review card says which). Pay first, the server no longer answers
99
- * 'attestation_required' or 'agreement_required'; they stay in the union and are handled defensively (the flow routes
100
- * into that step).
97
+ * shows "not available"). Pay first, the server no longer answers 'attestation_required' or 'agreement_required'; they
98
+ * stay in the union and are handled defensively (the flow routes into that step).
101
99
  */
102
100
  export type MarketDataCheckoutResponseDto = {
103
101
  url: string;
104
102
  } | {
105
103
  refused: MarketDataPurchaseRefusalCode;
106
104
  };
107
- export type MarketDataPurchaseRefusalCode = 'professional_unavailable' | 'review_held' | 'review_withdrawn' | 'agreement_required' | 'attestation_required';
108
- /**
109
- * GET <basePath>/subscription `review`: the review of the account's answers that bears on real-time (Exhibit A Q19.2),
110
- * or null. 'pending': an employer or occupation that suggests a financial firm or a registered person asks the
111
- * subscriber to confirm the declaration before `deadline` (POST <basePath>/attestation/review/confirm); real-time runs
112
- * until the deadline passes. 'held': an operator reviews the declaration and real-time waits. 'withdrawn': an operator
113
- * withdrew real-time (`resolvedAt`); the way back is a new declaration.
114
- */
115
- export interface MarketDataReviewDto {
116
- state: 'pending' | 'held' | 'withdrawn';
117
- reason: string;
118
- openedAt: string;
119
- deadline: string | null;
120
- resolvedAt: string | null;
121
- }
122
- /**
123
- * POST <basePath>/attestation/review/confirm (no body) -> 200: the pending review confirmed; 409
124
- * `<VENUE>_REVIEW_NOT_OPEN` when no review is pending (none, or one only an operator resolves).
125
- */
126
- export interface MarketDataReviewConfirmDto {
127
- confirmed: boolean;
128
- confirmedAt: string;
129
- }
105
+ export type MarketDataPurchaseRefusalCode = 'professional_unavailable' | 'agreement_required' | 'attestation_required';
130
106
  /**
131
107
  * Why the server set a subscription to end at its period end on its own: 'unqualified', the account is paid but has
132
108
  * not completed the subscriber questions and the agreement.
@@ -180,8 +156,6 @@ export interface MarketDataOperatorGrantDto {
180
156
  }
181
157
  export interface GetMarketDataSubscriptionResponseDto {
182
158
  subscription: MarketDataSubscriptionDto | null;
183
- /** Additive (a server from before the review answers none). */
184
- review?: MarketDataReviewDto | null;
185
159
  /** Additive (a server from before operator grants on the answer answers none). */
186
160
  grant?: MarketDataOperatorGrantDto | null;
187
161
  }
@@ -316,14 +290,11 @@ export interface MarketDataCancelResponseDto {
316
290
  }
317
291
  export type MarketDataAttestation = MarketDataAttestationRecordDto;
318
292
  export type MarketDataSubscription = MarketDataSubscriptionDto;
319
- /** The review of the account's answers, as served (`MarketDataReviewDto`). */
320
- export type MarketDataReview = MarketDataReviewDto;
321
293
  /** The operator's grant as the store holds it: no subscription, its steps release the grant at the gate. */
322
294
  export type MarketDataOperatorGrant = MarketDataOperatorGrantDto;
323
- /** GET <basePath>/subscription in the domain: the subscription, the review and the operator's grant, each or none. */
295
+ /** GET <basePath>/subscription in the domain: the subscription and the operator's grant, each or none. */
324
296
  export interface MarketDataSubscriptionAnswer {
325
297
  subscription: MarketDataSubscription | null;
326
- review: MarketDataReview | null;
327
298
  grant: MarketDataOperatorGrant | null;
328
299
  }
329
300
  /** The explicit agreement record: accepted, for which version, and when. */
@@ -365,8 +336,8 @@ export declare function isMarketDataListedAgreementCurrent(current: Pick<MarketD
365
336
  * A declaration on the venue's current form (a new question set means a new declaration) whose validity has not ended
366
337
  * at `now`, either classification. The client owns expiry: `now` is the caller's clock (the store's last evaluation),
367
338
  * never an implied Date.now(). A record without `expiresAt` reads lapsed, as does one whose `expiresAt` does not parse
368
- * (ask again rather than trust it): status is reconfirmed every 12 months (Exhibit A Q19.3), and a record that names
369
- * no end can never be shown to be inside its year.
339
+ * (ask again rather than trust it): status is reconfirmed every 12 months, and a record that names no end can never be
340
+ * shown to be inside its year.
370
341
  */
371
342
  export declare function isMarketDataAttestationLive(venue: MarketDataVenue, attestation: MarketDataAttestation | null | undefined, now: number): boolean;
372
343
  /** A non-professional declaration on the current form, still valid at `now`: the account may buy real-time. */
@@ -412,12 +383,12 @@ export type MarketDataCheckoutResult = {
412
383
  * 'refused': the server answered and refused (any status but a 401, a 429 or a 5xx), so what the account holds may
413
384
  * differ from what the page shows and the store reads the records again. The refusals a store acts on itself, read from
414
385
  * the body's tag, are refusals too: 'agreement_stale' (409 `<VENUE>_AGREEMENT_STALE`: the text changed, read it
415
- * again), 'attestation_required' (`<VENUE>_ATTESTATION_REQUIRED`: the declaration on file does not count),
416
- * 'email_unverified' (403 `<VENUE>_EMAIL_UNVERIFIED`: the verify-email card opens) and 'review_not_open' (409
417
- * `<VENUE>_REVIEW_NOT_OPEN`: read the records again). 'unauthorized': a 401 or an expired session. 'server': a 5xx or a
418
- * rate limit, where a retry can succeed. 'network': no answer. 'aborted': the caller's own abort, no refusal at all.
386
+ * again), 'attestation_required' (`<VENUE>_ATTESTATION_REQUIRED`: the declaration on file does not count) and
387
+ * 'email_unverified' (403 `<VENUE>_EMAIL_UNVERIFIED`: the verify-email card opens). 'unauthorized': a 401 or an expired
388
+ * session. 'server': a 5xx or a rate limit, where a retry can succeed. 'network': no answer. 'aborted': the caller's
389
+ * own abort, no refusal at all.
419
390
  */
420
- export type MarketDataBillingErrorKind = 'refused' | 'agreement_stale' | 'attestation_required' | 'email_unverified' | 'review_not_open' | 'unauthorized' | 'network' | 'aborted' | 'server';
391
+ export type MarketDataBillingErrorKind = 'refused' | 'agreement_stale' | 'attestation_required' | 'email_unverified' | 'unauthorized' | 'network' | 'aborted' | 'server';
421
392
  export declare class MarketDataBillingError extends Error {
422
393
  readonly kind: MarketDataBillingErrorKind;
423
394
  readonly status: number | null;
@@ -436,12 +407,8 @@ export declare class MarketDataBillingError extends Error {
436
407
  export interface MarketDataBillingRepository {
437
408
  getAttestation(signal?: AbortSignal): Promise<MarketDataAttestation | null>;
438
409
  submitAttestation(body: MarketDataAttestationDto, signal?: AbortSignal): Promise<MarketDataAttestationSubmitResult>;
439
- /** GET <basePath>/subscription: the subscription and the review of the account's answers, each or none. */
410
+ /** GET <basePath>/subscription: the subscription and the operator's grant, each or none. */
440
411
  getSubscription(signal?: AbortSignal): Promise<MarketDataSubscriptionAnswer>;
441
- /** POST <basePath>/attestation/review/confirm: the subscriber confirms a pending review (a typed refusal throws). */
442
- confirmReview(signal?: AbortSignal): Promise<{
443
- confirmedAt: string;
444
- }>;
445
412
  /** Never resolves 'busy' (that is the store's own answer); a refusal resolves, a failure throws. */
446
413
  checkout(body: MarketDataCheckoutDto | MarketDataProductCheckoutDto, options: {
447
414
  idempotencyId: string;
@@ -54,8 +54,8 @@ export function isMarketDataListedAgreementCurrent(current, assent) {
54
54
  * A declaration on the venue's current form (a new question set means a new declaration) whose validity has not ended
55
55
  * at `now`, either classification. The client owns expiry: `now` is the caller's clock (the store's last evaluation),
56
56
  * never an implied Date.now(). A record without `expiresAt` reads lapsed, as does one whose `expiresAt` does not parse
57
- * (ask again rather than trust it): status is reconfirmed every 12 months (Exhibit A Q19.3), and a record that names
58
- * no end can never be shown to be inside its year.
57
+ * (ask again rather than trust it): status is reconfirmed every 12 months, and a record that names no end can never be
58
+ * shown to be inside its year.
59
59
  */
60
60
  export function isMarketDataAttestationLive(venue, attestation, now) {
61
61
  if (!attestation || !isMarketDataFormVersionAccepted(venue, attestation.formVersion))
@@ -232,7 +232,7 @@ export declare const FLAG_GATED_MARKET_DATA_VENUES: readonly [{
232
232
  };
233
233
  readonly paymentItemPrefix: "stocks_";
234
234
  readonly professionalPolicy: "refuse";
235
- readonly internalRolePolicy: "refuse";
235
+ readonly internalRolePolicy: "report";
236
236
  readonly payFirst: true;
237
237
  readonly questionnaire: {
238
238
  readonly formVersion: "stocks-2026-10-20";
@@ -340,7 +340,7 @@ export declare const FLAG_GATED_MARKET_DATA_VENUES: readonly [{
340
340
  readonly i18nNamespace: "stocksRealtimeData";
341
341
  readonly storeId: "stocksRealtime";
342
342
  readonly surfaces: readonly ["contract-chart-delay-chip", "chart-source-line"];
343
- readonly contractRevision: "2026-11-04.1";
343
+ readonly contractRevision: "2026-11-08.1";
344
344
  }];
345
345
  type CarriedMarketDataVenue = (typeof MARKET_DATA_VENUES)[number] | (typeof FLAG_GATED_MARKET_DATA_VENUES)[number];
346
346
  /** A registered venue's key: a card the build carries, served now or dark. */
@@ -17,9 +17,9 @@ export const OPRA_VENUE = {
17
17
  planCard: { name: 'OPRA real-time', level: 'TOP OF BOOK', market: 'OPRA', region: '🇺🇸 USA' },
18
18
  paymentItemPrefix: 'opra_',
19
19
  professionalPolicy: 'refuse',
20
- // Staff are reported, as on CME (contract revision 2026-10-28.1; Kyle 2026-10-28: staff get OPRA real time): the
21
- // server records an internal account's grant as staff (`dev: true`) and the gate reports it. No role is consulted
22
- // here either way.
20
+ // Staff get OPRA real time through operator test grants (contract revision 2026-10-28.1, `internalPolicy: 'report'`;
21
+ // Kyle 2026-11-08: testing only): the server records a staff grant's rows as staff (`dev: true`) with no attestation,
22
+ // and they are in no report and filed nowhere. No role is consulted here either way.
23
23
  internalRolePolicy: 'report',
24
24
  payFirst: true,
25
25
  questionnaire: {
@@ -1,5 +1,5 @@
1
1
  {
2
- "revision": "2026-11-04.1",
2
+ "revision": "2026-11-08.1",
3
3
  "key": "stocks",
4
4
  "productGroups": ["NYSE", "NYSE_ARCA", "NASDAQ"],
5
5
  "products": [
@@ -60,5 +60,6 @@
60
60
  { "id": "paragraph12Titles", "required": true, "maxLength": 200 },
61
61
  { "id": "paragraph12Functions", "required": true, "maxLength": 500 }
62
62
  ],
63
- "legalNameFrom": ["firstName", "middleName", "lastName"]
63
+ "legalNameFrom": ["firstName", "middleName", "lastName"],
64
+ "internalPolicy": "report"
64
65
  }
@@ -18,7 +18,7 @@ export declare const STOCKS_VENUE: {
18
18
  };
19
19
  readonly paymentItemPrefix: "stocks_";
20
20
  readonly professionalPolicy: "refuse";
21
- readonly internalRolePolicy: "refuse";
21
+ readonly internalRolePolicy: "report";
22
22
  readonly payFirst: true;
23
23
  readonly questionnaire: {
24
24
  readonly formVersion: "stocks-2026-10-20";
@@ -126,5 +126,5 @@ export declare const STOCKS_VENUE: {
126
126
  readonly i18nNamespace: "stocksRealtimeData";
127
127
  readonly storeId: "stocksRealtime";
128
128
  readonly surfaces: readonly ["contract-chart-delay-chip", "chart-source-line"];
129
- readonly contractRevision: "2026-11-04.1";
129
+ readonly contractRevision: "2026-11-08.1";
130
130
  };
@@ -4,11 +4,11 @@
4
4
  * stocks on the plane"). Carried DARK: the registry lists it only while `us-equities-full` reads on
5
5
  * (`FLAG_GATED_MARKET_DATA_VENUES`, `marketDataVenueIsServed`), so with the flag off nothing in the app reads it.
6
6
  *
7
- * OPRA's policy set (pay first, one product, a professional refused), with what the tape adds: two agreements, one per
8
- * set of product groups (`agreements`: CTA's Exhibit B covers Tapes A and B, `NYSE_TAPE` and `NYSE_ARCA_TAPE`, the UTP
9
- * Subscriber Agreement covers Tape C, `NASDAQ_TAPE`; the gate release's `agreements:` names and versions, each version
10
- * the revision of the text orange serves), staff refused (ENTITLEMENT.md §7: no staff real time, the release's
11
- * `internal_realtime: false`), and a declaration that records the Exhibit B Section 2 answers (a) to (k), the
7
+ * OPRA's policy set (pay first, one product, a professional refused, staff on operator test grants: contract revision
8
+ * 2026-11-08.1, no attestation, in no report), with what the tape adds: two agreements, one per set of product
9
+ * groups (`agreements`: CTA's Exhibit B covers Tapes A and B, `NYSE_TAPE` and `NYSE_ARCA_TAPE`, the UTP Subscriber
10
+ * Agreement covers Tape C, `NASDAQ_TAPE`; the gate release's `agreements:` names and versions, each version the
11
+ * revision of the text orange serves), and a declaration that records the Exhibit B Section 2 answers (a) to (k), the
12
12
  * Paragraph 12 data and the UTP subscriber fields (`recordFields`, `legalNameFrom`). The question wording is the screen
13
13
  * NYSE approved on 2026-10-21: the content module is marked approved, so the plan page sells
14
14
  * (src/components/dialogs/market-data/questionnaires/stocks.ts).
@@ -35,9 +35,10 @@ export const STOCKS_VENUE = {
35
35
  planCard: { name: 'Real-time US stocks', level: 'ALL US VENUES', market: 'US stocks', region: '🇺🇸 USA' },
36
36
  paymentItemPrefix: 'stocks_',
37
37
  professionalPolicy: 'refuse',
38
- // Staff get no real time on the tape (ENTITLEMENT.md §7; the release refuses internal rows): the server's refusal
39
- // stands. No role is consulted here either way.
40
- internalRolePolicy: 'refuse',
38
+ // Staff get real-time US stocks through operator test grants (contract revision 2026-11-08.1, `internalPolicy:
39
+ // 'report'`; Kyle 2026-11-08: testing only): the server records a staff grant's rows as staff (`dev: true`) with no
40
+ // attestation, and they are in no report and filed nowhere. No role is consulted here either way.
41
+ internalRolePolicy: 'report',
41
42
  payFirst: true,
42
43
  questionnaire: {
43
44
  // The approved screen's submission date: the Exhibit B screen went to NYSE with Exhibit A on 2026-10-20, approved
@@ -115,5 +116,5 @@ export const STOCKS_VENUE = {
115
116
  storeId: 'stocksRealtime',
116
117
  // For now the delay statement shows on a tape chart's delay chip and its source line only.
117
118
  surfaces: ['contract-chart-delay-chip', 'chart-source-line'],
118
- contractRevision: '2026-11-04.1',
119
+ contractRevision: '2026-11-08.1',
119
120
  };
@@ -1,6 +1,6 @@
1
1
  // Replay fidelity ladder: measured retention and request-shaping constants.
2
2
  import { RAIL_TFS, RAIL_TF_BOOK_EDGE_SEC, RAIL_TF_BUCKET_SEC, RAIL_TF_EDGE_SEC, REPLAY_LADDER_EDGES_SEC, REPLAY_STEP_TFS, REPLAY_STEP_TF_BOOK_EDGE_SEC, REPLAY_STEP_TF_BUCKET_SEC, REPLAY_STEP_TF_EDGE_SEC, } from '../constants/replay-ladder.leaf.js';
3
- import { FEATURE_LIMITS, GATEWAY_TIER_MAX_BARS } from '../constants/feature-limits.constants.js';
3
+ import { FEATURE_LIMITS, GATEWAY_TIER_MAX_BARS, upgradeOfferTier, } from '../constants/feature-limits.constants.js';
4
4
  import { checkIsCryptoIndex } from '../utility/chart/crypto-index.leaf.js';
5
5
  import { checkIsBlockedOn1s } from '../utility/chart/index-mode.util.js';
6
6
  import { standardIntervalMsAtOrBelow } from '../utility/chart/interval-registry.util.js';
@@ -223,10 +223,13 @@ export function gatewayTierMaxBars(tier, resolution) {
223
223
  * wall now explains itself the way a paid one does.
224
224
  */
225
225
  export function replayPlusReachesFurther(tier, reachBars, resolution) {
226
- if (tier !== 'free')
226
+ // The plan an upgrade prompt may offer from the viewer's own (Plus from free; none from a paid plan while
227
+ // Ultimate is not sold), compared against the viewer's own gateway wall.
228
+ const offer = upgradeOfferTier(tier);
229
+ if (offer === null)
227
230
  return false;
228
- return (FEATURE_LIMITS.replayReachBars.plus > reachBars ||
229
- gatewayTierMaxBars('plus', resolution) > gatewayTierMaxBars('free', resolution));
231
+ return (FEATURE_LIMITS.replayReachBars[offer] > reachBars ||
232
+ gatewayTierMaxBars(offer, resolution) > gatewayTierMaxBars(tier, resolution));
230
233
  }
231
234
  export function gatewayTierReachMs(tier, resolution) {
232
235
  const label = replayResolutionRequestIntervalLabel(resolution);
@@ -17,6 +17,12 @@ import type { SettingsFormModel, SettingsFormRow } from './form-rows.js';
17
17
  */
18
18
  /** The groups a host draws, by the slot names of both web footprint dialogs. */
19
19
  export declare const FOOTPRINT_FORM_SLOTS: readonly ["sierra-look", "footprint-columns"];
20
+ /**
21
+ * Web-only footprint slots: rows web's dialogs draw that a host's form does not describe yet. `footprint-row-split`
22
+ * (Split rows by, FootprintRowSplitPicker.vue) waits on the phone's engine pin; until then the phone keeps the split
23
+ * at none through withFootprintDisplayMode, which sets it back on every display mode pick other than Total.
24
+ */
25
+ export declare const FOOTPRINT_WEB_ONLY_SLOTS: readonly ["footprint-row-split"];
20
26
  export type FootprintFormSlot = (typeof FOOTPRINT_FORM_SLOTS)[number];
21
27
  /**
22
28
  * The rows of one group for `model`, top to bottom: `sierra-look` is the Classic Presets row; `footprint-columns` is
@@ -19,6 +19,12 @@ import { withFootprintSierraLook } from '../utility/chart/footprint-sierra-look.
19
19
  */
20
20
  /** The groups a host draws, by the slot names of both web footprint dialogs. */
21
21
  export const FOOTPRINT_FORM_SLOTS = ['sierra-look', 'footprint-columns'];
22
+ /**
23
+ * Web-only footprint slots: rows web's dialogs draw that a host's form does not describe yet. `footprint-row-split`
24
+ * (Split rows by, FootprintRowSplitPicker.vue) waits on the phone's engine pin; until then the phone keeps the split
25
+ * at none through withFootprintDisplayMode, which sets it back on every display mode pick other than Total.
26
+ */
27
+ export const FOOTPRINT_WEB_ONLY_SLOTS = ['footprint-row-split'];
22
28
  const DISPLAY_MODE_WORDS = {
23
29
  'split-bar': 'indicators.settings.options.split',
24
30
  'stacked-bar-delta': 'indicators.settings.options.delta',
@@ -122,6 +122,20 @@ export const FRVP_FIELD_ROWS = [
122
122
  // Not a setting: the stamp the saved defaults' profile half carries in the account's style memory, written with it
123
123
  // (FRVP_PROFILE_DEFAULTS_STAMP below). In the default lane so the memory keeps it; no panel, row or copy holds it.
124
124
  ['profileDefaultsVersion', { owner: 'profile', lanes: ['default'] }],
125
+ // Dynamic Profile parity (Exocharts, 2026-11-13). The profile's row text and imbalance marks, read with the session
126
+ // volume profile's keys and words, and the candle the box draws for its range ('none' by default).
127
+ ['rowText', PREFERENCE],
128
+ ['imbalance', PREFERENCE],
129
+ ['imbalanceRatio', PREFERENCE],
130
+ ['imbalanceBuyColor', PREFERENCE],
131
+ ['imbalanceSellColor', PREFERENCE],
132
+ ['rangeCandle', PREFERENCE],
133
+ // The box's fill (null: none) and its border: the Style tab's rows beside the boundary lines.
134
+ ['backgroundColor', BOX_STYLE],
135
+ ['showBorder', BOX_STYLE],
136
+ // The range's own figures the printed stats read (change, high, low, open interest change, liquidations, the
137
+ // window's ends): written by the control for the box it draws, never saved.
138
+ ['profileRangeStats', BOX_DRAWN],
125
139
  ];
126
140
  /**
127
141
  * The stamp of the saved FRVP defaults' profile half in the account's style memory (the `profileDefaultsVersion` row):