@tidal-ts/chart 0.11.0 → 0.12.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 (2) hide show
  1. package/dist/series.js +20 -2
  2. package/package.json +2 -2
package/dist/series.js CHANGED
@@ -125,7 +125,7 @@ export function configColumns(c) {
125
125
  // `@tidal-ts/core` (where the windowing + derive seam live) — imported for
126
126
  // `SeriesConfig` below and re-exported so UI code has one import site for the
127
127
  // series vocabulary.
128
- import { BAND_OUTPUTS, COMPARE_PREFIX, deriveId, inputNames, opOutputs, opParams, outputMark, studyLevels, usesCompare, withFanOutput, } from '@tidal-ts/core';
128
+ import { BAND_OUTPUTS, BAR_PRICE_COLUMNS, COMPARE_PREFIX, deriveId, inputNames, isPairOp, opOutputs, opParams, outputMark, studyLevels, usesCompare, withFanOutput, } from '@tidal-ts/core';
129
129
  // The app-wide presentation defaults the category resolvers below read.
130
130
  import { DEFAULT_CHART_SETTINGS, } from './chartSettings.js';
131
131
  /** The textures in display order. */
@@ -554,7 +554,11 @@ export function sourcesOf(configs, c) {
554
554
  const recorded = configs.find((x) => x.id === byId);
555
555
  if (!recorded)
556
556
  return; // its parent is gone — an orphan, not a re-bind
557
- if (publishes(recorded, name)) {
557
+ // A DATA node offers every column of its source, not only the one it
558
+ // draws: a Bollinger of a price's HIGH is still built on that price
559
+ // (Peter, 2026-10-12). Only through the recorded parent, so a study is
560
+ // never re-bound to some other node on the same source.
561
+ if (publishes(recorded, name) || offersRaw(recorded, c, i)) {
558
562
  out.push(recorded);
559
563
  return;
560
564
  }
@@ -566,6 +570,20 @@ export function sourcesOf(configs, c) {
566
570
  });
567
571
  return out;
568
572
  }
573
+ /** Whether data node `p` feeds study `c`'s raw input `i`: `p` draws one of a
574
+ * bar's price columns on the study's own source, and the input reads another.
575
+ * Only a BAR offers its siblings — a vol source's `iv21` and `iv63` are two
576
+ * metrics, each its own node, not two columns of one. */
577
+ const offersRaw = (p, c, i) => {
578
+ if (p.derive || p.source == null || p.source !== c.source || !c.derive)
579
+ return false;
580
+ if (isPairOp(c.derive.op))
581
+ return false;
582
+ const input = c.derive.inputs[i];
583
+ return (typeof input === 'string' &&
584
+ BAR_PRICE_COLUMNS.includes(p.column) &&
585
+ BAR_PRICE_COLUMNS.includes(input));
586
+ };
569
587
  /** Whether `c` computes the column `name` — its own, or one of its fanned
570
588
  * lines' ({@link publishedColumns}). The cheap test first: a fan is rare. */
571
589
  const publishes = (c, name) => c.column === name || (!!c.fan && publishedColumns(c).includes(name));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tidal-ts/chart",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "private": false,
5
5
  "description": "TimeSeriesChart — a multi-row time-series chart on @pond-ts/charts, plus the series and settings vocabulary and the prepare step. Theme, colours and settings arrive as props.",
6
6
  "license": "MIT",
@@ -38,7 +38,7 @@
38
38
  "react": "^18.2.0 || ^19.0.0"
39
39
  },
40
40
  "dependencies": {
41
- "@tidal-ts/core": "0.11.0"
41
+ "@tidal-ts/core": "0.12.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@pond-ts/charts": "^0.73.0",