@orangecharts/wrun-chart-host 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (198) hide show
  1. package/README.md +72 -0
  2. package/dist/constants/governed-exchanges.constants.d.ts +11 -0
  3. package/dist/constants/governed-exchanges.constants.js +11 -0
  4. package/dist/constants/indicator-sets.constants.d.ts +8 -0
  5. package/dist/constants/indicator-sets.constants.js +8 -0
  6. package/dist/constants/interval.constants.d.ts +34 -0
  7. package/dist/constants/interval.constants.js +121 -0
  8. package/dist/constants/scriptEditor/technicalIndicatorScriptKeys.constants.d.ts +28 -0
  9. package/dist/constants/scriptEditor/technicalIndicatorScriptKeys.constants.js +65 -0
  10. package/dist/constants/tpo-color-schemes.constants.d.ts +30 -0
  11. package/dist/constants/tpo-color-schemes.constants.js +32 -0
  12. package/dist/host-env.d.ts +102 -0
  13. package/dist/host-env.js +26 -0
  14. package/dist/index.d.ts +93 -0
  15. package/dist/index.js +96 -0
  16. package/dist/indicators/controls/tpo-letter.util.d.ts +2 -0
  17. package/dist/indicators/controls/tpo-letter.util.js +13 -0
  18. package/dist/indicators/controls/tpo-session.util.d.ts +99 -0
  19. package/dist/indicators/controls/tpo-session.util.js +389 -0
  20. package/dist/interfaces/kscript-diagnostics.interface.d.ts +64 -0
  21. package/dist/interfaces/kscript-diagnostics.interface.js +1 -0
  22. package/dist/interfaces/om-panel-data.interface.d.ts +103 -0
  23. package/dist/interfaces/om-panel-data.interface.js +7 -0
  24. package/dist/interfaces/wrun-runtime.interface.d.ts +2659 -0
  25. package/dist/interfaces/wrun-runtime.interface.js +55 -0
  26. package/dist/utility/chart/calendar-interval.util.d.ts +24 -0
  27. package/dist/utility/chart/calendar-interval.util.js +81 -0
  28. package/dist/utility/chart/candle-bar-end.util.d.ts +15 -0
  29. package/dist/utility/chart/candle-bar-end.util.js +23 -0
  30. package/dist/utility/chart/cme-realtime.util.d.ts +24 -0
  31. package/dist/utility/chart/cme-realtime.util.js +53 -0
  32. package/dist/utility/chart/interval-ladder.util.d.ts +27 -0
  33. package/dist/utility/chart/interval-ladder.util.js +92 -0
  34. package/dist/utility/chart/kscript-drawing-prep.util.d.ts +40 -0
  35. package/dist/utility/chart/kscript-drawing-prep.util.js +184 -0
  36. package/dist/utility/chart/kscript-drawing-safe-area.util.d.ts +95 -0
  37. package/dist/utility/chart/kscript-drawing-safe-area.util.js +805 -0
  38. package/dist/utility/chart/kscript-legend-entries.util.d.ts +166 -0
  39. package/dist/utility/chart/kscript-legend-entries.util.js +538 -0
  40. package/dist/utility/chart/kscript-output-role.util.d.ts +32 -0
  41. package/dist/utility/chart/kscript-output-role.util.js +215 -0
  42. package/dist/utility/chart/kscript-provenance-keys.util.d.ts +22 -0
  43. package/dist/utility/chart/kscript-provenance-keys.util.js +56 -0
  44. package/dist/utility/chart/kscript-run-result-normalize.util.d.ts +53 -0
  45. package/dist/utility/chart/kscript-run-result-normalize.util.js +476 -0
  46. package/dist/utility/chart/kscript-run-result-shape.util.d.ts +14 -0
  47. package/dist/utility/chart/kscript-run-result-shape.util.js +66 -0
  48. package/dist/utility/chart/kscript-titancharts-container.util.d.ts +29 -0
  49. package/dist/utility/chart/kscript-titancharts-container.util.js +151 -0
  50. package/dist/utility/chart/kscript-viewport-overlays.util.d.ts +83 -0
  51. package/dist/utility/chart/kscript-viewport-overlays.util.js +443 -0
  52. package/dist/utility/chart/om-panel-push-style.util.d.ts +78 -0
  53. package/dist/utility/chart/om-panel-push-style.util.js +301 -0
  54. package/dist/utility/chart/om-panel.util.d.ts +166 -0
  55. package/dist/utility/chart/om-panel.util.js +815 -0
  56. package/dist/utility/chart/om-series.util.d.ts +42 -0
  57. package/dist/utility/chart/om-series.util.js +330 -0
  58. package/dist/utility/chart/om-target.util.d.ts +11 -0
  59. package/dist/utility/chart/om-target.util.js +24 -0
  60. package/dist/utility/chart/om-widget.util.d.ts +148 -0
  61. package/dist/utility/chart/om-widget.util.js +413 -0
  62. package/dist/utility/chart/overlay-output-budget.util.d.ts +16 -0
  63. package/dist/utility/chart/overlay-output-budget.util.js +109 -0
  64. package/dist/utility/chart/overlay-paint-flags.util.d.ts +24 -0
  65. package/dist/utility/chart/overlay-paint-flags.util.js +55 -0
  66. package/dist/utility/chart/profile-row-height.util.d.ts +21 -0
  67. package/dist/utility/chart/profile-row-height.util.js +110 -0
  68. package/dist/utility/chart/session-interval.util.d.ts +1 -0
  69. package/dist/utility/chart/session-interval.util.js +35 -0
  70. package/dist/utility/chart/technical-script-legend-value.util.d.ts +18 -0
  71. package/dist/utility/chart/technical-script-legend-value.util.js +53 -0
  72. package/dist/utility/chart/trading-day.util.d.ts +70 -0
  73. package/dist/utility/chart/trading-day.util.js +238 -0
  74. package/dist/utility/chart/wrun-legend-name.util.d.ts +25 -0
  75. package/dist/utility/chart/wrun-legend-name.util.js +87 -0
  76. package/dist/utility/chart/wrun-run-result.util.d.ts +977 -0
  77. package/dist/utility/chart/wrun-run-result.util.js +5179 -0
  78. package/dist/utility/chart/wrun-visibility-chart.util.d.ts +25 -0
  79. package/dist/utility/chart/wrun-visibility-chart.util.js +22 -0
  80. package/dist/utility/indicators/heatmap-sensitivity.util.d.ts +62 -0
  81. package/dist/utility/indicators/heatmap-sensitivity.util.js +82 -0
  82. package/dist/utility/number-format.util.d.ts +68 -0
  83. package/dist/utility/number-format.util.js +188 -0
  84. package/dist/utility/v2/opra-governed.util.d.ts +1 -0
  85. package/dist/utility/v2/opra-governed.util.js +13 -0
  86. package/dist/utility/wrun/wrun-auto-row.util.d.ts +54 -0
  87. package/dist/utility/wrun/wrun-auto-row.util.js +96 -0
  88. package/dist/utility/wrun/wrun-batched-marks.util.d.ts +341 -0
  89. package/dist/utility/wrun/wrun-batched-marks.util.js +938 -0
  90. package/dist/utility/wrun/wrun-batched-readout.util.d.ts +75 -0
  91. package/dist/utility/wrun/wrun-batched-readout.util.js +171 -0
  92. package/dist/utility/wrun/wrun-box-segment.util.d.ts +185 -0
  93. package/dist/utility/wrun/wrun-box-segment.util.js +570 -0
  94. package/dist/utility/wrun/wrun-build-memo.util.d.ts +133 -0
  95. package/dist/utility/wrun/wrun-build-memo.util.js +301 -0
  96. package/dist/utility/wrun/wrun-builtin-twin-ports.util.d.ts +25 -0
  97. package/dist/utility/wrun/wrun-builtin-twin-ports.util.js +75 -0
  98. package/dist/utility/wrun/wrun-builtin-twin.util.d.ts +9 -0
  99. package/dist/utility/wrun/wrun-builtin-twin.util.js +40 -0
  100. package/dist/utility/wrun/wrun-canvas-cache.util.d.ts +28 -0
  101. package/dist/utility/wrun/wrun-canvas-cache.util.js +56 -0
  102. package/dist/utility/wrun/wrun-canvas-readout.util.d.ts +69 -0
  103. package/dist/utility/wrun/wrun-canvas-readout.util.js +53 -0
  104. package/dist/utility/wrun/wrun-canvases.util.d.ts +295 -0
  105. package/dist/utility/wrun/wrun-canvases.util.js +1432 -0
  106. package/dist/utility/wrun/wrun-cap-notice.util.d.ts +77 -0
  107. package/dist/utility/wrun/wrun-cap-notice.util.js +296 -0
  108. package/dist/utility/wrun/wrun-card-style.util.d.ts +154 -0
  109. package/dist/utility/wrun/wrun-card-style.util.js +539 -0
  110. package/dist/utility/wrun/wrun-chart-context.util.d.ts +89 -0
  111. package/dist/utility/wrun/wrun-chart-context.util.js +213 -0
  112. package/dist/utility/wrun/wrun-chart-names.util.d.ts +23 -0
  113. package/dist/utility/wrun/wrun-chart-names.util.js +33 -0
  114. package/dist/utility/wrun/wrun-chart-time.util.d.ts +12 -0
  115. package/dist/utility/wrun/wrun-chart-time.util.js +23 -0
  116. package/dist/utility/wrun/wrun-child-overlay-id.util.d.ts +13 -0
  117. package/dist/utility/wrun/wrun-child-overlay-id.util.js +44 -0
  118. package/dist/utility/wrun/wrun-color-facts.util.d.ts +40 -0
  119. package/dist/utility/wrun/wrun-color-facts.util.js +88 -0
  120. package/dist/utility/wrun/wrun-color-settings.lazy.d.ts +26 -0
  121. package/dist/utility/wrun/wrun-color-settings.lazy.js +9 -0
  122. package/dist/utility/wrun/wrun-color-settings.util.d.ts +351 -0
  123. package/dist/utility/wrun/wrun-color-settings.util.js +1363 -0
  124. package/dist/utility/wrun/wrun-footprint-modes.util.d.ts +23 -0
  125. package/dist/utility/wrun/wrun-footprint-modes.util.js +24 -0
  126. package/dist/utility/wrun/wrun-frames.d.ts +217 -0
  127. package/dist/utility/wrun/wrun-frames.js +1021 -0
  128. package/dist/utility/wrun/wrun-handles.util.d.ts +792 -0
  129. package/dist/utility/wrun/wrun-handles.util.js +2050 -0
  130. package/dist/utility/wrun/wrun-heatmap-cell-budget.util.d.ts +156 -0
  131. package/dist/utility/wrun/wrun-heatmap-cell-budget.util.js +342 -0
  132. package/dist/utility/wrun/wrun-hosted-wire-caps.d.ts +218 -0
  133. package/dist/utility/wrun/wrun-hosted-wire-caps.js +667 -0
  134. package/dist/utility/wrun/wrun-hosted-wire.util.d.ts +40 -0
  135. package/dist/utility/wrun/wrun-hosted-wire.util.js +27 -0
  136. package/dist/utility/wrun/wrun-hover.util.d.ts +182 -0
  137. package/dist/utility/wrun/wrun-hover.util.js +534 -0
  138. package/dist/utility/wrun/wrun-hud-looks.util.d.ts +246 -0
  139. package/dist/utility/wrun/wrun-hud-looks.util.js +587 -0
  140. package/dist/utility/wrun/wrun-integration-budget.util.d.ts +47 -0
  141. package/dist/utility/wrun/wrun-integration-budget.util.js +122 -0
  142. package/dist/utility/wrun/wrun-latest-snapshot.d.ts +19 -0
  143. package/dist/utility/wrun/wrun-latest-snapshot.js +7 -0
  144. package/dist/utility/wrun/wrun-levels-child.util.d.ts +131 -0
  145. package/dist/utility/wrun/wrun-levels-child.util.js +514 -0
  146. package/dist/utility/wrun/wrun-lifecycle.contract.d.ts +75 -0
  147. package/dist/utility/wrun/wrun-lifecycle.contract.js +9 -0
  148. package/dist/utility/wrun/wrun-market-facts.util.d.ts +116 -0
  149. package/dist/utility/wrun/wrun-market-facts.util.js +238 -0
  150. package/dist/utility/wrun/wrun-output-style.util.d.ts +344 -0
  151. package/dist/utility/wrun/wrun-output-style.util.js +1239 -0
  152. package/dist/utility/wrun/wrun-overlay-identity.util.d.ts +84 -0
  153. package/dist/utility/wrun/wrun-overlay-identity.util.js +142 -0
  154. package/dist/utility/wrun/wrun-overlay-result.util.d.ts +120 -0
  155. package/dist/utility/wrun/wrun-overlay-result.util.js +219 -0
  156. package/dist/utility/wrun/wrun-pack.util.d.ts +70 -0
  157. package/dist/utility/wrun/wrun-pack.util.js +301 -0
  158. package/dist/utility/wrun/wrun-pane-format.util.d.ts +180 -0
  159. package/dist/utility/wrun/wrun-pane-format.util.js +299 -0
  160. package/dist/utility/wrun/wrun-panel-style.lazy.d.ts +25 -0
  161. package/dist/utility/wrun/wrun-panel-style.lazy.js +15 -0
  162. package/dist/utility/wrun/wrun-panel-style.util.d.ts +174 -0
  163. package/dist/utility/wrun/wrun-panel-style.util.js +726 -0
  164. package/dist/utility/wrun/wrun-param-values.util.d.ts +69 -0
  165. package/dist/utility/wrun/wrun-param-values.util.js +230 -0
  166. package/dist/utility/wrun/wrun-refusal.util.d.ts +263 -0
  167. package/dist/utility/wrun/wrun-refusal.util.js +1259 -0
  168. package/dist/utility/wrun/wrun-registry-errors.util.d.ts +199 -0
  169. package/dist/utility/wrun/wrun-registry-errors.util.js +257 -0
  170. package/dist/utility/wrun/wrun-render-select.util.d.ts +336 -0
  171. package/dist/utility/wrun/wrun-render-select.util.js +1157 -0
  172. package/dist/utility/wrun/wrun-script-inputs.util.d.ts +434 -0
  173. package/dist/utility/wrun/wrun-script-inputs.util.js +1971 -0
  174. package/dist/utility/wrun/wrun-setting-words.lazy.d.ts +20 -0
  175. package/dist/utility/wrun/wrun-setting-words.lazy.js +9 -0
  176. package/dist/utility/wrun/wrun-setting-words.util.d.ts +79 -0
  177. package/dist/utility/wrun/wrun-setting-words.util.js +176 -0
  178. package/dist/utility/wrun/wrun-socket-row-store.d.ts +98 -0
  179. package/dist/utility/wrun/wrun-socket-row-store.js +417 -0
  180. package/dist/utility/wrun/wrun-style-flags.util.d.ts +18 -0
  181. package/dist/utility/wrun/wrun-style-flags.util.js +21 -0
  182. package/dist/utility/wrun/wrun-style-words.util.d.ts +148 -0
  183. package/dist/utility/wrun/wrun-style-words.util.js +439 -0
  184. package/dist/utility/wrun/wrun-table-look.util.d.ts +125 -0
  185. package/dist/utility/wrun/wrun-table-look.util.js +225 -0
  186. package/dist/utility/wrun/wrun-text-look.util.d.ts +51 -0
  187. package/dist/utility/wrun/wrun-text-look.util.js +227 -0
  188. package/dist/utility/wrun/wrun-text-params.util.d.ts +106 -0
  189. package/dist/utility/wrun/wrun-text-params.util.js +171 -0
  190. package/dist/utility/wrun/wrun-tpo-rows.util.d.ts +71 -0
  191. package/dist/utility/wrun/wrun-tpo-rows.util.js +438 -0
  192. package/dist/utility/wrun/wrun-twin-compute-inputs.util.d.ts +14 -0
  193. package/dist/utility/wrun/wrun-twin-compute-inputs.util.js +58 -0
  194. package/dist/utility/wrun/wrun-visibility-table.d.ts +437 -0
  195. package/dist/utility/wrun/wrun-visibility-table.js +237 -0
  196. package/dist/utility/wrun/wrun-volume-profile.util.d.ts +37 -0
  197. package/dist/utility/wrun/wrun-volume-profile.util.js +278 -0
  198. package/package.json +38 -0
