@tidal-ts/terminal 0.4.0 → 0.4.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.
package/dist/context.d.ts CHANGED
@@ -48,6 +48,9 @@ export declare function useAddPair(): (a: PairLegInput, b: PairLegInput, op: Pai
48
48
  * terminal machine cannot see whether one is. */
49
49
  export declare function useCompareAll(): () => void;
50
50
  export declare function useSetStudyParam(): (id: string, name: string, value: number) => void;
51
+ /** Switch which output of a multi-output source a study reads (the output
52
+ * picker). Pair it with `outputAllowed` to render refused choices disabled. */
53
+ export declare function useSetStudyOutput(): (id: string, output: string) => void;
51
54
  /** Step a series' draw order within its row (`front`/`up`/`down`/`back`; the
52
55
  * list is front→back, so `up` moves toward the top of the canvas stack). */
53
56
  export declare function useOrderSeries(): (id: string, to: 'front' | 'up' | 'down' | 'back') => void;
package/dist/context.js CHANGED
@@ -86,6 +86,12 @@ export function useSetStudyParam() {
86
86
  const ref = TerminalContext.useActorRef();
87
87
  return useCallback((id, name, value) => ref.send({ type: 'series.setStudyParam', id, name, value }), [ref]);
88
88
  }
89
+ /** Switch which output of a multi-output source a study reads (the output
90
+ * picker). Pair it with `outputAllowed` to render refused choices disabled. */
91
+ export function useSetStudyOutput() {
92
+ const ref = TerminalContext.useActorRef();
93
+ return useCallback((id, output) => ref.send({ type: 'series.setStudyOutput', id, output }), [ref]);
94
+ }
89
95
  /** Step a series' draw order within its row (`front`/`up`/`down`/`back`; the
90
96
  * list is front→back, so `up` moves toward the top of the canvas stack). */
91
97
  export function useOrderSeries() {
package/dist/index.d.ts CHANGED
@@ -5,6 +5,6 @@
5
5
  * union — the pre-paid bus contract. The actor context + machine internals stay
6
6
  * private to the module.
7
7
  */
8
- export { TerminalProvider, useRows, useSelectedSeries, useExpandedSeries, useControlsOpen, usePresetSaved, useActiveSlot, useAddSeries, useAddPair, useCompareAll, useAddStudy, useSetStudyParam, useOrderSeries, useReindexSeries, useMoveSeriesToRow, useMoveToAxis, useRemoveSeries, usePatchSeries, useToggleVisible, useToggleGroupVisible, useRemoveGroup, useSelectSeries, useExpandSeries, useSetControlsOpen, useSelectPreset, useSavePreset, useSetRowHeights, useAddRow, useRemoveRow, useAxisRanges, useToggleAxisLink, useSwapAxisSide, useSetAxisRange, useSetAxisAuto, useSetAxisLocks, useSetAxisAutoOpts, useSetAxisFormat, useTerminalHotkeys, type TerminalProviderProps, } from './context.js';
8
+ export { TerminalProvider, useRows, useSelectedSeries, useExpandedSeries, useControlsOpen, usePresetSaved, useActiveSlot, useAddSeries, useAddPair, useCompareAll, useAddStudy, useSetStudyParam, useSetStudyOutput, useOrderSeries, useReindexSeries, useMoveSeriesToRow, useMoveToAxis, useRemoveSeries, usePatchSeries, useToggleVisible, useToggleGroupVisible, useRemoveGroup, useSelectSeries, useExpandSeries, useSetControlsOpen, useSelectPreset, useSavePreset, useSetRowHeights, useAddRow, useRemoveRow, useAxisRanges, useToggleAxisLink, useSwapAxisSide, useSetAxisRange, useSetAxisAuto, useSetAxisLocks, useSetAxisAutoOpts, useSetAxisFormat, useTerminalHotkeys, type TerminalProviderProps, } from './context.js';
9
9
  export { PRESET_SLOTS, MAX_ROWS, activeSlot, canonRows, columnLabel, columnUnits, entryColumn, groupMembers, mintId, axisMoveAllowed, linkToggleAllowed, respecAllowed, outputAllowed, studyChainTail, studyOfferable, SOURCE_COLUMNS, swapAllowed, type EditScope, type RowState, type TerminalPreset, type MetricEntry, type PairLegInput, type PresetStorage, type TerminalEvent, type TerminalInput, } from './terminalMachine.js';
10
10
  export { axisBindings, allowedAxes, canAddUnit, axisForAdd, type AxisMember, } from './axisPolicy.js';
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * union — the pre-paid bus contract. The actor context + machine internals stay
6
6
  * private to the module.
7
7
  */
8
- export { TerminalProvider, useRows, useSelectedSeries, useExpandedSeries, useControlsOpen, usePresetSaved, useActiveSlot, useAddSeries, useAddPair, useCompareAll, useAddStudy, useSetStudyParam, useOrderSeries, useReindexSeries, useMoveSeriesToRow, useMoveToAxis, useRemoveSeries, usePatchSeries, useToggleVisible, useToggleGroupVisible, useRemoveGroup, useSelectSeries, useExpandSeries, useSetControlsOpen, useSelectPreset, useSavePreset, useSetRowHeights, useAddRow, useRemoveRow, useAxisRanges, useToggleAxisLink, useSwapAxisSide, useSetAxisRange, useSetAxisAuto, useSetAxisLocks, useSetAxisAutoOpts, useSetAxisFormat, useTerminalHotkeys, } from './context.js';
8
+ export { TerminalProvider, useRows, useSelectedSeries, useExpandedSeries, useControlsOpen, usePresetSaved, useActiveSlot, useAddSeries, useAddPair, useCompareAll, useAddStudy, useSetStudyParam, useSetStudyOutput, useOrderSeries, useReindexSeries, useMoveSeriesToRow, useMoveToAxis, useRemoveSeries, usePatchSeries, useToggleVisible, useToggleGroupVisible, useRemoveGroup, useSelectSeries, useExpandSeries, useSetControlsOpen, useSelectPreset, useSavePreset, useSetRowHeights, useAddRow, useRemoveRow, useAxisRanges, useToggleAxisLink, useSwapAxisSide, useSetAxisRange, useSetAxisAuto, useSetAxisLocks, useSetAxisAutoOpts, useSetAxisFormat, useTerminalHotkeys, } from './context.js';
9
9
  export { PRESET_SLOTS, MAX_ROWS, activeSlot, canonRows, columnLabel, columnUnits, entryColumn, groupMembers, mintId, axisMoveAllowed, linkToggleAllowed, respecAllowed, outputAllowed, studyChainTail, studyOfferable, SOURCE_COLUMNS, swapAllowed, } from './terminalMachine.js';
10
10
  // The axis policy a host's MENUS gate on — the same predicates the machine's
11
11
  // guards enforce, exported so the two cannot disagree (0.1.0 left them internal;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tidal-ts/terminal",
3
- "version": "0.4.0",
3
+ "version": "0.4.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.4.0",
40
- "@tidal-ts/core": "0.4.0"
39
+ "@tidal-ts/chart": "0.4.1",
40
+ "@tidal-ts/core": "0.4.1"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@pond-ts/charts": "^0.70.0",