@fasl-work/caos-app-shell 0.18.0 → 0.19.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
@@ -2,8 +2,8 @@ export { A as APP_ROUTE, a as AppShell, b as ArchTab, c as ArchitectureConfig, d
2
2
  import * as react from 'react';
3
3
  import { ReactNode, Component, ErrorInfo } from 'react';
4
4
  import * as zustand from 'zustand';
5
- import { F as FormatOptions } from './text-DyQ1A8oo.js';
6
- export { a as FittedLabel, N as NBSP, b as NOT_AVAILABLE, c as SCIENTIFIC_BELOW, d as SHELL_TOKENS, S as ShellColorToken, e as ShellToken, f as fitLabel, g as fontFamily, h as formatNumber, i as formatTicks, n as niceStep, j as niceTicks, k as resolveToken, t as textWidth, u as useFormat, l as useThemeTokens, w as widestLabel } from './text-DyQ1A8oo.js';
5
+ import { F as FormatOptions } from './tokens-BvU9bFPw.js';
6
+ export { b as FittedLabel, N as NBSP, c as NOT_AVAILABLE, d as SCIENTIFIC_BELOW, e as SHELL_TOKENS, S as ShellColorToken, f as ShellToken, g as fitLabel, h as fontFamily, i as formatNumber, j as formatTicks, n as niceStep, k as niceTicks, l as resolveToken, t as textWidth, u as useFormat, m as useThemeTokens, w as widestLabel } from './tokens-BvU9bFPw.js';
7
7
  import { L as Lang, B as BiText } from './text-BlY47nIt.js';
8
8
  export { p as pick, u as useLangStore, a as useShellLang } from './text-BlY47nIt.js';
9
9
 
@@ -1082,16 +1082,32 @@ interface BarDatum {
1082
1082
  value: number | null | undefined;
1083
1083
  /** An explicit colour by meaning; otherwise the accent, or faint beside a highlighted bar. */
1084
1084
  tone?: Tone;
1085
- /** The bar the reader is on (the selected variant, the case asked about). */
1085
+ /** The bar the reader is on (the selected variant, the case asked about). A bar with a `tone` keeps it and is outlined (0.19.0). */
1086
1086
  highlight?: boolean;
1087
1087
  /** One line shown as the bar's title. */
1088
1088
  hint?: BiText;
1089
+ /** A floating bar (0.19.0): the bar's two ends on the value axis, in any order (a waterfall layer, a bridge step). Without it the bar spans
1090
+ * zero to `value`. `value` stays the number the bar states (a layer's size, a step's amount, a total): it is written at the bar, read in the
1091
+ * readout and the table, which add the two ends. A span of zero length is drawn as a dot as thick as a bar (a total on a bridge); a span with
1092
+ * a missing end draws nothing; a span outside `axis.range` is cut to it. */
1093
+ span?: [number | null | undefined, number | null | undefined];
1094
+ /** Grouped bars (0.19.0): consecutive data with the same `group.id` share one category band, side by side (vertical) or one under another
1095
+ * (horizontal), and the category axis prints the group label once; `label` then names the member (a regime, a year), read with its group
1096
+ * ("Retail, Stress: 18"). Data of one group that are not consecutive make a band each. */
1097
+ group?: {
1098
+ id: string;
1099
+ label: BiText;
1100
+ };
1101
+ /** The number format of this bar (0.19.0), over `axis.format`: its value label, its readout, its ends and its table cells (a layer stated to three
1102
+ * decimals in a stack of two). The axis keeps `axis.format`. */
1103
+ format?: FormatOptions;
1089
1104
  }
1090
1105
  interface BarChartProps {
1091
1106
  /** The chart's accessible name. */
1092
1107
  title: BiText;
1093
1108
  data: BarDatum[];
1094
- /** The value axis: its title, unit and number format; `range` fixes the domain (it always includes zero). */
1109
+ /** The value axis: its title, unit and number format; `range` fixes the domain (it includes zero, unless a datum has a `span`: then
1110
+ * the range is the axis, a bridge's from 100 to 140 for instance). */
1095
1111
  axis: {
1096
1112
  label: BiText;
1097
1113
  unit?: BiText;
@@ -1108,6 +1124,15 @@ interface BarChartProps {
1108
1124
  height?: number | 'fill';
1109
1125
  /** Called with a bar's id when it is clicked or chosen with the keyboard. */
1110
1126
  onSelect?: (id: string) => void;
1127
+ /** Turn zoom and pan by category off (0.19.0), with the reason (at least 12 characters; the gate lists every chart that sets it).
1128
+ * The crosshair, the readout, the keyboard, the data table and the summary cannot be turned off. */
1129
+ zoomOff?: BiText;
1130
+ /** What each tone means (0.19.0), drawn as a legend under the bars: grouped bars name their members by tone. A tone no bar uses is drawn
1131
+ * anyway and warned about in development. */
1132
+ legend?: Array<{
1133
+ tone: Tone;
1134
+ label: BiText;
1135
+ }>;
1111
1136
  }
1112
1137
  /**
1113
1138
  * The house categorical chart (CAOS_MANAGE audit 2026-10-07: every product hand-drew its bar charts with fixed margins,
@@ -1115,8 +1140,14 @@ interface BarChartProps {
1115
1140
  * over two lines at a word and only then shortened, with the whole label as its title; ticks are round and share one
1116
1141
  * notation; values are written in the interface language. It renders once its box has a width and declares
1117
1142
  * `data-chart`, which the gate's text check (G10) measures.
1143
+ *
1144
+ * Since 0.19.0 it carries Tier A of the interactive-visualization rubric: a crosshair band and a readout for the bar under
1145
+ * the pointer or the keyboard, zoom and pan by category (wheel while the chart has the focus, Ctrl and wheel, brush, Shift and
1146
+ * drag, pinch), a reset control shown while zoomed, the keyboard model (arrows, Home, End, + and -, Shift with the arrows,
1147
+ * 0 and Escape), a hidden table of the values and a one-line summary. A value axis of counts ticks at whole numbers only
1148
+ * (`data-ticks-repeat` declares the labels that repeat, for the gate), and a long axis title wraps instead of being cut.
1118
1149
  */
1119
- declare function BarChart({ title, data, axis, orientation, values, height, onSelect }: BarChartProps): react.JSX.Element;
1150
+ declare function BarChart({ title, data, axis, orientation, values, height, onSelect, zoomOff, legend }: BarChartProps): react.JSX.Element;
1120
1151
 
1121
1152
  /** One section of the control rail. A rail whose content does not fit is SPLIT into sections, one shown at a
1122
1153
  * time, never scrolled (ADR-0071 rule 6: a panel must show its own controls). */