@sproutsocial/seeds-react-data-viz 0.27.3 → 0.28.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.
Files changed (86) hide show
  1. package/dist/{annotations-CjFoRPXf.d.mts → annotations-YfJndb5S.d.mts} +2 -2
  2. package/dist/{annotations-CjFoRPXf.d.ts → annotations-YfJndb5S.d.ts} +2 -2
  3. package/dist/{axis-DVx6Mn1k.d.mts → axis-Byl9vNMR.d.mts} +9 -9
  4. package/dist/{axis-DQXvjzBs.d.ts → axis-Cn8NAgwb.d.ts} +9 -9
  5. package/dist/bar/index.d.mts +25 -47
  6. package/dist/bar/index.d.ts +25 -47
  7. package/dist/bar/index.js +14 -14
  8. package/dist/bar/index.js.map +1 -1
  9. package/dist/bubble/index.d.mts +29 -40
  10. package/dist/bubble/index.d.ts +29 -40
  11. package/dist/bubble/index.js +18 -20
  12. package/dist/bubble/index.js.map +1 -1
  13. package/dist/{chartExport-CKYpuhik.d.mts → chartExport-B0imEQ8Y.d.mts} +4 -4
  14. package/dist/{chartExport-CKYpuhik.d.ts → chartExport-B0imEQ8Y.d.ts} +4 -4
  15. package/dist/{chartBase-Cd405GIA.d.mts → chartProps-BgGx1GTo.d.mts} +67 -23
  16. package/dist/{chartBase-BYipK7MZ.d.ts → chartProps-C2Lxty-_.d.ts} +67 -23
  17. package/dist/{chunk-WMKO3RGT.js → chunk-2S7XMWJ4.js} +3 -3
  18. package/dist/chunk-2S7XMWJ4.js.map +1 -0
  19. package/dist/{chunk-6EIJCJCN.js → chunk-I72SSPMX.js} +1 -1
  20. package/dist/chunk-I72SSPMX.js.map +1 -0
  21. package/dist/{chunk-CV45MD47.js → chunk-RDS2VCPO.js} +3 -3
  22. package/dist/chunk-RDS2VCPO.js.map +1 -0
  23. package/dist/{chunk-5TWNMPQU.js → chunk-V5EXL244.js} +73 -63
  24. package/dist/chunk-V5EXL244.js.map +1 -0
  25. package/dist/{chunk-34OKRQET.js → chunk-XH7ZKGHD.js} +5 -5
  26. package/dist/{chunk-34OKRQET.js.map → chunk-XH7ZKGHD.js.map} +1 -1
  27. package/dist/donut/index.d.mts +21 -36
  28. package/dist/donut/index.d.ts +21 -36
  29. package/dist/donut/index.js +8 -8
  30. package/dist/donut/index.js.map +1 -1
  31. package/dist/esm/bar/index.js +5 -5
  32. package/dist/esm/bar/index.js.map +1 -1
  33. package/dist/esm/bubble/index.js +10 -12
  34. package/dist/esm/bubble/index.js.map +1 -1
  35. package/dist/esm/{chunk-P3MVYSHX.js → chunk-37QVUJXM.js} +1 -1
  36. package/dist/esm/chunk-37QVUJXM.js.map +1 -0
  37. package/dist/esm/{chunk-332X77M5.js → chunk-JNQC3ZRQ.js} +3 -3
  38. package/dist/esm/chunk-JNQC3ZRQ.js.map +1 -0
  39. package/dist/esm/{chunk-MVNO5UV6.js → chunk-NBMVFYDJ.js} +2 -2
  40. package/dist/esm/chunk-NBMVFYDJ.js.map +1 -0
  41. package/dist/esm/{chunk-AL3OTBTT.js → chunk-THDIQMFN.js} +2 -2
  42. package/dist/esm/chunk-THDIQMFN.js.map +1 -0
  43. package/dist/esm/{chunk-CYCKJ5ML.js → chunk-YCYACOQU.js} +34 -24
  44. package/dist/esm/chunk-YCYACOQU.js.map +1 -0
  45. package/dist/esm/donut/index.js +3 -3
  46. package/dist/esm/donut/index.js.map +1 -1
  47. package/dist/esm/export/index.js.map +1 -1
  48. package/dist/esm/index.js +4 -4
  49. package/dist/esm/index.js.map +1 -1
  50. package/dist/esm/line-area/index.js +5 -5
  51. package/dist/esm/line-area/index.js.map +1 -1
  52. package/dist/esm/sparkline/index.js +3 -3
  53. package/dist/esm/sparkline/index.js.map +1 -1
  54. package/dist/esm/wordcloud/index.js +4 -3
  55. package/dist/esm/wordcloud/index.js.map +1 -1
  56. package/dist/export/index.d.mts +5 -5
  57. package/dist/export/index.d.ts +5 -5
  58. package/dist/export/index.js.map +1 -1
  59. package/dist/index.js +92 -92
  60. package/dist/index.js.map +1 -1
  61. package/dist/{interactions-pEXA1XxF.d.ts → interactions-D2a4O6iM.d.mts} +8 -8
  62. package/dist/{interactions-pEXA1XxF.d.mts → interactions-D2a4O6iM.d.ts} +8 -8
  63. package/dist/line-area/index.d.mts +22 -48
  64. package/dist/line-area/index.d.ts +22 -48
  65. package/dist/line-area/index.js +14 -14
  66. package/dist/line-area/index.js.map +1 -1
  67. package/dist/pointerClick-4LUDwS3L.d.mts +15 -0
  68. package/dist/pointerClick-4LUDwS3L.d.ts +15 -0
  69. package/dist/sparkline/index.d.mts +24 -33
  70. package/dist/sparkline/index.d.ts +24 -33
  71. package/dist/sparkline/index.js +7 -7
  72. package/dist/sparkline/index.js.map +1 -1
  73. package/dist/wordcloud/index.d.mts +22 -20
  74. package/dist/wordcloud/index.d.ts +22 -20
  75. package/dist/wordcloud/index.js +11 -10
  76. package/dist/wordcloud/index.js.map +1 -1
  77. package/package.json +3 -3
  78. package/dist/chunk-5TWNMPQU.js.map +0 -1
  79. package/dist/chunk-6EIJCJCN.js.map +0 -1
  80. package/dist/chunk-CV45MD47.js.map +0 -1
  81. package/dist/chunk-WMKO3RGT.js.map +0 -1
  82. package/dist/esm/chunk-332X77M5.js.map +0 -1
  83. package/dist/esm/chunk-AL3OTBTT.js.map +0 -1
  84. package/dist/esm/chunk-CYCKJ5ML.js.map +0 -1
  85. package/dist/esm/chunk-MVNO5UV6.js.map +0 -1
  86. package/dist/esm/chunk-P3MVYSHX.js.map +0 -1
