@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,246 @@
1
+ /**
2
+ * HUD looks (WRUN-STYLE g3 addendum LK01..LK10, decision D11): the frozen
3
+ * look table as data, the word lists a HUD card and its tiles accept, and the
4
+ * one resolver that turns a `presentation.hud` entry plus the viewer's pick
5
+ * into the card's inline style and its tile defaults.
6
+ *
7
+ * Resolution order (LK01, LK09): a word declared on the entry wins; then the
8
+ * viewer's pick on the Style page; then the row of the author's look; then
9
+ * today's look, untouched (an entry without a look resolves to no inline
10
+ * style at all, byte for byte today's card).
11
+ *
12
+ * The look values travel as CSS custom properties on `.wrun-hud`
13
+ * (`--wrun-hud-bg`, `--wrun-hud-radius`, ...); the card's base rules in
14
+ * WrunHudLayer.vue read each one with today's value as the fallback, and
15
+ * `src/styles/wrun-hud-looks.scss` holds only what a variable cannot carry
16
+ * (frame parts, textures, letter case). Nothing here reads the DOM: the
17
+ * palette a token resolves against is handed in by the caller.
18
+ *
19
+ * Cost rules (LK10, D11 acceptance): no blur, no animation, no downloaded
20
+ * font. The serif and rounded stacks are the foundation's system stacks.
21
+ */
22
+ import type { WrunGaugeDraw, WrunHoverBlock, WrunHud, WrunHudChrome, WrunHudLook, WrunIndicatorMetadata, WrunMeterDraw, WrunPillDraw, WrunSparkDraw, WrunTextCase } from '../../interfaces/wrun-runtime.interface.js';
23
+ import type { WrunLatestSnapshot } from './wrun-latest-snapshot.js';
24
+ import { type WrunColorTheme, type WrunFontFamily, type WrunFontWeight } from './wrun-style-words.util.js';
25
+ /** LK01: the looks, the rows of the look table. */
26
+ export declare const WRUN_HUD_LOOKS: readonly ["default", "glass", "stage", "signal", "terminal", "broadsheet", "chart_desk", "dial", "grid", "cockpit", "phosphor", "classic"];
27
+ /** LK08 (as `chrome`, X16: `frame` is the data channel's word): the card's box. */
28
+ export declare const WRUN_HUD_CHROMES: readonly ["card", "none", "brackets", "rules", "tag", "title_bar", "window", "cover"];
29
+ /** LK08: a static surface texture. */
30
+ export declare const WRUN_HUD_TEXTURES: readonly ["none", "scanlines"];
31
+ export type WrunHudTexture = (typeof WRUN_HUD_TEXTURES)[number];
32
+ /** LK06: title and label letter case (values never change case). */
33
+ export declare const WRUN_TEXT_CASES: readonly ["none", "upper", "lower", "small_caps"];
34
+ /** LK04: the drawing choice per tile kind. */
35
+ export declare const WRUN_GAUGE_DRAWS: readonly ["arc", "ring", "dial", "ticks", "bar", "blocks", "text"];
36
+ export declare const WRUN_SPARK_DRAWS: readonly ["line", "area", "dots", "bars", "text"];
37
+ export declare const WRUN_METER_DRAWS: readonly ["bar", "split", "blocks", "segments", "scale", "text"];
38
+ export declare const WRUN_PILL_DRAWS: readonly ["capsule", "dot", "led", "text"];
39
+ /** The tile kinds that take `draw`, each with its list. */
40
+ export declare const WRUN_BLOCK_DRAWS: Readonly<Record<string, ReadonlyArray<string>>>;
41
+ /** LK06: the rows tile's key-to-value leader. */
42
+ export declare const WRUN_ROW_LEADERS: readonly ["none", "dots"];
43
+ export type WrunRowLeader = (typeof WRUN_ROW_LEADERS)[number];
44
+ /** LK05 / LK07: a spark, meter or rings tile height, px. */
45
+ export declare const WRUN_MIN_BLOCK_HEIGHT_PX = 16;
46
+ export declare const WRUN_MAX_BLOCK_HEIGHT_PX = 120;
47
+ /** LK07: concentric rings per tile. */
48
+ export declare const WRUN_MAX_HUD_RINGS = 3;
49
+ /** LK08: the static text halo, px. */
50
+ export declare const WRUN_MAX_HUD_TEXT_GLOW_PX = 8;
51
+ /** DW22: a declared card width, px. */
52
+ export declare const WRUN_MIN_HUD_WIDTH_PX = 80;
53
+ export declare const WRUN_MAX_HUD_WIDTH_PX = 1200;
54
+ /** DW22: an offset entry, px, either sign. The layer clamps the applied offset
55
+ * into the price pane's inset rect (CLIP-AUDIT item 29): the sheet range is
56
+ * what validates, the pane is what shows. */
57
+ export declare const WRUN_MAX_HUD_OFFSET_PX = 4096;
58
+ /** Item 29: a card under this opacity is pointer-free (its tiles let every click through). */
59
+ export declare const WRUN_HUD_POINTER_FREE_OPACITY = 0.15;
60
+ /** DW22: the inner padding, px. */
61
+ export declare const WRUN_MAX_HUD_PADDING_PX = 24;
62
+ /** D1: `corner_radius`, px. */
63
+ export declare const WRUN_MAX_HUD_CORNER_RADIUS_PX = 32;
64
+ /** DW22: `border_width`, px. */
65
+ export declare const WRUN_MAX_HUD_BORDER_WIDTH_PX = 10;
66
+ /** LK05: `font_size` on a value or pill tile, px. */
67
+ export declare const WRUN_MIN_HUD_FONT_SIZE_PX = 6;
68
+ export declare const WRUN_MAX_HUD_FONT_SIZE_PX = 64;
69
+ /** LK05: the headline tile's size when it declares none, and today's lead sizes. */
70
+ export declare const WRUN_HUD_HEADLINE_FONT_SIZE_PX = 22;
71
+ /** The least label opacity a look's light variant names (template QA C17: the tiles' 0.55 read about 3.5:1). */
72
+ export declare const WRUN_HUD_LIGHT_LABEL_OPACITY_MIN = 0.75;
73
+ /** LK07: the rings tile's default height. */
74
+ export declare const WRUN_HUD_RINGS_HEIGHT_PX = 86;
75
+ /** The accent's strength per ring when the rings declare no colours (LK07). */
76
+ export declare const WRUN_HUD_RING_STRENGTHS: ReadonlyArray<number>;
77
+ export declare function isWrunHudLook(value: unknown): value is WrunHudLook;
78
+ export declare function isWrunHudChrome(value: unknown): value is WrunHudChrome;
79
+ export declare function isWrunHudTexture(value: unknown): value is WrunHudTexture;
80
+ export declare function isWrunTextCase(value: unknown): value is WrunTextCase;
81
+ export declare function isWrunRowLeader(value: unknown): value is WrunRowLeader;
82
+ /** A tile's `draw` word when it is one of its kind's drawings (LK04); any
83
+ * other value, and a word on a kind that takes none, is undefined. */
84
+ export declare function wrunBlockDraw(kind: string, value: unknown): string | undefined;
85
+ /** A look's per-kind drawing defaults (LK04); a tile's own `draw` wins. */
86
+ export interface WrunHudLookDraws {
87
+ gauge?: WrunGaugeDraw;
88
+ spark?: WrunSparkDraw;
89
+ meter?: WrunMeterDraw;
90
+ pill?: WrunPillDraw;
91
+ }
92
+ /** One row of the look table. Every value is a default a declared word
93
+ * beats. Colours are convention-2 words (hex, or a theme token resolved at
94
+ * paint time). */
95
+ export interface WrunHudLookRow {
96
+ /** Surface: the background word, or a vertical gradient's stops. */
97
+ background?: string;
98
+ backgroundGradient?: string[];
99
+ borderColor?: string;
100
+ borderWidth?: number;
101
+ cornerRadius?: number;
102
+ padding?: number;
103
+ /** A box shadow of the look's own (today's stays when absent). */
104
+ shadow?: string;
105
+ /** Type. */
106
+ fontFamily?: WrunFontFamily;
107
+ textColor?: string;
108
+ /** The label ink; the text colour when absent. */
109
+ labelTextColor?: string;
110
+ titleCase?: WrunTextCase;
111
+ labelCase?: WrunTextCase;
112
+ headlineFontSize?: number;
113
+ headlineFontWeight?: WrunFontWeight;
114
+ accentColor?: string;
115
+ textGlow?: number;
116
+ /** Tiles. */
117
+ draws: WrunHudLookDraws;
118
+ sparkHeight?: number;
119
+ /** A dotted guide at zero under a spark line, or spark bars that grow from
120
+ * the card's first meter mark. */
121
+ sparkBaseline?: 'zero' | 'mark';
122
+ /** Marks (spark strokes, gauge fills) ink in the accent, or in the text ink. */
123
+ markInk?: 'accent' | 'text';
124
+ /** The split meter's rest: the theme's down colour, or the accent. */
125
+ splitRest?: 'down' | 'accent';
126
+ rowLeader?: WrunRowLeader;
127
+ /** Frame. */
128
+ chrome: WrunHudChrome;
129
+ /** The title ink on a `title_bar` chrome. */
130
+ titleBarInk?: string;
131
+ /** The `window` chrome's two-colour title bar. */
132
+ windowBar?: [string, string];
133
+ texture: WrunHudTexture;
134
+ /** A home look keeps its paper in both themes; an adaptive one resolves
135
+ * tokens per theme and may name a light variant. A home look may name one
136
+ * too, to keep its paper legible over a light chart (cockpit: the same
137
+ * slate, opaque, with stronger labels). */
138
+ home: boolean;
139
+ light?: {
140
+ background?: string;
141
+ borderColor?: string;
142
+ textColor?: string;
143
+ /** The tiles' label opacity (`--wrun-hud-label-opacity`, 0.55 when absent);
144
+ * at least WRUN_HUD_LIGHT_LABEL_OPACITY_MIN. */
145
+ labelOpacity?: number;
146
+ };
147
+ }
148
+ /** The frozen look table (g3 addendum, "The look table"). `default` is
149
+ * today's card: the g3 HUD defaults with the g3 drawings (arc, line, bar,
150
+ * capsule), adaptive. Where the table names no accent and the look's mock
151
+ * paints one colour throughout, the row carries that colour as its accent
152
+ * (broadsheet newsprint ink, classic's navy, phosphor's green): without it
153
+ * LK03 would hand the look the app's accent (glass keeps the app's: its
154
+ * mock's reds and greens are reading tones, not an accent). */
155
+ export declare const WRUN_HUD_LOOK_TABLE: Readonly<Record<WrunHudLook, WrunHudLookRow>>;
156
+ /** The entry words the resolver reads: every `presentation.hud` key but the
157
+ * name, position, title, columns and tiles. */
158
+ export type WrunHudStyleEntry = Partial<Pick<WrunHud, 'look' | 'width' | 'offset' | 'z' | 'background_color' | 'background_opacity' | 'background_gradient' | 'gradient_direction' | 'border_color' | 'border_width' | 'border_style' | 'corner_radius' | 'padding' | 'shadow' | 'opacity' | 'text_color' | 'title_text_color' | 'font_family' | 'safe_area' | 'mobile' | 'accent_color' | 'accent_color_by' | 'accent_colors' | 'title_case' | 'label_case' | 'chrome' | 'texture' | 'text_glow'>>;
159
+ /** The nine HUD anchors, as wrun-hud.util spells them. */
160
+ export type WrunHudAnchorWord = 'top_left' | 'top_center' | 'top_right' | 'middle_left' | 'middle_center' | 'middle_right' | 'bottom_left' | 'bottom_center' | 'bottom_right';
161
+ export interface WrunHudResolveOptions {
162
+ /** The viewer's Look pick for this HUD (LK09), read off the overlay settings. */
163
+ viewerPick?: unknown;
164
+ /** The chart's palette: colour tokens resolve against it. */
165
+ theme?: WrunColorTheme;
166
+ /** The accent ladder reads its rung here (LK03). */
167
+ snapshot?: WrunLatestSnapshot;
168
+ metadata?: WrunIndicatorMetadata;
169
+ /** The card's anchor: an offset moves inward from the anchored edges (DW22). */
170
+ anchor?: WrunHudAnchorWord;
171
+ /** The chart is on a light theme: adaptive looks take their light variant. */
172
+ light?: boolean;
173
+ }
174
+ /** DW22: a declared offset as the card's `left` and `top`, CSS px (the
175
+ * inward-from-the-anchored-edges reading already applied). */
176
+ export interface WrunHudOffsetPx {
177
+ left: number;
178
+ top: number;
179
+ }
180
+ /** What one entry resolves to: the words a tile and the layer read, and the
181
+ * inline style of `.wrun-hud`. */
182
+ export interface WrunHudResolvedStyle {
183
+ /** The look in force (the viewer's pick, else the author's); absent = today's. */
184
+ look?: WrunHudLook;
185
+ authorLook?: WrunHudLook;
186
+ viewerPick?: WrunHudLook;
187
+ fontFamily?: WrunFontFamily;
188
+ cornerRadius?: number;
189
+ padding?: number;
190
+ chrome: WrunHudChrome;
191
+ texture: WrunHudTexture;
192
+ titleCase: WrunTextCase;
193
+ labelCase: WrunTextCase;
194
+ textGlow: number;
195
+ /** The accent as a CSS colour; absent without a look or an accent word (today's marks). */
196
+ accent?: string;
197
+ draws: WrunHudLookDraws;
198
+ sparkHeight?: number;
199
+ sparkBaseline?: 'zero' | 'mark';
200
+ rowLeader?: WrunRowLeader;
201
+ /** DW22: the declared offset the `css` carries as `left`/`top`; the layer
202
+ * clamps it into the pane (item 29). Absent without a valid offset. */
203
+ offset?: WrunHudOffsetPx;
204
+ /** A declared `opacity` (0..1); absent keeps today's opaque card. */
205
+ opacity?: number;
206
+ /** The inline style of `.wrun-hud`: custom properties the base rules read, plus width, offset and opacity. */
207
+ css: Record<string, string>;
208
+ }
209
+ /** DW22: an offset moves inward from the anchored edges: x from a left or
210
+ * right edge (signed on the centre column), y from the top or bottom edge
211
+ * (signed on the middle row). The shift in screen px (`left`, `top`) a card
212
+ * at `anchor` takes from it; undefined for no offset or one off the range. */
213
+ export declare function wrunHudOffsetShift(offset: unknown, anchor: WrunHudAnchorWord | undefined): WrunHudOffsetPx | undefined;
214
+ /** The inline style of a declared offset: the card moves relative to its seat in the stack. */
215
+ export declare function wrunHudOffsetCss(offset: WrunHudOffsetPx): Record<string, string>;
216
+ /** Item 29: a card under `WRUN_HUD_POINTER_FREE_OPACITY` takes no pointer
217
+ * (an invisible card must never trap a click meant for the chart). */
218
+ export declare function wrunHudPointerFree(style: Pick<WrunHudResolvedStyle, 'opacity'>): boolean;
219
+ /**
220
+ * The style of one HUD entry: declared word > viewer pick > look row >
221
+ * today's (LK01, LK09). Every value lands in `css` as a custom property the
222
+ * card's base rules read (today's value is each rule's fallback), so an
223
+ * entry without a look and without a word resolves to an empty style.
224
+ */
225
+ export declare function resolveWrunHudLook(entry: WrunHudStyleEntry, options?: WrunHudResolveOptions): WrunHudResolvedStyle;
226
+ /** The look defaults one tile takes when it declares none (LK04 draw, LK05
227
+ * height, the signal zero line, the broadsheet row leaders). */
228
+ export interface WrunHudTileLookDefaults {
229
+ draw?: string;
230
+ height?: number;
231
+ baseline?: number;
232
+ leader?: WrunRowLeader;
233
+ }
234
+ /**
235
+ * The defaults the look in force gives a tile of `kind` (undefined fields
236
+ * keep today's drawing). `cardMark` is the card's first meter mark, the
237
+ * baseline spark bars grow from on a look that says so.
238
+ */
239
+ export declare function wrunHudTileLookDefaults(style: Pick<WrunHudResolvedStyle, 'draws' | 'sparkHeight' | 'sparkBaseline' | 'rowLeader'>, kind: WrunHoverBlock['kind'], cardMark?: number): WrunHudTileLookDefaults;
240
+ /** The luminance of a palette's background, read as a light theme above
241
+ * 0.5; an unreadable colour counts as dark (the chart's default). */
242
+ export declare function wrunHudThemeIsLight(theme: WrunColorTheme | undefined): boolean;
243
+ /** The text the `cover` chrome's tile holds: the chart's base asset, read
244
+ * off the display symbol (a known quote suffix and a pool address stripped),
245
+ * at most five characters; empty for no symbol. */
246
+ export declare function wrunHudCoverText(symbol: unknown): string;