@orangecharts/wrun-chart-host 0.7.1 → 0.9.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 +27 -4
- package/dist/constants/feature-flags.constants.d.ts +5 -0
- package/dist/constants/feature-flags.constants.js +32 -0
- package/dist/constants/marketCapabilities.constants.d.ts +14 -9
- package/dist/constants/marketCapabilities.constants.js +36 -13
- package/dist/constants/opra-compliance.constants.d.ts +14 -0
- package/dist/constants/opra-compliance.constants.js +14 -0
- package/dist/constants/option-venues.constants.d.ts +29 -6
- package/dist/constants/option-venues.constants.js +19 -2
- package/dist/constants/venue-presets.constants.d.ts +17 -3
- package/dist/constants/venue-presets.constants.js +17 -3
- package/dist/host-env.d.ts +34 -4
- package/dist/host-env.js +21 -0
- package/dist/host-ports.types.d.ts +51 -3
- package/dist/index.d.ts +17 -0
- package/dist/index.js +17 -0
- package/dist/indicators/controls/tpo-session.util.d.ts +40 -11
- package/dist/indicators/controls/tpo-session.util.js +138 -14
- package/dist/interfaces/opra-realtime.interface.d.ts +13 -11
- package/dist/interfaces/opra-realtime.interface.js +10 -10
- package/dist/interfaces/option-instrument.interface.d.ts +6 -0
- package/dist/interfaces/wrun-runtime.interface.d.ts +34 -13
- package/dist/kscript-data/controls/live-trades-merge.util.d.ts +57 -10
- package/dist/kscript-data/controls/live-trades-merge.util.js +85 -16
- package/dist/market-data/billing.interface.d.ts +138 -17
- package/dist/market-data/billing.interface.js +25 -8
- package/dist/market-data/venues/index.d.ts +3 -3
- package/dist/market-data/venues/opra.contract.copy.json +5 -3
- package/dist/market-data/venues/opra.d.ts +3 -3
- package/dist/market-data/venues/opra.js +5 -4
- package/dist/replay/replayLadder.js +3 -1
- package/dist/settings-templates/footprint-rows.d.ts +25 -0
- package/dist/settings-templates/footprint-rows.js +127 -0
- package/dist/settings-templates/form-rows.d.ts +56 -0
- package/dist/settings-templates/form-rows.js +19 -0
- package/dist/settings-templates/frvp-fields.js +14 -0
- package/dist/settings-templates/index.d.ts +10 -1
- package/dist/settings-templates/index.js +11 -2
- package/dist/settings-templates/indicator-fields.js +78 -0
- package/dist/settings-templates/tool-rules.d.ts +35 -9
- package/dist/settings-templates/tool-rules.js +42 -8
- package/dist/settings-templates/tool-tables.generated.js +13 -2
- package/dist/utility/chart/candle-volume-unit.leaf.d.ts +16 -0
- package/dist/utility/chart/candle-volume-unit.leaf.js +61 -0
- package/dist/utility/chart/crypto-index.leaf.d.ts +2 -2
- package/dist/utility/chart/crypto-index.leaf.js +2 -2
- package/dist/utility/chart/footprint-columns.util.d.ts +74 -0
- package/dist/utility/chart/footprint-columns.util.js +106 -0
- package/dist/utility/chart/footprint-display-mode.util.d.ts +40 -0
- package/dist/utility/chart/footprint-display-mode.util.js +62 -0
- package/dist/utility/chart/footprint-sierra-look.util.d.ts +2 -0
- package/dist/utility/chart/footprint-sierra-look.util.js +37 -0
- package/dist/utility/chart/index-mode-admission.util.js +9 -1
- package/dist/utility/chart/index-mode.util.d.ts +5 -2
- package/dist/utility/chart/index-mode.util.js +23 -13
- package/dist/utility/chart/kscript-venue-policy.util.d.ts +28 -21
- package/dist/utility/chart/kscript-venue-policy.util.js +34 -26
- package/dist/utility/chart/marketKind.util.d.ts +12 -10
- package/dist/utility/chart/marketKind.util.js +17 -7
- package/dist/utility/chart/om-panel-push-style.util.d.ts +7 -7
- package/dist/utility/chart/om-panel-push-style.util.js +17 -15
- package/dist/utility/chart/om-panel.util.d.ts +11 -0
- package/dist/utility/chart/om-panel.util.js +65 -6
- package/dist/utility/chart/profile-block-size.util.d.ts +16 -0
- package/dist/utility/chart/profile-block-size.util.js +7 -0
- package/dist/utility/chart/quote-perp.leaf.d.ts +17 -0
- package/dist/utility/chart/quote-perp.leaf.js +20 -0
- package/dist/utility/chart/window-geometry.leaf.d.ts +23 -1
- package/dist/utility/chart/window-geometry.leaf.js +78 -6
- package/dist/utility/chart/window-owner.leaf.d.ts +13 -0
- package/dist/utility/chart/window-owner.leaf.js +5 -0
- package/dist/utility/chart/wrun-run-result.util.d.ts +5 -0
- package/dist/utility/chart/wrun-run-result.util.js +4 -1
- package/dist/utility/common/transformations.util.d.ts +7 -0
- package/dist/utility/common/transformations.util.js +11 -0
- package/dist/utility/options/cme-options-root.util.d.ts +25 -0
- package/dist/utility/options/cme-options-root.util.js +40 -0
- package/dist/utility/options/option-book.util.d.ts +27 -0
- package/dist/utility/options/option-book.util.js +76 -0
- package/dist/utility/options/option-trade-date.util.d.ts +50 -0
- package/dist/utility/options/option-trade-date.util.js +120 -0
- package/dist/utility/options/option-venue.util.d.ts +3 -3
- package/dist/utility/options/option-venue.util.js +3 -3
- package/dist/utility/wrun/run-schedule/wrun-late-reads.util.d.ts +1 -1
- package/dist/utility/wrun/run-schedule/wrun-late-reads.util.js +2 -2
- package/dist/utility/wrun/run-schedule/wrun-prefix-feeds.util.d.ts +2 -2
- package/dist/utility/wrun/run-schedule/wrun-prefix-feeds.util.js +5 -1
- package/dist/utility/wrun/sources/host-grid-landing.d.ts +4 -2
- package/dist/utility/wrun/sources/host-grid-landing.js +8 -0
- package/dist/utility/wrun/sources/lanes/options_flow.d.ts +40 -4
- package/dist/utility/wrun/sources/lanes/options_flow.js +115 -18
- package/dist/utility/wrun/sources/opra-option-lanes.util.d.ts +12 -9
- package/dist/utility/wrun/sources/opra-option-lanes.util.js +10 -7
- package/dist/utility/wrun/sources/row-lane-registry.js +10 -5
- package/dist/utility/wrun/sources/row-lanes/index.js +2 -0
- package/dist/utility/wrun/sources/row-lanes/option_contract_flow.d.ts +3 -2
- package/dist/utility/wrun/sources/row-lanes/option_contract_flow.js +30 -5
- package/dist/utility/wrun/sources/row-lanes/option_contract_state.d.ts +9 -3
- package/dist/utility/wrun/sources/row-lanes/option_contract_state.js +13 -5
- package/dist/utility/wrun/sources/row-lanes/option_prints.d.ts +25 -1
- package/dist/utility/wrun/sources/row-lanes/option_prints.js +161 -30
- package/dist/utility/wrun/sources/row-lanes/option_strike_flow.d.ts +4 -0
- package/dist/utility/wrun/sources/row-lanes/option_strike_flow.js +65 -0
- package/dist/utility/wrun/sources/row-lanes/option_strikes.d.ts +55 -1
- package/dist/utility/wrun/sources/row-lanes/option_strikes.js +83 -2
- package/dist/utility/wrun/sources/row-lanes/option_surface.d.ts +17 -1
- package/dist/utility/wrun/sources/row-lanes/option_surface.js +33 -2
- package/dist/utility/wrun/sources/wrun-poll-lane.types.d.ts +7 -1
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +51 -5
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +136 -3
- package/dist/utility/wrun/sources/wrun-row-lane-first-paint.util.d.ts +42 -0
- package/dist/utility/wrun/sources/wrun-row-lane-first-paint.util.js +146 -0
- package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +25 -5
- package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +111 -20
- package/dist/utility/wrun/sources/wrun-row-lanes.util.js +291 -48
- package/dist/utility/wrun/wrun-batched-marks.util.d.ts +16 -3
- package/dist/utility/wrun/wrun-batched-marks.util.js +30 -19
- package/dist/utility/wrun/wrun-batched-readout.util.d.ts +37 -9
- package/dist/utility/wrun/wrun-batched-readout.util.js +61 -15
- package/dist/utility/wrun/wrun-canvas-readout.util.d.ts +4 -0
- package/dist/utility/wrun/wrun-cell-capacity.leaf.d.ts +66 -0
- package/dist/utility/wrun/wrun-cell-capacity.leaf.js +86 -0
- package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +147 -9
- package/dist/utility/wrun/wrun-chart-market-facts.util.js +345 -11
- package/dist/utility/wrun/wrun-cloud-record.leaf.d.ts +27 -0
- package/dist/utility/wrun/wrun-cloud-record.leaf.js +71 -0
- package/dist/utility/wrun/wrun-cloud-record.util.d.ts +4 -21
- package/dist/utility/wrun/wrun-cloud-record.util.js +5 -65
- package/dist/utility/wrun/wrun-color-facts.util.d.ts +19 -9
- package/dist/utility/wrun/wrun-color-facts.util.js +24 -14
- package/dist/utility/wrun/wrun-color-settings.util.d.ts +22 -9
- package/dist/utility/wrun/wrun-color-settings.util.js +57 -23
- package/dist/utility/wrun/wrun-dollar-unit-port.leaf.d.ts +17 -0
- package/dist/utility/wrun/wrun-dollar-unit-port.leaf.js +9 -0
- package/dist/utility/wrun/wrun-download-meter.util.d.ts +92 -0
- package/dist/utility/wrun/wrun-download-meter.util.js +122 -0
- package/dist/utility/wrun/wrun-draft-overlay.util.d.ts +10 -3
- package/dist/utility/wrun/wrun-draft-overlay.util.js +63 -6
- package/dist/utility/wrun/wrun-frames.js +5 -5
- package/dist/utility/wrun/wrun-hosted-wire-caps.d.ts +2 -2
- package/dist/utility/wrun/wrun-hosted-wire-caps.js +11 -0
- package/dist/utility/wrun/wrun-hud-looks.util.d.ts +33 -17
- package/dist/utility/wrun/wrun-hud-looks.util.js +30 -16
- package/dist/utility/wrun/wrun-lane-refusal.leaf.d.ts +29 -3
- package/dist/utility/wrun/wrun-lane-refusal.leaf.js +33 -3
- package/dist/utility/wrun/wrun-lifecycle-runtime.util.d.ts +8 -6
- package/dist/utility/wrun/wrun-lifecycle-runtime.util.js +8 -6
- package/dist/utility/wrun/wrun-lifecycle.contract.d.ts +4 -2
- package/dist/utility/wrun/wrun-live-intake.util.d.ts +6 -2
- package/dist/utility/wrun/wrun-live-intake.util.js +136 -21
- package/dist/utility/wrun/wrun-live-tick.util.d.ts +4 -1
- package/dist/utility/wrun/wrun-live-tick.util.js +130 -44
- package/dist/utility/wrun/wrun-market-size-contract-carry.leaf.d.ts +53 -0
- package/dist/utility/wrun/wrun-market-size-contract-carry.leaf.js +162 -0
- package/dist/utility/wrun/wrun-market-size-defaults.leaf.d.ts +224 -0
- package/dist/utility/wrun/wrun-market-size-defaults.leaf.js +342 -0
- package/dist/utility/wrun/wrun-market-size-defaults.util.d.ts +88 -0
- package/dist/utility/wrun/wrun-market-size-defaults.util.js +471 -0
- package/dist/utility/wrun/wrun-opra-flow.leaf.d.ts +43 -8
- package/dist/utility/wrun/wrun-opra-flow.leaf.js +37 -6
- package/dist/utility/wrun/wrun-option-contract-flow.util.d.ts +51 -10
- package/dist/utility/wrun/wrun-option-contract-flow.util.js +85 -33
- package/dist/utility/wrun/wrun-option-prints.util.d.ts +172 -3
- package/dist/utility/wrun/wrun-option-prints.util.js +394 -17
- package/dist/utility/wrun/wrun-option-strike-flow-lane.util.d.ts +99 -0
- package/dist/utility/wrun/wrun-option-strike-flow-lane.util.js +218 -0
- package/dist/utility/wrun/wrun-option-strike-flow.util.d.ts +365 -0
- package/dist/utility/wrun/wrun-option-strike-flow.util.js +797 -0
- package/dist/utility/wrun/wrun-option-views.util.d.ts +231 -7
- package/dist/utility/wrun/wrun-option-views.util.js +643 -23
- package/dist/utility/wrun/wrun-options-chain.util.d.ts +6 -4
- package/dist/utility/wrun/wrun-options-chain.util.js +8 -5
- package/dist/utility/wrun/wrun-options-stop.util.d.ts +2 -1
- package/dist/utility/wrun/wrun-options-stop.util.js +3 -2
- package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +3 -0
- package/dist/utility/wrun/wrun-overlay-lifecycle.lazy.d.ts +31 -14
- package/dist/utility/wrun/wrun-overlay-lifecycle.lazy.js +22 -0
- package/dist/utility/wrun/wrun-overlay-recovery.util.d.ts +9 -1
- package/dist/utility/wrun/wrun-overlay-recovery.util.js +32 -3
- package/dist/utility/wrun/wrun-overlay-result.util.d.ts +7 -1
- package/dist/utility/wrun/wrun-overlay-result.util.js +2 -0
- package/dist/utility/wrun/wrun-overlay-run.util.d.ts +34 -6
- package/dist/utility/wrun/wrun-overlay-run.util.js +527 -180
- package/dist/utility/wrun/wrun-pack-widths.leaf.d.ts +15 -0
- package/dist/utility/wrun/wrun-pack-widths.leaf.js +22 -0
- package/dist/utility/wrun/wrun-pack.util.d.ts +13 -8
- package/dist/utility/wrun/wrun-pack.util.js +38 -21
- package/dist/utility/wrun/wrun-panel-mount.util.d.ts +4 -0
- package/dist/utility/wrun/wrun-panel-mount.util.js +62 -22
- package/dist/utility/wrun/wrun-panel-style.util.d.ts +41 -14
- package/dist/utility/wrun/wrun-panel-style.util.js +86 -26
- package/dist/utility/wrun/wrun-param-map.util.d.ts +7 -6
- package/dist/utility/wrun/wrun-param-map.util.js +8 -5
- package/dist/utility/wrun/wrun-param-values.util.d.ts +10 -2
- package/dist/utility/wrun/wrun-param-values.util.js +2 -0
- package/dist/utility/wrun/wrun-pin-spelling.util.js +19 -10
- package/dist/utility/wrun/wrun-prefix-lanes.util.js +2 -2
- package/dist/utility/wrun/wrun-refusal.util.js +17 -2
- package/dist/utility/wrun/wrun-script-inputs.util.d.ts +20 -0
- package/dist/utility/wrun/wrun-script-inputs.util.js +43 -0
- package/dist/utility/wrun/wrun-source-rows.util.d.ts +4 -0
- package/dist/utility/wrun/wrun-source-rows.util.js +92 -40
- package/dist/utility/wrun/wrun-tape-source.util.d.ts +133 -48
- package/dist/utility/wrun/wrun-tape-source.util.js +205 -62
- package/dist/utility/wrun/wrun-volume-profile-lane.util.d.ts +7 -5
- package/dist/utility/wrun/wrun-volume-profile-lane.util.js +8 -6
- package/dist/workers/utils/volume-profile.worker.util.d.ts +4 -1
- package/dist/workers/utils/volume-profile.worker.util.js +5 -2
- package/dist/workers/wrun/wrun-abi-host.js +3 -2
- package/package.json +11 -11
|
@@ -1,43 +1,71 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The `tape` input source's browser-side contract (WRUN-BIG-TRADES-PLAN C1): how a
|
|
3
|
-
* `inputSources.<name> = { source: "tape", min_size, history }` becomes the ONE acquisition the
|
|
4
|
-
* K_TRADES large lane fetches and the live intake folds. Pure: no store, no chart, no fetch; the
|
|
5
|
-
*
|
|
6
|
-
* at zero fetches.
|
|
2
|
+
* The `tape` input source's browser-side contract (WRUN-BIG-TRADES-PLAN C1, and C-DOLLAR for the dollar floor): how a
|
|
3
|
+
* package's `inputSources.<name> = { source: "tape", min_size | min_value, history }` becomes the ONE acquisition the
|
|
4
|
+
* K_TRADES large lane fetches and the live intake folds. Pure: no store, no chart, no fetch; the run pass calls it at
|
|
5
|
+
* its head, before any lane fetch, so every refusal here lands by name and at zero fetches.
|
|
7
6
|
*
|
|
8
|
-
* -
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* (
|
|
20
|
-
* `
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* -
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
7
|
+
* - A tape declares exactly ONE floor, `min_size` or `min_value`; both or neither refuses `wrun_tape_floor_invalid`
|
|
8
|
+
* naming the input. Each is a number literal or a string naming a declared numeric `param`, resolved from the run's
|
|
9
|
+
* CURRENT param values (`wrunParamValuesFromSettings`, the values `init()` receives, so a settings edit moves the
|
|
10
|
+
* floor with the module). The resolved value must be finite and above zero, else the run refuses by the floor's own
|
|
11
|
+
* code (`wrun_tape_min_size_invalid`, `wrun_tape_min_value_invalid`) naming the input and the param.
|
|
12
|
+
* - `min_size` is the smallest print size served in the venue's RAW STORED unit (coins on Binance, contracts on
|
|
13
|
+
* gate.io futures and OKX swaps, USD contracts on inverse venues, lots on CME). It rides the wire as the gateway's
|
|
14
|
+
* `minAmount` (the K_TRADES worker), and a cell's `size` is the raw amount. It keeps @om-core/big-trades 0.5.0
|
|
15
|
+
* running byte for byte; a raw floor means a different thing on every venue whose unit differs, which is why the
|
|
16
|
+
* dollar floor exists.
|
|
17
|
+
* - `min_value` is the smallest print served by its value in US dollars. It rides the wire as the gateway's
|
|
18
|
+
* `minQuoteAmount` (never beside a `minAmount`), and a cell's `size` is then the print's dollar value (the gateway's
|
|
19
|
+
* `quoteAmount` for a history row, the market's dollar unit times price times size for a live print,
|
|
20
|
+
* live-trades-merge.util `tradesTapeCellSize`), so a package compares and draws in the same unit as its floor. The
|
|
21
|
+
* cell layout is unchanged (`[tsOffsetMs, price, size, side]`).
|
|
22
|
+
* - The table's own floor ($10k quote on USD-quoted markets, a contracts floor per CME Group root) is a fact a package
|
|
23
|
+
* cannot lower: a floor below it is served at the table's floor (documented, never enforced here).
|
|
24
|
+
* - `history: "0" | <duration>`: `"0"` (the default) is the live edge only; a duration `^\d+(s|m|h|d)$` seeds that much
|
|
25
|
+
* history from TRADE_LARGE, at most `WRUN_TAPE_HISTORY_MAX_SEC` (30 days); a zero-length spelling ("0m") is the live
|
|
26
|
+
* edge too. Anything else refuses `wrun_tape_history_invalid`. The lane serves `min(history, the chart's loaded
|
|
27
|
+
* window)`, and no more than the gateway's bar limit lets it today (`WRUN_TAPE_HISTORY_SERVED_MAX_SEC`: 15,000
|
|
28
|
+
* one-minute points, about 10.4 days; k-trades.control.ts opens the ask at the first bar after it), so the
|
|
29
|
+
* acquisition's `historySeconds` is the history served, capped there; `history` stays the declared spelling the
|
|
30
|
+
* K_TRADES payload carries.
|
|
31
|
+
* - Every tape input the run ASKS must be celled (`cellType: "array"`) and resolve to the SAME floor (facet and
|
|
32
|
+
* value) and `history`: the browser lane serves one tape acquisition per package (one K_TRADES fetch, one live
|
|
33
|
+
* fold), and silently serving a second input at the first input's floor would be a wrong-but-plausible block. Two
|
|
34
|
+
* asked inputs that differ refuse by name.
|
|
35
|
+
* - A tape the chart's market does not ask (kit 0.95.0: its `needed_by` leaves the market's size unit out, so the run's
|
|
36
|
+
* sheet on the market marks it `undemanded`, wrunSheetWithLaneDemand) is no part of the acquisition: no floor, no
|
|
37
|
+
* history, no refusal and no setting words read it (`isWrunAskedTapeSource`), and every row reads zero cells for it
|
|
38
|
+
* (the row builder's empty block). Big Trades 0.8.0 floors CME in contracts (`min_size` on `tape_contracts`, asked
|
|
39
|
+
* on size unit 3) and every other market in dollars (`min_value` on `tape`, asked on 0, 1 and 2): one acquisition
|
|
40
|
+
* on every market, two floors in the sheet.
|
|
41
|
+
* The om daemon shares the vocabulary (`wrun_tape_floor_invalid`, `wrun_tape_min_size_invalid`,
|
|
42
|
+
* `wrun_tape_min_value_invalid`, `wrun_tape_history_invalid`).
|
|
30
43
|
*/
|
|
31
44
|
import { TRADES_LARGE_BAR_LIMIT_SEC } from '../../kscript-data/controls/live-trades-merge.util.js';
|
|
32
|
-
/** A tape `min_size` that resolves to nothing servable (
|
|
33
|
-
*
|
|
45
|
+
/** A tape `min_size` that resolves to nothing servable (a param the package does not declare, non-finite or not
|
|
46
|
+
* above zero). */
|
|
34
47
|
export const WRUN_TAPE_MIN_SIZE_INVALID_CODE = 'wrun_tape_min_size_invalid';
|
|
48
|
+
/** A tape `min_value` that resolves to nothing servable (a param the package does not declare, non-finite or not
|
|
49
|
+
* above zero): C-DOLLAR's refusal, naming the input and the param. */
|
|
50
|
+
export const WRUN_TAPE_MIN_VALUE_INVALID_CODE = 'wrun_tape_min_value_invalid';
|
|
51
|
+
/** A tape input declaring both floors or neither (C-DOLLAR): a tape serves exactly one floor. */
|
|
52
|
+
export const WRUN_TAPE_FLOOR_INVALID_CODE = 'wrun_tape_floor_invalid';
|
|
53
|
+
/** A dollar tape (C-DOLLAR's `min_value`) on a market whose dollar unit no read can ever prove (a quote that is no
|
|
54
|
+
* dollar, a venue or a contract with no point value): none of its prints could be valued, so the run refuses it by
|
|
55
|
+
* name before any fetch. The om daemon's code for the same refusal (packages/sdk wrun-host refusals). */
|
|
56
|
+
export const WRUN_TAPE_VALUE_UNPROVEN_CODE = 'wrun_tape_value_unproven';
|
|
35
57
|
/** A tape `history` outside the contract ("0" or `^\d+(s|m|h|d)$` at most 30 days). */
|
|
36
58
|
export const WRUN_TAPE_HISTORY_INVALID_CODE = 'wrun_tape_history_invalid';
|
|
37
59
|
/** A tape input on a chart interval the lane does not serve (a one-second or any sub-minute chart, a
|
|
38
60
|
* calendar interval of a month or coarser): the shared host's refusal code (`WrunHostRefusalCode`,
|
|
39
61
|
* the kit's `WRUN_TAPE_INTERVAL_UNSUPPORTED_CODE`), whose words its `wrunRefusalMessage` gives. */
|
|
40
62
|
export const WRUN_TAPE_INTERVAL_UNSUPPORTED_CODE = 'wrun_tape_interval_unsupported';
|
|
63
|
+
/** The large lane's history held more prints at or above the floor than the history worker reads
|
|
64
|
+
* (`TRADES_HISTORY_MAX_CELLS`): its refusal by name (wrun-lane-refusal.leaf), which the run words as
|
|
65
|
+
* too much data with the floor to raise (the `too-big` `tape` record, Open the settings), never as a
|
|
66
|
+
* source that did not answer. The same floor over the same history is refused again, so no ladder
|
|
67
|
+
* re-asks it: only a settings change (a higher floor) or a shorter window can pass it. */
|
|
68
|
+
export const WRUN_TAPE_TOO_MANY_TRADES_CODE = 'tape-too-many-trades';
|
|
41
69
|
/** The longest tape history a package may declare, in seconds (30 days). */
|
|
42
70
|
export const WRUN_TAPE_HISTORY_MAX_SEC = 2_592_000;
|
|
43
71
|
/** The longest tape history the lane serves today, in seconds: the gateway's bar limit on an
|
|
@@ -46,6 +74,19 @@ export const WRUN_TAPE_HISTORY_MAX_SEC = 2_592_000;
|
|
|
46
74
|
export const WRUN_TAPE_HISTORY_SERVED_MAX_SEC = TRADES_LARGE_BAR_LIMIT_SEC;
|
|
47
75
|
const WRUN_TAPE_HISTORY_PATTERN = /^(\d+)(s|m|h|d)$/;
|
|
48
76
|
const WRUN_TAPE_HISTORY_UNIT_SEC = { s: 1, m: 60, h: 3600, d: 86_400 };
|
|
77
|
+
const WRUN_TAPE_FLOOR_FACETS = ['min_size', 'min_value'];
|
|
78
|
+
/** Each floor facet's refusal code and the words a refusal uses for what it floors. */
|
|
79
|
+
const WRUN_TAPE_FLOOR_RULES = {
|
|
80
|
+
min_size: { code: WRUN_TAPE_MIN_SIZE_INVALID_CODE, what: 'size' },
|
|
81
|
+
min_value: { code: WRUN_TAPE_MIN_VALUE_INVALID_CODE, what: 'value' },
|
|
82
|
+
};
|
|
83
|
+
/** Whether an input source is a tape the run asks: a `tape` source the run's sheet on the chart's market did not mark
|
|
84
|
+
* `undemanded` (wrunSheetWithLaneDemand, kit 0.95.0's `needed_by` on a secondary tape). THE predicate every reader
|
|
85
|
+
* of the package's tapes takes (the acquisition, its floor settings and words, the plan's floor params, the live
|
|
86
|
+
* refusals): an unasked tape has no lane, and its rows read zero cells. */
|
|
87
|
+
export function isWrunAskedTapeSource(source) {
|
|
88
|
+
return source?.source === 'tape' && source.undemanded !== true;
|
|
89
|
+
}
|
|
49
90
|
/** The declared `history` as the lane reads it: "0" when absent. */
|
|
50
91
|
export function wrunTapeHistoryOf(source) {
|
|
51
92
|
return source.history === undefined ? '0' : String(source.history);
|
|
@@ -66,47 +107,95 @@ export function parseWrunTapeHistory(metadata, inputName, history) {
|
|
|
66
107
|
}
|
|
67
108
|
return seconds;
|
|
68
109
|
}
|
|
69
|
-
/** The
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
110
|
+
/** The floor facet a tape source declares when it declares exactly one, else undefined (both, or neither). */
|
|
111
|
+
export function wrunTapeFloorFacetOf(source) {
|
|
112
|
+
const declared = WRUN_TAPE_FLOOR_FACETS.filter((facet) => source[facet] !== undefined);
|
|
113
|
+
return declared.length === 1 ? declared[0] : undefined;
|
|
114
|
+
}
|
|
115
|
+
/** The name of the param a tape source's floor reads (its one floor facet's string), else undefined (a literal floor,
|
|
116
|
+
* or a source declaring both floors or neither). */
|
|
117
|
+
export function wrunTapeFloorParamOf(source) {
|
|
118
|
+
const facet = wrunTapeFloorFacetOf(source);
|
|
119
|
+
const declared = facet === undefined ? undefined : source[facet];
|
|
120
|
+
return typeof declared === 'string' ? declared : undefined;
|
|
121
|
+
}
|
|
122
|
+
/** The value of one floor facet: the literal, or the named param's current value; refused by the facet's own code
|
|
123
|
+
* when it is not finite and above zero (an unfiltered tape is the one request the lane never makes). */
|
|
124
|
+
function resolveWrunTapeFloorFacet(metadata, inputName, facet, declared, paramValues) {
|
|
125
|
+
const { code, what } = WRUN_TAPE_FLOOR_RULES[facet];
|
|
74
126
|
const refuse = (detail) => {
|
|
75
|
-
throw new Error(`WRUN ${metadata.id}: input '${inputName}' (tape) ${detail} (${
|
|
127
|
+
throw new Error(`WRUN ${metadata.id}: input '${inputName}' (tape) ${detail} (${code})`);
|
|
76
128
|
};
|
|
77
129
|
if (typeof declared === 'string') {
|
|
78
130
|
if (!metadata.params.some((param) => param.name === declared)) {
|
|
79
|
-
return refuse(`binds
|
|
131
|
+
return refuse(`binds ${facet} to param '${declared}', which the package does not declare: ${facet} is a positive ` +
|
|
80
132
|
'number or the name of a numeric param');
|
|
81
133
|
}
|
|
82
134
|
const value = Number(paramValues[declared]);
|
|
83
135
|
if (!Number.isFinite(value) || value <= 0) {
|
|
84
|
-
return refuse(`binds
|
|
85
|
-
|
|
136
|
+
return refuse(`binds ${facet} to param '${declared}', which is ${String(paramValues[declared])}: the smallest print ` +
|
|
137
|
+
`${what} must be finite and above zero`);
|
|
86
138
|
}
|
|
87
139
|
return value;
|
|
88
140
|
}
|
|
89
141
|
if (declared === undefined) {
|
|
90
|
-
return refuse(
|
|
142
|
+
return refuse(`declares no ${facet}: the smallest print ${what} to serve is required (a positive number or the name of a ` +
|
|
91
143
|
'numeric param)');
|
|
92
144
|
}
|
|
93
145
|
const value = Number(declared);
|
|
94
146
|
if (typeof declared !== 'number' || !Number.isFinite(value) || value <= 0) {
|
|
95
|
-
return refuse(`declares
|
|
147
|
+
return refuse(`declares ${facet} ${JSON.stringify(declared)}: the smallest print ${what} must be finite and above zero`);
|
|
96
148
|
}
|
|
97
149
|
return value;
|
|
98
150
|
}
|
|
151
|
+
/** The smallest print size a tape input serves (raw stored units): the literal, or the named param's current value;
|
|
152
|
+
* refused by name (`wrun_tape_min_size_invalid`) when it is not finite and above zero. */
|
|
153
|
+
export function resolveWrunTapeMinSize(metadata, inputName, source, paramValues) {
|
|
154
|
+
return resolveWrunTapeFloorFacet(metadata, inputName, 'min_size', source.min_size, paramValues);
|
|
155
|
+
}
|
|
156
|
+
/** The smallest print value a tape input serves (US dollars): the literal, or the named param's current value;
|
|
157
|
+
* refused by name (`wrun_tape_min_value_invalid`, naming the input and the param) when it is not finite and above
|
|
158
|
+
* zero. */
|
|
159
|
+
export function resolveWrunTapeMinValue(metadata, inputName, source, paramValues) {
|
|
160
|
+
return resolveWrunTapeFloorFacet(metadata, inputName, 'min_value', source.min_value, paramValues);
|
|
161
|
+
}
|
|
162
|
+
/** A tape input's one floor, by its facet: refused `wrun_tape_floor_invalid` naming the input when it declares both
|
|
163
|
+
* floors or neither, else by the facet's own code when the value is not servable. */
|
|
164
|
+
export function resolveWrunTapeFloor(metadata, inputName, source, paramValues) {
|
|
165
|
+
const facet = wrunTapeFloorFacetOf(source);
|
|
166
|
+
if (facet === undefined) {
|
|
167
|
+
const both = source.min_size !== undefined && source.min_value !== undefined;
|
|
168
|
+
throw new Error(`WRUN ${metadata.id}: input '${inputName}' (tape) declares ${both ? 'both min_size and min_value' : 'no floor'} ` +
|
|
169
|
+
`(${WRUN_TAPE_FLOOR_INVALID_CODE}): a tape takes exactly one floor, min_size (the raw stored unit) or ` +
|
|
170
|
+
'min_value (US dollars)');
|
|
171
|
+
}
|
|
172
|
+
return { facet, value: resolveWrunTapeFloorFacet(metadata, inputName, facet, source[facet], paramValues) };
|
|
173
|
+
}
|
|
174
|
+
/** The floor an acquisition asks at, in its own unit (raw stored units under `min_size`, dollars under `min_value`). */
|
|
175
|
+
export function wrunTapeFloorOf(tape) {
|
|
176
|
+
return (tape.minValue ?? tape.minSize);
|
|
177
|
+
}
|
|
178
|
+
/** The words a refusal states an acquisition's floor in: the raw number under `min_size`, a US dollar amount under
|
|
179
|
+
* `min_value` (`$500,000`). */
|
|
180
|
+
export function wrunTapeFloorWords(tape) {
|
|
181
|
+
if (tape === undefined)
|
|
182
|
+
return '0';
|
|
183
|
+
if (tape.minValue === undefined)
|
|
184
|
+
return String(tape.minSize ?? 0);
|
|
185
|
+
return `$${tape.minValue.toLocaleString('en-US', { maximumFractionDigits: 2 })}`;
|
|
186
|
+
}
|
|
99
187
|
/**
|
|
100
|
-
* Resolve every
|
|
101
|
-
*
|
|
102
|
-
* input.
|
|
188
|
+
* Resolve every tape input the run asks (`isWrunAskedTapeSource`: the run's sheet on the chart's market, its
|
|
189
|
+
* unasked tapes marked) against the run's param values into the package's one tape acquisition, refusing by name
|
|
190
|
+
* before any fetch; undefined when the package asks no tape input here.
|
|
103
191
|
*/
|
|
104
192
|
export function resolveWrunTapeAcquisition(metadata, paramValues) {
|
|
105
193
|
let acquisition;
|
|
194
|
+
let first;
|
|
106
195
|
const inputs = [...metadata.inputs].sort((a, b) => a.index - b.index);
|
|
107
196
|
for (const input of inputs) {
|
|
108
197
|
const source = metadata.inputSources[input.name];
|
|
109
|
-
if (!source
|
|
198
|
+
if (!isWrunAskedTapeSource(source))
|
|
110
199
|
continue;
|
|
111
200
|
const name = input.name;
|
|
112
201
|
if (input.cellType !== 'array') {
|
|
@@ -114,38 +203,92 @@ export function resolveWrunTapeAcquisition(metadata, paramValues) {
|
|
|
114
203
|
}
|
|
115
204
|
const history = wrunTapeHistoryOf(source);
|
|
116
205
|
const historySeconds = Math.min(parseWrunTapeHistory(metadata, name, history), WRUN_TAPE_HISTORY_SERVED_MAX_SEC);
|
|
117
|
-
const
|
|
118
|
-
if (acquisition === undefined) {
|
|
119
|
-
|
|
206
|
+
const floor = resolveWrunTapeFloor(metadata, name, source, paramValues);
|
|
207
|
+
if (acquisition === undefined || first === undefined) {
|
|
208
|
+
first = floor;
|
|
209
|
+
acquisition =
|
|
210
|
+
floor.facet === 'min_size'
|
|
211
|
+
? { minSize: floor.value, history, historySeconds, inputNames: [name] }
|
|
212
|
+
: { minValue: floor.value, history, historySeconds, inputNames: [name] };
|
|
120
213
|
continue;
|
|
121
214
|
}
|
|
122
|
-
if (
|
|
123
|
-
throw new Error(`WRUN ${metadata.id}: input '${name}' (tape) resolves to
|
|
124
|
-
`input '${acquisition.inputNames[0]}' resolves to
|
|
215
|
+
if (first.facet !== floor.facet || first.value !== floor.value || acquisition.historySeconds !== historySeconds) {
|
|
216
|
+
throw new Error(`WRUN ${metadata.id}: input '${name}' (tape) resolves to ${floor.facet} ${floor.value} and history '${history}', ` +
|
|
217
|
+
`but input '${acquisition.inputNames[0]}' resolves to ${first.facet} ${first.value} and history ` +
|
|
125
218
|
`'${acquisition.history}': the browser lane serves one tape acquisition per package`);
|
|
126
219
|
}
|
|
127
220
|
acquisition.inputNames.push(name);
|
|
128
221
|
}
|
|
129
222
|
return acquisition;
|
|
130
223
|
}
|
|
224
|
+
/** The words of the setting a tape's floor reads: the label (else the name) of the param its first asked tape input's
|
|
225
|
+
* floor (`min_size` or `min_value`) names, or the floor facet itself for a literal floor (a source edit raises it).
|
|
226
|
+
* An unasked tape's floor is no setting the chart's tape reads (Big Trades 0.8.0 on CME names Min size, the contracts
|
|
227
|
+
* floor, never Min value). */
|
|
228
|
+
export function wrunTapeFloorSettingWords(metadata) {
|
|
229
|
+
let literal;
|
|
230
|
+
for (const source of Object.values(metadata.inputSources)) {
|
|
231
|
+
if (!isWrunAskedTapeSource(source))
|
|
232
|
+
continue;
|
|
233
|
+
const paramName = wrunTapeFloorParamOf(source);
|
|
234
|
+
if (paramName === undefined) {
|
|
235
|
+
literal ??= wrunTapeFloorFacetOf(source);
|
|
236
|
+
continue;
|
|
237
|
+
}
|
|
238
|
+
const param = metadata.params.find((candidate) => candidate.name === paramName);
|
|
239
|
+
const label = typeof param?.label === 'string' ? param.label.trim() : '';
|
|
240
|
+
return label !== '' ? label : paramName;
|
|
241
|
+
}
|
|
242
|
+
return literal ?? 'min_size';
|
|
243
|
+
}
|
|
131
244
|
/**
|
|
132
245
|
* The settings a row build hands the shared host's plan for a param-bound floor
|
|
133
|
-
* (`WrunChartSourceRows.settings`): the floor the lane's acquisition was asked at
|
|
134
|
-
* of every param a tape input's `min_size` names. The host resolves that
|
|
135
|
-
* settings it is handed (its planTapeFloors
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
246
|
+
* (`WrunChartSourceRows.settings`): the floor the lane's acquisition was asked at (`wrunTapeFloorOf`, in its own
|
|
247
|
+
* unit), under the name of every param a tape input's floor (`min_size` or `min_value`) names. The host resolves that
|
|
248
|
+
* floor itself from the settings it is handed (its planTapeFloors; a `min_value` tape is planned as the kit's floor
|
|
249
|
+
* facet over the dollar cells, wrun-source-rows.util `wrunPlannedSheet`), so the plan's tape ask carries the floor the
|
|
250
|
+
* run resolved from the overlay's current settings (`resolveWrunTapeAcquisition`): a full run hands its acquisition's
|
|
251
|
+
* floor, a live build its session's (`context.acquisition.tape`), so a tail, a carry advance or a reseed plans the ask
|
|
252
|
+
* its full run planned whatever the settings say meanwhile (a refused settings run keeps the session). An unasked
|
|
253
|
+
* tape's param is left out: its floor is in another unit, and the plan reads no cells for it. Undefined without a
|
|
254
|
+
* finite floor or a bound param.
|
|
140
255
|
*/
|
|
141
|
-
export function wrunTapeFloorSettings(metadata,
|
|
142
|
-
const floor = Number(
|
|
143
|
-
if (
|
|
256
|
+
export function wrunTapeFloorSettings(metadata, floorValue) {
|
|
257
|
+
const floor = Number(floorValue);
|
|
258
|
+
if (floorValue === undefined || floorValue === null || !Number.isFinite(floor))
|
|
144
259
|
return undefined;
|
|
145
260
|
let settings;
|
|
146
261
|
for (const source of Object.values(metadata.inputSources)) {
|
|
147
|
-
if (source
|
|
148
|
-
|
|
262
|
+
if (!isWrunAskedTapeSource(source))
|
|
263
|
+
continue;
|
|
264
|
+
const paramName = wrunTapeFloorParamOf(source);
|
|
265
|
+
if (paramName !== undefined)
|
|
266
|
+
(settings ??= {})[paramName] = floor;
|
|
149
267
|
}
|
|
150
268
|
return settings;
|
|
151
269
|
}
|
|
270
|
+
/** The floor a recorded tape acquisition (a K_TRADES payload: the full run's `fetchLane` extras, the live context's
|
|
271
|
+
* `acquisition.tape`) asks at, in its own unit: `minValue` when it floors by dollars, else `minSize`. */
|
|
272
|
+
export function wrunTapeAcquisitionFloor(acquisition) {
|
|
273
|
+
if (acquisition === undefined)
|
|
274
|
+
return undefined;
|
|
275
|
+
return acquisition.minValue !== undefined ? acquisition.minValue : acquisition.minSize;
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* The K_TRADES payload extras of a tape acquisition (the run pass's `fetchLane('trades', 'tp', ...)`, which the run
|
|
279
|
+
* records as the lane's acquisition: the history fetch, the reconcile's re-ask and the live fold read the SAME
|
|
280
|
+
* payload): the large lane, the declared history and the one floor. A dollar floor also carries `valuePerUnit`, the US
|
|
281
|
+
* dollars one price unit times one size unit of a live print is worth on the chart's market (the run head's
|
|
282
|
+
* `wrunMarketDollarUnit`); without it no live print can be priced and none folds (the history rows carry the gateway's
|
|
283
|
+
* own dollar value). A raw floor carries exactly what it always did, so 0.5.0's payload is unchanged.
|
|
284
|
+
*/
|
|
285
|
+
export function wrunTapeLaneExtras(tape, valuePerUnit) {
|
|
286
|
+
if (tape.minValue === undefined)
|
|
287
|
+
return { minSize: tape.minSize, history: tape.history, large: true };
|
|
288
|
+
return {
|
|
289
|
+
minValue: tape.minValue,
|
|
290
|
+
...(valuePerUnit !== undefined && Number.isFinite(valuePerUnit) && valuePerUnit > 0 ? { valuePerUnit } : {}),
|
|
291
|
+
history: tape.history,
|
|
292
|
+
large: true,
|
|
293
|
+
};
|
|
294
|
+
}
|
|
@@ -33,9 +33,11 @@ export interface WrunVolumeProfileLaneExtras {
|
|
|
33
33
|
ticksPerBar: number;
|
|
34
34
|
currency: 'USD' | 'Coin';
|
|
35
35
|
}
|
|
36
|
-
/** The lane payload extras the sheet's volume_profile inputs declare
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
36
|
+
/** The lane payload extras the sheet's demanded volume_profile inputs declare
|
|
37
|
+
* (an input the run's sheet on the market leaves undemanded asks no lane, as
|
|
38
|
+
* wrunOiLaneExtras reads it); undefined when none declares `ticks_per_bar` or
|
|
39
|
+
* `currency`. Throws, naming the inputs, when two inputs declare different
|
|
40
|
+
* lanes, and naming the input when its bucket size is a `"@<param>"`
|
|
41
|
+
* reference the paint seam could not resolve (no declared param of that
|
|
42
|
+
* name). */
|
|
41
43
|
export declare function wrunVolumeProfileLaneExtras(metadata: Pick<WrunIndicatorMetadata, 'inputs' | 'inputSources'>): WrunVolumeProfileLaneExtras | undefined;
|
|
@@ -30,16 +30,18 @@ export const WRUN_VOLUME_PROFILE_TICKS_PARAM_CODE = 'wrun_volume_profile_ticks_p
|
|
|
30
30
|
function describeLane(lane) {
|
|
31
31
|
return `ticksPerBar ${lane.ticksPerBar} in ${lane.currency === 'USD' ? 'USD' : 'coins'}`;
|
|
32
32
|
}
|
|
33
|
-
/** The lane payload extras the sheet's volume_profile inputs declare
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
33
|
+
/** The lane payload extras the sheet's demanded volume_profile inputs declare
|
|
34
|
+
* (an input the run's sheet on the market leaves undemanded asks no lane, as
|
|
35
|
+
* wrunOiLaneExtras reads it); undefined when none declares `ticks_per_bar` or
|
|
36
|
+
* `currency`. Throws, naming the inputs, when two inputs declare different
|
|
37
|
+
* lanes, and naming the input when its bucket size is a `"@<param>"`
|
|
38
|
+
* reference the paint seam could not resolve (no declared param of that
|
|
39
|
+
* name). */
|
|
38
40
|
export function wrunVolumeProfileLaneExtras(metadata) {
|
|
39
41
|
let declared;
|
|
40
42
|
for (const input of metadata.inputs) {
|
|
41
43
|
const source = metadata.inputSources[input.name];
|
|
42
|
-
if (source?.source !== 'volume_profile')
|
|
44
|
+
if (source?.source !== 'volume_profile' || source.undemanded === true)
|
|
43
45
|
continue;
|
|
44
46
|
if (source.ticks_per_bar === undefined && source.currency === undefined)
|
|
45
47
|
continue;
|
|
@@ -132,7 +132,10 @@ export declare function maxProfileBucketHeight(rows: (number | number[])[][]): n
|
|
|
132
132
|
* a wide served bucket outside a non-multiple cell's span — e.g. 2.0-wide
|
|
133
133
|
* rows into 2.25 cells); with no coarse rows present the user height applies
|
|
134
134
|
* exactly, and uniform fine-grid windows (crypto, recent-only CME) keep the
|
|
135
|
-
* legacy branches byte-identically.
|
|
135
|
+
* legacy branches byte-identically. At one block per row, rows served FINER
|
|
136
|
+
* than the block (an answer the gateway served below the overlay's held base,
|
|
137
|
+
* resolveHeldProfileBlockSize) are regridded onto it first: gap-filled as-is,
|
|
138
|
+
* each finer level became its own cell on another grid.
|
|
136
139
|
*/
|
|
137
140
|
export declare function finalizeVolumeProfileGrid(rows: any[], barHeight: number | undefined, minimumBarHeight: number): any[];
|
|
138
141
|
/**
|
|
@@ -485,7 +485,10 @@ export function maxProfileBucketHeight(rows) {
|
|
|
485
485
|
* a wide served bucket outside a non-multiple cell's span — e.g. 2.0-wide
|
|
486
486
|
* rows into 2.25 cells); with no coarse rows present the user height applies
|
|
487
487
|
* exactly, and uniform fine-grid windows (crypto, recent-only CME) keep the
|
|
488
|
-
* legacy branches byte-identically.
|
|
488
|
+
* legacy branches byte-identically. At one block per row, rows served FINER
|
|
489
|
+
* than the block (an answer the gateway served below the overlay's held base,
|
|
490
|
+
* resolveHeldProfileBlockSize) are regridded onto it first: gap-filled as-is,
|
|
491
|
+
* each finer level became its own cell on another grid.
|
|
489
492
|
*/
|
|
490
493
|
export function finalizeVolumeProfileGrid(rows, barHeight, minimumBarHeight) {
|
|
491
494
|
const { servedCoarse, userCoarse, target } = resolveFinalizedProfileGridBranches(rows, barHeight, minimumBarHeight);
|
|
@@ -493,7 +496,7 @@ export function finalizeVolumeProfileGrid(rows, barHeight, minimumBarHeight) {
|
|
|
493
496
|
return rebucketVolumeProfile(rows, target, minimumBarHeight);
|
|
494
497
|
if (userCoarse > 0)
|
|
495
498
|
return rebucketVolumeProfile(rows, userCoarse, minimumBarHeight);
|
|
496
|
-
return fillVolumeProfilePriceGaps(rows, minimumBarHeight);
|
|
499
|
+
return fillVolumeProfilePriceGaps(regridRowsServedFinerThan(rows, minimumBarHeight), minimumBarHeight);
|
|
497
500
|
}
|
|
498
501
|
function resolveFinalizedProfileGridBranches(rows, barHeight, minimumBarHeight) {
|
|
499
502
|
const maxServed = maxProfileBucketHeight(rows);
|
|
@@ -387,8 +387,9 @@ export async function createWrunAbiSession(config) {
|
|
|
387
387
|
const byteLength = len * BYTES_PER_CELL;
|
|
388
388
|
if (!Number.isInteger(ptr) || ptr < 0 || ptr + byteLength > memory.buffer.byteLength) {
|
|
389
389
|
throw new Error(`WRUN wrun_arg_bytes(${index}, ${ptr}): ${byteLength} bytes do not fit the module's ` +
|
|
390
|
-
`exported memory of ${memory.buffer.byteLength} bytes; reserve
|
|
391
|
-
`
|
|
390
|
+
`exported memory of ${memory.buffer.byteLength} bytes; reserve the input's capacity ` +
|
|
391
|
+
`(in_<name>_capacity: max_cells tuples, max_cells + newest for a print class's union) * ` +
|
|
392
|
+
`${BYTES_PER_CELL} bytes per celled input and pass a pointer inside that buffer`);
|
|
392
393
|
}
|
|
393
394
|
new Uint8Array(memory.buffer, ptr, byteLength).set(new Uint8Array(block.cells.buffer, block.cells.byteOffset + block.cellOffsets[at] * BYTES_PER_CELL, byteLength));
|
|
394
395
|
return byteLength;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orangecharts/wrun-chart-host",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "The wrun chart-host layer shared by the kiyotaka web app and the mobile app: the wrun result reader and painter model, cut from the web app (its reference implementation).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -22,23 +22,23 @@
|
|
|
22
22
|
"default": "./dist/*.js"
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
|
-
"scripts": {
|
|
26
|
-
"build": "node scripts/generate-tool-tables.mjs && rm -rf dist && tsc -p tsconfig.build.json && node scripts/esm-dist.mjs dist",
|
|
27
|
-
"consumer-check": "node scripts/consumer-check.mjs",
|
|
28
|
-
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
29
|
-
},
|
|
30
25
|
"peerDependencies": {
|
|
31
|
-
"@orangecharts/indicator-kit": "0.
|
|
32
|
-
"@orangecharts/orange-v2-pb-common": "12.
|
|
26
|
+
"@orangecharts/indicator-kit": "0.97.0",
|
|
27
|
+
"@orangecharts/orange-v2-pb-common": "12.73.0",
|
|
33
28
|
"dayjs": "1.11.23",
|
|
34
29
|
"lodash-es": "4.18.1"
|
|
35
30
|
},
|
|
36
31
|
"devDependencies": {
|
|
37
|
-
"@orangecharts/indicator-kit": "0.
|
|
38
|
-
"@orangecharts/orange-v2-pb-common": "12.
|
|
32
|
+
"@orangecharts/indicator-kit": "0.97.0",
|
|
33
|
+
"@orangecharts/orange-v2-pb-common": "12.73.0",
|
|
39
34
|
"@types/lodash-es": "4.17.12",
|
|
40
35
|
"dayjs": "1.11.23",
|
|
41
36
|
"lodash-es": "4.18.1",
|
|
42
37
|
"typescript": "5.9.3"
|
|
38
|
+
},
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build": "node scripts/generate-tool-tables.mjs && rm -rf dist && tsc -p tsconfig.build.json && node scripts/esm-dist.mjs dist",
|
|
41
|
+
"consumer-check": "node scripts/consumer-check.mjs",
|
|
42
|
+
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
43
43
|
}
|
|
44
|
-
}
|
|
44
|
+
}
|