@@ -1,23 +1,8 @@
1
1
  import { ReactNode } from 'react';
2
+ import { T as TypeChartExportHandle } from './chartExport-B0imEQ8Y.mjs';
2
3
  import { TypeIconName } from '@sproutsocial/seeds-react-icon';
3
4
  import { c as TypeChartNumberFormat, k as TypeChartStyleColor } from './types-DxrhdAdn.mjs';
4
5
 
5
- /**
6
- * Pure, Highcharts-free datetime axis label formatter for v2 chart families.
7
- *
8
- * Ports v1's `helpers/xAxisLabelFormatter` into a rendering-agnostic shape: it
9
- * returns a `{ primary, secondary? }` object instead of an HTML string, leaving
10
- * SVG rendering to the caller. The timezone- and DST-correct boundary detection
11
- * (calendar parts read in the target timezone) and the per-granularity
12
- * `Intl.DateTimeFormat` option sets are a near-verbatim port of v1.
13
- *
14
- * The one net-new piece versus v1 is granularity derivation: v1 receives
15
- * `unitName` from Highcharts, but `charts/` may not depend on Highcharts types
16
- * (see `charts/README.md` invariants), so granularity is derived from the
17
- * spacing of `tickPositions`.
18
- */
19
- type DatetimeTimeFormat = "12" | "24";
20
-
21
6
  type TypeValuePercentInput = "decimal" | "whole";
