@orangecharts/wrun-chart-host 0.8.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 (246) hide show
  1. package/README.md +3 -1
  2. package/dist/constants/feature-flags.constants.d.ts +9 -0
  3. package/dist/constants/feature-flags.constants.js +86 -16
  4. package/dist/constants/marketCapabilities.constants.d.ts +14 -9
  5. package/dist/constants/marketCapabilities.constants.js +36 -13
  6. package/dist/constants/opra-compliance.constants.d.ts +15 -0
  7. package/dist/constants/opra-compliance.constants.js +15 -0
  8. package/dist/constants/option-venues.constants.d.ts +11 -6
  9. package/dist/constants/option-venues.constants.js +5 -2
  10. package/dist/constants/scriptEditor/builtin-script-snippets.d.ts +26 -0
  11. package/dist/constants/scriptEditor/builtin-script-snippets.js +6 -0
  12. package/dist/constants/scriptEditor/technicalIndicatorScriptKeys.constants.d.ts +15 -0
  13. package/dist/constants/scriptEditor/technicalIndicatorScriptKeys.constants.js +17 -0
  14. package/dist/constants/venue-presets.constants.d.ts +20 -20
  15. package/dist/constants/venue-presets.constants.js +24 -26
  16. package/dist/host-env.d.ts +39 -9
  17. package/dist/host-env.js +6 -0
  18. package/dist/host-ports.types.d.ts +108 -18
  19. package/dist/index.d.ts +14 -0
  20. package/dist/index.js +14 -0
  21. package/dist/interfaces/kscript-diagnostics.interface.d.ts +6 -0
  22. package/dist/interfaces/opra-realtime.interface.d.ts +13 -11
  23. package/dist/interfaces/opra-realtime.interface.js +10 -10
  24. package/dist/interfaces/replay.interface.d.ts +8 -0
  25. package/dist/interfaces/wrun-runtime.interface.d.ts +52 -15
  26. package/dist/kscript-data/controls/live-trades-merge.util.d.ts +94 -14
  27. package/dist/kscript-data/controls/live-trades-merge.util.js +132 -22
  28. package/dist/kscript-data/controls/live-trades-order-gate.util.d.ts +56 -0
  29. package/dist/kscript-data/controls/live-trades-order-gate.util.js +107 -0
  30. package/dist/market-data/billing.interface.d.ts +227 -42
  31. package/dist/market-data/billing.interface.js +60 -12
  32. package/dist/market-data/venue.d.ts +88 -6
  33. package/dist/market-data/venues/cme.contract.copy.json +66 -0
  34. package/dist/market-data/venues/cme.d.ts +126 -0
  35. package/dist/market-data/venues/cme.js +133 -0
  36. package/dist/market-data/venues/index.d.ts +165 -8
  37. package/dist/market-data/venues/index.js +48 -6
  38. package/dist/market-data/venues/opra.contract.copy.json +5 -3
  39. package/dist/market-data/venues/opra.d.ts +3 -3
  40. package/dist/market-data/venues/opra.js +5 -4
  41. package/dist/replay/replayLadder.js +3 -1
  42. package/dist/settings-templates/index.js +7 -3
  43. package/dist/settings-templates/indicator-fields.d.ts +5 -4
  44. package/dist/settings-templates/indicator-fields.js +45 -6
  45. package/dist/settings-templates/tool-rules.d.ts +27 -17
  46. package/dist/settings-templates/tool-rules.js +27 -11
  47. package/dist/settings-templates/tool-tables.generated.js +91 -31
  48. package/dist/utility/chart/book-live-bucket.util.d.ts +15 -0
  49. package/dist/utility/chart/book-live-bucket.util.js +47 -0
  50. package/dist/utility/chart/crypto-index.leaf.d.ts +2 -2
  51. package/dist/utility/chart/crypto-index.leaf.js +2 -2
  52. package/dist/utility/chart/index-mode-admission.util.js +24 -3
  53. package/dist/utility/chart/index-mode.util.d.ts +5 -2
  54. package/dist/utility/chart/index-mode.util.js +23 -13
  55. package/dist/utility/chart/kscript-drawing-safe-area.util.d.ts +35 -11
  56. package/dist/utility/chart/kscript-drawing-safe-area.util.js +145 -35
  57. package/dist/utility/chart/kscript-live-coalesce.util.d.ts +7 -2
  58. package/dist/utility/chart/kscript-live-coalesce.util.js +9 -3
  59. package/dist/utility/chart/kscript-provenance-keys.util.js +6 -0
  60. package/dist/utility/chart/kscript-standin-identity.leaf.d.ts +3 -1
  61. package/dist/utility/chart/kscript-titancharts-render-keys.constants.d.ts +32 -2
  62. package/dist/utility/chart/kscript-titancharts-render-keys.constants.js +45 -0
  63. package/dist/utility/chart/kscript-venue-policy.util.d.ts +53 -27
  64. package/dist/utility/chart/kscript-venue-policy.util.js +74 -32
  65. package/dist/utility/chart/market-session-schedule.util.d.ts +10 -0
  66. package/dist/utility/chart/market-session-schedule.util.js +16 -0
  67. package/dist/utility/chart/marketKind.util.d.ts +12 -10
  68. package/dist/utility/chart/marketKind.util.js +17 -7
  69. package/dist/utility/chart/om-panel-push-style.util.d.ts +7 -7
  70. package/dist/utility/chart/om-panel-push-style.util.js +17 -15
  71. package/dist/utility/chart/om-panel.util.js +6 -6
  72. package/dist/utility/chart/opra-read-access.leaf.d.ts +5 -3
  73. package/dist/utility/chart/opra-read-access.leaf.js +5 -3
  74. package/dist/utility/chart/profile-block-size.util.d.ts +16 -0
  75. package/dist/utility/chart/profile-block-size.util.js +7 -0
  76. package/dist/utility/chart/quote-perp.leaf.d.ts +17 -0
  77. package/dist/utility/chart/quote-perp.leaf.js +20 -0
  78. package/dist/utility/chart/rth-session.util.d.ts +3 -2
  79. package/dist/utility/chart/rth-session.util.js +2 -1
  80. package/dist/utility/chart/window-geometry.leaf.d.ts +8 -0
  81. package/dist/utility/chart/window-geometry.leaf.js +22 -6
  82. package/dist/utility/chart/wrun-run-result.util.d.ts +17 -0
  83. package/dist/utility/chart/wrun-run-result.util.js +145 -7
  84. package/dist/utility/common/transformations.util.d.ts +7 -0
  85. package/dist/utility/common/transformations.util.js +11 -0
  86. package/dist/utility/options/option-bar-anchor.util.d.ts +145 -0
  87. package/dist/utility/options/option-bar-anchor.util.js +340 -0
  88. package/dist/utility/options/option-venue.util.d.ts +21 -3
  89. package/dist/utility/options/option-venue.util.js +30 -3
  90. package/dist/utility/scriptEditor/wrun-runtime-diagnostics.leaf.js +2 -0
  91. package/dist/utility/wrun/derived-roots.util.d.ts +213 -0
  92. package/dist/utility/wrun/derived-roots.util.js +471 -0
  93. package/dist/utility/wrun/run-schedule/wrun-chart-gate-reader.util.d.ts +41 -6
  94. package/dist/utility/wrun/run-schedule/wrun-chart-gate-reader.util.js +89 -19
  95. package/dist/utility/wrun/run-schedule/wrun-gate-reader-warm.util.d.ts +9 -4
  96. package/dist/utility/wrun/run-schedule/wrun-gate-reader-warm.util.js +47 -6
  97. package/dist/utility/wrun/run-schedule/wrun-late-reads.util.d.ts +5 -3
  98. package/dist/utility/wrun/run-schedule/wrun-late-reads.util.js +6 -4
  99. package/dist/utility/wrun/run-schedule/wrun-prefix-feeds.util.d.ts +2 -2
  100. package/dist/utility/wrun/run-schedule/wrun-prefix-feeds.util.js +5 -1
  101. package/dist/utility/wrun/sources/lanes/option_daily.js +5 -2
  102. package/dist/utility/wrun/sources/lanes/options_flow.js +5 -2
  103. package/dist/utility/wrun/sources/opra-option-lanes.util.d.ts +64 -19
  104. package/dist/utility/wrun/sources/opra-option-lanes.util.js +105 -35
  105. package/dist/utility/wrun/sources/row-lane-registry.js +3 -2
  106. package/dist/utility/wrun/sources/row-lanes/option_contract_flow.js +2 -1
  107. package/dist/utility/wrun/sources/row-lanes/option_contract_state.d.ts +9 -3
  108. package/dist/utility/wrun/sources/row-lanes/option_contract_state.js +15 -6
  109. package/dist/utility/wrun/sources/row-lanes/option_prints.d.ts +14 -0
  110. package/dist/utility/wrun/sources/row-lanes/option_prints.js +82 -13
  111. package/dist/utility/wrun/sources/row-lanes/option_strike_flow.js +17 -4
  112. package/dist/utility/wrun/sources/row-lanes/option_strikes.d.ts +55 -8
  113. package/dist/utility/wrun/sources/row-lanes/option_strikes.js +95 -14
  114. package/dist/utility/wrun/sources/row-lanes/option_surface.d.ts +5 -2
  115. package/dist/utility/wrun/sources/row-lanes/option_surface.js +7 -3
  116. package/dist/utility/wrun/sources/wrun-poll-lane.types.d.ts +19 -0
  117. package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +35 -14
  118. package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +70 -20
  119. package/dist/utility/wrun/sources/wrun-row-lane-add-memo.util.d.ts +64 -0
  120. package/dist/utility/wrun/sources/wrun-row-lane-add-memo.util.js +89 -0
  121. package/dist/utility/wrun/sources/wrun-row-lane-first-paint.util.d.ts +45 -1
  122. package/dist/utility/wrun/sources/wrun-row-lane-first-paint.util.js +114 -6
  123. package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +56 -5
  124. package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +224 -26
  125. package/dist/utility/wrun/sources/wrun-row-lanes.util.js +822 -58
  126. package/dist/utility/wrun/wrun-batched-marks.util.d.ts +16 -3
  127. package/dist/utility/wrun/wrun-batched-marks.util.js +30 -19
  128. package/dist/utility/wrun/wrun-batched-readout.util.d.ts +37 -9
  129. package/dist/utility/wrun/wrun-batched-readout.util.js +61 -15
  130. package/dist/utility/wrun/wrun-builtin-twin.util.d.ts +12 -0
  131. package/dist/utility/wrun/wrun-builtin-twin.util.js +21 -0
  132. package/dist/utility/wrun/wrun-canvas-readout.util.d.ts +4 -0
  133. package/dist/utility/wrun/wrun-cell-capacity.leaf.d.ts +66 -0
  134. package/dist/utility/wrun/wrun-cell-capacity.leaf.js +86 -0
  135. package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +192 -13
  136. package/dist/utility/wrun/wrun-chart-market-facts.util.js +437 -55
  137. package/dist/utility/wrun/wrun-color-facts.util.d.ts +19 -9
  138. package/dist/utility/wrun/wrun-color-facts.util.js +24 -14
  139. package/dist/utility/wrun/wrun-color-settings.util.d.ts +15 -4
  140. package/dist/utility/wrun/wrun-color-settings.util.js +31 -12
  141. package/dist/utility/wrun/wrun-dollar-unit-port.leaf.d.ts +17 -0
  142. package/dist/utility/wrun/wrun-dollar-unit-port.leaf.js +9 -0
  143. package/dist/utility/wrun/wrun-download-meter.util.d.ts +107 -0
  144. package/dist/utility/wrun/wrun-download-meter.util.js +134 -0
  145. package/dist/utility/wrun/wrun-download-plan.util.d.ts +99 -0
  146. package/dist/utility/wrun/wrun-download-plan.util.js +118 -0
  147. package/dist/utility/wrun/wrun-draft-legend-note.util.d.ts +11 -3
  148. package/dist/utility/wrun/wrun-draft-legend-note.util.js +26 -4
  149. package/dist/utility/wrun/wrun-draft-overlay.util.d.ts +6 -1
  150. package/dist/utility/wrun/wrun-draft-overlay.util.js +23 -3
  151. package/dist/utility/wrun/wrun-frames.d.ts +27 -6
  152. package/dist/utility/wrun/wrun-frames.js +78 -15
  153. package/dist/utility/wrun/wrun-hosted-wire-caps.d.ts +2 -2
  154. package/dist/utility/wrun/wrun-hosted-wire-caps.js +7 -0
  155. package/dist/utility/wrun/wrun-hosted-wire.util.d.ts +7 -1
  156. package/dist/utility/wrun/wrun-hosted-wire.util.js +12 -2
  157. package/dist/utility/wrun/wrun-hud-looks.util.d.ts +51 -21
  158. package/dist/utility/wrun/wrun-hud-looks.util.js +74 -28
  159. package/dist/utility/wrun/wrun-latest-snapshot.d.ts +11 -0
  160. package/dist/utility/wrun/wrun-lifecycle-runtime.util.d.ts +8 -6
  161. package/dist/utility/wrun/wrun-lifecycle-runtime.util.js +8 -6
  162. package/dist/utility/wrun/wrun-lifecycle.contract.d.ts +4 -2
  163. package/dist/utility/wrun/wrun-live-intake.util.d.ts +19 -9
  164. package/dist/utility/wrun/wrun-live-intake.util.js +213 -45
  165. package/dist/utility/wrun/wrun-live-tick.util.d.ts +4 -0
  166. package/dist/utility/wrun/wrun-live-tick.util.js +246 -49
  167. package/dist/utility/wrun/wrun-market-size-contract-carry.leaf.d.ts +53 -0
  168. package/dist/utility/wrun/wrun-market-size-contract-carry.leaf.js +162 -0
  169. package/dist/utility/wrun/wrun-market-size-defaults.leaf.d.ts +205 -48
  170. package/dist/utility/wrun/wrun-market-size-defaults.leaf.js +277 -34
  171. package/dist/utility/wrun/wrun-market-size-defaults.util.d.ts +51 -7
  172. package/dist/utility/wrun/wrun-market-size-defaults.util.js +340 -56
  173. package/dist/utility/wrun/wrun-opra-lane.util.d.ts +17 -4
  174. package/dist/utility/wrun/wrun-opra-lane.util.js +6 -4
  175. package/dist/utility/wrun/wrun-option-prints.util.d.ts +41 -2
  176. package/dist/utility/wrun/wrun-option-prints.util.js +80 -13
  177. package/dist/utility/wrun/wrun-option-strike-flow-forecast.util.d.ts +31 -0
  178. package/dist/utility/wrun/wrun-option-strike-flow-forecast.util.js +119 -0
  179. package/dist/utility/wrun/wrun-option-strike-flow-lane.util.d.ts +26 -6
  180. package/dist/utility/wrun/wrun-option-strike-flow-lane.util.js +50 -11
  181. package/dist/utility/wrun/wrun-option-strike-flow.util.d.ts +109 -19
  182. package/dist/utility/wrun/wrun-option-strike-flow.util.js +222 -61
  183. package/dist/utility/wrun/wrun-option-views.util.d.ts +96 -18
  184. package/dist/utility/wrun/wrun-option-views.util.js +246 -51
  185. package/dist/utility/wrun/wrun-options-stop.util.d.ts +2 -1
  186. package/dist/utility/wrun/wrun-options-stop.util.js +3 -2
  187. package/dist/utility/wrun/wrun-output-style.util.d.ts +6 -2
  188. package/dist/utility/wrun/wrun-output-style.util.js +20 -2
  189. package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +20 -0
  190. package/dist/utility/wrun/wrun-overlay-lifecycle.lazy.d.ts +31 -14
  191. package/dist/utility/wrun/wrun-overlay-lifecycle.lazy.js +22 -0
  192. package/dist/utility/wrun/wrun-overlay-lifecycle.util.d.ts +10 -1
  193. package/dist/utility/wrun/wrun-overlay-lifecycle.util.js +52 -4
  194. package/dist/utility/wrun/wrun-overlay-recovery.util.d.ts +7 -0
  195. package/dist/utility/wrun/wrun-overlay-recovery.util.js +25 -1
  196. package/dist/utility/wrun/wrun-overlay-result.util.d.ts +7 -1
  197. package/dist/utility/wrun/wrun-overlay-result.util.js +2 -0
  198. package/dist/utility/wrun/wrun-overlay-run.util.d.ts +134 -37
  199. package/dist/utility/wrun/wrun-overlay-run.util.js +1118 -254
  200. package/dist/utility/wrun/wrun-pack-widths.leaf.d.ts +4 -4
  201. package/dist/utility/wrun/wrun-pack-widths.leaf.js +4 -4
  202. package/dist/utility/wrun/wrun-pack.util.d.ts +7 -3
  203. package/dist/utility/wrun/wrun-pack.util.js +20 -9
  204. package/dist/utility/wrun/wrun-pane-format.util.d.ts +2 -1
  205. package/dist/utility/wrun/wrun-pane-format.util.js +7 -3
  206. package/dist/utility/wrun/wrun-panel-mount.util.d.ts +9 -0
  207. package/dist/utility/wrun/wrun-panel-mount.util.js +63 -13
  208. package/dist/utility/wrun/wrun-panel-style.util.d.ts +37 -24
  209. package/dist/utility/wrun/wrun-panel-style.util.js +100 -29
  210. package/dist/utility/wrun/wrun-param-map.util.d.ts +15 -11
  211. package/dist/utility/wrun/wrun-param-map.util.js +13 -5
  212. package/dist/utility/wrun/wrun-param-values.util.d.ts +21 -3
  213. package/dist/utility/wrun/wrun-param-values.util.js +6 -0
  214. package/dist/utility/wrun/wrun-pin-spelling.util.js +12 -11
  215. package/dist/utility/wrun/wrun-prefix-lanes.util.js +2 -2
  216. package/dist/utility/wrun/wrun-refusal-surface.util.d.ts +50 -0
  217. package/dist/utility/wrun/wrun-refusal-surface.util.js +68 -0
  218. package/dist/utility/wrun/wrun-refusal.util.js +10 -1
  219. package/dist/utility/wrun/wrun-refused-latest.util.d.ts +10 -0
  220. package/dist/utility/wrun/wrun-refused-latest.util.js +12 -0
  221. package/dist/utility/wrun/wrun-row-source.d.ts +11 -0
  222. package/dist/utility/wrun/wrun-run-interval.util.d.ts +4 -2
  223. package/dist/utility/wrun/wrun-run-interval.util.js +9 -6
  224. package/dist/utility/wrun/wrun-script-inputs.util.d.ts +52 -1
  225. package/dist/utility/wrun/wrun-script-inputs.util.js +112 -4
  226. package/dist/utility/wrun/wrun-setting-words.util.d.ts +7 -3
  227. package/dist/utility/wrun/wrun-setting-words.util.js +13 -5
  228. package/dist/utility/wrun/wrun-socket-row-source.d.ts +27 -2
  229. package/dist/utility/wrun/wrun-socket-row-source.js +113 -8
  230. package/dist/utility/wrun/wrun-source-rows.util.d.ts +9 -1
  231. package/dist/utility/wrun/wrun-source-rows.util.js +108 -43
  232. package/dist/utility/wrun/wrun-style-words.util.js +6 -4
  233. package/dist/utility/wrun/wrun-table-chrome.util.d.ts +3 -2
  234. package/dist/utility/wrun/wrun-table-chrome.util.js +19 -11
  235. package/dist/utility/wrun/wrun-tape-per-order.util.d.ts +2 -0
  236. package/dist/utility/wrun/wrun-tape-per-order.util.js +26 -0
  237. package/dist/utility/wrun/wrun-tape-source.util.d.ts +126 -50
  238. package/dist/utility/wrun/wrun-tape-source.util.js +193 -68
  239. package/dist/utility/wrun/wrun-volume-profile-lane.util.d.ts +7 -5
  240. package/dist/utility/wrun/wrun-volume-profile-lane.util.js +8 -6
  241. package/dist/utils/replay/replay-buffer-math.d.ts +53 -2
  242. package/dist/utils/replay/replay-buffer-math.js +227 -20
  243. package/dist/workers/utils/volume-profile.worker.util.d.ts +4 -1
  244. package/dist/workers/utils/volume-profile.worker.util.js +5 -2
  245. package/dist/workers/wrun/wrun-abi-host.js +3 -2
  246. package/package.json +5 -5
