@tidal-ts/terminal 0.12.0 → 0.12.1

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.
@@ -1,5 +1,5 @@
1
1
  import { assign, enqueueActions, setup } from 'xstate';
2
- import { COMPARE_PREFIX, hasPairOp, usesCompare, deriveId, opParams, opInputs, opNeedsColumns, opIsBand, opIsMulti, outputMark, opOutputs, TARGET_ROLES, opSharesSourceAxis, studyTag, inputNames, isPickedInput, isPairOp, isValidSpec, partStudyLabel, readPairParts, specUnit, studyInputOf, studyPick, substituteInput, withStudyOutput, studyColumn, withStudyColumn, BAR_PRICE_COLUMNS, fanPick, primaryOutput, withFanOutput, } from '@tidal-ts/core';
2
+ import { COMPARE_PREFIX, hasPairOp, usesCompare, deriveId, opParams, opInputs, opNeedsColumns, opIsBand, opIsMulti, outputMark, opOutputs, TARGET_ROLES, opSharesSourceAxis, studyTag, inputNames, isPickedInput, isPairOp, isValidSpec, partStudyLabel, readPairParts, specUnit, studyInputOf, studyPick, substituteInput, withStudyOutput, studyColumn, withStudyColumn, isStudyOp, BAR_PRICE_COLUMNS, fanPick, primaryOutput, withFanOutput, } from '@tidal-ts/core';
3
3
  /**
4
4
  * The bar columns each data SOURCE carries — the one fact that decides whether a
5
5
  * multi-column study is offerable on a series. Only the price series has bars;
@@ -293,11 +293,11 @@ function placeOnRow(target, movers) {
293
293
  export function rowBlocks(configs) {
294
294
  const parentOf = new Map();
295
295
  for (const c of configs) {
296
- // Only a tunable STUDY attaches to a parent; a derived catalog metric and a
297
- // pair stand alone (the same rule `layeredOn` travels by). Asked of the
298
- // registry — a period-shaped test was the same question only while every
299
- // tunable op had one param called `period` (PR #181 review, MEDIUM).
300
- if (!c.derive || opParams(c.derive.op).length === 0)
296
+ // Only a STUDY attaches to a parent (`isStudyOp` — the test `isStudySeries`
297
+ // uses, so the panel's parenting and these blocks agree); a derived catalog
298
+ // metric and a pair stand alone. "Has params?" left a parameterless study
299
+ // (a Typical Price) out of its chain (tidal-ts#34 review, HIGH).
300
+ if (!c.derive || !isStudyOp(c.derive.op))
301
301
  continue;
302
302
  const parent = sourcesOf(configs, c)[0];
303
303
  if (parent)
@@ -362,7 +362,7 @@ export function studyChainTail(configs, rootId) {
362
362
  const next = configs.find((c) => c.id !== cur.id &&
363
363
  !seen.has(c.id) &&
364
364
  !!c.derive &&
365
- opParams(c.derive.op).length > 0 &&
365
+ isStudyOp(c.derive.op) &&
366
366
  readsFrom(configs, c, cur));
367
367
  if (!next)
368
368
  return cur.id;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tidal-ts/terminal",
3
- "version": "0.12.0",
3
+ "version": "0.12.1",
4
4
  "private": false,
5
5
  "description": "The terminal machine — an XState v5 statechart that owns a chart's configuration (rows, series, studies, pairs, axes, presets) and never its data.",
6
6
  "license": "MIT",
@@ -36,8 +36,8 @@
36
36
  "xstate": "^5.28.0"
37
37
  },
38
38
  "dependencies": {
39
- "@tidal-ts/chart": "0.12.0",
40
- "@tidal-ts/core": "0.12.0"
39
+ "@tidal-ts/chart": "0.12.1",
40
+ "@tidal-ts/core": "0.12.1"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@pond-ts/charts": "^0.73.0",