22
7
  type TypeValueFormatterOptions = Readonly<{
23
8
  /** The raw numeric value. For duration, milliseconds. */
@@ -40,9 +25,25 @@ type TypeValueFormatterOptions = Readonly<{
40
25
  * full {@link TypeValueFormatterOptions} surface minus `value`, which is
41
26
  * supplied per-tick / per-row by the caller (the adapter and tooltip).
42
27
  */
43
- type ValueFormat = Omit<TypeValueFormatterOptions, "value">;
28
+ type TypeValueFormat = Omit<TypeValueFormatterOptions, "value">;
44
29
 
45
- interface ChartTooltipDataRow {
30
+ /**
31
+ * Pure, Highcharts-free datetime axis label formatter for v2 chart families.
32
+ *
33
+ * Ports v1's `helpers/xAxisLabelFormatter` into a rendering-agnostic shape: it
34
+ * returns a `{ primary, secondary? }` object instead of an HTML string, leaving
35
+ * SVG rendering to the caller. The timezone- and DST-correct boundary detection
36
+ * (calendar parts read in the target timezone) and the per-granularity
37
+ * `Intl.DateTimeFormat` option sets are a near-verbatim port of v1.
38
+ *
39
+ * The one net-new piece versus v1 is granularity derivation: v1 receives
40
+ * `unitName` from Highcharts, but `charts/` may not depend on Highcharts types
41
+ * (see `charts/README.md` invariants), so granularity is derived from the
42
+ * spacing of `tickPositions`.
43
+ */
44
+ type TypeDatetimeTimeFormat = "12" | "24";
45
+
46
+ interface TypeChartTooltipDataRow {
46
47
  color: TypeChartStyleColor;
47
48
  name: string;
48
49
  value: number | null;
@@ -60,8 +61,8 @@ interface ChartTooltipDataRow {
60
61
  pointIndex?: number;
61
62
  }
62
63
  /** Tooltip render-prop signature for v2 charts. */
63
- interface ChartTooltipProps {
64
- data: ChartTooltipDataRow[];
64
+ interface TypeChartTooltipRenderProps {
65
+ data: TypeChartTooltipDataRow[];
65
66
  /** Resolved x-axis position. Category name for category axes, numeric for time/linear. */
66
67
  position: number | string;
67
68
  /** Suppress the default tooltip's title row. Set for pie/donut, which have no x-axis position — the title would just duplicate the single slice's name. */
@@ -69,7 +70,7 @@ interface ChartTooltipProps {
69
70
  /** Resolved chart timezone — pass to date formatters when `position` is a numeric timestamp. Undefined on category axes. */
70
71
  timezone?: string;
71
72
  /** Resolved datetime-axis `timeFormat` ("12" | "24"). Governs the hour-granularity date title. Undefined on category axes. */
72
- timeFormat?: DatetimeTimeFormat;
73
+ timeFormat?: TypeDatetimeTimeFormat;
73
74
  /** Full x-axis tick positions, extracted at the engine boundary — used to derive the title's granularity (day vs month vs hour …). Undefined on category axes. */
74
75
  tickPositions?: readonly number[];
75
76
  /** Locale for the date title's Intl formatting. Defaults to "en-US" (see CE-36); threaded internally, not a consumer-facing prop today (CE-35). */
@@ -88,7 +89,50 @@ interface ChartTooltipProps {
88
89
  /** Content shown in place of a row's value when the value is null. Defaults to an em-dash. */
89
90
  invalidNumberLabel?: ReactNode;
90
91
  /** Declarative value format for the tooltip value cell. Omit for raw rendering. Applied at full precision (abbreviation off). */
91
- valueFormat?: ValueFormat;
92
+ valueFormat?: TypeValueFormat;
93
+ }
94
+
95
+ /** Universal fields every v2 chart family exposes. */
96
+ interface TypeChartBaseProps {
97
+ /** Wired into Highcharts' `accessibility.description`. */
98
+ description: string;
99
+ /** Class names appended to the container's class chain — e.g. Tailwind utilities for layout or sizing. */
100
+ className?: string;
101
+ /**
102
+ * Chart title included in the exported image (PNG/SVG/PDF) only — it does
103
+ * *not* render on screen. The on-screen title is a React sibling outside the
104
+ * chart SVG and can't be captured on export, so `exportTitle` is baked into
105
+ * the export clone as a themed native Highcharts title. Omit for no title.
106
+ */
107
+ exportTitle?: string;
108
+ /**
109
+ * Fired once per chart instance with an opaque {@link TypeChartExportHandle}
110
+ * for triggering PNG/SVG/PDF/CSV downloads. Re-fires only on a genuine
111
+ * remount, never on data or prop updates.
112
+ */
113
+ onReady?: (handle: TypeChartExportHandle) => void;
114
+ }
115
+ /** Explicit pixel height. Sparkline opts out — it's fixed-size, sized via `className`. */
116
+ interface TypeChartSizingProps {
117
+ /** Chart height in pixels. The default is family-specific — see each family's adapter. */
118
+ height?: number;
119
+ }
120
+ /** Default-tooltip customization. Wordcloud opts out (its tooltip subsystem is disabled). */
121
+ interface TypeChartTooltipDisplayProps {
122
+ /** Override for the default tooltip content. */
123
+ tooltip?: (args: TypeChartTooltipRenderProps) => ReactNode;
124
+ /** Override for the value shown when a data point is null. Defaults to an em-dash. */
125
+ invalidNumberLabel?: ReactNode;
126
+ }
127
+ /**
128
+ * The default tooltip's click-footer slot. Dependent on the tooltip tier rather
129
+ * than independent of it: the field is only meaningful for a family that has
130
+ * both {@link TypeChartTooltipDisplayProps} and an `onClick`, which is why
131
+ * sparkline (no `onClick`) and wordcloud (no tooltip) both omit it.
132
+ */
133
+ interface TypeChartTooltipClickFooterProps {
134
+ /** Footer content shown in the default tooltip when `onClick` is set. */
135
+ tooltipClickLabel?: ReactNode;
92
136
  }
93
137
 
94
- export type { ChartTooltipProps as C, DatetimeTimeFormat as D, ValueFormat as V, ChartTooltipDataRow as a };
138
+ export type { TypeChartBaseProps as T, TypeChartSizingProps as a, TypeChartTooltipDisplayProps as b, TypeChartTooltipClickFooterProps as c, TypeValueFormat as d, TypeChartTooltipRenderProps as e, TypeChartTooltipDataRow as f, TypeDatetimeTimeFormat as g };
@@ -1,23 +1,8 @@
1
1
  import { ReactNode } from 'react';
2
+ import { T as TypeChartExportHandle } from './chartExport-B0imEQ8Y.js';
2
3
  import { TypeIconName } from '@sproutsocial/seeds-react-icon';
3
4
  import { c as TypeChartNumberFormat, k as TypeChartStyleColor } from './types-DxrhdAdn.js';
4
5
 
5
- /**
6
- * Pure, Highcharts-free datetime axis label formatter for v2 chart families.
7
- *
8
- * Ports v1's `helpers/xAxisLabelFormatter` into a rendering-agnostic shape: it
9
- * returns a `{ primary, secondary? }` object instead of an HTML string, leaving
10
- * SVG rendering to the caller. The timezone- and DST-correct boundary detection
11
- * (calendar parts read in the target timezone) and the per-granularity
12
- * `Intl.DateTimeFormat` option sets are a near-verbatim port of v1.
13
- *
14
- * The one net-new piece versus v1 is granularity derivation: v1 receives
15
- * `unitName` from Highcharts, but `charts/` may not depend on Highcharts types
16
- * (see `charts/README.md` invariants), so granularity is derived from the
17
- * spacing of `tickPositions`.
18
- */
19
- type DatetimeTimeFormat = "12" | "24";
20
-
21
6
  type TypeValuePercentInput = "decimal" | "whole";
22
7
  type TypeValueFormatterOptions = Readonly<{
23
8
  /** The raw numeric value. For duration, milliseconds. */
@@ -40,9 +25,25 @@ type TypeValueFormatterOptions = Readonly<{
40
25
  * full {@link TypeValueFormatterOptions} surface minus `value`, which is
41
26
  * supplied per-tick / per-row by the caller (the adapter and tooltip).
42
27
  */
43
- type ValueFormat = Omit<TypeValueFormatterOptions, "value">;
28
+ type TypeValueFormat = Omit<TypeValueFormatterOptions, "value">;
44
29
 
45
- interface ChartTooltipDataRow {
30
+ /**
31
+ * Pure, Highcharts-free datetime axis label formatter for v2 chart families.
32
+ *
33
+ * Ports v1's `helpers/xAxisLabelFormatter` into a rendering-agnostic shape: it
34
+ * returns a `{ primary, secondary? }` object instead of an HTML string, leaving
35
+ * SVG rendering to the caller. The timezone- and DST-correct boundary detection
36
+ * (calendar parts read in the target timezone) and the per-granularity
37
+ * `Intl.DateTimeFormat` option sets are a near-verbatim port of v1.
38
+ *
39
+ * The one net-new piece versus v1 is granularity derivation: v1 receives
40
+ * `unitName` from Highcharts, but `charts/` may not depend on Highcharts types
41
+ * (see `charts/README.md` invariants), so granularity is derived from the
42
+ * spacing of `tickPositions`.
43
+ */
44
+ type TypeDatetimeTimeFormat = "12" | "24";
45
+
46
+ interface TypeChartTooltipDataRow {
46
47
  color: TypeChartStyleColor;
47
48
  name: string;
48
49
  value: number | null;
@@ -60,8 +61,8 @@ interface ChartTooltipDataRow {
60
61
  pointIndex?: number;
61
62
  }
62
63
  /** Tooltip render-prop signature for v2 charts. */
63
- interface ChartTooltipProps {
64
- data: ChartTooltipDataRow[];
64
+ interface TypeChartTooltipRenderProps {
65
+ data: TypeChartTooltipDataRow[];
65
66
  /** Resolved x-axis position. Category name for category axes, numeric for time/linear. */
66
67
  position: number | string;
67
68
  /** Suppress the default tooltip's title row. Set for pie/donut, which have no x-axis position — the title would just duplicate the single slice's name. */
@@ -69,7 +70,7 @@ interface ChartTooltipProps {
69
70
  /** Resolved chart timezone — pass to date formatters when `position` is a numeric timestamp. Undefined on category axes. */
70
71
  timezone?: string;
71
72
  /** Resolved datetime-axis `timeFormat` ("12" | "24"). Governs the hour-granularity date title. Undefined on category axes. */
72
- timeFormat?: DatetimeTimeFormat;
73
+ timeFormat?: TypeDatetimeTimeFormat;
73
74
  /** Full x-axis tick positions, extracted at the engine boundary — used to derive the title's granularity (day vs month vs hour …). Undefined on category axes. */
74
75
  tickPositions?: readonly number[];
75
76
  /** Locale for the date title's Intl formatting. Defaults to "en-US" (see CE-36); threaded internally, not a consumer-facing prop today (CE-35). */
@@ -88,7 +89,50 @@ interface ChartTooltipProps {
88
89
  /** Content shown in place of a row's value when the value is null. Defaults to an em-dash. */
89
90
  invalidNumberLabel?: ReactNode;
90
91
  /** Declarative value format for the tooltip value cell. Omit for raw rendering. Applied at full precision (abbreviation off). */
91
- valueFormat?: ValueFormat;
92
+ valueFormat?: TypeValueFormat;
93
+ }
94
+
95
+ /** Universal fields every v2 chart family exposes. */
96
+ interface TypeChartBaseProps {
97
+ /** Wired into Highcharts' `accessibility.description`. */
98
+ description: string;
99
+ /** Class names appended to the container's class chain — e.g. Tailwind utilities for layout or sizing. */
100
+ className?: string;
101
+ /**
102
+ * Chart title included in the exported image (PNG/SVG/PDF) only — it does
103
+ * *not* render on screen. The on-screen title is a React sibling outside the
104
+ * chart SVG and can't be captured on export, so `exportTitle` is baked into
105
+ * the export clone as a themed native Highcharts title. Omit for no title.
106
+ */
107
+ exportTitle?: string;
108
+ /**
109
+ * Fired once per chart instance with an opaque {@link TypeChartExportHandle}
110
+ * for triggering PNG/SVG/PDF/CSV downloads. Re-fires only on a genuine
111
+ * remount, never on data or prop updates.
112
+ */
113
+ onReady?: (handle: TypeChartExportHandle) => void;
114
+ }
115
+ /** Explicit pixel height. Sparkline opts out — it's fixed-size, sized via `className`. */
116
+ interface TypeChartSizingProps {
117
+ /** Chart height in pixels. The default is family-specific — see each family's adapter. */
118
+ height?: number;
119
+ }
120
+ /** Default-tooltip customization. Wordcloud opts out (its tooltip subsystem is disabled). */
121
+ interface TypeChartTooltipDisplayProps {
122
+ /** Override for the default tooltip content. */
123
+ tooltip?: (args: TypeChartTooltipRenderProps) => ReactNode;
124
+ /** Override for the value shown when a data point is null. Defaults to an em-dash. */
125
+ invalidNumberLabel?: ReactNode;
126
+ }
127
+ /**
128
+ * The default tooltip's click-footer slot. Dependent on the tooltip tier rather
129
+ * than independent of it: the field is only meaningful for a family that has
130
+ * both {@link TypeChartTooltipDisplayProps} and an `onClick`, which is why
131
+ * sparkline (no `onClick`) and wordcloud (no tooltip) both omit it.
132
+ */
133
+ interface TypeChartTooltipClickFooterProps {
134
+ /** Footer content shown in the default tooltip when `onClick` is set. */
135
+ tooltipClickLabel?: ReactNode;
92
136
  }
93
137
 
94
- export type { ChartTooltipProps as C, DatetimeTimeFormat as D, ValueFormat as V, ChartTooltipDataRow as a };
138
+ export type { TypeChartBaseProps as T, TypeChartSizingProps as a, TypeChartTooltipDisplayProps as b, TypeChartTooltipClickFooterProps as c, TypeValueFormat as d, TypeChartTooltipRenderProps as e, TypeChartTooltipDataRow as f, TypeDatetimeTimeFormat as g };
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunk5TWNMPQUjs = require('./chunk-5TWNMPQU.js');
3
+ var _chunkV5EXL244js = require('./chunk-V5EXL244.js');
4
4
 
5
5
  // src/charts/shared/annotations.ts
6
6
  function buildAnnotationConfig(annotations) {
@@ -56,7 +56,7 @@ function makeValueAxisLabelFormatter(format) {
56
56
  return function() {
57
57
  const numberValue = Number(this.value);
58
58
  const abbreviate = format.abbreviate === false ? false : deriveAbbreviateFromTicks(this);
59
- return _chunk5TWNMPQUjs.valueFormatter.call(void 0, { ...format, value: numberValue, abbreviate });
59
+ return _chunkV5EXL244js.valueFormatter.call(void 0, { ...format, value: numberValue, abbreviate });
60
60
  };
61
61
  }
62
62
 
@@ -65,4 +65,4 @@ function makeValueAxisLabelFormatter(format) {
65
65
 
66
66
 
67
67
  exports.buildAnnotationConfig = buildAnnotationConfig; exports.defaultValueAxisLabelFormatter = defaultValueAxisLabelFormatter; exports.makeValueAxisLabelFormatter = makeValueAxisLabelFormatter;
68
- //# sourceMappingURL=chunk-WMKO3RGT.js.map
68
+ //# sourceMappingURL=chunk-2S7XMWJ4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/_work/seeds/seeds/seeds-react/seeds-react-data-viz/dist/chunk-2S7XMWJ4.js","../src/charts/shared/annotations.ts","../src/charts/shared/valueAxisLabelFormatter.ts"],"names":[],"mappings":"AAAA;AACE;AACF,sDAA4B;AAC5B;AACA;ACkCO,SAAS,qBAAA,CACd,WAAA,EAIA;AACA,EAAA,GAAA,CAAI,iBAAC,WAAA,2BAAa,QAAA,EAAQ;AACxB,IAAA,OAAO,EAAE,WAAA,EAAa,KAAA,CAAA,EAAW,MAAA,EAAQ,KAAA,EAAU,CAAA;AAAA,EACrD;AACA,EAAA,MAAM,OAAA,EAGA,CAAC,CAAA;AACP,EAAA,MAAM,OAAA,kBAAoC,IAAI,GAAA,CAAI,CAAA;AAClD,EAAA,IAAA,CAAA,MAAW,WAAA,GAAc,WAAA,EAAa;AACpC,IAAA,MAAM,EAAE,SAAS,EAAA,EAAI,UAAA;AACrB,IAAA,MAAA,CAAO,IAAA,CAAK;AAAA;AAAA,MAEV,KAAA,EAAO,EAAE,CAAA,EAAG,QAAA,EAAU,CAAA,EAAG,CAAA,EAAG,KAAA,EAAO,CAAA,EAAG,KAAA,EAAO,EAAE,CAAA;AAAA;AAAA,MAE/C,IAAA,EAAM;AAAA,IACR,CAAC,CAAA;AAID,IAAA,MAAA,CAAO,GAAA,CAAI,QAAA,EAAU,UAAU,CAAA;AAAA,EACjC;AACA,EAAA,GAAA,CAAI,MAAA,CAAO,OAAA,IAAW,CAAA,EAAG;AACvB,IAAA,OAAO,EAAE,WAAA,EAAa,KAAA,CAAA,EAAW,MAAA,EAAQ,KAAA,EAAU,CAAA;AAAA,EACrD;AACA,EAAA,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,WAAA,EAAa,CAAC,EAAE,MAAA,EAAQ,YAAA,EAAc,EAAE,OAAA,EAAS,IAAA,EAAM,OAAA,EAAS,EAAE,EAAE,CAAC,CAAA;AAAA,IACrE;AAAA,EACF,CAAA;AACF;AD3CA;AACA;AEjCA,sEAA8B;AAc9B,IAAM,aAAA,EAAe,OAAA;AAWrB,SAAS,yBAAA,CACP,OAAA,EACkB;AAClB,EAAA,MAAM,cAAA,EAAgB,OAAA,CAAQ,IAAA,CAAK,aAAA;AACnC,EAAA,MAAM,SAAA,EACJ,cAAA,GAAiB,aAAA,CAAc,OAAA,EAAS,EAAA,EACpC,aAAA,CAAc,aAAA,CAAc,OAAA,EAAS,CAAC,EAAA,EACtC,KAAA,CAAA;AACN,EAAA,OAAO,OAAO,SAAA,IAAa,SAAA,GAAY,SAAA,EAAW,KAAA,EAAO,IAAA,EAAO,IAAA;AAClE;AAWO,SAAS,8BAAA,CAAA,EAEN;AACR,EAAA,MAAM,YAAA,EAAc,MAAA,CAAO,IAAA,CAAK,KAAK,CAAA;AAErC,EAAA,GAAA,CAAI,YAAA,IAAgB,CAAA,EAAG;AACrB,IAAA,OAAO,8CAAA,EAAgB,MAAA,EAAQ,YAAA,EAAc,MAAA,EAAQ,EAAE,CAAC,CAAA;AAAA,EAC1D;AAEA,EAAA,MAAM,WAAA,EAAa,yBAAA,CAA0B,IAAI,CAAA;AAEjD,EAAA,OAAO,8CAAA;AAAc,IACnB,UAAA;AAAA,IACA,MAAA,EAAQ,SAAA;AAAA,IACR,MAAA,EAAQ,YAAA;AAAA,IACR,MAAA,EAAQ;AAAA,EACV,CAAC,CAAA;AACH;AAYO,SAAS,2BAAA,CAA4B,MAAA,EAAyB;AACnE,EAAA,OAAO,QAAA,CAAA,EAA4D;AACjE,IAAA,MAAM,YAAA,EAAc,MAAA,CAAO,IAAA,CAAK,KAAK,CAAA;AAMrC,IAAA,MAAM,WAAA,EACJ,MAAA,CAAO,WAAA,IAAe,MAAA,EAAQ,MAAA,EAAQ,yBAAA,CAA0B,IAAI,CAAA;AAEtE,IAAA,OAAO,6CAAA,EAAiB,GAAG,MAAA,EAAQ,KAAA,EAAO,WAAA,EAAa,WAAW,CAAC,CAAA;AAAA,EACrE,CAAA;AACF;AF1BA;AACA;AACE;AACA;AACA;AACF,kMAAC","file":"/home/runner/_work/seeds/seeds/seeds-react/seeds-react-data-viz/dist/chunk-2S7XMWJ4.js","sourcesContent":[null,"// Shared annotation plumbing across v2 chart families. Currently consumed by\n// BarChart; v2 Line/Area will share the same `annotations` shape and reuse\n// `buildAnnotationConfig` directly. Annotation data is purely numeric —\n// the module has no knowledge of `categories`; resolving a numeric position to\n// a display name is the tooltip's job (see chartBase `renderContent`).\n\nimport type { TypeIconName } from \"@sproutsocial/seeds-react-icon\";\nimport type { TypeSeedsChartAnnotationsOptions } from \"./chartBase\";\n\n/**\n * Annotations keyed by the numeric Highcharts index. Both consumers resolve\n * numerically: the marker portal reads `label.point.x` and the tooltip reads\n * `context.point.x` (numeric on both category and datetime axes).\n */\nexport type TypeChartAnnotationLookup = Map<number, TypeChartAnnotation>;\n\n/**\n * Declarative annotation shape — the DS renders the marker and tooltip header\n * internally; consumers don't supply render functions. See CE-7.\n */\nexport interface TypeChartAnnotation {\n /** Numeric x-axis coordinate — a category index (category axes) or the raw coordinate (datetime/linear axes). */\n position: number;\n /** Icon shown above the chart at `position` and inline with `title` in the tooltip header. */\n icon?: TypeIconName;\n /** Color applied to the marker's vertical line. */\n color?: string;\n /** Tooltip header line 1. */\n title?: string;\n /** Tooltip header line 2. */\n description?: string;\n}\n\n/**\n * Build the Highcharts `annotations` config and a parallel lookup keyed by the\n * numeric `position`. Both consumers (chart adapter for Highcharts, ChartRenderer\n * for the portal + tooltip) read from the same numeric lookup to stay aligned.\n */\nexport function buildAnnotationConfig(\n annotations: TypeChartAnnotation[] | undefined\n): {\n annotations: TypeSeedsChartAnnotationsOptions[] | undefined;\n lookup: TypeChartAnnotationLookup | undefined;\n} {\n if (!annotations?.length) {\n return { annotations: undefined, lookup: undefined };\n }\n const labels: {\n point: { x: number; y: number; xAxis: 0; yAxis: 0 };\n text: string;\n }[] = [];\n const lookup: TypeChartAnnotationLookup = new Map();\n for (const annotation of annotations) {\n const { position } = annotation;\n labels.push({\n // Highcharts anchor — always uses `x` regardless of chart orientation.\n point: { x: position, y: 0, xAxis: 0, yAxis: 0 },\n // Space (not empty) — Highcharts reverts to its built-in label text on empty string.\n text: \" \",\n });\n // Keyed by the numeric position only. The marker portal reads\n // `label.point.x` and the tooltip reads `context.point.x` — both numeric on\n // every axis type, so no category-name keying is needed.\n lookup.set(position, annotation);\n }\n if (labels.length === 0) {\n return { annotations: undefined, lookup: undefined };\n }\n return {\n // `useHTML: true` makes Highcharts attach an HTML `graphic.div` to each\n // label, which the marker portal needs as its render target. `padding: 0`\n // removes Highcharts' default left padding so markers stay centered.\n annotations: [{ labels, labelOptions: { useHTML: true, padding: 0 } }],\n lookup,\n };\n}\n","import { formatNumeral } from \"@sproutsocial/seeds-react-numeral\";\n\nimport type { TypeSeedsAxisLabelFormatterContext } from \"./chartBase\";\nimport {\n valueFormatter,\n type TypeValueFormat,\n} from \"./formatters/valueFormatter\";\n\n/**\n * Fixed internal locale for the default value-axis formatter. Pins the en-US\n * compact symbols (2K / 1.2M / 1.2B) so output is deterministic regardless of\n * the environment's locale resolution.\n * TODO: consumer-facing locale and an override surface may be added later.\n */\nconst FIXED_LOCALE = \"en-US\";\n\n/**\n * Derive formatNumeral's `abbreviate` threshold from the axis tick scan.\n *\n * formatNumeral abbreviates above 10,000 by default; passing a numeric\n * `abbreviate` lowers that threshold to that value. When the top tick exceeds\n * 9,999 we lower it to 1,000 so the whole axis reads \"2K 4K 6K 8K 10K\" rather\n * than a mixed \"2,000 4,000 6,000 8,000 10K\". Otherwise `true` keeps the default\n * 10,000 threshold. Centralizes the 9,999 rule for both formatters below.\n */\nfunction deriveAbbreviateFromTicks(\n context: TypeSeedsAxisLabelFormatterContext\n): boolean | number {\n const tickPositions = context.axis.tickPositions;\n const maxValue =\n tickPositions && tickPositions.length > 0\n ? tickPositions[tickPositions.length - 1]\n : undefined;\n return typeof maxValue === \"number\" && maxValue > 9999 ? 1000 : true;\n}\n\n/**\n * Internal, zero-config default value-axis label formatter for v2 chart\n * families. Abbreviates value-axis ticks (1.20K / 1.20M / 1.20B); decimal mode\n * only. Zero renders \"0\". Decimal compact precision is fixed at two fraction\n * digits, so abbreviated ticks always carry two decimals.\n *\n * Wired as a Highcharts `yAxis.labels.formatter`, invoked `this`-bound with the\n * Seeds-local context.\n */\nexport function defaultValueAxisLabelFormatter(\n this: TypeSeedsAxisLabelFormatterContext\n): string {\n const numberValue = Number(this.value);\n\n if (numberValue === 0) {\n return formatNumeral({ locale: FIXED_LOCALE, number: 0 });\n }\n\n const abbreviate = deriveAbbreviateFromTicks(this);\n\n return formatNumeral({\n abbreviate,\n format: \"decimal\",\n locale: FIXED_LOCALE,\n number: numberValue,\n });\n}\n\n/**\n * Build a `format`-driven value-axis label formatter that runs a declarative\n * {@link TypeValueFormat} through the shared {@link valueFormatter}. Reuses the same\n * `tickPositions` scan as {@link defaultValueAxisLabelFormatter} so the\n * axis-wide \"smart 1k/10k\" abbreviation is preserved for decimal/currency ticks.\n *\n * Wired as a Highcharts `yAxis.labels.formatter`; invoked `this`-bound with the\n * Seeds-local context. The returned formatter never carries chart-engine types,\n * keeping the engine boundary intact.\n */\nexport function makeValueAxisLabelFormatter(format: TypeValueFormat) {\n return function (this: TypeSeedsAxisLabelFormatterContext): string {\n const numberValue = Number(this.value);\n\n // Honor an explicit `abbreviate: false` opt-out; otherwise derive the\n // threshold from the same tick scan as the default formatter (abbreviation\n // only affects decimal/currency — percent and duration ignore it inside\n // valueFormatter).\n const abbreviate =\n format.abbreviate === false ? false : deriveAbbreviateFromTicks(this);\n\n return valueFormatter({ ...format, value: numberValue, abbreviate });\n };\n}\n"]}
@@ -19,4 +19,4 @@ function getChartContainerProps(args) {
19
19
 
20
20
 
21
21
  exports.getChartContainerProps = getChartContainerProps;
22
- //# sourceMappingURL=chunk-6EIJCJCN.js.map
22
+ //# sourceMappingURL=chunk-I72SSPMX.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/_work/seeds/seeds/seeds-react/seeds-react-data-viz/dist/chunk-I72SSPMX.js","../src/charts/shared/chartContainer.ts"],"names":[],"mappings":"AAAA;ACsDO,SAAS,sBAAA,CACd,IAAA,EAQyB;AACzB,EAAA,MAAM,EAAE,aAAA,EAAe,MAAA,EAAQ,SAAA,EAAW,CAAC,CAAA,EAAG,UAAA,EAAY,UAAU,EAAA,EAAI,IAAA;AAOxE,EAAA,MAAM,MAAA,EAAgC,CAAC,CAAA;AACvC,EAAA,MAAA,CAAO,OAAA,CAAQ,CAAC,KAAA,EAAO,KAAA,EAAA,GAAU;AAC/B,IAAA,GAAA,CAAI,KAAA,EAAO;AACT,MAAA,KAAA,CAAM,CAAA,mBAAA,EAAsB,KAAK,CAAA,CAAA;AACnC,IAAA;AACD,EAAA;AAIO,EAAA;AAID,EAAA;AACyB,IAAA;AAG9B,IAAA;AACmB,IAAA;AACE,IAAA;AACvB,EAAA;AACF;AD3EwC;AACA;AACA;AACA","file":"/home/runner/_work/seeds/seeds/seeds-react/seeds-react-data-viz/dist/chunk-I72SSPMX.js","sourcesContent":[null,"import type { CSSProperties } from \"react\";\nimport type { TypeChartStyleColor, TypeChartStylePattern } from \"../../types\";\n\n/**\n * The container contract for v2 charts using the static chart-styles.css.\n *\n * This is the analog of Sparkline's inline --seeds-sparkline-color: it turns the\n * dynamic pieces the styled-components blocks in src/styles/chartStyles.ts used\n * to interpolate at runtime ($hasOnClick, $patterns, per-series color overrides)\n * into the class names, CSS custom properties, and data-attributes that\n * chart-styles.css reads. The three per-chart subtasks (CE-170 bar,\n * CE-165 line-area, CE-166 donut) derive their container props from this one\n * source so the class/variable/attribute names stay in sync with the stylesheet.\n *\n * Theme tokens are NOT resolved here: chart-styles.css references the DS's\n * already-emitted global CSS variables (var(--color-*), var(--font-*)) directly,\n * so light/dark follows the theme stylesheet with zero inline JS. Likewise the\n * default data-viz palette falls through to var(--color-dataviz-list-N) in the\n * stylesheet — only an explicit consumer-provided per-series color is inlined\n * here as --highcharts-color-N. Callers therefore pass the RAW per-series colors\n * (series.map(s => s.color), undefined when unset), not the palette-resolved\n * array from useSeedsChartSetup.\n *\n * This function owns only the genuinely-shared container mechanism. It does NOT\n * know about individual chart families: each family (CE-170 bar, CE-165\n * line-area, CE-166 donut) passes its own `familyClasses` chain, so a new family\n * never has to edit this file. Those chains mix a shared cross-family layer that\n * lives in chart-styles.css (e.g. .seeds-chart-time-series, used by both bar and\n * line-area) with truly per-family selectors each family ships in its own .css\n * (e.g. .seeds-chart-bar hover-dimming).\n */\nexport type TypeChartContainerProps = Readonly<{\n className: string;\n style: CSSProperties;\n \"data-has-on-click\"?: string;\n \"data-dashed-series\"?: string;\n}>;\n\n/**\n * Build the props for a v2 chart container consuming chart-styles.css.\n *\n * @param familyClasses the family class chain the caller owns, prepended by the\n * shared `seeds-chart` base — e.g. `[\"seeds-chart-time-series\", \"seeds-chart-line\"]`.\n * The shared function does not know families in advance; each family supplies\n * its own chain. Selectors for a shared cross-family class live in\n * chart-styles.css (e.g. seeds-chart-time-series); truly per-family selectors\n * live in that family's own .css (e.g. seeds-chart-bar).\n * @param colors the RAW per-series colors (series.map(s => s.color)); undefined\n * entries are left to fall through to the CSS var default and only explicit\n * overrides are inlined as --highcharts-color-N.\n * @returns the className chain, the inline CSS custom properties (explicit\n * per-series color overrides only), and the data-attributes gating the\n * $hasOnClick and $patterns rules.\n */\nexport function getChartContainerProps(\n args: Readonly<{\n familyClasses: readonly string[];\n colors: readonly (TypeChartStyleColor | undefined)[];\n patterns?: readonly TypeChartStylePattern[];\n hasOnClick?: boolean;\n /** Consumer Tailwind passthrough, appended to the class chain. */\n className?: string;\n }>\n): TypeChartContainerProps {\n const { familyClasses, colors, patterns = [], hasOnClick, className } = args;\n\n // Per-series colors: inline --highcharts-color-N ONLY for an explicit\n // consumer-provided override. A default (undefined) series falls through to\n // var(--highcharts-color-N, var(--color-dataviz-list-N)) in chart-styles.css,\n // so the default data-viz rotation is resolved by the DS theme stylesheet\n // (light/dark aware) rather than baked into an inline literal here.\n const style: Record<string, string> = {};\n colors.forEach((color, index) => {\n if (color) {\n style[`--highcharts-color-${index}`] = color;\n }\n });\n\n // $patterns -> space-separated dashed indices, matched by [data-dashed-series~=\"N\"].\n const dashedSeries = patterns\n .map((pattern, index) => (pattern === \"dashed\" ? index : -1))\n .filter((index) => index >= 0)\n .join(\" \");\n\n return {\n className: [\"seeds-chart\", ...familyClasses, className]\n .filter(Boolean)\n .join(\" \"),\n style: style as CSSProperties,\n ...(hasOnClick ? { \"data-has-on-click\": \"\" } : {}),\n ...(dashedSeries ? { \"data-dashed-series\": dashedSeries } : {}),\n };\n}\n"]}
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
2
 
3
- var _chunk5TWNMPQUjs = require('./chunk-5TWNMPQU.js');
3
+ var _chunkV5EXL244js = require('./chunk-V5EXL244.js');
4
4
 
5
5
  // src/charts/shared/axisOptions.ts
6
6
  function makeDatetimeAxisLabelFormatter(timezone, timeFormat) {
7
7
  return function() {
8
- const { primary, secondary } = _chunk5TWNMPQUjs.datetimeFormatter.call(void 0, {
8
+ const { primary, secondary } = _chunkV5EXL244js.datetimeFormatter.call(void 0, {
9
9
  value: this.value,
10
10
  tickPositions: _nullishCoalesce(this.axis.tickPositions, () => ( [])),
11
11
  timezone,
@@ -53,4 +53,4 @@ function resolveTooltipOptions(input) {
53
53
 
54
54
 
55
55
  exports.buildDimensionalAxis = buildDimensionalAxis; exports.resolveTooltipOptions = resolveTooltipOptions;
56
- //# sourceMappingURL=chunk-CV45MD47.js.map
56
+ //# sourceMappingURL=chunk-RDS2VCPO.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/_work/seeds/seeds/seeds-react/seeds-react-data-viz/dist/chunk-RDS2VCPO.js","../src/charts/shared/axisOptions.ts"],"names":[],"mappings":"AAAA;AACE;AACF,sDAA4B;AAC5B;AACA;ACqBA,SAAS,8BAAA,CACP,QAAA,EACA,UAAA,EACA;AACA,EAAA,OAAO,QAAA,CAAA,EAA4D;AACjE,IAAA,MAAM,EAAE,OAAA,EAAS,UAAU,EAAA,EAAI,gDAAA;AAAkB,MAC/C,KAAA,EAAO,IAAA,CAAK,KAAA;AAAA,MACZ,aAAA,mBAAe,IAAA,CAAK,IAAA,CAAK,aAAA,UAAiB,CAAC,GAAA;AAAA,MAC3C,QAAA;AAAA,MACA;AAAA,IACF,CAAC,CAAA;AACD,IAAA,OAAO,UAAA,EACH,CAAA,EAAA;AAEN,EAAA;AACF;AAOgB;AAII,EAAA;AACT,IAAA;AACC,MAAA;AACU,MAAA;AACR,MAAA;AACK,QAAA;AACb,MAAA;AACF,IAAA;AACF,EAAA;AACO,EAAA;AACC,IAAA;AACU,IAAA;AACA,IAAA;AAClB,EAAA;AACF;AAOgB;AAIO,EAAA;AACvB;AAqBgB;AAGC,EAAA;AACH,EAAA;AACH,IAAA;AACK,MAAA;AACE,MAAA;AACA,MAAA;AACd,IAAA;AACF,EAAA;AACO,EAAA;AACK,IAAA;AACQ,IAAA;AACN,IAAA;AACd,EAAA;AACF;ADhEwB;AACA;AACA;AACA;AACA","file":"/home/runner/_work/seeds/seeds/seeds-react/seeds-react-data-viz/dist/chunk-RDS2VCPO.js","sourcesContent":[null,"// Shared adapter helpers for the X/Y chart families (bar, line-area, …). Each\n// family's adapter still owns its `chart.type`, `plotOptions`, `series`, and\n// value (y) axis; these utilities cover the dimensional-axis + timezone wiring\n// that is identical across families, so it lives in one place.\n//\n// Deliberately granular (one concern per function) rather than a single base-\n// options builder, so a non-X/Y family like donut can reuse the subset that\n// applies to it. The broader shared-shell + value-axis sharing is left to the\n// X/Y pattern-sharing spike — the value axis in particular diverges per family\n// today (e.g. bar's declarative `format` from CE-41), so it stays per-family.\n\nimport type { TypeDimensionalAxis } from \"./axis\";\nimport type {\n TypeSeedsAxisLabelFormatterContext,\n TypeSeedsChartXAxisOptions,\n} from \"./chartBase\";\nimport type { TypeChartTooltipRenderProps } from \"./chartTooltip\";\nimport { datetimeFormatter } from \"./formatters/datetimeFormatter\";\nimport type { TypeDatetimeTimeFormat } from \"./formatters/datetimeFormatter\";\n\n// Datetime tick labels: a granularity-aware, timezone/DST-correct two-line\n// stacked label via the shared `datetimeFormatter`, rendered as SVG. `<br/>` is a\n// line break in Highcharts' SVG text (styledMode, useHTML: false); the secondary\n// token is wrapped in a <span> — rendered as a <tspan> — styled by the\n// `.highcharts-xaxis-labels` rule in `styles/chartStyles.ts`.\nfunction makeDatetimeAxisLabelFormatter(\n timezone: string,\n timeFormat: TypeDatetimeTimeFormat | undefined\n) {\n return function (this: TypeSeedsAxisLabelFormatterContext): string {\n const { primary, secondary } = datetimeFormatter({\n value: this.value,\n tickPositions: this.axis.tickPositions ?? [],\n timezone,\n timeFormat,\n });\n return secondary\n ? `${primary}<br/><span class=\"hc-axis-label-secondary\">${secondary}</span>`\n : primary;\n };\n}\n\n/**\n * Builds the dimensional (x) axis options shared by the X/Y chart families.\n * Category axes pass their labels through; datetime axes get the granularity-\n * aware two-line label formatter. `timezone` is only consulted for datetime.\n */\nexport function buildDimensionalAxis(\n axis: TypeDimensionalAxis,\n timezone: string\n): TypeSeedsChartXAxisOptions {\n if (axis.type === \"datetime\") {\n return {\n type: \"datetime\",\n crosshair: axis.crosshair,\n labels: {\n formatter: makeDatetimeAxisLabelFormatter(timezone, axis.timeFormat),\n },\n };\n }\n return {\n type: \"category\",\n categories: [...axis.categories],\n crosshair: axis.crosshair,\n };\n}\n\n/**\n * The timezone shared by datetime-axis ticks (`time.timezone`) and the tooltip\n * date formatter, so they can never disagree about the day. Defaults to `\"UTC\"`\n * on a datetime axis; `undefined` on a category axis (timezone is meaningless).\n */\nexport function resolveTooltipTimezone(\n axis: TypeDimensionalAxis,\n timezone?: string\n): string | undefined {\n return axis.type === \"datetime\" ? timezone ?? \"UTC\" : undefined;\n}\n\n/**\n * The slice of a family's public props the tooltip defaults derive from. Every\n * X/Y family satisfies this structurally, so a family passes its props straight\n * in. Growing the inputs means widening this type, not changing call sites.\n */\nexport type TypeChartTooltipOptionsInput = Readonly<{\n xAxis?: TypeDimensionalAxis;\n timezone?: string;\n}>;\n\n/**\n * The tooltip's datetime-derived options as one object, so the resolver output\n * and the `TypeChartTooltipRenderProps` payload can't drift. `timezone` gets the `?? \"UTC\"`\n * default via `resolveTooltipTimezone`; `timeFormat` is read straight off a\n * datetime axis; `textLocale` has no input source in this signature today\n * (CE-35) and resolves to `undefined` — wiring it to `valueFormat.textLocale` is\n * out of scope. Both sides are derived types: widen the input, add the field to\n * `TypeChartTooltipRenderProps` and this `Pick`, and the compiler keeps them aligned.\n */\nexport function resolveTooltipOptions(\n input: TypeChartTooltipOptionsInput\n): Pick<TypeChartTooltipRenderProps, \"timezone\" | \"timeFormat\" | \"textLocale\"> {\n const { xAxis, timezone } = input;\n if (!xAxis) {\n return {\n timezone: undefined,\n timeFormat: undefined,\n textLocale: undefined,\n };\n }\n return {\n timezone: resolveTooltipTimezone(xAxis, timezone),\n timeFormat: xAxis.type === \"datetime\" ? xAxis.timeFormat : undefined,\n textLocale: undefined,\n };\n}\n"]}