@tidal-ts/chart 0.22.0 → 0.24.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/dist/index.d.ts CHANGED
@@ -14,7 +14,7 @@
14
14
  export { TimeSeriesChart, annotationInView, type ChartAnnotation, type ChartStats, type TimeSeriesChartProps, type TimeSeriesChartRow, } from './TimeSeriesChart.js';
15
15
  export type { ChartSeries } from './types.js';
16
16
  export { levelRole, levelRoles, rowLevelMarks, type ChartLevel, type ChartLevelLine, type ChartLevelRange, type ChartLevelStyle, type LevelLineMark, type LevelRoleStyle, type LevelWashMark, } from './levels.js';
17
- export { configAxisId, effectiveSplit, formatSeriesValue, isStudySeries, LINE_WIDTHS, PAIR_JOINS, PAIR_LENSES, seriesAxisId, readsCompare, drawsAsCompare, isCompareSide, seriesDrawn, seriesCategoryStyle, seriesLineDashArray, seriesLineWidth, sharedAxisId, type AxisRange, effectiveAxisBounds, clampBoundsToLocks, barZeroLock, centerOnZero, axisRangeIsEmpty, axisFormat, fractionTicks, bandColumns, configBand, configColumns, configOutputs, configSpecs, dashPattern, fanIsBand, LINE_DASHES, OUTPUT_DASHES, outputKey, outputLook, publishedColumns, type ConfigOutput, type OutputLook, type OutputStyle, hasBarOutput, offersOutputBars, logAllowed, AXIS_PRECISIONS, type PairJoinOp, type PairLensOp, type SeriesGroup, type PairPartView, type PairView, type SeriesBinding, type SeriesConfig, type SeriesAxis, type SeriesStyle, type SeriesWindow, type CandleVariant, type ColorBy, readsFrom, sourcesOf, } from './series.js';
17
+ export { configAxisId, effectiveSplit, formatSeriesValue, isStudySeries, LINE_WIDTHS, PAIR_JOINS, PAIR_LENSES, seriesAxisId, readsCompare, drawsAsCompare, isCompareSide, seriesDrawn, seriesCategoryStyle, seriesLineDashArray, seriesLineWidth, sharedAxisId, type AxisRange, effectiveAxisBounds, clampBoundsToLocks, barZeroLock, centerOnZero, axisRangeIsEmpty, axisFormat, fractionTicks, bandColumns, configBand, configColumns, configOutputs, configSpecs, dashPattern, fanIsBand, LINE_DASHES, OUTPUT_DASHES, outputKey, outputLook, publishedColumns, type ConfigOutput, type OutputLook, type OutputStyle, hasBarOutput, offersOutputBars, logAllowed, AXIS_PRECISIONS, type PairJoinOp, type PairLensOp, type SeriesGroup, type PairPartView, type PairView, type SeriesBinding, type SeriesConfig, type CompareWith, type SeriesAxis, type SeriesStyle, type SeriesWindow, type CandleVariant, type ColorBy, readsFrom, sourcesOf, } from './series.js';
18
18
  export { DEFAULT_CHART_SETTINGS, mergeChartSettings, type AnnotationOverride, type ChartSettings, type CategoryLineStyle, type SessionDividers, type SplitColorDefault, type LineDash, } from './chartSettings.js';
19
19
  export { useMeasuredWidth, useMeasuredSize } from './useMeasuredWidth.js';
20
20
  export { assembleRows, carries, foldKey, foldSources, foldSourcesReport, type SourceFoldReport, prepareChart, sourceFacts, type ConfigRow, type PreparedRow, type SourceFacts, type SourceHold, type SourceInput, type SourceInputs, } from './prepare.js';
package/dist/series.d.ts CHANGED
@@ -314,6 +314,34 @@ export interface SeriesConfig {
314
314
  * the comparison, has nothing to restore.
315
315
  */
316
316
  compareFn?: PairOp;
317
+ /**
318
+ * What a compare reads as its other side (inB), when it is **wired by hand**
319
+ * rather than automatic. Absent ⇒ automatic: the same chain on the
320
+ * comparison symbol. Set ⇒ the output of the config `id`, read on the
321
+ * primary symbol or on the comparison (`side`) — `iv21` against `hv21`, or
322
+ * against `close` with a `ratio`. Set on the ROOT of a chain, like
323
+ * {@link compareFn}; the studies on the metric mirror onto this input, and a
324
+ * function joins the metric with it.
325
+ *
326
+ * Saved with the config, and kept when the comparison goes away: like the
327
+ * function, it sleeps until there is a comparison again. The host does the
328
+ * wiring at render time and treats an `id` that no longer exists as
329
+ * automatic. The terminal machine drops a wiring as soon as the other side
330
+ * is removed or stops being one line to read (joins a pair, draws several
331
+ * columns, takes a fan).
332
+ *
333
+ * The other side is read as its own PLAIN output, never its compare — so
334
+ * two metrics wired to each other, or a metric wired to its own study, form
335
+ * no cycle.
336
+ */
337
+ compareWith?: CompareWith;
338
+ }
339
+ /** A compare's hand-wired other side — see {@link SeriesConfig.compareWith}. */
340
+ export interface CompareWith {
341
+ /** The config whose output is the other side. */
342
+ id: string;
343
+ /** Read on the primary symbol, or on the comparison. */
344
+ side: 'primary' | 'comparison';
317
345
  }
318
346
  /** The textures in display order. */
319
347
  export declare const LINE_DASHES: readonly LineDash[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tidal-ts/chart",
3
- "version": "0.22.0",
3
+ "version": "0.24.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.22.0"
41
+ "@tidal-ts/core": "0.24.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@pond-ts/charts": "^0.78.0",