@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.
- package/README.md +72 -0
- package/dist/constants/governed-exchanges.constants.d.ts +11 -0
- package/dist/constants/governed-exchanges.constants.js +11 -0
- package/dist/constants/indicator-sets.constants.d.ts +8 -0
- package/dist/constants/indicator-sets.constants.js +8 -0
- package/dist/constants/interval.constants.d.ts +34 -0
- package/dist/constants/interval.constants.js +121 -0
- package/dist/constants/scriptEditor/technicalIndicatorScriptKeys.constants.d.ts +28 -0
- package/dist/constants/scriptEditor/technicalIndicatorScriptKeys.constants.js +65 -0
- package/dist/constants/tpo-color-schemes.constants.d.ts +30 -0
- package/dist/constants/tpo-color-schemes.constants.js +32 -0
- package/dist/host-env.d.ts +102 -0
- package/dist/host-env.js +26 -0
- package/dist/index.d.ts +93 -0
- package/dist/index.js +96 -0
- package/dist/indicators/controls/tpo-letter.util.d.ts +2 -0
- package/dist/indicators/controls/tpo-letter.util.js +13 -0
- package/dist/indicators/controls/tpo-session.util.d.ts +99 -0
- package/dist/indicators/controls/tpo-session.util.js +389 -0
- package/dist/interfaces/kscript-diagnostics.interface.d.ts +64 -0
- package/dist/interfaces/kscript-diagnostics.interface.js +1 -0
- package/dist/interfaces/om-panel-data.interface.d.ts +103 -0
- package/dist/interfaces/om-panel-data.interface.js +7 -0
- package/dist/interfaces/wrun-runtime.interface.d.ts +2659 -0
- package/dist/interfaces/wrun-runtime.interface.js +55 -0
- package/dist/utility/chart/calendar-interval.util.d.ts +24 -0
- package/dist/utility/chart/calendar-interval.util.js +81 -0
- package/dist/utility/chart/candle-bar-end.util.d.ts +15 -0
- package/dist/utility/chart/candle-bar-end.util.js +23 -0
- package/dist/utility/chart/cme-realtime.util.d.ts +24 -0
- package/dist/utility/chart/cme-realtime.util.js +53 -0
- package/dist/utility/chart/interval-ladder.util.d.ts +27 -0
- package/dist/utility/chart/interval-ladder.util.js +92 -0
- package/dist/utility/chart/kscript-drawing-prep.util.d.ts +40 -0
- package/dist/utility/chart/kscript-drawing-prep.util.js +184 -0
- package/dist/utility/chart/kscript-drawing-safe-area.util.d.ts +95 -0
- package/dist/utility/chart/kscript-drawing-safe-area.util.js +805 -0
- package/dist/utility/chart/kscript-legend-entries.util.d.ts +166 -0
- package/dist/utility/chart/kscript-legend-entries.util.js +538 -0
- package/dist/utility/chart/kscript-output-role.util.d.ts +32 -0
- package/dist/utility/chart/kscript-output-role.util.js +215 -0
- package/dist/utility/chart/kscript-provenance-keys.util.d.ts +22 -0
- package/dist/utility/chart/kscript-provenance-keys.util.js +56 -0
- package/dist/utility/chart/kscript-run-result-normalize.util.d.ts +53 -0
- package/dist/utility/chart/kscript-run-result-normalize.util.js +476 -0
- package/dist/utility/chart/kscript-run-result-shape.util.d.ts +14 -0
- package/dist/utility/chart/kscript-run-result-shape.util.js +66 -0
- package/dist/utility/chart/kscript-titancharts-container.util.d.ts +29 -0
- package/dist/utility/chart/kscript-titancharts-container.util.js +151 -0
- package/dist/utility/chart/kscript-viewport-overlays.util.d.ts +83 -0
- package/dist/utility/chart/kscript-viewport-overlays.util.js +443 -0
- package/dist/utility/chart/om-panel-push-style.util.d.ts +78 -0
- package/dist/utility/chart/om-panel-push-style.util.js +301 -0
- package/dist/utility/chart/om-panel.util.d.ts +166 -0
- package/dist/utility/chart/om-panel.util.js +815 -0
- package/dist/utility/chart/om-series.util.d.ts +42 -0
- package/dist/utility/chart/om-series.util.js +330 -0
- package/dist/utility/chart/om-target.util.d.ts +11 -0
- package/dist/utility/chart/om-target.util.js +24 -0
- package/dist/utility/chart/om-widget.util.d.ts +148 -0
- package/dist/utility/chart/om-widget.util.js +413 -0
- package/dist/utility/chart/overlay-output-budget.util.d.ts +16 -0
- package/dist/utility/chart/overlay-output-budget.util.js +109 -0
- package/dist/utility/chart/overlay-paint-flags.util.d.ts +24 -0
- package/dist/utility/chart/overlay-paint-flags.util.js +55 -0
- package/dist/utility/chart/profile-row-height.util.d.ts +21 -0
- package/dist/utility/chart/profile-row-height.util.js +110 -0
- package/dist/utility/chart/session-interval.util.d.ts +1 -0
- package/dist/utility/chart/session-interval.util.js +35 -0
- package/dist/utility/chart/technical-script-legend-value.util.d.ts +18 -0
- package/dist/utility/chart/technical-script-legend-value.util.js +53 -0
- package/dist/utility/chart/trading-day.util.d.ts +70 -0
- package/dist/utility/chart/trading-day.util.js +238 -0
- package/dist/utility/chart/wrun-legend-name.util.d.ts +25 -0
- package/dist/utility/chart/wrun-legend-name.util.js +87 -0
- package/dist/utility/chart/wrun-run-result.util.d.ts +977 -0
- package/dist/utility/chart/wrun-run-result.util.js +5179 -0
- package/dist/utility/chart/wrun-visibility-chart.util.d.ts +25 -0
- package/dist/utility/chart/wrun-visibility-chart.util.js +22 -0
- package/dist/utility/indicators/heatmap-sensitivity.util.d.ts +62 -0
- package/dist/utility/indicators/heatmap-sensitivity.util.js +82 -0
- package/dist/utility/number-format.util.d.ts +68 -0
- package/dist/utility/number-format.util.js +188 -0
- package/dist/utility/v2/opra-governed.util.d.ts +1 -0
- package/dist/utility/v2/opra-governed.util.js +13 -0
- package/dist/utility/wrun/wrun-auto-row.util.d.ts +54 -0
- package/dist/utility/wrun/wrun-auto-row.util.js +96 -0
- package/dist/utility/wrun/wrun-batched-marks.util.d.ts +341 -0
- package/dist/utility/wrun/wrun-batched-marks.util.js +938 -0
- package/dist/utility/wrun/wrun-batched-readout.util.d.ts +75 -0
- package/dist/utility/wrun/wrun-batched-readout.util.js +171 -0
- package/dist/utility/wrun/wrun-box-segment.util.d.ts +185 -0
- package/dist/utility/wrun/wrun-box-segment.util.js +570 -0
- package/dist/utility/wrun/wrun-build-memo.util.d.ts +133 -0
- package/dist/utility/wrun/wrun-build-memo.util.js +301 -0
- package/dist/utility/wrun/wrun-builtin-twin-ports.util.d.ts +25 -0
- package/dist/utility/wrun/wrun-builtin-twin-ports.util.js +75 -0
- package/dist/utility/wrun/wrun-builtin-twin.util.d.ts +9 -0
- package/dist/utility/wrun/wrun-builtin-twin.util.js +40 -0
- package/dist/utility/wrun/wrun-canvas-cache.util.d.ts +28 -0
- package/dist/utility/wrun/wrun-canvas-cache.util.js +56 -0
- package/dist/utility/wrun/wrun-canvas-readout.util.d.ts +69 -0
- package/dist/utility/wrun/wrun-canvas-readout.util.js +53 -0
- package/dist/utility/wrun/wrun-canvases.util.d.ts +295 -0
- package/dist/utility/wrun/wrun-canvases.util.js +1432 -0
- package/dist/utility/wrun/wrun-cap-notice.util.d.ts +77 -0
- package/dist/utility/wrun/wrun-cap-notice.util.js +296 -0
- package/dist/utility/wrun/wrun-card-style.util.d.ts +154 -0
- package/dist/utility/wrun/wrun-card-style.util.js +539 -0
- package/dist/utility/wrun/wrun-chart-context.util.d.ts +89 -0
- package/dist/utility/wrun/wrun-chart-context.util.js +213 -0
- package/dist/utility/wrun/wrun-chart-names.util.d.ts +23 -0
- package/dist/utility/wrun/wrun-chart-names.util.js +33 -0
- package/dist/utility/wrun/wrun-chart-time.util.d.ts +12 -0
- package/dist/utility/wrun/wrun-chart-time.util.js +23 -0
- package/dist/utility/wrun/wrun-child-overlay-id.util.d.ts +13 -0
- package/dist/utility/wrun/wrun-child-overlay-id.util.js +44 -0
- package/dist/utility/wrun/wrun-color-facts.util.d.ts +40 -0
- package/dist/utility/wrun/wrun-color-facts.util.js +88 -0
- package/dist/utility/wrun/wrun-color-settings.lazy.d.ts +26 -0
- package/dist/utility/wrun/wrun-color-settings.lazy.js +9 -0
- package/dist/utility/wrun/wrun-color-settings.util.d.ts +351 -0
- package/dist/utility/wrun/wrun-color-settings.util.js +1363 -0
- package/dist/utility/wrun/wrun-footprint-modes.util.d.ts +23 -0
- package/dist/utility/wrun/wrun-footprint-modes.util.js +24 -0
- package/dist/utility/wrun/wrun-frames.d.ts +217 -0
- package/dist/utility/wrun/wrun-frames.js +1021 -0
- package/dist/utility/wrun/wrun-handles.util.d.ts +792 -0
- package/dist/utility/wrun/wrun-handles.util.js +2050 -0
- package/dist/utility/wrun/wrun-heatmap-cell-budget.util.d.ts +156 -0
- package/dist/utility/wrun/wrun-heatmap-cell-budget.util.js +342 -0
- package/dist/utility/wrun/wrun-hosted-wire-caps.d.ts +218 -0
- package/dist/utility/wrun/wrun-hosted-wire-caps.js +667 -0
- package/dist/utility/wrun/wrun-hosted-wire.util.d.ts +40 -0
- package/dist/utility/wrun/wrun-hosted-wire.util.js +27 -0
- package/dist/utility/wrun/wrun-hover.util.d.ts +182 -0
- package/dist/utility/wrun/wrun-hover.util.js +534 -0
- package/dist/utility/wrun/wrun-hud-looks.util.d.ts +246 -0
- package/dist/utility/wrun/wrun-hud-looks.util.js +587 -0
- package/dist/utility/wrun/wrun-integration-budget.util.d.ts +47 -0
- package/dist/utility/wrun/wrun-integration-budget.util.js +122 -0
- package/dist/utility/wrun/wrun-latest-snapshot.d.ts +19 -0
- package/dist/utility/wrun/wrun-latest-snapshot.js +7 -0
- package/dist/utility/wrun/wrun-levels-child.util.d.ts +131 -0
- package/dist/utility/wrun/wrun-levels-child.util.js +514 -0
- package/dist/utility/wrun/wrun-lifecycle.contract.d.ts +75 -0
- package/dist/utility/wrun/wrun-lifecycle.contract.js +9 -0
- package/dist/utility/wrun/wrun-market-facts.util.d.ts +116 -0
- package/dist/utility/wrun/wrun-market-facts.util.js +238 -0
- package/dist/utility/wrun/wrun-output-style.util.d.ts +344 -0
- package/dist/utility/wrun/wrun-output-style.util.js +1239 -0
- package/dist/utility/wrun/wrun-overlay-identity.util.d.ts +84 -0
- package/dist/utility/wrun/wrun-overlay-identity.util.js +142 -0
- package/dist/utility/wrun/wrun-overlay-result.util.d.ts +120 -0
- package/dist/utility/wrun/wrun-overlay-result.util.js +219 -0
- package/dist/utility/wrun/wrun-pack.util.d.ts +70 -0
- package/dist/utility/wrun/wrun-pack.util.js +301 -0
- package/dist/utility/wrun/wrun-pane-format.util.d.ts +180 -0
- package/dist/utility/wrun/wrun-pane-format.util.js +299 -0
- package/dist/utility/wrun/wrun-panel-style.lazy.d.ts +25 -0
- package/dist/utility/wrun/wrun-panel-style.lazy.js +15 -0
- package/dist/utility/wrun/wrun-panel-style.util.d.ts +174 -0
- package/dist/utility/wrun/wrun-panel-style.util.js +726 -0
- package/dist/utility/wrun/wrun-param-values.util.d.ts +69 -0
- package/dist/utility/wrun/wrun-param-values.util.js +230 -0
- package/dist/utility/wrun/wrun-refusal.util.d.ts +263 -0
- package/dist/utility/wrun/wrun-refusal.util.js +1259 -0
- package/dist/utility/wrun/wrun-registry-errors.util.d.ts +199 -0
- package/dist/utility/wrun/wrun-registry-errors.util.js +257 -0
- package/dist/utility/wrun/wrun-render-select.util.d.ts +336 -0
- package/dist/utility/wrun/wrun-render-select.util.js +1157 -0
- package/dist/utility/wrun/wrun-script-inputs.util.d.ts +434 -0
- package/dist/utility/wrun/wrun-script-inputs.util.js +1971 -0
- package/dist/utility/wrun/wrun-setting-words.lazy.d.ts +20 -0
- package/dist/utility/wrun/wrun-setting-words.lazy.js +9 -0
- package/dist/utility/wrun/wrun-setting-words.util.d.ts +79 -0
- package/dist/utility/wrun/wrun-setting-words.util.js +176 -0
- package/dist/utility/wrun/wrun-socket-row-store.d.ts +98 -0
- package/dist/utility/wrun/wrun-socket-row-store.js +417 -0
- package/dist/utility/wrun/wrun-style-flags.util.d.ts +18 -0
- package/dist/utility/wrun/wrun-style-flags.util.js +21 -0
- package/dist/utility/wrun/wrun-style-words.util.d.ts +148 -0
- package/dist/utility/wrun/wrun-style-words.util.js +439 -0
- package/dist/utility/wrun/wrun-table-look.util.d.ts +125 -0
- package/dist/utility/wrun/wrun-table-look.util.js +225 -0
- package/dist/utility/wrun/wrun-text-look.util.d.ts +51 -0
- package/dist/utility/wrun/wrun-text-look.util.js +227 -0
- package/dist/utility/wrun/wrun-text-params.util.d.ts +106 -0
- package/dist/utility/wrun/wrun-text-params.util.js +171 -0
- package/dist/utility/wrun/wrun-tpo-rows.util.d.ts +71 -0
- package/dist/utility/wrun/wrun-tpo-rows.util.js +438 -0
- package/dist/utility/wrun/wrun-twin-compute-inputs.util.d.ts +14 -0
- package/dist/utility/wrun/wrun-twin-compute-inputs.util.js +58 -0
- package/dist/utility/wrun/wrun-visibility-table.d.ts +437 -0
- package/dist/utility/wrun/wrun-visibility-table.js +237 -0
- package/dist/utility/wrun/wrun-volume-profile.util.d.ts +37 -0
- package/dist/utility/wrun/wrun-volume-profile.util.js +278 -0
- package/package.json +38 -0
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Colour settings for browser-run Indicators (frozen sheet contract, round 6):
|
|
3
|
+
* how a colour param's packed default, the overlay's picked colour string and
|
|
4
|
+
* the sheet locations it paints fit together, and the ONE seam that repaints
|
|
5
|
+
* a sheet with the overlay's current settings.
|
|
6
|
+
*
|
|
7
|
+
* - A compute colour param (`type: 'color'`, no om `style`) defaults to the
|
|
8
|
+
* packed colour `((r * 256 + g) * 256 + b) * 1024 + round(alpha * 1000)`
|
|
9
|
+
* (the `color_packed_by` wire). The settings dialog shows and stores a
|
|
10
|
+
* colour STRING; init() receives the packed number of the stored string
|
|
11
|
+
* (an unparsable setting falls back to the default).
|
|
12
|
+
* - `color_array: '<kScript input name>'` groups N consecutive colour params
|
|
13
|
+
* into one colour-array row stored under that key (member i = element i),
|
|
14
|
+
* the kScript `color[]` input's own shape.
|
|
15
|
+
* - An om `style` knob never reaches init() (its slot holds 0, the om
|
|
16
|
+
* runtime's rule) and sets its bound output's property.
|
|
17
|
+
* - `style_targets` lists every sheet location a colour param, a number /
|
|
18
|
+
* int / select param (round 7: widths, line styles; a select writes
|
|
19
|
+
* `style_values[value]` when it declares them), a boolean param (its state
|
|
20
|
+
* in the kind the location holds: true / false or 1 / 0, e.g. a Smooth
|
|
21
|
+
* toggle on each line's `smooth`, a stats row's switch at
|
|
22
|
+
* `renderers.<name>.visible`, which a legacy 0..1 switch param paints the
|
|
23
|
+
* same way, or an output's `visible`, which makes the param OWN that
|
|
24
|
+
* output's visibility, wrunVisibilityOwners) or a style knob sets;
|
|
25
|
+
* `wrunSheetWithSettings` writes them into a copy of the sheet
|
|
26
|
+
* before anything reads it (run request, run result, live ticks), so every
|
|
27
|
+
* reader downstream (ladders, ranges, renderers, tables, handle defaults,
|
|
28
|
+
* legend, price tags) sees the chosen colours. A target's `alpha`
|
|
29
|
+
* REPLACES the pick's own alpha (the kScript engine's opacity() rule, see
|
|
30
|
+
* WrunStyleTarget).
|
|
31
|
+
*
|
|
32
|
+
* Typed inputs (WRUN-INPUTS-PLAN 1.1, 1.5, 1.7) ride the same seam:
|
|
33
|
+
* - A host-applied param (`host: 'source' | 'interval' | 'symbol'`) stays an
|
|
34
|
+
* ordinary numeric init arg (its index, 0 for a symbol) and, on the browser
|
|
35
|
+
* host only, rewrites the pins of every input bound to it (`field_param`,
|
|
36
|
+
* `interval_param`, `symbol_param` on the input): the frozen field word at
|
|
37
|
+
* the setting index (the blends hl2 / hlc3 / ohlc4 / hlcc4 included, the
|
|
38
|
+
* row builder derives them), the frozen interval word (index 0 = follow the chart = the pin
|
|
39
|
+
* key removed), the `EXCHANGE:SYMBOL` text split into both pins. A setting
|
|
40
|
+
* at the declared default writes nothing: the extractor baked the default
|
|
41
|
+
* pins into the sheet.
|
|
42
|
+
* - A volume-profile bucket size bound to a setting (frozen authoring
|
|
43
|
+
* contract C1.3, the in-source `ticks_per_bar: "@<int param>"`): an input
|
|
44
|
+
* bound to a declared param (`ticks_per_bar_param` beside a numeric
|
|
45
|
+
* default, or the reference verbatim in `ticks_per_bar`) takes that
|
|
46
|
+
* param's current value (the setting, else its default) as its
|
|
47
|
+
* `ticks_per_bar`, so the lane request, the live fold and a settings
|
|
48
|
+
* change follow it, the way a timeframe or symbol param rewrites its pins.
|
|
49
|
+
* A value equal to the baked `ticks_per_bar` writes nothing; the lane util
|
|
50
|
+
* clamps it to 1..500 (`wrunVolumeProfileLaneExtras`).
|
|
51
|
+
* - The lane words (kit 0.77.0, `laneWordWrites`): `currency_param` and `when`.
|
|
52
|
+
* - A Style page row (`__style__<output>__<property>`, an FE-only declared
|
|
53
|
+
* input that never reaches any host) writes the output's `width`,
|
|
54
|
+
* `line_style`, `color` or `opacity` (created when the sheet left the key
|
|
55
|
+
* to the adapter's default), and `colors` recolours a two-tone histogram's
|
|
56
|
+
* declared `colors` swatch by swatch. An output's `visible` row is no
|
|
57
|
+
* sheet write: the run applies it through `applyWrunOutputVisibility`
|
|
58
|
+
* after integration. An output a boolean param owns has no such row: the
|
|
59
|
+
* param's flag is the sheet's `visible`, which that apply reads.
|
|
60
|
+
* - The targets past the outputs are the visibility table's
|
|
61
|
+
* (wrun-visibility-table.ts, frozen identities): a renderer of any kind
|
|
62
|
+
* (`text:<name>`), a heatmap (`heatmap:<name>`), a profile
|
|
63
|
+
* (`profile:<name>`), a docked level (`levels:<name>`), a batched section
|
|
64
|
+
* (`marks:<name>`, `spans:<name>`, `rays:<name>`), a band
|
|
65
|
+
* (`fill:<first>/<second>#<n>`, `range:<upper>/<lower>#<n>`), a box
|
|
66
|
+
* (`box:<name>`), a segment (`segment:<name>`), a sheet drawing
|
|
67
|
+
* (`drawing:<kind>:<name>`), a draw-API handle kind (`handles:<kind>`), a
|
|
68
|
+
* matrix (`matrix:<name>`) and a panel (`panel:<name>`). A Visible row is a
|
|
69
|
+
* sheet write on the declaration only for the table's `skip` group
|
|
70
|
+
* (wrunStyleTargetWrites: `visible: false` mounts nothing,
|
|
71
|
+
* isWrunStyleTargetHidden); the colour rows land on the keys the builders
|
|
72
|
+
* already read. A change to any of them, or to an output's `colors`,
|
|
73
|
+
* reruns: the in-place patch (wrun-style-patch.util) reaches an output's
|
|
74
|
+
* color, width, line_style and opacity, and the Visible rows of the
|
|
75
|
+
* table's `nested` group, only.
|
|
76
|
+
* - A colour lands in the kind its location holds: a colour word into a
|
|
77
|
+
* string location, the packed number (the colour param's own form) into a
|
|
78
|
+
* batched section's `colors` slot holding a number (packed by the build;
|
|
79
|
+
* any other number, a width or an opacity, is no colour and stays), so a
|
|
80
|
+
* colour param bound through `style_targets` and a `colors` row paint either.
|
|
81
|
+
*/
|
|
82
|
+
import type { WrunIndicatorMetadata, WrunMetadataParam, WrunParamStyleBinding } from '../../interfaces/wrun-runtime.interface.js';
|
|
83
|
+
import { type WrunVisibilityPrefix, type WrunVisibilitySheet } from './wrun-visibility-table.js';
|
|
84
|
+
import { type WrunRgba } from './wrun-color-facts.util.js';
|
|
85
|
+
export { isWrunHeatmapSensitivityRowKey, isWrunHudLookRowKey, isWrunHudPlaceRowKey, isWrunHudViewerRowKey, isWrunStyleRowKey, isWrunViewerRowKey, packWrunColor, parseWrunColor, WRUN_HUD_LOOK_ROW_PREFIX, WRUN_STYLE_ROW_PREFIX, type WrunRgba, } from './wrun-color-facts.util.js';
|
|
86
|
+
declare const WRUN_LINE_STYLES: readonly ["solid", "dashed", "dotted"];
|
|
87
|
+
export type WrunLineStyle = (typeof WRUN_LINE_STYLES)[number];
|
|
88
|
+
/** The frozen `param.source` field list (plan 1.7, the kit's
|
|
89
|
+
* WRUN_SOURCE_FIELD_WORDS): a `_field` select's value is the index into this
|
|
90
|
+
* list (hlcc4 is 8). The blends (hl2 / hlc3 / ohlc4 / hlcc4) are derived by
|
|
91
|
+
* the row builder from the candle's open / high / low / close
|
|
92
|
+
* (wrunSourceBlend). */
|
|
93
|
+
export declare const WRUN_SOURCE_FIELDS: ReadonlyArray<string>;
|
|
94
|
+
/** The frozen `param.timeframe` word list (plan 1.7): a timeframe select's
|
|
95
|
+
* value is the index into this list; index 0 follows the chart (no pin). */
|
|
96
|
+
export declare const WRUN_TIMEFRAME_WORDS: ReadonlyArray<string>;
|
|
97
|
+
export interface WrunParamChoice {
|
|
98
|
+
value: number;
|
|
99
|
+
label: string;
|
|
100
|
+
}
|
|
101
|
+
/** A select param's choices: its `options` or, without them, the integers
|
|
102
|
+
* min..max, each labelled by `option_labels` at the same position (else by
|
|
103
|
+
* its value). Undefined when the param declares no usable choice set. */
|
|
104
|
+
export declare function wrunParamChoices(param: WrunMetadataParam): WrunParamChoice[] | undefined;
|
|
105
|
+
/**
|
|
106
|
+
* A select setting resolved against the row's option strings and their
|
|
107
|
+
* labels: the ONE select read. The dialog's row codec, the run values, the
|
|
108
|
+
* cloud param map, the sheet's host pins and its style targets all read a
|
|
109
|
+
* persisted choice through it, so every lane agrees. A string that is an
|
|
110
|
+
* option is itself; an option label is its option; a number, or a numeric
|
|
111
|
+
* string, is the option whose string it is, else (an integer that names no
|
|
112
|
+
* option) the option at that index; anything else, an index past the
|
|
113
|
+
* options included (a choice persisted before the author dropped one), is
|
|
114
|
+
* undefined, and the reader keeps its declared default. A row without
|
|
115
|
+
* options passes the value through.
|
|
116
|
+
*/
|
|
117
|
+
export declare function wrunSelectOptionValue(options: ReadonlyArray<string>, labels: ReadonlyArray<string>, raw: unknown): string | undefined;
|
|
118
|
+
/** A select PARAM's setting as its option value (the number init() and the
|
|
119
|
+
* sheet writes take), through the one select read over the param's choice
|
|
120
|
+
* set; undefined when the param declares no usable choice set (the number
|
|
121
|
+
* field's read applies) or the setting names no option. */
|
|
122
|
+
export declare function wrunSelectParamValue(param: WrunMetadataParam, raw: unknown): number | undefined;
|
|
123
|
+
/** `colors` (C1) is a two-swatch value for a two-tone histogram (its `colors`
|
|
124
|
+
* pair or `color_by` palette) and a child's colour list (wrunStyleTargetWrites). */
|
|
125
|
+
export type WrunStyleRowProperty = 'visible' | 'width' | 'lineStyle' | 'color' | 'opacity' | 'colors';
|
|
126
|
+
/** A Style page row key read back: the target it styles (an output name, or
|
|
127
|
+
* a prefixed declaration, parseWrunStyleTarget) and the property. */
|
|
128
|
+
export declare function parseWrunStyleRowKey(key: string): {
|
|
129
|
+
output: string;
|
|
130
|
+
property: WrunStyleRowProperty;
|
|
131
|
+
} | undefined;
|
|
132
|
+
/** A Style row target's kind: an output, a prefix of the visibility table (wrun-visibility-table.ts
|
|
133
|
+
* WRUN_VISIBILITY_RULES: `text:` a renderer of any kind, `heatmap:` / `profile:` a price canvas,
|
|
134
|
+
* `levels:` a docked level, `marks:` / `spans:` / `rays:` a batched section, `fill:` / `range:` a
|
|
135
|
+
* band, `box:`, `segment:`, `drawing:`, `handles:`, `matrix:`, `panel:`), or `unknown`: a prefix the
|
|
136
|
+
* table does not list. */
|
|
137
|
+
export type WrunStyleTargetKind = 'output' | 'unknown' | WrunVisibilityPrefix;
|
|
138
|
+
/** A Style row target read back: a prefix the visibility table lists and the identity after it,
|
|
139
|
+
* else an output name as written (an output name never carries a colon, the kit's output grammar),
|
|
140
|
+
* else `unknown`: a target with a colon the table does not list is refused, never read as an output
|
|
141
|
+
* name (a write for it paints nothing). */
|
|
142
|
+
export declare function parseWrunStyleTarget(target: string): {
|
|
143
|
+
kind: WrunStyleTargetKind;
|
|
144
|
+
name: string;
|
|
145
|
+
};
|
|
146
|
+
/** True for a declaration a Style row's Visible switched off (C1: a text
|
|
147
|
+
* renderer, heatmap, profile or levels declaration the seam painted
|
|
148
|
+
* `visible: false`): it mounts nothing, the stats-row rule. Absent or true
|
|
149
|
+
* draws. */
|
|
150
|
+
export declare function isWrunStyleTargetHidden(declaration: unknown): boolean;
|
|
151
|
+
export declare function wrunHudLookRowKey(name: string): string;
|
|
152
|
+
/** A HUD Look row key read back: the HUD it belongs to. */
|
|
153
|
+
export declare function parseWrunHudLookRowKey(key: string): {
|
|
154
|
+
name: string;
|
|
155
|
+
} | undefined;
|
|
156
|
+
/** The viewer's Look pick for one HUD under the overlay's settings: the
|
|
157
|
+
* stored word, or undefined for "As made" (absent, empty, not a string).
|
|
158
|
+
* The resolver checks the word against the look list. */
|
|
159
|
+
export declare function wrunHudLookSetting(settings: unknown, name: string): string | undefined;
|
|
160
|
+
declare const WRUN_HUD_PLACE_ANCHORS: readonly ["top_left", "top_center", "top_right", "middle_left", "middle_center", "middle_right", "bottom_left", "bottom_center", "bottom_right"];
|
|
161
|
+
export type WrunHudPlaceAnchor = (typeof WRUN_HUD_PLACE_ANCHORS)[number];
|
|
162
|
+
export interface WrunHudPlaceSetting {
|
|
163
|
+
anchor: WrunHudPlaceAnchor;
|
|
164
|
+
/** When the viewer made the move, ms: the later move sits outermost in a shared place. */
|
|
165
|
+
at: number;
|
|
166
|
+
/** A free drop: the nudge inward from the place, px. Absent = snapped into the place. */
|
|
167
|
+
nudge?: [number, number];
|
|
168
|
+
}
|
|
169
|
+
export declare function wrunHudPlaceRowKey(name: string): string;
|
|
170
|
+
/** The viewer's Sensitivity for one heatmap (`heatmap:<name>:sensitivity`):
|
|
171
|
+
* a 0..100 slider position on the options heatmap's Subtle..Vivid map
|
|
172
|
+
* (options-heatmap-encoding.util), stored on the overlay beside the HUD rows
|
|
173
|
+
* and never written into the sheet: the run keeps the author's bounds and
|
|
174
|
+
* the mount re-picks them (wrun-canvases.util). Absent or null is the
|
|
175
|
+
* author's `auto_quantile`, exactly. */
|
|
176
|
+
export declare function wrunHeatmapSensitivityRowKey(name: string): string;
|
|
177
|
+
/** A Sensitivity value read as a position: a finite number clamped into
|
|
178
|
+
* 0..100; undefined (draw the author's bounds) for anything else. */
|
|
179
|
+
export declare function wrunHeatmapSensitivityValue(raw: unknown): number | undefined;
|
|
180
|
+
/** The viewer's Sensitivity for one heatmap under the overlay's settings: a
|
|
181
|
+
* finite stored position, clamped into 0..100; undefined (draw the author's
|
|
182
|
+
* bounds) for anything else, null and absent included. */
|
|
183
|
+
export declare function wrunHeatmapSensitivitySetting(settings: unknown, name: string): number | undefined;
|
|
184
|
+
/** True when a save moves the Sensitivity any heatmap draws with (a value set,
|
|
185
|
+
* changed or cleared, read as wrunHeatmapSensitivitySetting reads it). */
|
|
186
|
+
export declare function wrunHeatmapSensitivityChanged(prev: unknown, next: unknown): boolean;
|
|
187
|
+
/** A save whose every change is a HUD's viewer row (its Look pick, its place): rows only the FE-drawn
|
|
188
|
+
* card reads, so no run, canvas paint or legend row depends on them. `patch` is what the save
|
|
189
|
+
* sends; its keys are compared with the overlay's current settings (`current`). */
|
|
190
|
+
export declare function onlyWrunHudViewerRowsChanged(current: unknown, patch: unknown): boolean;
|
|
191
|
+
/** A stored place read back; anything malformed reads as "where the script puts it". */
|
|
192
|
+
export declare function parseWrunHudPlace(raw: unknown): WrunHudPlaceSetting | undefined;
|
|
193
|
+
export declare function formatWrunHudPlace(place: WrunHudPlaceSetting): string;
|
|
194
|
+
/** The viewer's place for one HUD under the overlay's settings, or undefined (the script's place). */
|
|
195
|
+
export declare function wrunHudPlaceSetting(settings: unknown, name: string): WrunHudPlaceSetting | undefined;
|
|
196
|
+
/** A packed colour (the `color_packed_by` wire) as the engine's own
|
|
197
|
+
* `rgba(r, g, b, a)` spelling. A non-finite, negative, fractional or
|
|
198
|
+
* out-of-range value (alpha thousandths past 1000) decodes to no colour. */
|
|
199
|
+
export declare function decodeWrunPackedColor(value: unknown): string | undefined;
|
|
200
|
+
/** A colour as a settings string: `#rrggbb` when opaque, else the engine's
|
|
201
|
+
* `rgba(r, g, b, a)` spelling (an 8-digit hex cannot hold every
|
|
202
|
+
* thousandth). */
|
|
203
|
+
export declare function wrunColorString(rgba: WrunRgba): string;
|
|
204
|
+
/** An om style knob (a param with `style`): never reaches init(). The om
|
|
205
|
+
* runtime's own test is the key's presence. */
|
|
206
|
+
export declare function isWrunStyleParam(param: WrunMetadataParam): boolean;
|
|
207
|
+
/** A compute colour param: `type: 'color'`, no om `style`, and a packed
|
|
208
|
+
* default the FE decodes (one it cannot decode keeps the number field the
|
|
209
|
+
* param rendered as before the key). */
|
|
210
|
+
export declare function isWrunColorParam(param: WrunMetadataParam): boolean;
|
|
211
|
+
/** The colour-array key of a compute colour param, when it declares one. */
|
|
212
|
+
export declare function wrunColorArrayKey(param: WrunMetadataParam): string | undefined;
|
|
213
|
+
/** A colour param's default as a settings string (`#rrggbb` or rgba). */
|
|
214
|
+
export declare function wrunColorParamDefault(param: WrunMetadataParam): string;
|
|
215
|
+
/** A colour setting as the string the chart paints, or undefined when it is
|
|
216
|
+
* no colour: a parsable string verbatim (the kScript engine hands a colour
|
|
217
|
+
* input's value through as written), a packed number decoded. */
|
|
218
|
+
export declare function wrunColorSettingString(value: unknown): string | undefined;
|
|
219
|
+
/** Each colour-array member's key and position (member i = element i of
|
|
220
|
+
* the row stored under the key), in param order. */
|
|
221
|
+
export declare function wrunColorArrayMembers(params: ReadonlyArray<WrunMetadataParam>): Map<string, {
|
|
222
|
+
key: string;
|
|
223
|
+
index: number;
|
|
224
|
+
}>;
|
|
225
|
+
/** The colour a colour param paints under the overlay's settings: the
|
|
226
|
+
* setting when it is a colour, else the declared default. */
|
|
227
|
+
export declare function wrunColorParamSetting(param: WrunMetadataParam, settings: unknown, members?: Map<string, {
|
|
228
|
+
key: string;
|
|
229
|
+
index: number;
|
|
230
|
+
}>): string;
|
|
231
|
+
/** The packed colour init() receives for a colour param: the setting's
|
|
232
|
+
* colour packed, else (no setting, or no colour) the declared default. */
|
|
233
|
+
export declare function wrunColorParamPacked(param: WrunMetadataParam, settings: unknown, members?: Map<string, {
|
|
234
|
+
key: string;
|
|
235
|
+
index: number;
|
|
236
|
+
}>): number;
|
|
237
|
+
/** An om style knob's current value under the overlay's settings (the
|
|
238
|
+
* setting when it fits the property, else the declared default), or
|
|
239
|
+
* undefined when neither fits. */
|
|
240
|
+
export declare function wrunStyleParamValue(param: WrunMetadataParam, settings: unknown): string | number | undefined;
|
|
241
|
+
/** The line styles a lineStyle knob offers (the dialog's select values). */
|
|
242
|
+
export declare function wrunLineStyles(): string[];
|
|
243
|
+
/** The binding a style knob renders by (undefined when malformed). */
|
|
244
|
+
export declare function wrunStyleBinding(param: WrunMetadataParam): WrunParamStyleBinding | undefined;
|
|
245
|
+
/** The declaration a painted container was copied from, or the container itself. */
|
|
246
|
+
export declare function wrunPaintedDeclarationOf<T extends object>(value: T): T;
|
|
247
|
+
/**
|
|
248
|
+
* What a number / int / select / boolean param with `style_targets` writes
|
|
249
|
+
* (frozen sheet contract, round 7): its current value (the flat setting when
|
|
250
|
+
* Number() reads it as finite, a select's through the one select read, else
|
|
251
|
+
* the declared default: the value init() receives), or `style_values[value]`
|
|
252
|
+
* for a select that declares them (a
|
|
253
|
+
* line-style select writes "dashed", never 1). A boolean reads as 1 or 0 here,
|
|
254
|
+
* the module's own form; at a target it is written in the kind the location
|
|
255
|
+
* holds (applyWrite). Undefined when neither fits.
|
|
256
|
+
*/
|
|
257
|
+
export declare function wrunValueParamSetting(param: WrunMetadataParam, settings: unknown): string | number | undefined;
|
|
258
|
+
/**
|
|
259
|
+
* THE param-owned visibility reader: the boolean params that own a drawn
|
|
260
|
+
* target's visibility, each with the Style targets it owns in its
|
|
261
|
+
* `style_targets` order, over every section the visibility table lists
|
|
262
|
+
* (wrun-visibility-table.ts, the same targets the Style page offers): a
|
|
263
|
+
* `type: 'boolean'` param (no om `style`) with a target `{ path: [<section>,
|
|
264
|
+
* <name or index>, 'visible'] }` on a drawn entry whose declaration holds
|
|
265
|
+
* `visible` as a boolean (the ports harness requires the key, so the param's
|
|
266
|
+
* flag always lands, paramWrites; a stats row's switch is one). Such a param
|
|
267
|
+
* IS the target's Visible control: the Style page builds no Visible row for
|
|
268
|
+
* it and places the param in that row's slot (wrun-script-inputs.util
|
|
269
|
+
* stylePlacements), and the visibility apply reads the painted sheet's
|
|
270
|
+
* `visible` over any `__style__<target>__visible` setting saved under an
|
|
271
|
+
* earlier package version (wrunOutputVisibleState). The kit's `{ output,
|
|
272
|
+
* property }` spelling and a `paints` word never reach `visible`.
|
|
273
|
+
*/
|
|
274
|
+
export declare function wrunVisibilityTargetOwners(metadata: WrunVisibilitySheet | undefined): Map<string, string[]>;
|
|
275
|
+
/** The outputs' half of the param-owned visibility (wrunVisibilityTargetOwners): each boolean
|
|
276
|
+
* param with the drawn OUTPUTS it owns, by name (an output's target is its name). */
|
|
277
|
+
export declare function wrunVisibilityOwners(metadata: WrunVisibilitySheet | undefined): Map<string, string[]>;
|
|
278
|
+
/** The output entries whose whole `key` a param writes, by the locations the
|
|
279
|
+
* seam writes it to (paramWrites: its targets, paramTargets, else an om
|
|
280
|
+
* style knob's own binding), `["outputs", <name or index>, key]`, each once,
|
|
281
|
+
* in target order. */
|
|
282
|
+
export declare function wrunParamOutputTargets(param: WrunMetadataParam, outputs: unknown, key: string): Array<Record<string, unknown> & {
|
|
283
|
+
name: string;
|
|
284
|
+
}>;
|
|
285
|
+
/** Every Style target whose visibility a boolean param owns (wrunVisibilityTargetOwners): an
|
|
286
|
+
* output by its name, any other drawn kind by its prefixed target. Such a target shows by the
|
|
287
|
+
* painted sheet alone and offers no Visible row. */
|
|
288
|
+
export declare function wrunVisibilityOwnedOutputs(metadata: WrunVisibilitySheet | undefined): Set<string>;
|
|
289
|
+
/** What a host-applied param's setting resolves to on the browser host. */
|
|
290
|
+
export type WrunHostParamSetting = {
|
|
291
|
+
host: 'source';
|
|
292
|
+
index: number;
|
|
293
|
+
field: string;
|
|
294
|
+
} | {
|
|
295
|
+
host: 'interval';
|
|
296
|
+
index: number;
|
|
297
|
+
word: string;
|
|
298
|
+
} | {
|
|
299
|
+
host: 'symbol';
|
|
300
|
+
text: string;
|
|
301
|
+
exchange?: string;
|
|
302
|
+
symbol?: string;
|
|
303
|
+
};
|
|
304
|
+
/**
|
|
305
|
+
* A host-applied param's CURRENT setting resolved (plan 1.1, 1.7): a source
|
|
306
|
+
* param's field word and a timeframe param's interval word at the setting's
|
|
307
|
+
* index (a label resolves to it; an index past the options, or no setting,
|
|
308
|
+
* reads the declared default's), a symbol param's `EXCHANGE:SYMBOL` text
|
|
309
|
+
* split into its pins. Undefined for a param that is not host-applied, an
|
|
310
|
+
* index outside the frozen list, or a symbol setting that is empty / 0 (the
|
|
311
|
+
* sheet's own pins stand).
|
|
312
|
+
*/
|
|
313
|
+
export declare function wrunHostParamSetting(param: WrunMetadataParam, settings: unknown): WrunHostParamSetting | undefined;
|
|
314
|
+
/** True when a host-applied param's setting is its declared default (absent,
|
|
315
|
+
* the default index, or for a symbol: empty, 0, or the declared
|
|
316
|
+
* `symbol_default` market). The browser and the cloud both compute on a
|
|
317
|
+
* moved pick (the hosted map rides a timeframe pick as its index and a
|
|
318
|
+
* symbol pick as its `EXCHANGE:SYMBOL` text, lane parity contract C1); the
|
|
319
|
+
* alerts host still computes on the sheet's own pins, so the alert arm
|
|
320
|
+
* refuses a non-default pick on this. */
|
|
321
|
+
export declare function wrunHostParamAtDefault(param: WrunMetadataParam, settings: unknown): boolean;
|
|
322
|
+
/**
|
|
323
|
+
* The sheet as the overlay's current settings paint it: every colour param's
|
|
324
|
+
* pick (else its default) written to its `style_targets`, every number / int
|
|
325
|
+
* / select param's value (a select's `style_values` entry when it declares
|
|
326
|
+
* them) to its targets, every om style knob's value to its targets (else its
|
|
327
|
+
* bound output's property), every host-applied param's pick to the pins of
|
|
328
|
+
* the inputs bound to it, every Style page row to its target's property (an
|
|
329
|
+
* output's, or a text renderer's, heatmap's, profile's or level's: C1,
|
|
330
|
+
* wrunStyleTargetWrites; after the params, so an explicit Style edit wins
|
|
331
|
+
* over a code binding).
|
|
332
|
+
* THE seam the full run applies before anything reads the sheet (the run
|
|
333
|
+
* request's handle defaults, the run result, the live context the ticks and
|
|
334
|
+
* reseeds reuse). A copy: containers on a written path are copied,
|
|
335
|
+
* everything else is shared; a sheet with nothing to write is returned as is.
|
|
336
|
+
*/
|
|
337
|
+
export declare function wrunSheetWithSettings(metadata: WrunIndicatorMetadata, settings: unknown): WrunIndicatorMetadata;
|
|
338
|
+
/**
|
|
339
|
+
* The overlay palette (the collapsed-legend chip) of a sheet with colour
|
|
340
|
+
* rows: every colour row's CURRENT colour in row
|
|
341
|
+
* order, a colour-array row flattened over its declared length. The kScript
|
|
342
|
+
* control's own rule (its extractColorArray flattens the colour inputs in
|
|
343
|
+
* declaration order). Rows are settings declarations
|
|
344
|
+
* (buildWrunScriptInputs) or the dialog's options built from them; a row
|
|
345
|
+
* with no usable setting reads its default.
|
|
346
|
+
*/
|
|
347
|
+
export declare function wrunColorPalette(rows: ReadonlyArray<{
|
|
348
|
+
name?: unknown;
|
|
349
|
+
type?: unknown;
|
|
350
|
+
defaultValue?: unknown;
|
|
351
|
+
}>, settings: unknown): string[];
|