@@ -3,10 +3,10 @@
3
3
  * `wrunCellTupleWidths`). The row-lane registry registers it at its own evaluation and in its spec hook
4
4
  * (sources/row-lane-registry.ts); the packer reads it at pack time and re-exports the register function.
5
5
  *
6
- * A LEAF on purpose (no imports): the registry rides the code parsed before the first candle (the live intake reads
7
- * row lanes), the packer does not (tests/utility/wrun/wrun-door.closure.spec.ts), so the registration seam lives here
8
- * and the registry never loads the packer. One table: a run that loads the packer later reads the widths the
9
- * registry registered at boot.
6
+ * A LEAF on purpose (no imports): the registry rides the code parsed before the first candle (the requirement leaf
7
+ * reads row lanes for the chart store), the packer does not (tests/utility/wrun/wrun-door.closure.spec.ts), so the
8
+ * registration seam lives here and the registry never loads the packer. One table: a run that loads the packer later
9
+ * reads the widths the registry registered at boot.
10
10
  */
11
11
  /** Replace the registered row-lane tuple widths (web: src/utility/wrun/sources/row-lane-registry.ts, at load and in
12
12
  * its spec hook). */
@@ -3,10 +3,10 @@
3
3
  * `wrunCellTupleWidths`). The row-lane registry registers it at its own evaluation and in its spec hook