@@ -0,0 +1,344 @@
1
+ /**
2
+ * The over-time plot looks of WRUN-STYLE group 5 (OT01..OT38) and the pane
3
+ * words (OT08 OT18 OT19 OT20 OT24, plus the DW25 widget routing): pure
4
+ * helpers the run-result adapter (wrun-run-result.util) merges into the
5
+ * outputs it mounts, the child-pane plan it splits a result by, the define
6
+ * a declared pane gives its child, and the mount settings the panel mount
7
+ * (wrun-panel-mount.util) gives a series child.
8
+ *
9
+ * Every word is opt-in: a helper answers an empty patch for an output that
10
+ * declares none of its words, so a sheet without them mounts byte-identical.
11
+ * Refusals read `WRUN <sheet>: output '<name>' <key> must ...`, the plain
12
+ * messages of the kit's area module (packages/sdk/src/wrun-style/outputs.ts
13
+ * and panes.ts), so a hand-written sheet fails here the way the kit would.
14
+ *
15
+ * Colours are never resolved here: a theme token (`theme.up`) rides the
16
+ * patch as written and `multiplyWrunOpacity` scales its alpha in the token's
17
+ * own `/aa` form; the mount doors resolve it against the chart's palette
18
+ * (wrun-style-words.util). Font words become CSS stacks here (X14: the
19
+ * engine never sees a font word).
20
+ *
21
+ * Imports no vue, no DOM, no titan and no kit: main-thread and worker safe.
22
+ */
23
+ import type { WrunIndicatorMetadata, WrunMetadataOutput, WrunOutputRow, WrunPane, WrunRenderer, WrunSheetFill } from '../../interfaces/wrun-runtime.interface.js';
24
+ /** How a line splits its colour (OT14). */
25
+ export declare const WRUN_LINE_SPLIT_MODES: readonly ["level", "slope"];
26
+ /** A candle group's body style (OT17) and the engine plot kind it mounts as. */
27
+ export declare const WRUN_CANDLE_STYLES: readonly ["candle", "hollow", "ohlc", "high_low"];
28
+ /** Column alpha by magnitude (OT34). */
29
+ export declare const WRUN_BAR_GRADINGS: readonly ["linear", "square"];
30
+ /** The on-line label pill of a guide (OT10). */
31
+ export declare const WRUN_PILL_STYLES: readonly ["filled", "outlined"];
32
+ /** The pane's value scale (OT18) and the engine value mode it maps to. */
33
+ export declare const WRUN_PANE_SCALES: readonly ["linear", "log", "percent", "indexed"];
34
+ /** Where a pane sits (OT24). */
35
+ export declare const WRUN_PANE_PLACES: readonly ["below", "price"];
36
+ /** The name of the default pane below the chart (OT08): `pane("lower", ...)`
37
+ * styles it, `outputs[].pane: "lower"` names it. */
38
+ export declare const WRUN_DEFAULT_PANE_NAME = "lower";
39
+ export declare const WRUN_MIN_Z = -10;
40
+ export declare const WRUN_MAX_Z = 10;
41
+ /** Titan's own flat delta-fill alpha, the interior an area paints under its
42
+ * line when the sheet declares no `fill_opacity` (OT02, OT31). */
43
+ export declare const WRUN_AREA_FILL_ALPHA = 0.4;
44
+ /**
45
+ * The most glow a wrun output or drawing lands with (PLOTS-2): the engine
46
+ * writes glow to `ctx.shadowBlur` with no clamp, its cost grows with the
47
+ * radius, and a glowing mark, column or candle leaves its batch and blurs one
48
+ * primitive per bar on every full frame. It IS the handles' validation range
49
+ * (`WRUN3_MAX_GLOW_PX`, the kit's documented 0 to 32, pinned by the kit
50
+ * mirror), one constant so the two can never drift: no documented-legal
51
+ * script changes, only a value past it (a hand-written sheet the kit never
52
+ * validated) lands at the ceiling, and a negative one as none instead of
53
+ * refusing the run. `true` stays the engine's 12 px.
54
+ */
55
+ export declare const WRUN_MAX_GLOW_PX = 32;
56
+ /** Kill switch for the host glow clamp: off restores today's glow exactly
57
+ * (any px >= 0, a negative refused; render.shape keeps the engine's 30). */
58
+ export declare function setWrunGlowClampDisabled(disabled: boolean): void;
59
+ export declare function isWrunGlowClampDisabled(): boolean;
60
+ /** A finite declared glow in px as it lands: inside 0..32 (a negative is
61
+ * none) while the clamp is on, as declared while it is off. */
62
+ export declare function landWrunGlowPx(px: number): number;
63
+ /** A finite plotShape glow in px as it lands: 0 or less is no glow (false),
64
+ * else at most the engine's clampGlow 30 (under the host's 32). */
65
+ export declare function landWrunShapeGlowPx(px: number): false | number;
66
+ /** MULTIPLIES a colour's own alpha by `opacity` (conventions 3, OT30): a
67
+ * colour without alpha comes back exactly as the adapter's `withOpacity`
68
+ * wrote it (`rgba(r, g, b, opacity)`), one with alpha at the product; a
69
+ * theme token keeps its word with its alpha scaled (`theme.up` at 0.5 is
70
+ * `theme.up/80`); `hsl()` / `hsla()` scale in place. An opacity that is
71
+ * absent, 1, out of 0..1 or not a number, and a colour the parser cannot
72
+ * read (a named colour), come back unchanged. */
73
+ export declare function multiplyWrunOpacity(color: string, opacity: number | undefined): string;
74
+ /** The format companions a surface declares beside `format` (conventions
75
+ * 8): the shape `formatOptions` rides a mounted output with and a pane
76
+ * axis prints with. */
77
+ export interface WrunFormatOptions {
78
+ decimals?: number;
79
+ signed?: boolean;
80
+ unit?: string;
81
+ }
82
+ /** The `formatOptions` an output's declaration stamps on the mounted output
83
+ * (OT32), beside its `format`, or a printed legacy unit alone without one
84
+ * (B15): undefined when it declares no companion. */
85
+ export declare function readWrunOutputFormatOptions(output: Pick<WrunMetadataOutput, 'name' | 'format' | 'decimals' | 'signed' | 'unit'>, sheetId?: string): WrunFormatOptions | undefined;
86
+ /** How an output mounts: the unit its look words are checked against. */
87
+ export type WrunOutputLookMount = 'line' | 'area' | 'bar' | 'shape' | 'candle';
88
+ export interface WrunOutputLookContext {
89
+ /** The sheet declares `price_display: "per_output"`: the kScript tag
90
+ * lineage is on, so a guide keeps the hline's own tag; off, a guide sends
91
+ * `showPriceDisplay: false` and no role (OT10). */
92
+ perOutputPriceDisplay: boolean;
93
+ /** The sheet id for refusals (absent: the message names the output only). */
94
+ sheetId?: string;
95
+ /** The output's resolved base colour before its opacity (the adapter's
96
+ * outputBaseColor): the flat area fill (OT02) falls back to it when the
97
+ * output declares `fill_opacity` without `fill_color`. */
98
+ baseColor?: string;
99
+ /** The per_output tag flag the adapter resolved for this output
100
+ * (`show_price_display_by`, then `show_price_display`); defined, it wins
101
+ * over `axis_label` (OT01 precedence), absent, `axis_label` applies. */
102
+ showPriceDisplay?: boolean;
103
+ }
104
+ /** The run-output fields an output's g5 look words add (OT01 OT02 OT04 OT07
105
+ * OT09 OT11 OT13 OT14 OT16 OT32 OT34 OT35), merged over the adapter's own
106
+ * fields by every mount branch: an output that declares none of them gets
107
+ * an empty patch. `mount` is how the adapter mounts the output; an area
108
+ * passed as a line is read as an area. */
109
+ export declare function wrunOutputLookPatch(output: WrunMetadataOutput, mount: WrunOutputLookMount, ctx: WrunOutputLookContext): Record<string, unknown>;
110
+ /** The hline fields a `role: "guide"` output adds (OT10): the on-line label
111
+ * (`align` places the output's `label`, `pill_style` and `font_size` dress
112
+ * it), the axis pill (`axis_label: true` puts value + label on the axis
113
+ * instead), the constant `value` and the paint order. `lastValue` is the
114
+ * output's last finite value (NaN when the run never gave one). */
115
+ export declare function wrunGuideLook(output: WrunMetadataOutput, lastValue: number, label: string): Record<string, unknown>;
116
+ /** The candle look a group's first output declares (OT17): the body style
117
+ * as the engine plot kind, the border and wick pairs (faded by the group's
118
+ * opacity, OT30) and the border width. */
119
+ export declare function wrunCandleLook(first: WrunMetadataOutput, sheetId: string): Record<string, unknown>;
120
+ /** Refuses the candle look keys on a group's second to fourth output by
121
+ * name (OT17): only the first output carries the group's look. */
122
+ export declare function assertWrunCandleMemberLook(member: WrunMetadataOutput, sheetId: string): void;
123
+ export interface WrunShapeLadderInput {
124
+ /** Each mark: its wire timestamp, its value and the run row it reads. */
125
+ records: ReadonlyArray<readonly [ts: number, value: number, rowAt: number]>;
126
+ /** The static mark colour (slot 0, what a non-finite rung draws), before opacity. */
127
+ staticColor: string;
128
+ /** The ladder table (the declared `colors`, or the packed palette), before opacity. */
129
+ ladder: ReadonlyArray<string>;
130
+ /** The table slot a run row's rung selects; undefined = the static colour. */
131
+ slotAt: (rowAt: number) => number | undefined;
132
+ /** The declared opacity (OT30), multiplied into every colour. */
133
+ opacity?: number;
134
+ /** The width slot of a run row (a `width_by` ladder); undefined = the def width. */
135
+ widthSlotAt?: (rowAt: number) => number | undefined;
136
+ /** The widths table (`width_by`), or `[width]` for a static width; absent
137
+ * = no table, so the engine keeps its own mark size. */
138
+ widths?: ReadonlyArray<number>;
139
+ }
140
+ export interface WrunShapeLadderOutput {
141
+ data: unknown[][];
142
+ colors: string[];
143
+ color: string[];
144
+ widths?: number[];
145
+ styleProperties: ['width', 'color'];
146
+ styleDataOffset: 2;
147
+ }
148
+ /** The plotShape wire of a shape output with a colour ladder (OT05): mark
149
+ * rows `[ts, value, widthSlot, colorSlot]` at styleDataOffset 2
150
+ * (styleProperties ['width', 'color']), the `color` table
151
+ * `[staticColor, ...ladder]` so a non-finite rung indexes slot 0 (the
152
+ * static colour, the output ladder rule), the `widths` table only when
153
+ * one is declared. */
154
+ export declare function wrunShapeLadderOutput(input: WrunShapeLadderInput): WrunShapeLadderOutput;
155
+ export interface WrunAreaFillLadderInput {
156
+ /** The area output's name and legend label. */
157
+ name: string;
158
+ label: string;
159
+ /** The line's own points, one per run row: [wire ts, value] (NaN = a gap). */
160
+ points: ReadonlyArray<readonly [ts: number, value: number]>;
161
+ /** The fill ladder's slot for a run row; undefined = no cells (the static fill). */
162
+ slotAt: (rowAt: number) => number | undefined;
163
+ /** The fill ladder table (`fill_colors`, or the packed palette), before alpha. */
164
+ ladder: ReadonlyArray<string>;
165
+ /** The static fill colour (`fill_color`, else the base colour), before alpha. */
166
+ staticColor: string;
167
+ /** `fill_opacity` (default 0.4) and the output's `opacity` (default 1). */
168
+ fillOpacity?: number;
169
+ opacity?: number;
170
+ z?: number;
171
+ smooth?: boolean;
172
+ forceOnChart?: boolean;
173
+ }
174
+ /** The output key an area's fill band mounts under (OT31): the band's own
175
+ * mount mints it, the pane routing and the visibility apply find it by it. */
176
+ export declare function wrunAreaFillKey(name: string): string;
177
+ /** The second output an area with a fill ladder mounts right after its line
178
+ * (OT31): `<name>__area_fill`, the engine's plotLine(value=[v, 0],
179
+ * fill=true) band with no edge lines (width 0), each bar's interior from
180
+ * the fill ladder at alpha own x (fill_opacity ?? 0.4) x (opacity ?? 1),
181
+ * never a legend line nor a tag, half a layer under the line. */
182
+ export declare function wrunAreaFillLadderOutput(input: WrunAreaFillLadderInput): {
183
+ key: string;
184
+ output: Record<string, unknown>;
185
+ };
186
+ /** One stacked member's span on a row: the column runs from `bottom` (the
187
+ * running sum before it) to `top` (the sum with it), positives above zero
188
+ * and negatives below; the legend reads top - bottom. */
189
+ export type WrunStackedSpan = readonly [top: number, bottom: number];
190
+ /** The spans of every stacked bar output (OT38), keyed by output name, one
191
+ * entry per run row (undefined where the row is not ready or the member's
192
+ * value is not finite: the member draws nothing that bar). Members sharing
193
+ * a `stack` name stack in declaration order; a `stack` off a bar or
194
+ * histogram output, beside `base`, or whose members sit on different panes
195
+ * refuses by name. */
196
+ export declare function wrunStackedRows(outputs: ReadonlyArray<Pick<WrunMetadataOutput, 'name' | 'index' | 'plot' | 'panel' | 'pane' | 'stack' | 'base'>>, rows: ReadonlyArray<WrunOutputRow>): Map<string, Array<WrunStackedSpan | undefined>>;
197
+ export interface WrunFillLadderRows {
198
+ /** The fillBetween `colors` table. */
199
+ colors: string[];
200
+ /** The fillBetween rows `[ts, colorSlot, opacity]`; a NaN slot fills nothing that bar. */
201
+ data: Array<[number, number, number]>;
202
+ zOrder?: number;
203
+ }
204
+ /** A fill row's opacity, the per-row cell of the engine's fillBetween wire
205
+ * (`[ts, colorSlot, opacity]`): the `opacity_by` output's value on the row
206
+ * when it is finite (clamped to 0..1, as titan paints it), else the fill's
207
+ * static `opacity`, else `fallback` (the host's own default; titan's is
208
+ * 0.25). Titan replaces each colour's alpha with it in every colour mode
209
+ * (static, `color_by`, `color_packed_by`), so every mode takes it. `row`
210
+ * is the run row's outputs (null on a row that was not ready). The kit's
211
+ * `wrunFillRowOpacity` (om scaffold 42, wrun-style/panes.ts), verbatim:
212
+ * wrun-fill-opacity.kit-mirror.spec.ts pins it to the kit's export. */
213
+ export declare function wrunFillRowOpacity(fill: {
214
+ opacity?: number | undefined;
215
+ opacity_by?: string | undefined;
216
+ }, row: ArrayLike<number> | null | undefined, outputIndex: ReadonlyMap<string, number>, fallback: number): number;
217
+ /** The engine's fillBetween colour wire of a sheet fill (OT03): a static
218
+ * colour (`color`, else `staticColor`) for every row; `color_by` + `colors`
219
+ * the ladder table with each row's slot (floor, out of range = slot 0, a
220
+ * non-finite rung = NaN: no fill that bar); `color_packed_by` a palette
221
+ * interned in row order (the static colour where a value does not decode,
222
+ * NaN when there is none); `z` the paint order (OT04). Each row's opacity
223
+ * is wrunFillRowOpacity's in every mode: the `opacity_by` output's value on
224
+ * the row, else the static `opacity`, else `options.opacity` (else 0.25). */
225
+ export declare function wrunFillLadderRows(fill: WrunSheetFill, rows: ReadonlyArray<WrunOutputRow>, outputIndex: ReadonlyMap<string, number>, options?: {
226
+ sheetId?: string;
227
+ staticColor?: string;
228
+ opacity?: number;
229
+ }): WrunFillLadderRows;
230
+ export interface WrunInsetLook {
231
+ settings: Record<string, unknown>;
232
+ /** With a `color_by` ladder: the strip rows `[ts, value, ladderSlot]` (no
233
+ * slot where the rung is not finite), one per ready row. */
234
+ data?: unknown[][];
235
+ }
236
+ /** The inset sender settings an inset output's colour words add (OT36):
237
+ * `colors` without `color_by` is the sign pair (`up_color` at or above 0,
238
+ * `down_color` below), `color_by` + `colors` the `palette` each row's
239
+ * ladder slot indexes, `opacity` the strip alpha. `rows` are the run rows
240
+ * (the strip reads every ready row); a `color_by` needs the declared
241
+ * outputs' indexes (`ctx.outputIndexByName`). */
242
+ export declare function wrunInsetLook(output: WrunMetadataOutput, rows: ReadonlyArray<WrunOutputRow>, ctx?: {
243
+ outputIndexByName?: ReadonlyMap<string, number>;
244
+ sheetId?: string;
245
+ }): WrunInsetLook;
246
+ type WrunShapeRenderer = Extract<WrunRenderer, {
247
+ kind: 'shape';
248
+ }>;
249
+ type WrunBgcolorRenderer = Extract<WrunRenderer, {
250
+ kind: 'bgcolor';
251
+ }>;
252
+ /** The mark look a render.shape declares (D5: OT07 OT16 OT35): placement,
253
+ * glow (through the engine's clamp, `shapeRendererGlow`), the char glyph
254
+ * and its font stack, the hollow (`fill: false`) and faded (`fillOpacity`)
255
+ * interior. `width` is the adapter's own field. */
256
+ export declare function wrunShapeRendererLook(renderer: WrunShapeRenderer, sheetId: string): Record<string, unknown>;
257
+ /** The vertical-line fields a render.bgcolor declares (OT38): `width` (px,
258
+ * 0.5..10) as `lineWidth`, `line_style` (needs `width`) as `lineStyle`;
259
+ * without them the renderer keeps painting a band. */
260
+ export declare function wrunBgcolorLineLook(renderer: WrunBgcolorRenderer): Record<string, unknown>;
261
+ /** The pane an output draws into: its declared `pane`, else the default
262
+ * lower pane when its panel is `lower`, else undefined (the price pane). */
263
+ export declare function wrunPaneOfOutput(output: Pick<WrunMetadataOutput, 'pane' | 'panel'>): string | undefined;
264
+ /** The series child's overlay id (`<parent>::series:<pane>`): the default
265
+ * pane keeps the "lower" child every on-price Indicator always had. */
266
+ export declare function wrunPaneChildId(overlayId: string, pane: string): string;
267
+ /** One child pane of a result (OT08 OT24): the pane's name and place, its
268
+ * declaration when the sheet declares it (title template, height share),
269
+ * and every visual that rides it, by key. */
270
+ export interface WrunPanePlanChild {
271
+ name: string;
272
+ place: 'below' | 'price';
273
+ /** The declaration behind the pane (absent on the undeclared default pane). */
274
+ declaration?: WrunPane;
275
+ /** The declared `title` template (`{{param}}` placeholders, unresolved). */
276
+ title?: string;
277
+ /** The declared `height_frac`. */
278
+ height?: number;
279
+ /** The drawn outputs (names) in the pane, in declaration order. */
280
+ outputs: string[];
281
+ /** The `ranges[]` indexes anchored in the pane (by their upper edge). */
282
+ ranges: number[];
283
+ /** The `fills[]` indexes anchored in the pane (by their first side). */
284
+ fills: number[];
285
+ /** The box and segment names, by their declared panel and top / y_from anchor. */
286
+ boxes: string[];
287
+ segments: string[];
288
+ /** The renderer names, by their panel and anchor output. */
289
+ renderers: string[];
290
+ /** The `drawings[]` indexes of the widgets routed into the pane (DW25). */
291
+ drawings: number[];
292
+ }
293
+ /** Where a result's visuals go (OT08 OT24, DW25): the pane the parent keeps,
294
+ * the child panes in mount order, and each drawn output's pane. */
295
+ export interface WrunPanePlan {
296
+ /** The pane the parent overlay holds: an Indicator that homes below the
297
+ * chart keeps its first drawn output's pane (absent = the price pane). */
298
+ home?: string;
299
+ /** The child panes, one series child each, in mount order: the undeclared
300
+ * default pane first, then the declared panes in `panes[]` order, then
301
+ * any other pane drawn into, the home pane left out. */
302
+ children: WrunPanePlanChild[];
303
+ /** Every drawn output's pane name (absent = the price pane). */
304
+ outputPane: Record<string, string>;
305
+ }
306
+ /** The pane a visual rides, by its declared panel and anchor output (OT08):
307
+ * `overlay` stays on price; otherwise the anchor's pane (a `lower` panel on
308
+ * a price anchor takes the default lower pane). Undefined = the parent
309
+ * (the price pane, or the home pane of an Indicator that homes below). */
310
+ export declare function wrunPaneOfVisual(plan: WrunPanePlan, panel: string | undefined, anchor: string | undefined): string | undefined;
311
+ /** The child-pane plan of a sheet (OT08 OT24, DW25): every pane a drawn
312
+ * output homes in is one series child named by the pane (the default keeps
313
+ * "lower"), in panes[] order with the undeclared default first; ranges,
314
+ * fills, boxes, segments and renderers follow their anchor output's pane
315
+ * and `panel: "lower"` widgets the lower pane (the default pane when drawn
316
+ * into, else the first pane placed below). `homesBelow` (the result's side
317
+ * is offchart) keeps the first drawn output's pane on the parent and splits
318
+ * the others; a sheet that pins `overlay: "onchart"` splits nothing. */
319
+ export declare function planWrunPanes(sheet: WrunIndicatorMetadata, homesBelow: boolean): WrunPanePlan;
320
+ /** The declared height share (`height_frac`) of the pane holding a sheet's
321
+ * first drawn output, when that output sits below the chart (OT20): what a
322
+ * NEW add of an Indicator that homes below mounts as its `gridHeight`.
323
+ * Undefined when the first drawn output is on price, the pane is not
324
+ * declared or declares no height. */
325
+ export declare function wrunHomePaneHeight(sheet: Pick<WrunIndicatorMetadata, 'id' | 'outputs' | 'panes'>): number | undefined;
326
+ /** A declared pane's define (OT18 OT19): `pane` is the scale look the engine
327
+ * applies (value mode, inversion, padding, held ends), always present for a
328
+ * declared pane; `paneAxis` the axis tick format (app-only, read by the
329
+ * pane formatter) only when the pane declares format words. */
330
+ export declare function wrunPaneDefine(pane: WrunPane): {
331
+ pane?: Record<string, unknown>;
332
+ paneAxis?: Record<string, unknown>;
333
+ };
334
+ /** The engine settings a series child takes from its pane (OT20 OT24): a
335
+ * pane placed on price mounts pinned over the candles on its own hidden
336
+ * scale (the pinned onchart flags, no main-pane fold); a pane below the
337
+ * chart carries its declared height share as `gridHeight` (absent = the
338
+ * mount's default share). Takes the child's pane info or a declaration. */
339
+ export declare function wrunPaneChildMountSettings(pane: {
340
+ place?: 'below' | 'price';
341
+ height?: number;
342
+ height_frac?: number;
343
+ } | undefined): Record<string, unknown>;
344
+ export {};