4
4
  * (sources/row-lane-registry.ts); the packer reads it at pack time and re-exports the register function.
5
5
  *
6
- * A LEAF on purpose (no imports): the registry rides the code parsed before the first candle (the live intake reads
7
- * row lanes), the packer does not (tests/utility/wrun/wrun-door.closure.spec.ts), so the registration seam lives here
8
- * and the registry never loads the packer. One table: a run that loads the packer later reads the widths the
9
- * registry registered at boot.
6
+ * A LEAF on purpose (no imports): the registry rides the code parsed before the first candle (the requirement leaf
7
+ * reads row lanes for the chart store), the packer does not (tests/utility/wrun/wrun-door.closure.spec.ts), so the
8
+ * registration seam lives here and the registry never loads the packer. One table: a run that loads the packer later
9
+ * reads the widths the registry registered at boot.
10
10
  */
11
11
  /** The registered tuple widths by source class (web: each row-lane descriptor's `width`); empty until a registry
12
12
  * registers, so a host without row lanes packs with the shared host's table alone. */
@@ -11,9 +11,12 @@
11
11
  *
12
12
  * Cell enforcement runs HERE, during packing and before any worker is
13
13
  * involved: a block on an input not declared `cellType: "array"` and a block
14
- * over the input's `max_cells` (counted in TUPLES, at the input's own width:
15
- * its class's, or the width its words make, `wrunOptionInputTupleWidth`) both
16
- * refuse the whole evaluation by name, never truncate. One exception (frozen authoring
14
+ * over the input's capacity in the run's module (the sheet's `capacity`, else its
15
+ * `max_cells`, counted in TUPLES, at the input's own width: its class's, or the width
16
+ * its words make, `wrunOptionInputTupleWidth`; a print class's union whole only in a
17
+ * module whose capacity holds it, `wrunSheetCellBlockTuples`) both refuse the whole
18
+ * evaluation by name, never truncate, and so does a capacity no build writes
19
+ * (`wrun_cell_capacity_invalid`). One exception (frozen authoring
17
20
  * contract C1.2b): an input declaring `missing: "empty"` reads an oversize
18
21
  * block as a PRESENT EMPTY block (0 cells) on that bar alone and the run
19
22
  * goes on, the way the same input reads a lane that answered nothing; the
@@ -21,6 +24,7 @@
21
24
  */
22
25
  import type { WrunAbiVersion, WrunIndicatorMetadata, WrunOutputRow, WrunPackedRunRequest, WrunWorkerResponse } from '../../interfaces/wrun-runtime.interface.js';
23
26
  export { registerWrunRowLaneTupleWidths } from './wrun-pack-widths.leaf.js';
27
+ export { WRUN_CELL_CAPACITY_INVALID_CODE, wrunCellBlockTuples, wrunCellCapacityIssue, wrunCellReadCapacity, wrunModuleCellCapacity, wrunSheetCellBlockTuples, } from './wrun-cell-capacity.leaf.js';
24
28
  /** One runtime input row: `values` is the positional scalar block (celled
25
29
  * slots carry NaN placeholders); `cellBlocks` maps a celled input index to
26
30
  * that bar's flat f64 cell array. An index with no entry is a missing block
@@ -11,9 +11,12 @@
11
11
  *
12
12
  * Cell enforcement runs HERE, during packing and before any worker is
13
13
  * involved: a block on an input not declared `cellType: "array"` and a block
14
- * over the input's `max_cells` (counted in TUPLES, at the input's own width:
15
- * its class's, or the width its words make, `wrunOptionInputTupleWidth`) both
16
- * refuse the whole evaluation by name, never truncate. One exception (frozen authoring
14
+ * over the input's capacity in the run's module (the sheet's `capacity`, else its
15
+ * `max_cells`, counted in TUPLES, at the input's own width: its class's, or the width
16
+ * its words make, `wrunOptionInputTupleWidth`; a print class's union whole only in a
17
+ * module whose capacity holds it, `wrunSheetCellBlockTuples`) both refuse the whole
18
+ * evaluation by name, never truncate, and so does a capacity no build writes
19
+ * (`wrun_cell_capacity_invalid`). One exception (frozen authoring
17
20
  * contract C1.2b): an input declaring `missing: "empty"` reads an oversize
18
21
  * block as a PRESENT EMPTY block (0 cells) on that bar alone and the run
19
22
  * goes on, the way the same input reads a lane that answered nothing; the
@@ -27,7 +30,11 @@ import { wrunPlainText } from './wrun-text-params.util.js';
27
30
  // The row-lane widths table and its register function live in the widths leaf: the row-lane registry (boot path)
28
31
  // registers through it at its own evaluation and never loads this module; the packer reads the same table.
29
32
  import { wrunRegisteredRowLaneTupleWidths } from './wrun-pack-widths.leaf.js';
33
+ // The capacity rules live in their leaf: the row-lane plan hands each input's projection the same answer the packer
34
+ // bounds its block by, without loading this module.
35
+ import { wrunCellBoundWords, wrunSheetCellBlockTuples } from './wrun-cell-capacity.leaf.js';
30
36
  export { registerWrunRowLaneTupleWidths } from './wrun-pack-widths.leaf.js';
37
+ export { WRUN_CELL_CAPACITY_INVALID_CODE, wrunCellBlockTuples, wrunCellCapacityIssue, wrunCellReadCapacity, wrunModuleCellCapacity, wrunSheetCellBlockTuples, } from './wrun-cell-capacity.leaf.js';
31
38
  /** Cell tuple widths per celled source class (f64 cells per source tuple), the shared host's table
32
39
  * (`WRUN_HOST_CELL_TUPLE_WIDTHS`): `volume_profile` = [low, high, buy, sell]; `book` = [price,
33
40
  * abs(size), side]; `tape` = [offset_ms, price, size, side]; `trade_volume_by_size` = [bucket,
@@ -85,7 +92,9 @@ export function packWrunRows(metadata, rows, initArgs, textParams) {
85
92
  const cellColumnByIndex = new Map();
86
93
  celledInputs.forEach((input, column) => cellColumnByIndex.set(input.index, column));
87
94
  const tupleWidthByIndex = new Map();
88
- const maxCellsByIndex = new Map();
95
+ // The tuples a block may hold in this module: the sheet's `capacity ?? max_cells`, a print class's union whole only
96
+ // in a module whose capacity holds it (`wrunSheetCellBlockTuples`, which refuses a capacity no build writes).
97
+ const capacityByIndex = new Map();
89
98
  // The inputs that read an oversize block as an empty one (C1.2b `missing: "empty"`).
90
99
  const emptyWhenOversize = new Set();
91
100
  const tupleWidths = celledInputs.length > 0 ? wrunCellTupleWidths() : {};
@@ -98,7 +107,7 @@ export function packWrunRows(metadata, rows, initArgs, textParams) {
98
107
  tupleWidthByIndex.set(input.index, source === undefined
99
108
  ? classWidth
100
109
  : wrunOptionInputTupleWidth(source, classWidth));
101
- maxCellsByIndex.set(input.index, input.max_cells ?? Number.POSITIVE_INFINITY);
110
+ capacityByIndex.set(input.index, wrunSheetCellBlockTuples(metadata, input));
102
111
  if (source?.missing === 'empty')
103
112
  emptyWhenOversize.add(input.index);
104
113
  }
@@ -126,20 +135,22 @@ export function packWrunRows(metadata, rows, initArgs, textParams) {
126
135
  `which is not declared cellType "array" in metadata`);
127
136
  }
128
137
  const tupleWidth = tupleWidthByIndex.get(inputIndex) ?? 1;
129
- const maxCells = maxCellsByIndex.get(inputIndex) ?? Number.POSITIVE_INFINITY;
138
+ const capacity = capacityByIndex.get(inputIndex) ?? Number.POSITIVE_INFINITY;
130
139
  if (block.length % tupleWidth !== 0) {
131
140
  throw new Error(`WRUN ${metadata.id}: cell block for input ${inputIndex} at ts ${row.ts} has ` +
132
141
  `${block.length} f64 cells, which does not divide into ${tupleWidth}-cell tuples`);
133
142
  }
134
143
  const tuples = block.length / tupleWidth;
135
- if (tuples > maxCells && emptyWhenOversize.has(inputIndex)) {
144
+ if (tuples > capacity && emptyWhenOversize.has(inputIndex)) {
136
145
  // C1.2b: this bar reads a present empty block; every other bar keeps its own.
137
146
  cellLens[rowIdx * celledInputs.length + column] = 0;
138
147
  continue;
139
148
  }
140
- if (tuples > maxCells) {
149
+ if (tuples > capacity) {
150
+ const maxCells = metadata.inputs.find((input) => input.index === inputIndex)?.max_cells;
141
151
  throw new Error(`WRUN ${metadata.id}: ${WRUN_CELL_BLOCK_TOO_LARGE_CODE}: input ${inputIndex} bar at ts ${row.ts} has ` +
142
- `${tuples} cells; max_cells is ${maxCells}, so the evaluation is refused (a block is never truncated)`);
152
+ `${tuples} cells; ${wrunCellBoundWords(maxCells, capacity)}, so the evaluation is refused ` +
153
+ `(a block is never truncated)`);
143
154
  }
144
155
  cellLens[rowIdx * celledInputs.length + column] = block.length;
145
156
  totalCells += block.length;
@@ -132,7 +132,8 @@ export declare function hasWrunValueFormatOptions(options: WrunValueFormatOption
132
132
  /** One value through one declared format word: `price` at the chart's price
133
133
  * precision (`priceDigits`, the default decimals when the caller has no
134
134
  * chart), `%` as a percent with two decimals (the value already IS a
135
- * percent), `si` as K/M/B from 1K (the lower-pane axis rule), `int` and
135
+ * percent), `si` as K/M/B from 1K (the lower-pane axis rule) and below it
136
+ * at most two decimals, trailing zeros dropped ("4", "4.5"), `int` and
136
137
  * the fixed-point words at their decimals. No word: the app's own
137
138
  * partial formatter (two decimals, K/M/B from 1M). A hole reads '-'.
138
139
  * `usd`, `auto` and any word beside a companion (`decimals`, `signed`,
@@ -172,7 +172,8 @@ export function hasWrunValueFormatOptions(options) {
172
172
  /** One value through one declared format word: `price` at the chart's price
173
173
  * precision (`priceDigits`, the default decimals when the caller has no
174
174
  * chart), `%` as a percent with two decimals (the value already IS a
175
- * percent), `si` as K/M/B from 1K (the lower-pane axis rule), `int` and
175
+ * percent), `si` as K/M/B from 1K (the lower-pane axis rule) and below it
176
+ * at most two decimals, trailing zeros dropped ("4", "4.5"), `int` and
176
177
  * the fixed-point words at their decimals. No word: the app's own
177
178
  * partial formatter (two decimals, K/M/B from 1M). A hole reads '-'.
178
179
  * `usd`, `auto` and any word beside a companion (`decimals`, `signed`,
@@ -202,8 +203,11 @@ function wrunValueText(value, format, placement, options) {
202
203
  }
203
204
  case '%':
204
205
  return `${value.toFixed(2)}%`;
205
- case 'si':
206
- return formatWrunPaneNumber(value, WRUN_DEFAULT_VALUE_DIGITS);
206
+ case 'si': {
207
+ // The trim is si's own: the pane axis prints through formatWrunPaneNumber at its step digits.
208
+ const text = formatWrunPaneNumber(value, WRUN_DEFAULT_VALUE_DIGITS);
209
+ return Math.abs(value) < WRUN_PANE_COMPACT_FROM ? text.replace(/\.?0+$/, '') : text;
210
+ }
207
211
  default: {
208
212
  const digits = format === undefined ? undefined : WRUN_FIXED_DIGITS[format];
209
213
  if (digits !== undefined)
@@ -1,5 +1,6 @@
1
1
  import { type KScriptLegendEntry } from '../chart/kscript-legend-entries.util.js';
2
2
  import { type EnginePanelHooks } from '../chart/om-panel.util.js';
3
+ import { WRUN_WINDOW_TABLES_ONLY_SETTING } from '../chart/window-geometry.leaf.js';
3
4
  import { wrunSeriesChildId, type WrunRunResult } from '../chart/wrun-run-result.util.js';
4
5
  import { type WrunBuiltinTwin, type WrunPaneFormatChart } from './wrun-pane-format.util.js';
5
6
  import type { WrunRunIntervalProjection } from './wrun-run-interval-projection.types.js';
@@ -283,6 +284,14 @@ export declare function prepareWrunHeatmapWindowLanding(input: {
283
284
  }): Promise<PreparedWrunWindowLanding>;
284
285
  /** The window landing of any row-backed canvas child (a heatmap or a batched child), the generalized name. */
285
286
  export declare const prepareWrunChildWindowLanding: typeof prepareWrunHeatmapWindowLanding;
287
+ /**
288
+ * The owner setting of a window that shows its tables ALONE (window-geometry.leaf defines it; web's window-cell.util
289
+ * writes the same key: the window an add opens beside its chart Indicator, which keeps every other child under the
290
+ * candles of its own cell). Its mount mounts the `panel.table` children and no other child (mountsOnCell), so the
291
+ * window never shows a lower pane, another panel or a canvas the chart cell beside it already shows. Read off the
292
+ * parent's engine settings, like the owner flag; it means nothing on a cell that is no window.
293
+ */
294
+ export { WRUN_WINDOW_TABLES_ONLY_SETTING };
286
295
  /** Mount a run snapshot after every required pack has settled.
287
296
  * The parent remains the canonical numeric-output container. A panel child
288
297
  * the run still declares in the same pane takes the new rows in place; one
@@ -49,7 +49,7 @@ import { isDateLabelledBarInterval } from '../chart/date-labelled-interval.leaf.
49
49
  import { KSCRIPT_LEGEND_VALUE_INK, kScriptLegendEntries, kScriptLegendLineFormat, kScriptLegendLineFormatOptions, kScriptLegendLines, kScriptLegendLineSwatchAt, kScriptLegendLineValueAt, kScriptLegendSlotCells, padKScriptLegendSlots, } from '../chart/kscript-legend-entries.util.js';
50
50
  import { panelGridHeight, refreshPanelOverlayInPlace, samePanelPane, translatePanelToEngine, withoutEmptyTableColumns, } from '../chart/om-panel.util.js';
51
51
  import { isWrunWindowOwner } from '../chart/window-owner.leaf.js';
52
- import { ownerPaneDrawsNothing, planWindowWeights, reconcileWindowOwnerGeometry, savedWindowSplit, tableRowCountOf, } from '../chart/window-geometry.leaf.js';
52
+ import { ownerPaneDrawsNothing, planWindowWeights, reconcileWindowOwnerGeometry, savedWindowSplit, tableRowCountOf, WRUN_WINDOW_TABLES_ONLY_SETTING, } from '../chart/window-geometry.leaf.js';
53
53
  import { wrunLegendName } from '../chart/wrun-legend-name.util.js';
54
54
  import { wrunResultLegendColors, wrunSeriesChildId, } from '../chart/wrun-run-result.util.js';
55
55
  import { budgetWrunBatchedRetained, budgetWrunBatchedRows, commitWrunBatchedPlan, currentWrunBatchedPlan, forgetWrunBatchedCells, isWrunBatchedMarksKind, noteWrunBatchedRowsCut, planWrunBatchedMerged, restoreWrunBatchedLedger, snapshotWrunBatchedLedger, wrunBatchedChargeOf, wrunBatchedChildConfig, wrunBatchedChildrenOverShare, wrunBatchedSiblingsToRebalance, } from './wrun-batched-marks.util.js';
@@ -299,7 +299,10 @@ function userThemeMode() {
299
299
  * window of the layout shows it (the children filter, mountsOnCell), so it
300
300
  * never sits under the candles while its window shows it and never mounts
301
301
  * nowhere; its all-empty columns leave before the translation builds the
302
- * payload and the formatter (withoutEmptyTableColumns, C4). */
302
+ * payload and the formatter (withoutEmptyTableColumns, C4). A pane whose
303
+ * frame carries no rows says why in its caption: the owner's headline (the
304
+ * card headline the run selected, ctx.headline) stands in for the frame's
305
+ * caption, so an empty pane is never a blank box under a title. */
303
306
  function panelChildConfig(child, ctx) {
304
307
  const translateContext = {
305
308
  theme: ctx.theme,
@@ -309,7 +312,8 @@ function panelChildConfig(child, ctx) {
309
312
  const frame = withoutEmptyTableColumns(child.frame);
310
313
  const translated = translatePanelToEngine(frame, translateContext);
311
314
  const { panel, rows, chrome } = frame;
312
- const caption = chrome?.caption;
315
+ // An empty frame's words: the owner's headline (why there is nothing yet), else the frame's own caption.
316
+ const caption = (rows.length === 0 ? ctx.headline : undefined) ?? chrome?.caption;
313
317
  const id = `${ctx.overlayId}::panel:${child.name}`;
314
318
  // A table owns no value axis and a rich line (every chrome but box: the
315
319
  // numeric curve, or grid / none on a time, category or stacked line) draws
@@ -765,7 +769,10 @@ function windowPanesOfMount(parent, overlayId, children, kept) {
765
769
  panes.push({ id: config.id, kind: 'chart' });
766
770
  }
767
771
  const ownerPane = parent.type === 'offchart' && parent.isPaneHidden !== true;
768
- if (ownerPane && (panes.length === 0 || !ownerPaneDrawsNothing(parent))) {
772
+ // A window that shows its tables alone leaves the owner's own pane to the chart beside it (the geometry hides it
773
+ // there too, window-geometry.leaf settleOwnerPane), unless it would be the window's only pane.
774
+ const tablesOnly = parent.settings?.[WRUN_WINDOW_TABLES_ONLY_SETTING] === true;
775
+ if (ownerPane && (panes.length === 0 || (!tablesOnly && !ownerPaneDrawsNothing(parent)))) {
769
776
  panes.unshift({ id: overlayId, kind: 'time' });
770
777
  }
771
778
  return panes;
@@ -1612,17 +1619,52 @@ function ownerTimePaneId(parent, overlayId, children) {
1612
1619
  /**
1613
1620
  * Whether a run's child mounts on this cell. The class it closes: a table that mounts nowhere, or under the candles
1614
1621
  * while its window shows it (Kyle 2026-10-21: a table never sits under the candles WHILE its window shows it, which
1615
- * never lets a table vanish). A window cell mounts every child. A normal cell mounts every child but the `panel.table`
1616
- * children (any `place`) of an Indicator whose tables a window cell of the layout shows: the host shows windows (the
1617
- * env's `windows`, C1) and its `tablesShownInWindow` answers true for this chart and Indicator (R1;
1622
+ * never lets a table vanish). A window cell mounts every child, except a window that shows its tables alone
1623
+ * (`tablesOnly`, WRUN_WINDOW_TABLES_ONLY_SETTING: the window an add opened beside its chart Indicator), which mounts
1624
+ * the `panel.table` children and nothing else: every other child is on the chart cell beside it, and a second copy
1625
+ * showed the same pane twice (QA 2026-10-22, Volatility Character). A normal cell mounts every child but the
1626
+ * `panel.table` children (any `place`) of an Indicator whose tables a window cell of the layout shows: the host shows
1627
+ * windows (the env's `windows`, C1) and its `tablesShownInWindow` answers true for this chart and Indicator (R1;
1618
1628
  * `leavesTablesToWindow`, asked here only, and only for a table). An Indicator with no window, or one that cannot get
1619
1629
  * one (replay, a full layout, a slot budget that refuses the window copy, an editor draft, a layout saved before
1620
1630
  * windows), keeps its tables on the cell, as does every Indicator on a host without windows (the phone). A table an
1621
1631
  * earlier pass mounted that the rule now leaves out goes with the children a run no longer declares; one it left out
1622
1632
  * mounts again on the next run that carries frames once no window shows it.
1623
1633
  */
1624
- function mountsOnCell(child, windowCell, leavesTablesToWindow) {
1625
- return windowCell || child.kind !== 'panel' || child.frame.panel.kind !== 'table' || !leavesTablesToWindow();
1634
+ function mountsOnCell(child, windowCell, tablesOnly, leavesTablesToWindow) {
1635
+ const table = child.kind === 'panel' && child.frame.panel.kind === 'table';
1636
+ if (windowCell)
1637
+ return !tablesOnly || table;
1638
+ return !table || !leavesTablesToWindow();
1639
+ }
1640
+ /**
1641
+ * The owner setting of a window that shows its tables ALONE (window-geometry.leaf defines it; web's window-cell.util
1642
+ * writes the same key: the window an add opens beside its chart Indicator, which keeps every other child under the
1643
+ * candles of its own cell). Its mount mounts the `panel.table` children and no other child (mountsOnCell), so the
1644
+ * window never shows a lower pane, another panel or a canvas the chart cell beside it already shows. Read off the
1645
+ * parent's engine settings, like the owner flag; it means nothing on a cell that is no window.
1646
+ */
1647
+ export { WRUN_WINDOW_TABLES_ONLY_SETTING };
1648
+ /**
1649
+ * The owner's headline, the words an empty panel pane shows as its caption (panelChildConfig), so the pane says why
1650
+ * it is empty: the run's HUD headline first (WrunRunResult.headline, the card tile declared `headline: true` read on
1651
+ * the run's last ready row: Volatility Character's character word), else the text the run selected for a card
1652
+ * drawing's headline band (DW01: a declared output's formatted value or a string slot the recipe writes), the first
1653
+ * card that has one, trimmed. The HUD headline rides the result because the latest-values snapshot that feeds the
1654
+ * card is published after this mount. Undefined when the run carries neither.
1655
+ */
1656
+ function ownerHeadlineOf(runResult) {
1657
+ const hud = runResult.headline?.trim();
1658
+ if (hud)
1659
+ return hud;
1660
+ for (const drawing of runResult.drawings ?? []) {
1661
+ if (drawing?.kind !== 'card')
1662
+ continue;
1663
+ const text = drawing.props?.headline?.text;
1664
+ if (typeof text === 'string' && text.trim() !== '')
1665
+ return text.trim();
1666
+ }
1667
+ return undefined;
1626
1668
  }
1627
1669
  /** The run's children in mount order (C6): the panels first, then today's
1628
1670
  * order (series, levels, canvases, insets), each group as the run listed
@@ -1643,7 +1685,7 @@ function heatmapSensitivityOf(previews, parent, name) {
1643
1685
  * pane from the run's (or the mounted) children; each heatmap's Sensitivity
1644
1686
  * (a held drag value, else the parent's saved row) read when its config is
1645
1687
  * built; the Indicator's kept label formatters. */
1646
- function mountContext(tc, overlayId, parent, children, priceDigits, chartHeightPx, windowCell, planned, previews, formatters) {
1688
+ function mountContext(tc, overlayId, parent, children, priceDigits, chartHeightPx, windowCell, planned, previews, formatters, headline) {
1647
1689
  return {
1648
1690
  tc,
1649
1691
  overlayId,
@@ -1660,6 +1702,7 @@ function mountContext(tc, overlayId, parent, children, priceDigits, chartHeightP
1660
1702
  anchorPaneId: ownerTimePaneId(parent, overlayId, children),
1661
1703
  heatmapSensitivity: (name) => heatmapSensitivityOf(previews(), parent, name),
1662
1704
  formatters,
1705
+ headline,
1663
1706
  };
1664
1707
  }
1665
1708
  /** Mount a run snapshot after every required pack has settled.
@@ -1708,9 +1751,12 @@ export function mountWrunChildOverlays({ tc, overlayId, runResult, replaceFrames
1708
1751
  // a child the run dropped; one left out before mounts again on the first
1709
1752
  // pass that carries frames and finds no window showing it.
1710
1753
  const windowCell = cell?.window ?? isWrunWindowOwner(parent);
1754
+ // A window an add opened beside its chart Indicator shows the tables alone (the chart cell keeps the rest).
1755
+ const tablesOnly = windowCell && parent.settings?.[WRUN_WINDOW_TABLES_ONLY_SETTING] === true;
1711
1756
  let leavesTables;
1712
1757
  const leavesTablesToWindow = () => (leavesTables ??= wrunHostLeavesTablesToWindow(chartIndex, overlayId));
1713
- const children = (runResult.childOverlays ?? []).filter((child) => (replaceFrames || ROW_BACKED_KINDS.has(child.kind)) && mountsOnCell(child, windowCell, leavesTablesToWindow));
1758
+ const children = (runResult.childOverlays ?? []).filter((child) => (replaceFrames || ROW_BACKED_KINDS.has(child.kind)) &&
1759
+ mountsOnCell(child, windowCell, tablesOnly, leavesTablesToWindow));
1714
1760
  if (!state && children.length === 0)
1715
1761
  return Promise.resolve(true);
1716
1762
  if (!replaceFrames &&
@@ -1764,7 +1810,11 @@ export function mountWrunChildOverlays({ tc, overlayId, runResult, replaceFrames
1764
1810
  }
1765
1811
  current.windowCell = windowCell;
1766
1812
  current.planned = planned;
1767
- const ctx = mountContext(tc, overlayId, parent, children, priceDigits, current.chartHeightPx, windowCell, planned, () => current.previews, current.formatters);
1813
+ // The words an empty panel pane shows: re-read on every pass that carries frames (a tick carries no drawings and
1814
+ // keeps the last run's).
1815
+ if (replaceFrames)
1816
+ current.headline = ownerHeadlineOf(runResult);
1817
+ const ctx = mountContext(tc, overlayId, parent, children, priceDigits, current.chartHeightPx, windowCell, planned, () => current.previews, current.formatters, current.headline);
1768
1818
  // Panels mount ahead of the Indicator's time panes (C6), so a first mount
1769
1819
  // stacks them above the lower pane by order alone; the anchor keeps a
1770
1820
  // later or re-carved panel there.
@@ -2220,7 +2270,7 @@ export function retranslateWrunChildOverlays(tc) {
2220
2270
  continue;
2221
2271
  const owner = {
2222
2272
  state,
2223
- ctx: mountContext(tc, overlayId, parent, [...state.children.values()].map((mounted) => mounted.input), state.priceDigits, state.chartHeightPx, state.windowCell ?? false, state.planned, () => state.previews, state.formatters),
2273
+ ctx: mountContext(tc, overlayId, parent, [...state.children.values()].map((mounted) => mounted.input), state.priceDigits, state.chartHeightPx, state.windowCell ?? false, state.planned, () => state.previews, state.formatters, state.headline),
2224
2274
  };
2225
2275
  for (const [id, mounted] of state.children) {
2226
2276
  if (mounted.input.kind !== 'series')
@@ -8,9 +8,11 @@
8
8
  * settings it built from the structural words, a `series` array patch merging
9
9
  * per index. A frame field overrides the declared word of the same name for
10
10
  * that run; `markers` replaces the declared list. Absent words add no key, so
11
- * today's drawing stays the default (conventions 10), except a wrun table's:
12
- * on the wrun lane an absent table colour, border or grid word takes the
13
- * chart's look (wrunTableStyle), the push lane's table keeps the engine's.
11
+ * today's drawing stays the default (conventions 10), except the plain look's
12
+ * defaults (the `hairlines` chrome of a line, bars, histogram or scatter
13
+ * pane; a heatmap's palette) and a wrun table's: on the wrun lane an absent
14
+ * table colour, border or grid word takes the chart's look (wrunTableStyle),
15
+ * the push lane's table keeps the engine's.
14
16
  *
15
17
  * Pure and worker safe (om-panel.util rides the frame worker): it imports the
16
18
  * style foundation only. Colour words resolve here against `ctx.theme`
@@ -31,8 +33,9 @@ import type { WrunPanelFrameChrome } from './wrun-frames.js';
31
33
  export type WrunStyledPanel = Omit<ParsedPanel['panel'], 'id'>;
32
34
  export type WrunStyledPanelRows = ParsedPanel['rows'];
33
35
  export type WrunStyledPanelSeries = NonNullable<WrunStyledPanel['series']>[number];
34
- /** The pane chrome words (SC02 SC23). */
35
- export type WrunPanelChromeWord = 'box' | 'grid' | 'none';
36
+ /** The pane chrome words (SC02 SC23): the sheet type's own, so the two
37
+ * cannot drift. */
38
+ export type WrunPanelChromeWord = NonNullable<WrunPanelStyle['chrome']>;
36
39
  /** What a printed number stands for (titan `IMetaData.formatDomainValue`):
37
40
  * 'x' = numeric x ticks, the hover title x, marker show_value, the stats row
38
41
  * x; 'axis' = value-axis ticks; 'value' = every other value (hover rows, bar
@@ -71,9 +74,14 @@ export interface WrunHeatmapIndices {
71
74
  export declare const WRUN_PANEL_STYLE_KEYS: ReadonlyArray<keyof WrunPanelStyle>;
72
75
  /** Every `panels[i].series[j]` style word. */
73
76
  export declare const WRUN_PANEL_SERIES_STYLE_KEYS: ReadonlyArray<keyof WrunPanelSeriesStyle>;
74
- /** Today's heatmap palette (the engine's three-stop default), used under
75
- * scale "palette" when the panel declares none (SC06). */
77
+ /** The heatmap palette under scale "palette" when the panel declares none
78
+ * (SC06): the mono ramp from the chart's background to its text colour, so
79
+ * a dark chart ramps black to white and a light chart white to black. Theme
80
+ * tokens, resolved against `ctx.theme`. */
76
81
  export declare const WRUN_PANEL_HEATMAP_PALETTE: readonly string[];
82
+ /** The same default without a theme to resolve the ramp against (the om
83
+ * push lane): the three stops a pushed heatmap has always drawn. */
84
+ export declare const WRUN_PANEL_HEATMAP_UNTHEMED_PALETTE: readonly string[];
77
85
  /** The default `stroke_fade.edge_opacity` (SC03; the engine's own default). */
78
86
  export declare const WRUN_PANEL_STROKE_FADE_EDGE_OPACITY = 0.35;
79
87
  /** The badge chip's defaults (C2): the fill when `color` is absent, and the
@@ -92,9 +100,11 @@ export declare const WRUN_PANEL_TABLE_TOP_OFFSET_PX = 24;
92
100
  * rgba() but not 8-digit hex. Without a theme (the push lane) a token and a
93
101
  * 6-digit hex pass through unchanged. */
94
102
  export declare function wrunPaneColor(word: string, theme?: WrunColorTheme): string;
95
- /** A panel's effective chrome (SC02): the declared word, else "grid" for an
96
- * unstacked line with x "index" or "number" (today's rich curve), else
97
- * "box" (today's panel look). */
103
+ /** A panel's effective chrome (SC02): the declared word, else "hairlines"
104
+ * on a line, bars, histogram or scatter pane of every x kind, stacked or
105
+ * not (the plain look), else "box" (pie, heatmap, table, tiles). On a line
106
+ * every word but "box" is the rich curve: the engine routes any other
107
+ * chromeStyle there, and "hairlines" draws its rows-only grid. */
98
108
  export declare function wrunPanelChrome(panel: WrunStyledPanel): WrunPanelChromeWord;
99
109
  /** The ink a badge chip prints in when `text_color` is absent (C2): the
100
110
  * WCAG relative luminance of the resolved fill, the dark ink above the cut,
@@ -108,18 +118,19 @@ export declare function wrunPanelBadgeInk(fill: string): string;
108
118
  * each series once beside the title (titleLegendStyle). */
109
119
  export declare function wrunPanelCommonStyle(panel: WrunStyledPanel, ctx: WrunPanelTranslateContext): WrunPanelSettingsPatch;
110
120
  /** The line words (SC03 SC04 SC24 SC25 SC29 SC30 SC39): smoothing, the
111
- * signed two-tone fill, fill fade, stroke fade, markers, dots, end labels,
112
- * glow, motion, latest-value chips and the axis words on the pane; fill,
113
- * fill ink, style, width, dash, dots, end label and legend membership per
114
- * series. `y_title` is the rich curve's caption and a box line's axis title
115
- * (the effective chrome decides, SC02). */
121
+ * signed two-tone fill, fill fade, stroke fade, markers, the frame's row
122
+ * labels (C3), dots, end labels, glow, motion, latest-value chips and the
123
+ * axis words on the pane; fill, fill ink, style, width, dash, dots, end
124
+ * label and legend membership per series. `y_title` is the rich curve's
125
+ * caption and a box line's axis title (the effective chrome decides, SC02). */
116
126
  export declare function wrunLineStyle(panel: WrunStyledPanel, chrome: WrunPanelFrameChrome | undefined, rows: WrunStyledPanelRows, ctx: WrunPanelTranslateContext): WrunLineStylePatch;
117
127
  /** The bars words (SC19 SC23 SC24 SC39, C2): sign colouring (the tones
118
128
  * come from the common words), the axis words, the bar shape, the badge
119
- * chip and legend membership per series (`series[j].legend: false` keeps
120
- * that series out of the legend chips, a `series` patch merged per index);
121
- * per-bar colours are row data the caller maps. */
122
- export declare function wrunBarsStyle(panel: WrunStyledPanel, chrome: WrunPanelFrameChrome | undefined, _rows: WrunStyledPanelRows, ctx: WrunPanelTranslateContext): WrunPanelSettingsPatch;
129
+ * chip, the frame's row labels (C3, as `xLabels`) and legend membership
130
+ * per series (`series[j].legend: false` keeps that series out of the legend
131
+ * chips, a `series` patch merged per index); per-bar colours are row data
132
+ * the caller maps. */
133
+ export declare function wrunBarsStyle(panel: WrunStyledPanel, chrome: WrunPanelFrameChrome | undefined, rows: WrunStyledPanelRows, ctx: WrunPanelTranslateContext): WrunPanelSettingsPatch;
123
134
  /** The histogram words beyond its colour, labels and bins (the caller's,
124
135
  * SC38): the chrome, the axis words of its curve bars sub-plan (SC23 SC39),
125
136
  * the bar shape and the badge chip (C2). */
@@ -138,11 +149,13 @@ export declare function wrunScatterStyle(panel: WrunStyledPanel, chrome: WrunPan
138
149
  * (frame first), slice gaps and the slice border. */
139
150
  export declare function wrunPieStyle(panel: WrunStyledPanel, chrome: WrunPanelFrameChrome | undefined, rows: WrunStyledPanelRows, ctx: WrunPanelTranslateContext): WrunPanelSettingsPatch;
140
151
  /** The heatmap words (SC06 SC18): under scale "palette" the stops (the
141
- * declared ones, else today's three) and the bounds (frame first); under
142
- * "signed" none of them, so the engine's diverging scale draws through the
143
- * common tone pair. The highlight resolves its keys to the engine's row and
144
- * column indices (a key absent from the rows is dropped), the axis nouns
145
- * pass through, and a frame summary is fitted to the column count. */
152
+ * declared ones, else the mono ramp, or today's three on the push lane,
153
+ * which has no theme to resolve the ramp against) and the bounds (frame
154
+ * first); under "signed" none of them, so the engine's diverging scale
155
+ * draws through the common tone pair. The highlight resolves its keys to
156
+ * the engine's row and column indices (a key absent from the rows is
157
+ * dropped), the axis nouns pass through, and a frame summary is fitted to
158
+ * the column count. */
146
159
  export declare function wrunHeatmapStyle(panel: WrunStyledPanel, chrome: WrunPanelFrameChrome | undefined, indices: WrunHeatmapIndices, ctx: WrunPanelTranslateContext): WrunPanelSettingsPatch;
147
160
  /** The tiles words: none of their own. `columns`, `accent` and a tile's
148
161
  * colour ride the structural translation (the caller's, SC26 SC15), the