@sproutsocial/seeds-react-data-viz 0.24.5 → 0.25.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 (61) hide show
  1. package/dist/bar/index.js +12 -13
  2. package/dist/bar/index.js.map +1 -1
  3. package/dist/bubble/index.d.mts +1 -1
  4. package/dist/bubble/index.d.ts +1 -1
  5. package/dist/bubble/index.js +9 -10
  6. package/dist/bubble/index.js.map +1 -1
  7. package/dist/{chartOptions-DHzoGRdG.d.mts → chartOptions-D6MzNjbB.d.mts} +3 -1
  8. package/dist/{chartOptions-DHzoGRdG.d.ts → chartOptions-D6MzNjbB.d.ts} +3 -1
  9. package/dist/charts.css +80 -0
  10. package/dist/{chunk-LKUL4EFZ.js → chunk-2A3KLUIF.js} +3 -3
  11. package/dist/{chunk-LKUL4EFZ.js.map → chunk-2A3KLUIF.js.map} +1 -1
  12. package/dist/{chunk-GHZHRFE6.js → chunk-CWKFNAXF.js} +3 -3
  13. package/dist/{chunk-GHZHRFE6.js.map → chunk-CWKFNAXF.js.map} +1 -1
  14. package/dist/{chunk-W57R2V23.js → chunk-LWDHU4QK.js} +183 -7
  15. package/dist/chunk-LWDHU4QK.js.map +1 -0
  16. package/dist/{chunk-5JQXDK23.js → chunk-TNZNBMSZ.js} +292 -73
  17. package/dist/chunk-TNZNBMSZ.js.map +1 -0
  18. package/dist/donut/index.js +6 -7
  19. package/dist/donut/index.js.map +1 -1
  20. package/dist/esm/bar/index.js +6 -7
  21. package/dist/esm/bar/index.js.map +1 -1
  22. package/dist/esm/bubble/index.js +6 -7
  23. package/dist/esm/bubble/index.js.map +1 -1
  24. package/dist/esm/{chunk-AUU3KROF.js → chunk-AJGRGRI6.js} +2 -2
  25. package/dist/esm/{chunk-DF5PVRXT.js → chunk-CIG5NERD.js} +2 -2
  26. package/dist/esm/{chunk-EWAD675C.js → chunk-V63L6753.js} +257 -38
  27. package/dist/esm/chunk-V63L6753.js.map +1 -0
  28. package/dist/esm/{chunk-32QLJDP2.js → chunk-VCTZWYEM.js} +177 -1
  29. package/dist/esm/chunk-VCTZWYEM.js.map +1 -0
  30. package/dist/esm/donut/index.js +4 -5
  31. package/dist/esm/donut/index.js.map +1 -1
  32. package/dist/esm/index.js +15 -15
  33. package/dist/esm/index.js.map +1 -1
  34. package/dist/esm/line-area/index.js +6 -7
  35. package/dist/esm/line-area/index.js.map +1 -1
  36. package/dist/esm/sparkline/index.js +3 -3
  37. package/dist/esm/wordcloud/index.js +82 -0
  38. package/dist/esm/wordcloud/index.js.map +1 -0
  39. package/dist/index.d.mts +1 -1
  40. package/dist/index.d.ts +1 -1
  41. package/dist/index.js +54 -54
  42. package/dist/index.js.map +1 -1
  43. package/dist/line-area/index.js +12 -13
  44. package/dist/line-area/index.js.map +1 -1
  45. package/dist/sparkline/index.js +7 -7
  46. package/dist/wordcloud/index.d.mts +62 -0
  47. package/dist/wordcloud/index.d.ts +62 -0
  48. package/dist/wordcloud/index.js +82 -0
  49. package/dist/wordcloud/index.js.map +1 -0
  50. package/dist/wordcloud.css +79 -0
  51. package/package.json +10 -3
  52. package/dist/chunk-33Y5FZTT.js +0 -177
  53. package/dist/chunk-33Y5FZTT.js.map +0 -1
  54. package/dist/chunk-5JQXDK23.js.map +0 -1
  55. package/dist/chunk-W57R2V23.js.map +0 -1
  56. package/dist/esm/chunk-32QLJDP2.js.map +0 -1
  57. package/dist/esm/chunk-EWAD675C.js.map +0 -1
  58. package/dist/esm/chunk-XRZJACCB.js +0 -177
  59. package/dist/esm/chunk-XRZJACCB.js.map +0 -1
  60. /package/dist/esm/{chunk-AUU3KROF.js.map → chunk-AJGRGRI6.js.map} +0 -0
  61. /package/dist/esm/{chunk-DF5PVRXT.js.map → chunk-CIG5NERD.js.map} +0 -0
package/dist/bar/index.js CHANGED
@@ -2,23 +2,22 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkGHZHRFE6js = require('../chunk-GHZHRFE6.js');
5
+ var _chunkCWKFNAXFjs = require('../chunk-CWKFNAXF.js');
6
6
 
7
7
 
8
8
 
9
- var _chunkLKUL4EFZjs = require('../chunk-LKUL4EFZ.js');
9
+ var _chunk2A3KLUIFjs = require('../chunk-2A3KLUIF.js');
10
10
 
11
11
 
12
12
  var _chunk6EIJCJCNjs = require('../chunk-6EIJCJCN.js');
13
13
 
14
14
 
15
- var _chunk33Y5FZTTjs = require('../chunk-33Y5FZTT.js');
16
15
 
17
16
 
17
+ var _chunkTNZNBMSZjs = require('../chunk-TNZNBMSZ.js');
18
18
 
19
19
 
20
- var _chunk5JQXDK23js = require('../chunk-5JQXDK23.js');
21
- require('../chunk-W57R2V23.js');
20
+ var _chunkLWDHU4QKjs = require('../chunk-LWDHU4QK.js');
22
21
 
23
22
  // src/charts/bar/BarChart.tsx
24
23
  var _react = require('react');
@@ -31,8 +30,8 @@ function buildBarChartOptions(props, direction, series = props.series) {
31
30
  const chartType = highchartsType(direction);
32
31
  const isDatetime = props.xAxis.type === "datetime";
33
32
  const isMultiSeries = series.length > 1;
34
- const tooltipOptions = _chunkLKUL4EFZjs.resolveTooltipOptions.call(void 0, props);
35
- const { annotations, lookup: annotationLookup } = _chunkGHZHRFE6js.buildAnnotationConfig.call(void 0,
33
+ const tooltipOptions = _chunk2A3KLUIFjs.resolveTooltipOptions.call(void 0, props);
34
+ const { annotations, lookup: annotationLookup } = _chunkCWKFNAXFjs.buildAnnotationConfig.call(void 0,
36
35
  props.annotations
37
36
  );
38
37
  const barTypeConfig = {
@@ -92,7 +91,7 @@ function buildBarChartOptions(props, direction, series = props.series) {
92
91
  }
93
92
  }
94
93
  };
95
- const base = _chunk5JQXDK23js.buildBaseChartOptions.call(void 0, {
94
+ const base = _chunkTNZNBMSZjs.buildBaseChartOptions.call(void 0, {
96
95
  type: chartType,
97
96
  description: props.description,
98
97
  reserveTopMargin: Boolean(annotations),
@@ -107,13 +106,13 @@ function buildBarChartOptions(props, direction, series = props.series) {
107
106
  // Re-assert the definite `type` so spreading the optionally-typed
108
107
  // `base.chart` doesn't widen the required `type` field to optional.
109
108
  type: chartType,
110
- height: _nullishCoalesce(props.height, () => ( _chunk33Y5FZTTjs.TIME_SERIES_CHART_HEIGHT)),
109
+ height: _nullishCoalesce(props.height, () => ( _chunkLWDHU4QKjs.TIME_SERIES_CHART_HEIGHT)),
111
110
  // Tight time-series spacing (from constants/chartOptions.ts) so the plot
112
111
  // area fills the 275px container; without it Highcharts' larger default
113
112
  // spacing ([10, 10, 15, 10]) shrinks the plot area.
114
113
  spacing: [5, 1, 0, 2]
115
114
  },
116
- xAxis: _chunkLKUL4EFZjs.buildDimensionalAxis.call(void 0, props.xAxis, _nullishCoalesce(tooltipOptions.timezone, () => ( "UTC"))),
115
+ xAxis: _chunk2A3KLUIFjs.buildDimensionalAxis.call(void 0, props.xAxis, _nullishCoalesce(tooltipOptions.timezone, () => ( "UTC"))),
117
116
  yAxis: {
118
117
  min: _optionalChain([props, 'access', _15 => _15.yAxis, 'optionalAccess', _16 => _16.min]),
119
118
  max: _optionalChain([props, 'access', _17 => _17.yAxis, 'optionalAccess', _18 => _18.max]),
@@ -127,7 +126,7 @@ function buildBarChartOptions(props, direction, series = props.series) {
127
126
  enabled: _optionalChain([props, 'access', _23 => _23.yAxis, 'optionalAccess', _24 => _24.showLabels]) !== false,
128
127
  // A declarative `format` drives ticks through the shared valueFormatter;
129
128
  // absent it, the zero-config decimal default (1.20K / 1.20M / 1.20B).
130
- formatter: _optionalChain([props, 'access', _25 => _25.yAxis, 'optionalAccess', _26 => _26.format]) ? _chunkGHZHRFE6js.makeValueAxisLabelFormatter.call(void 0, props.yAxis.format) : _chunkGHZHRFE6js.defaultValueAxisLabelFormatter
129
+ formatter: _optionalChain([props, 'access', _25 => _25.yAxis, 'optionalAccess', _26 => _26.format]) ? _chunkCWKFNAXFjs.makeValueAxisLabelFormatter.call(void 0, props.yAxis.format) : _chunkCWKFNAXFjs.defaultValueAxisLabelFormatter
131
130
  }
132
131
  },
133
132
  plotOptions: {
@@ -152,7 +151,7 @@ var BAR_CHART_DEFAULT_SERIES_LIMIT = 10;
152
151
  var _jsxruntime = require('react/jsx-runtime');
153
152
  var BarChart = _react.memo.call(void 0, function BarChart2(props) {
154
153
  const seriesLimit = _nullishCoalesce(props.seriesLimit, () => ( BAR_CHART_DEFAULT_SERIES_LIMIT));
155
- const { colors, series } = _chunk5JQXDK23js.useSeedsChartSetup.call(void 0, {
154
+ const { colors, series } = _chunkTNZNBMSZjs.useSeedsChartSetup.call(void 0, {
156
155
  series: props.series,
157
156
  seriesLimit,
158
157
  isSeriesLimitOverridden: props.seriesLimit !== void 0,
@@ -172,7 +171,7 @@ var BarChart = _react.memo.call(void 0, function BarChart2(props) {
172
171
  className: props.className
173
172
  });
174
173
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ...containerProps, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
175
- _chunk5JQXDK23js.ChartRenderer,
174
+ _chunkTNZNBMSZjs.ChartRenderer,
176
175
  {
177
176
  options,
178
177
  series,
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/_work/seeds/seeds/seeds-react/seeds-react-data-viz/dist/bar/index.js","../../src/charts/bar/BarChart.tsx","../../src/charts/bar/adapter.ts","../../src/charts/constants.ts"],"names":["BarChart"],"mappings":"AAAA;AACE;AACA;AACA;AACF,uDAA6B;AAC7B;AACE;AACA;AACF,uDAA6B;AAC7B;AACE;AACF,uDAA6B;AAC7B;AACE;AACF,uDAA6B;AAC7B;AACE;AACA;AACA;AACF,uDAA6B;AAC7B,gCAA6B;AAC7B;AACA;ACtBA,8BAAqB;ADwBrB;AACA;AEFA,SAAS,cAAA,CAAe,SAAA,EAAgD;AACtE,EAAA,OAAO,UAAA,IAAc,aAAA,EAAe,MAAA,EAAQ,QAAA;AAC9C;AAEO,SAAS,oBAAA,CACd,KAAA,EACA,SAAA,EAIA,OAAA,EAAkC,KAAA,CAAM,MAAA,EASxC;AACA,EAAA,MAAM,UAAA,EAAY,cAAA,CA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/dist/bar/index.js","sourcesContent":[null,"import { memo } from \"react\";\nimport { useSeedsChartSetup, ChartRenderer } from \"../shared/chartBase\";\nimport { getChartContainerProps } from \"../shared/chartContainer\";\nimport { buildBarChartOptions } from \"./adapter\";\nimport type { BarChartProps } from \"./types\";\nimport { BAR_CHART_DEFAULT_SERIES_LIMIT } from \"../constants\";\n\nexport const BarChart = memo(function BarChart(props: BarChartProps) {\n // The shared hook caps the series to the limit (and warns once per render\n // when the default is exceeded without an explicit override) so the adapter\n // and renderer below all consume the capped data.\n const seriesLimit = props.seriesLimit ?? BAR_CHART_DEFAULT_SERIES_LIMIT;\n const { colors, series } = useSeedsChartSetup({\n series: props.series,\n seriesLimit,\n isSeriesLimitOverridden: props.seriesLimit !== undefined,\n hideSeriesLimitWarning: props.hideSeriesLimitWarning,\n componentName: \"BarChart\",\n });\n\n const { options, annotationLookup, tooltipOptions } = buildBarChartOptions(\n props,\n props.direction ?? \"vertical\",\n series\n );\n const hasOnClick = Boolean(props.onClick);\n\n // Plain <div> consuming the shared chart-styles.css contract via\n // getChartContainerProps. Colors are the RAW per-series colors (undefined when\n // unset, so only explicit overrides inline --highcharts-color-N), NOT the\n // palette-resolved `colors` passed to ChartRenderer. Neither stylesheet is\n // self-imported (consumers import both).\n const containerProps = getChartContainerProps({\n familyClasses: [\"seeds-chart-time-series\", \"seeds-chart-bar\"],\n colors: series.map((s) => s.color),\n hasOnClick,\n className: props.className,\n });\n\n return (\n <div {...containerProps}>\n <ChartRenderer\n options={options}\n series={series}\n colors={colors}\n tooltip={props.tooltip}\n annotationLookup={annotationLookup}\n hasOnClick={hasOnClick}\n tooltipClickLabel={props.tooltipClickLabel}\n tooltipOptions={tooltipOptions}\n invalidNumberLabel={props.invalidNumberLabel}\n valueFormat={props.yAxis?.format}\n exportTitle={props.exportTitle}\n onReady={props.onReady}\n />\n </div>\n );\n});\n","import { buildAnnotationConfig } from \"../shared/annotations\";\nimport type { ChartAnnotationLookup } from \"../shared/annotations\";\nimport type {\n ChartTooltipProps,\n SeedsChartColumnPlotOptions,\n SeedsChartOptions,\n} from \"../shared/chartBase\";\nimport { buildBaseChartOptions } from \"../shared/baseChartOptions\";\nimport { TIME_SERIES_CHART_HEIGHT } from \"../../constants/chartOptions\";\nimport {\n buildDimensionalAxis,\n resolveTooltipOptions,\n} from \"../shared/axisOptions\";\nimport {\n defaultValueAxisLabelFormatter,\n makeValueAxisLabelFormatter,\n} from \"../shared/valueAxisLabelFormatter\";\nimport type { BarChartDirection, BarChartProps } from \"./types\";\n\n// Maps the public `direction` to the Highcharts series/chart type. Highcharts\n// `bar` is a horizontally-oriented `column`: it performs the visual rotation\n// while keeping axis roles (xAxis = category, yAxis = value), so the rest of the\n// adapter is direction-agnostic.\nfunction highchartsType(direction: BarChartDirection): \"column\" | \"bar\" {\n return direction === \"horizontal\" ? \"bar\" : \"column\";\n}\n\nexport function buildBarChartOptions(\n props: BarChartProps,\n direction: BarChartDirection,\n // The (already-capped) series to render. Defaults to `props.series` so the\n // ~40 existing call sites keep working; the component passes the capped\n // series from `useSeedsChartSetup` explicitly.\n series: BarChartProps[\"series\"] = props.series\n): {\n options: SeedsChartOptions;\n annotationLookup: ChartAnnotationLookup | undefined;\n /** Resolved datetime-derived tooltip options (timezone / timeFormat / textLocale); all undefined on category axes. */\n tooltipOptions: Pick<\n ChartTooltipProps,\n \"timezone\" | \"timeFormat\" | \"textLocale\"\n >;\n} {\n const chartType = highchartsType(direction);\n const isDatetime = props.xAxis.type === \"datetime\";\n // Gate the `onMouseEnter`/`onMouseLeave` `series` field on the *rendered*\n // (already-capped) series count, not `props.series` — if `seriesLimit` caps a\n // multi-series input down to one rendered series the chart is effectively\n // single-series, and `series` must be absent per the \"present only for\n // multi-series bar\" contract.\n const isMultiSeries = series.length > 1;\n const tooltipOptions = resolveTooltipOptions(props);\n const { annotations, lookup: annotationLookup } = buildAnnotationConfig(\n props.annotations\n );\n // `column` (vertical) and `bar` (horizontal) take the same option shape, so a\n // single config is assigned under the active direction's key. Typed\n // explicitly so the `point.events` handlers below keep their `this`/`event`\n // contextual types (a computed `[chartType]` key would otherwise erase them).\n const barTypeConfig: SeedsChartColumnPlotOptions = {\n // \"grouped\" maps to omitting `stacking` — Highcharts renders multi-series\n // columns side-by-side when no stacking is set.\n ...(props.stacking === \"grouped\"\n ? {}\n : { stacking: props.stacking ?? \"normal\" }),\n // Horizontal bars are height-constrained (fixed chart height ÷ categories),\n // so the same padding fractions that work for columns produce hairline bars.\n pointPadding: direction === \"horizontal\" ? 0.05 : 0.25,\n groupPadding: direction === \"horizontal\" ? 0.1 : 0.25,\n // Fixed bar width on datetime axes. Sparse time-series otherwise size\n // columns from the (large) gap between points and balloon; a fixed\n // pointWidth: 20 gives a consistent time-series treatment. Dense datetime\n // data may instead want a maxPointWidth cap — revisit when Line/Area land.\n ...(isDatetime ? { pointWidth: 20 } : {}),\n borderRadius: 4,\n borderWidth: 0,\n // Pairs with the `:hover` dimming rule in `styles.ts`: while the cursor\n // is over the chart, all bars dim; these handlers restore opacity for\n // every bar at the hovered x (so stacked/grouped bars highlight together\n // rather than just the single hovered bar).\n point: {\n events: {\n click: props.onClick\n ? (event) => props.onClick!({ position: event.point.x })\n : undefined,\n mouseOver: function () {\n const x = this.x;\n props.onMouseEnter?.({\n position: x,\n // Omit the key entirely (not `series: undefined`) for single-series\n // so consumers testing `\"series\" in payload` see the contract.\n ...(isMultiSeries\n ? {\n series: { name: this.series.name, index: this.series.index },\n }\n : {}),\n });\n this.series.chart.series.forEach((s) => {\n if (s.type !== chartType) return;\n s.data.forEach((point) => {\n if (point.x !== x) return;\n point.graphic?.element?.classList.add(\"bar-point-hover\");\n });\n });\n },\n mouseOut: function () {\n props.onMouseLeave?.({\n position: this.x,\n ...(isMultiSeries\n ? {\n series: { name: this.series.name, index: this.series.index },\n }\n : {}),\n });\n this.series.chart.series.forEach((s) => {\n if (s.type !== chartType) return;\n s.data.forEach((point) => {\n point.graphic?.element?.classList.remove(\"bar-point-hover\");\n });\n });\n },\n },\n },\n };\n const base = buildBaseChartOptions({\n type: chartType,\n description: props.description,\n reserveTopMargin: Boolean(annotations),\n timezone: tooltipOptions.timezone,\n });\n\n const options: SeedsChartOptions = {\n ...base,\n // Default height baseline (overridable via `props.height`) so consumers\n // who don't configure sizing keep the design-reviewed default.\n chart: {\n ...base.chart,\n // Re-assert the definite `type` so spreading the optionally-typed\n // `base.chart` doesn't widen the required `type` field to optional.\n type: chartType,\n height: props.height ?? TIME_SERIES_CHART_HEIGHT,\n // Tight time-series spacing (from constants/chartOptions.ts) so the plot\n // area fills the 275px container; without it Highcharts' larger default\n // spacing ([10, 10, 15, 10]) shrinks the plot area.\n spacing: [5, 1, 0, 2],\n },\n xAxis: buildDimensionalAxis(props.xAxis, tooltipOptions.timezone ?? \"UTC\"),\n yAxis: {\n min: props.yAxis?.min,\n max: props.yAxis?.max,\n gridLineWidth: props.yAxis?.showGridLines === false ? 0 : 1,\n // A dedicated plotLine at 0, styled distinctly from regular gridlines\n // (see chartStyles.ts).\n plotLines: [{ value: 0, className: \"y-axis-zero-line\", zIndex: 3 }],\n title: { text: props.yAxis?.title ?? \"\" },\n labels: {\n // `showLabels` toggles tick-label visibility; defaults to shown.\n enabled: props.yAxis?.showLabels !== false,\n // A declarative `format` drives ticks through the shared valueFormatter;\n // absent it, the zero-config decimal default (1.20K / 1.20M / 1.20B).\n formatter: props.yAxis?.format\n ? makeValueAxisLabelFormatter(props.yAxis.format)\n : defaultValueAxisLabelFormatter,\n },\n },\n plotOptions: {\n series: { animation: false },\n [chartType]: barTypeConfig,\n },\n series: series.map((s) => ({\n type: chartType,\n name: s.name,\n data: [...s.data],\n color: s.color,\n })),\n ...(annotations ? { annotations } : {}),\n };\n\n return { options, annotationLookup, tooltipOptions };\n}\n","export const BAR_CHART_DEFAULT_SERIES_LIMIT = 10;\n"]}
1
+ {"version":3,"sources":["/home/runner/_work/seeds/seeds/seeds-react/seeds-react-data-viz/dist/bar/index.js","../../src/charts/bar/BarChart.tsx","../../src/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AAA;AAAA,MACA,MAAA;AAAA,MACA,OAAA,EAAS,KAAA,CAAM,OAAA;AAAA,MACf,gBAAA;AAAA,MACA,UAAA;AAAA,MACA,iBAAA,EAAmB,KAAA,CAAM,iBAAA;AAAA,MACzB,cAAA;AAAA,MACA,kBAAA,EAAoB,KAAA,CAAM,kBAAA;AAAA,MAC1B,WAAA,kBAAa,KAAA,uBAAM,KAAA,+BAAO,QAAA;AAAA,MAC1B,WAAA,EAAa,KAAA,CAAM,WAAA;AAAA,MACnB,OAAA,EAAS,KAAA,CAAM;AAAA,IAAA;AAAA,EACjB,EAAA,CACF,CAAA;AAEJ,CAAC,CAAA;ADqID;AACE;AACF,4BAAC","file":"/home/runner/_work/seeds/seeds/seeds-react/seeds-react-data-viz/dist/bar/index.js","sourcesContent":[null,"import { memo } from \"react\";\nimport { useSeedsChartSetup, ChartRenderer } from \"../shared/chartBase\";\nimport { getChartContainerProps } from \"../shared/chartContainer\";\nimport { buildBarChartOptions } from \"./adapter\";\nimport type { BarChartProps } from \"./types\";\nimport { BAR_CHART_DEFAULT_SERIES_LIMIT } from \"../constants\";\n\nexport const BarChart = memo(function BarChart(props: BarChartProps) {\n // The shared hook caps the series to the limit (and warns once per render\n // when the default is exceeded without an explicit override) so the adapter\n // and renderer below all consume the capped data.\n const seriesLimit = props.seriesLimit ?? BAR_CHART_DEFAULT_SERIES_LIMIT;\n const { colors, series } = useSeedsChartSetup({\n series: props.series,\n seriesLimit,\n isSeriesLimitOverridden: props.seriesLimit !== undefined,\n hideSeriesLimitWarning: props.hideSeriesLimitWarning,\n componentName: \"BarChart\",\n });\n\n const { options, annotationLookup, tooltipOptions } = buildBarChartOptions(\n props,\n props.direction ?? \"vertical\",\n series\n );\n const hasOnClick = Boolean(props.onClick);\n\n // Plain <div> consuming the shared chart-styles.css contract via\n // getChartContainerProps. Colors are the RAW per-series colors (undefined when\n // unset, so only explicit overrides inline --highcharts-color-N), NOT the\n // palette-resolved `colors` passed to ChartRenderer. Neither stylesheet is\n // self-imported (consumers import both).\n const containerProps = getChartContainerProps({\n familyClasses: [\"seeds-chart-time-series\", \"seeds-chart-bar\"],\n colors: series.map((s) => s.color),\n hasOnClick,\n className: props.className,\n });\n\n return (\n <div {...containerProps}>\n <ChartRenderer\n options={options}\n series={series}\n colors={colors}\n tooltip={props.tooltip}\n annotationLookup={annotationLookup}\n hasOnClick={hasOnClick}\n tooltipClickLabel={props.tooltipClickLabel}\n tooltipOptions={tooltipOptions}\n invalidNumberLabel={props.invalidNumberLabel}\n valueFormat={props.yAxis?.format}\n exportTitle={props.exportTitle}\n onReady={props.onReady}\n />\n </div>\n );\n});\n","import { buildAnnotationConfig } from \"../shared/annotations\";\nimport type { ChartAnnotationLookup } from \"../shared/annotations\";\nimport type {\n ChartTooltipProps,\n SeedsChartColumnPlotOptions,\n SeedsChartOptions,\n} from \"../shared/chartBase\";\nimport { buildBaseChartOptions } from \"../shared/baseChartOptions\";\nimport { TIME_SERIES_CHART_HEIGHT } from \"../../constants/chartOptions\";\nimport {\n buildDimensionalAxis,\n resolveTooltipOptions,\n} from \"../shared/axisOptions\";\nimport {\n defaultValueAxisLabelFormatter,\n makeValueAxisLabelFormatter,\n} from \"../shared/valueAxisLabelFormatter\";\nimport type { BarChartDirection, BarChartProps } from \"./types\";\n\n// Maps the public `direction` to the Highcharts series/chart type. Highcharts\n// `bar` is a horizontally-oriented `column`: it performs the visual rotation\n// while keeping axis roles (xAxis = category, yAxis = value), so the rest of the\n// adapter is direction-agnostic.\nfunction highchartsType(direction: BarChartDirection): \"column\" | \"bar\" {\n return direction === \"horizontal\" ? \"bar\" : \"column\";\n}\n\nexport function buildBarChartOptions(\n props: BarChartProps,\n direction: BarChartDirection,\n // The (already-capped) series to render. Defaults to `props.series` so the\n // ~40 existing call sites keep working; the component passes the capped\n // series from `useSeedsChartSetup` explicitly.\n series: BarChartProps[\"series\"] = props.series\n): {\n options: SeedsChartOptions;\n annotationLookup: ChartAnnotationLookup | undefined;\n /** Resolved datetime-derived tooltip options (timezone / timeFormat / textLocale); all undefined on category axes. */\n tooltipOptions: Pick<\n ChartTooltipProps,\n \"timezone\" | \"timeFormat\" | \"textLocale\"\n >;\n} {\n const chartType = highchartsType(direction);\n const isDatetime = props.xAxis.type === \"datetime\";\n // Gate the `onMouseEnter`/`onMouseLeave` `series` field on the *rendered*\n // (already-capped) series count, not `props.series` — if `seriesLimit` caps a\n // multi-series input down to one rendered series the chart is effectively\n // single-series, and `series` must be absent per the \"present only for\n // multi-series bar\" contract.\n const isMultiSeries = series.length > 1;\n const tooltipOptions = resolveTooltipOptions(props);\n const { annotations, lookup: annotationLookup } = buildAnnotationConfig(\n props.annotations\n );\n // `column` (vertical) and `bar` (horizontal) take the same option shape, so a\n // single config is assigned under the active direction's key. Typed\n // explicitly so the `point.events` handlers below keep their `this`/`event`\n // contextual types (a computed `[chartType]` key would otherwise erase them).\n const barTypeConfig: SeedsChartColumnPlotOptions = {\n // \"grouped\" maps to omitting `stacking` — Highcharts renders multi-series\n // columns side-by-side when no stacking is set.\n ...(props.stacking === \"grouped\"\n ? {}\n : { stacking: props.stacking ?? \"normal\" }),\n // Horizontal bars are height-constrained (fixed chart height ÷ categories),\n // so the same padding fractions that work for columns produce hairline bars.\n pointPadding: direction === \"horizontal\" ? 0.05 : 0.25,\n groupPadding: direction === \"horizontal\" ? 0.1 : 0.25,\n // Fixed bar width on datetime axes. Sparse time-series otherwise size\n // columns from the (large) gap between points and balloon; a fixed\n // pointWidth: 20 gives a consistent time-series treatment. Dense datetime\n // data may instead want a maxPointWidth cap — revisit when Line/Area land.\n ...(isDatetime ? { pointWidth: 20 } : {}),\n borderRadius: 4,\n borderWidth: 0,\n // Pairs with the `:hover` dimming rule in `styles.ts`: while the cursor\n // is over the chart, all bars dim; these handlers restore opacity for\n // every bar at the hovered x (so stacked/grouped bars highlight together\n // rather than just the single hovered bar).\n point: {\n events: {\n click: props.onClick\n ? (event) => props.onClick!({ position: event.point.x })\n : undefined,\n mouseOver: function () {\n const x = this.x;\n props.onMouseEnter?.({\n position: x,\n // Omit the key entirely (not `series: undefined`) for single-series\n // so consumers testing `\"series\" in payload` see the contract.\n ...(isMultiSeries\n ? {\n series: { name: this.series.name, index: this.series.index },\n }\n : {}),\n });\n this.series.chart.series.forEach((s) => {\n if (s.type !== chartType) return;\n s.data.forEach((point) => {\n if (point.x !== x) return;\n point.graphic?.element?.classList.add(\"bar-point-hover\");\n });\n });\n },\n mouseOut: function () {\n props.onMouseLeave?.({\n position: this.x,\n ...(isMultiSeries\n ? {\n series: { name: this.series.name, index: this.series.index },\n }\n : {}),\n });\n this.series.chart.series.forEach((s) => {\n if (s.type !== chartType) return;\n s.data.forEach((point) => {\n point.graphic?.element?.classList.remove(\"bar-point-hover\");\n });\n });\n },\n },\n },\n };\n const base = buildBaseChartOptions({\n type: chartType,\n description: props.description,\n reserveTopMargin: Boolean(annotations),\n timezone: tooltipOptions.timezone,\n });\n\n const options: SeedsChartOptions = {\n ...base,\n // Default height baseline (overridable via `props.height`) so consumers\n // who don't configure sizing keep the design-reviewed default.\n chart: {\n ...base.chart,\n // Re-assert the definite `type` so spreading the optionally-typed\n // `base.chart` doesn't widen the required `type` field to optional.\n type: chartType,\n height: props.height ?? TIME_SERIES_CHART_HEIGHT,\n // Tight time-series spacing (from constants/chartOptions.ts) so the plot\n // area fills the 275px container; without it Highcharts' larger default\n // spacing ([10, 10, 15, 10]) shrinks the plot area.\n spacing: [5, 1, 0, 2],\n },\n xAxis: buildDimensionalAxis(props.xAxis, tooltipOptions.timezone ?? \"UTC\"),\n yAxis: {\n min: props.yAxis?.min,\n max: props.yAxis?.max,\n gridLineWidth: props.yAxis?.showGridLines === false ? 0 : 1,\n // A dedicated plotLine at 0, styled distinctly from regular gridlines\n // (see chartStyles.ts).\n plotLines: [{ value: 0, className: \"y-axis-zero-line\", zIndex: 3 }],\n title: { text: props.yAxis?.title ?? \"\" },\n labels: {\n // `showLabels` toggles tick-label visibility; defaults to shown.\n enabled: props.yAxis?.showLabels !== false,\n // A declarative `format` drives ticks through the shared valueFormatter;\n // absent it, the zero-config decimal default (1.20K / 1.20M / 1.20B).\n formatter: props.yAxis?.format\n ? makeValueAxisLabelFormatter(props.yAxis.format)\n : defaultValueAxisLabelFormatter,\n },\n },\n plotOptions: {\n series: { animation: false },\n [chartType]: barTypeConfig,\n },\n series: series.map((s) => ({\n type: chartType,\n name: s.name,\n data: [...s.data],\n color: s.color,\n })),\n ...(annotations ? { annotations } : {}),\n };\n\n return { options, annotationLookup, tooltipOptions };\n}\n","export const BAR_CHART_DEFAULT_SERIES_LIMIT = 10;\n"]}
@@ -3,7 +3,7 @@ import { ReactNode, MouseEventHandler } from 'react';
3
3
  import { C as ChartTooltipProps, a as ChartTooltipDataRow, V as ValueFormat } from '../chartBase-D6WI2icR.mjs';
4
4
  import { C as ChartExportHandle } from '../chartExport-CKYpuhik.mjs';
5
5
  import { C as ChartColorableEntity, a as ChartIconableEntity, c as ChartHoverHandler } from '../interactions-pEXA1XxF.mjs';
6
- export { h as defaultBubbleChartWidth } from '../chartOptions-DHzoGRdG.mjs';
6
+ export { h as defaultBubbleChartWidth } from '../chartOptions-D6MzNjbB.mjs';
7
7
  import '@sproutsocial/seeds-react-icon';
8
8
  import '../types-DxrhdAdn.mjs';
9
9
  import 'highcharts';
@@ -3,7 +3,7 @@ import { ReactNode, MouseEventHandler } from 'react';
3
3
  import { C as ChartTooltipProps, a as ChartTooltipDataRow, V as ValueFormat } from '../chartBase-BM97OBBE.js';
4
4
  import { C as ChartExportHandle } from '../chartExport-CKYpuhik.js';
5
5
  import { C as ChartColorableEntity, a as ChartIconableEntity, c as ChartHoverHandler } from '../interactions-pEXA1XxF.js';
6
- export { h as defaultBubbleChartWidth } from '../chartOptions-DHzoGRdG.js';
6
+ export { h as defaultBubbleChartWidth } from '../chartOptions-D6MzNjbB.js';
7
7
  import '@sproutsocial/seeds-react-icon';
8
8
  import '../types-DxrhdAdn.js';
9
9
  import 'highcharts';
@@ -5,14 +5,13 @@ var _chunk6EIJCJCNjs = require('../chunk-6EIJCJCN.js');
5
5
 
6
6
 
7
7
 
8
+ var _chunkTNZNBMSZjs = require('../chunk-TNZNBMSZ.js');
8
9
 
9
- var _chunk33Y5FZTTjs = require('../chunk-33Y5FZTT.js');
10
10
 
11
11
 
12
12
 
13
13
 
14
- var _chunk5JQXDK23js = require('../chunk-5JQXDK23.js');
15
- require('../chunk-W57R2V23.js');
14
+ var _chunkLWDHU4QKjs = require('../chunk-LWDHU4QK.js');
16
15
 
17
16
  // src/charts/bubble/BubbleChart.tsx
18
17
  var _react = require('react');
@@ -107,7 +106,7 @@ function mapBubbleTooltipRow(data) {
107
106
  }
108
107
  function buildBubbleChartOptions(props) {
109
108
  const hasOnClick = Boolean(props.onClick);
110
- const base = _chunk5JQXDK23js.buildBaseChartOptions.call(void 0, {
109
+ const base = _chunkTNZNBMSZjs.buildBaseChartOptions.call(void 0, {
111
110
  type: "packedbubble",
112
111
  description: props.accessibility.description,
113
112
  svgContainerLabel: props.accessibility.svgContainerLabel,
@@ -122,12 +121,12 @@ function buildBubbleChartOptions(props) {
122
121
  chart: {
123
122
  ...base.chart,
124
123
  type: "packedbubble",
125
- height: _nullishCoalesce(props.height, () => ( _chunk33Y5FZTTjs.BUBBLE_CHART_HEIGHT))
124
+ height: _nullishCoalesce(props.height, () => ( _chunkLWDHU4QKjs.BUBBLE_CHART_HEIGHT))
126
125
  },
127
126
  plotOptions: {
128
127
  packedbubble: {
129
128
  minSize: "30%",
130
- maxSize: _nullishCoalesce(props.maxBubbleSize, () => ( _chunk33Y5FZTTjs.BUBBLE_CHART_DEFAULT_MAX_SIZE)),
129
+ maxSize: _nullishCoalesce(props.maxBubbleSize, () => ( _chunkLWDHU4QKjs.BUBBLE_CHART_DEFAULT_MAX_SIZE)),
131
130
  draggable: false,
132
131
  states: { hover: { enabled: false } },
133
132
  layoutAlgorithm: {
@@ -135,7 +134,7 @@ function buildBubbleChartOptions(props) {
135
134
  seriesInteraction: true,
136
135
  parentNodeLimit: true,
137
136
  enableSimulation: false,
138
- bubblePadding: _nullishCoalesce(props.bubblePadding, () => ( _chunk33Y5FZTTjs.BUBBLE_CHART_DEFAULT_PADDING)),
137
+ bubblePadding: _nullishCoalesce(props.bubblePadding, () => ( _chunkLWDHU4QKjs.BUBBLE_CHART_DEFAULT_PADDING)),
139
138
  splitSeries: _nullishCoalesce(props.splitSeries, () => ( false))
140
139
  },
141
140
  dataLabels: {
@@ -182,7 +181,7 @@ function buildBubbleChartOptions(props) {
182
181
  // src/charts/bubble/BubbleChart.tsx
183
182
  var _jsxruntime = require('react/jsx-runtime');
184
183
  var BubbleChart = _react.memo.call(void 0, function BubbleChart2(props) {
185
- const { colors } = _chunk5JQXDK23js.useSeedsChartSetup.call(void 0, {
184
+ const { colors } = _chunkTNZNBMSZjs.useSeedsChartSetup.call(void 0, {
186
185
  series: props.data.map((d) => ({ color: d.color }))
187
186
  });
188
187
  const options = _react.useMemo.call(void 0, () => buildBubbleChartOptions(props), [props]);
@@ -206,7 +205,7 @@ var BubbleChart = _react.memo.call(void 0, function BubbleChart2(props) {
206
205
  ...hasOnPlotBackgroundClick ? { "data-has-on-plot-background-click": "" } : {},
207
206
  onClick: props.onPlotBackgroundClick,
208
207
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
209
- _chunk5JQXDK23js.ChartRenderer,
208
+ _chunkTNZNBMSZjs.ChartRenderer,
210
209
  {
211
210
  options,
212
211
  series: props.data.map((d, i) => ({
@@ -231,5 +230,5 @@ var BubbleChart = _react.memo.call(void 0, function BubbleChart2(props) {
231
230
 
232
231
 
233
232
 
234
- exports.BubbleChart = BubbleChart; exports.defaultBubbleChartWidth = _chunk33Y5FZTTjs.defaultBubbleChartWidth;
233
+ exports.BubbleChart = BubbleChart; exports.defaultBubbleChartWidth = _chunkLWDHU4QKjs.defaultBubbleChartWidth;
235
234
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/_work/seeds/seeds/seeds-react/seeds-react-data-viz/dist/bubble/index.js","../../src/charts/bubble/BubbleChart.tsx","../../src/charts/bubble/iconMarkup.ts","../../src/charts/bubble/adapter.ts"],"names":[],"mappings":"AAAA;AACE;AACF,uDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACF,uDAA6B;AAC7B;AACE;AACA;AACA;AACF,uDAA6B;AAC7B,gCAA6B;AAC7B;AACA;AChBA,8BAA8B;ADkB9B;AACA;AEMO,IAAM,mBAAA,EAA6C;AAAA,EACxD,cAAA,EAAgB,CAAA;AAAA;AAAA;AAAA,MAAA,CAAA;AAAA,EAIhB,sBAAA,EAAwB,CAAA;AAAA;AAAA,MAAA,CAAA;AAAA,EAGxB,cAAA,EAAgB,CAAA;AAAA;AAAA,MAAA,CAAA;AAAA,EAGhB,mBAAA,EAAqB,CAAA;AAAA;AAAA,MAAA,CAAA;AAAA,EAGrB,uBAAA,EAAyB,CAAA;AAAA;AAAA;AAAA,MAAA,CAAA;AAAA,EAIzB,sBAAA,EAAwB,CAAA;AAAA;AAAA,MAAA,CAAA;AAAA,EAGxB,mBAAA,EAAqB,CAAA;AAAA;AAAA,MAAA,CAAA;AAAA,EAGrB,eAAA,EAAiB,CAAA;AAAA;AAAA;AAAA,MAAA;AAInB,CAAA;AFJA;AACA;AG5BA,SAAS,gCAAA,CAAiC,KAAA,EAG/B;AACT,EAAA,OAAO,CAAA,EAAA;AACT;AAQS;AACA,EAAA;AAGT;AAKS;AACA,EAAA;AACT;AAES;AACA,EAAA;AAKT;AAOM;AACA;AAcG;AAID,EAAA;AACA,EAAA;AACF,EAAA;AACI,IAAA;AACN,IAAA;AACF,EAAA;AACI,EAAA;AACE,EAAA;AACC,EAAA;AACT;AAEgB;AAGP,EAAA;AACC,IAAA;AACA,IAAA;AACA,IAAA;AACJ,MAAA;AACA,MAAA;AACA,IAAA;AACF,IAAA;AACA,IAAA;AACA,EAAA;AACJ;AAOgB;AAGR,EAAA;AACE,IAAA;AACN,IAAA;AACA,IAAA;AACA,IAA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AAA;AAAA,QAAA;AAiBC,UAAA;AACA,UAAA;AAAkC,YAAA;AACxB,YAAA;AAEV,UAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AACA,UAAA;AAAe,QAAA;AAdV,QAAA;AAeP,MAAA;AAAA,IAAA;AACF,EAAA;AAEH;ADwIS;AACA;AACA;AACA","file":"/home/runner/_work/seeds/seeds/seeds-react/seeds-react-data-viz/dist/bubble/index.js","sourcesContent":[null,"import { memo, useMemo } from \"react\";\nimport {\n ChartRenderer,\n useSeedsChartSetup,\n type ChartTooltipProps,\n} from \"../shared/chartBase\";\nimport { getChartContainerProps } from \"../shared/chartContainer\";\nimport { buildBubbleChartOptions, mapBubbleTooltipRow } from \"./adapter\";\nimport type { BubbleChartProps } from \"./types\";\n\n/**\n * BubbleChart renders a Highcharts packedbubble (clustered, axis-less) chart\n * from a list of categories, each with its own nested inner bubbles.\n *\n * Like DonutChart, it carries no `styled-components`: the wrapper is a plain\n * `<div>` and the Highcharts styling ships as static CSS. Consumers import\n * both `@sproutsocial/seeds-react-data-viz/chart-styles.css` and\n * `.../bubble.css` once (the component never self-imports its CSS).\n */\nexport const BubbleChart = memo(function BubbleChart(props: BubbleChartProps) {\n const { colors } = useSeedsChartSetup({\n series: props.data.map((d) => ({ color: d.color })),\n });\n\n const options = useMemo(() => buildBubbleChartOptions(props), [props]);\n const hasOnClick = Boolean(props.onClick);\n const hasOnPlotBackgroundClick = Boolean(props.onPlotBackgroundClick);\n\n // RAW per-category colors only — an unset category falls through to\n // chart-styles.css's --highcharts-color-N default, matching the bar\n // convention (bubble's outer categories are separate series, like bar's,\n // not donut's single-series-many-points model).\n const containerProps = getChartContainerProps({\n familyClasses: [\"seeds-chart-bubble\"],\n colors: props.data.map((d) => d.color),\n hasOnClick,\n className: props.className,\n });\n\n // `ChartRenderer` expects `(ChartTooltipProps) => ReactNode`; the consumer's\n // function expects the narrower `BubbleChartTooltipProps` (required\n // seriesIndex/pointIndex). Wrap rather than cast the function type so the\n // intent is explicit; `mapBubbleTooltipRow` applies the remount-desync null\n // guard.\n const tooltip = props.tooltip\n ? (args: ChartTooltipProps) => {\n const row = mapBubbleTooltipRow(args.data);\n if (!row) return null;\n return props.tooltip!({ ...args, data: [row] });\n }\n : undefined;\n\n return (\n <div\n {...containerProps}\n {...(hasOnPlotBackgroundClick\n ? { \"data-has-on-plot-background-click\": \"\" }\n : {})}\n onClick={props.onPlotBackgroundClick}\n >\n <ChartRenderer\n // Highcharts <12.2.0 can't re-run the packedbubble split layout when\n // `splitSeries` toggles (highcharts/highcharts#21972, fixed by #22186\n // in 12.2.0), so we force a full remount via `key`. REMOVE this `key`\n // once seeds is on Highcharts >=12.2.0.\n // Unrelated, but a watch-item for that same upgrade: the #21972 fix\n // (#22186) introduced a still-open regression, #24134, where 2+\n // packedbubble charts that are BOTH in split mode at the same time on\n // one page share a global `allParentNodes` array, causing one chart's\n // bubbles to drift outside its plot area. A single bubble chart (or\n // several where at most one is split) is unaffected — only\n // simultaneous multi-chart split mode triggers it. Doesn't affect this\n // usage today (Smart Categories renders one bubble chart at a time),\n // but if a future surface ever renders 2+ split bubble charts at\n // once post-upgrade, apply the maintainers' workaround (reset\n // `allParentNodes` on chart `init`) until Highcharts ships a fix.\n key={`Bubble-Chart-${props.splitSeries ? \"SplitSeries\" : \"\"}`}\n options={options}\n series={props.data.map((d, i) => ({\n name: d.name,\n color: d.color ?? colors[i],\n }))}\n colors={colors}\n tooltip={tooltip}\n hasOnClick={hasOnClick}\n tooltipClickLabel={props.tooltipClickLabel}\n invalidNumberLabel={props.invalidNumberLabel}\n valueFormat={props.format}\n hideLegend\n exportTitle={props.exportTitle}\n onReady={props.onReady}\n />\n </div>\n );\n});\n","/**\n * TEMPORARY — remove when CE-202 lands (this file and its import in\n * `adapter.ts`).\n *\n * Raw inline-SVG markup for the bubble chart's data-label icons, duplicated\n * verbatim from web-app-core v1's `smartCategoryToSVGMap`\n * (`SmartCategoriesBubbleChart.tsx`), re-keyed from entity type to the Seeds\n * icon name the chart's `icon` prop actually receives (the Listening consumer\n * maps entity type -> icon name via `EntityTypeIconMap`). Copying v1's exact\n * glyphs is what guarantees pixel parity with the live chart.\n *\n * WHY inline SVG rather than the Seeds sprite `<use xlink:href=\"#seeds-svgs_...\">`:\n * Highcharts renders `useHTML` data labels outside the light-DOM tree the\n * sprite sheet is injected into, so cross-tree `<use>` resolution fails. This\n * is the same wall v1 hit, which is why it hand-copied raw path data instead\n * of referencing the sprite. The general fix — a lightweight per-icon markup\n * export from seeds-icons that avoids pulling the whole ~300KB+/category\n * sprite bundle into every `seeds-react-data-viz` consumer — is tracked by\n * CE-202; when it lands, resolve icons through that and delete this file.\n *\n * Fills are `currentColor` so each glyph inherits the data-label text color.\n * Each SVG keeps its native `width`/`height` for v1-identical inline sizing.\n * An icon outside this map degrades to the no-icon (name-only) label rather\n * than rendering nothing.\n */\nexport const BUBBLE_ICON_MARKUP: Record<string, string> = {\n \"user-outline\": `<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M5.72756 6C7.38441 6 8.72756 4.65685 8.72756 3C8.72756 1.34315 7.38441 0 5.72756 0C4.07071 0 2.72756 1.34315 2.72756 3C2.72756 4.65685 4.07071 6 5.72756 6Z\" fill=\"currentColor\"/>\n<path d=\"M5.72756 12C8.50201 12 10.1833 10.1963 11.0339 8.89858C11.4669 8.23803 11.0644 7.41859 10.2861 7.28445C8.63561 7 7.15327 7 5.72756 7C4.30185 7 2.81951 7 1.16899 7.28445C0.390671 7.41859 -0.0117778 8.23803 0.421187 8.89858C1.2718 10.1963 2.95311 12 5.72756 12Z\" fill=\"currentColor\"/>\n</svg>`,\n \"location-pin-outline\": `<svg width=\"10\" height=\"12\" viewBox=\"0 0 10 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path style=\"fill-rule: evenodd; clip-rule: evenodd;\" d=\"M4.99992 12C6.33325 12 9.66659 7.244 9.66659 4.66667C9.66659 2.08934 7.57725 0 4.99992 0C2.42259 0 0.333252 2.08934 0.333252 4.66667C0.333252 7.244 3.66659 12 4.99992 12ZM4.99992 4.66667C5.36811 4.66667 5.66659 4.36819 5.66659 4C5.66659 3.63181 5.36811 3.33333 4.99992 3.33333C4.63173 3.33333 4.33325 3.63181 4.33325 4C4.33325 4.36819 4.63173 4.66667 4.99992 4.66667Z\" fill=\"currentColor\"/>\n</svg>`,\n \"cart-outline\": `<svg width=\"11\" height=\"12\" viewBox=\"0 0 11 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M0.666748 1.83333H1.76749C1.93793 1.83333 2.08092 1.96192 2.09895 2.1314L2.75892 8.33515C1.9651 8.37397 1.33341 9.02988 1.33341 9.83333C1.33341 10.6618 2.00499 11.3333 2.83341 11.3333C3.66184 11.3333 4.33341 10.6618 4.33341 9.83333C4.33341 9.777 4.33031 9.72139 4.32426 9.66667H7.34257C7.33652 9.72139 7.33341 9.777 7.33341 9.83333C7.33341 10.6618 8.00499 11.3333 8.83341 11.3333C9.66184 11.3333 10.3334 10.6618 10.3334 9.83333C10.3334 9.00491 9.66184 8.33333 8.83341 8.33333H4.09959L3.92228 6.66667H9.18028C9.65696 6.66667 10.0674 6.33021 10.1609 5.86278L10.9203 2.06537C10.9616 1.85911 10.8038 1.66667 10.5935 1.66667H3.35763C3.14364 0.98448 2.50729 0.5 1.76749 0.5H0.666748V1.83333Z\" fill=\"currentColor\"/>\n</svg>`,\n \"briefcase-outline\": `<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path style=\"fill-rule: evenodd; clip-rule: evenodd;\" d=\"M3.5 1.83333V2H1C0.447715 2 0 2.44772 0 3V10.3333C0 10.8856 0.447715 11.3333 1 11.3333H11C11.5523 11.3333 12 10.8856 12 10.3333V3C12 2.44772 11.5523 2 11 2H8.5V1.83333C8.5 0.820811 7.67919 0 6.66667 0H5.33333C4.32081 0 3.5 0.820811 3.5 1.83333ZM5.33333 1C4.8731 1 4.5 1.3731 4.5 1.83333V2H7.5V1.83333C7.5 1.3731 7.1269 1 6.66667 1H5.33333ZM6.66667 5.33333C6.66667 5.70152 6.36819 6 6 6C5.63181 6 5.33333 5.70152 5.33333 5.33333C5.33333 4.96514 5.63181 4.66667 6 4.66667C6.36819 4.66667 6.66667 4.96514 6.66667 5.33333ZM10.6667 6.88767V5.74479C9.44176 6.48334 7.81474 6.95116 6 6.95116C4.18526 6.95116 2.55823 6.48334 1.33333 5.74479V6.88767C2.64682 7.55696 4.25842 7.95116 6 7.95116C7.74158 7.95116 9.35318 7.55696 10.6667 6.88767Z\" fill=\"currentColor\"/>\n</svg>`,\n \"laptop-mobile-outline\": `<svg width=\"13\" height=\"10\" viewBox=\"0 0 13 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M2.84994 0.333313C2.29765 0.333313 1.84993 0.781028 1.84993 1.33331V7.33331H0.516602C0.516602 7.8856 0.964317 8.33331 1.5166 8.33331H6.84994V3.33331C6.84994 2.22874 7.74537 1.33331 8.84994 1.33331H11.1833C11.1833 0.781028 10.7356 0.333313 10.1833 0.333313H2.84994Z\" fill=\"currentColor\"/>\n<path style=\"fill-rule: evenodd; clip-rule: evenodd;\" d=\"M7.84994 3.33331C7.84994 2.78103 8.29765 2.33331 8.84994 2.33331H11.5166C12.0689 2.33331 12.5166 2.78103 12.5166 3.33331V8.66665C12.5166 9.21893 12.0689 9.66665 11.5166 9.66665H8.84994C8.29765 9.66665 7.84994 9.21893 7.84994 8.66665V3.33331ZM10.6833 8.16665C10.6833 8.44279 10.4594 8.66665 10.1833 8.66665C9.90713 8.66665 9.68327 8.44279 9.68327 8.16665C9.68327 7.8905 9.90713 7.66665 10.1833 7.66665C10.4594 7.66665 10.6833 7.8905 10.6833 8.16665Z\" fill=\"currentColor\"/>\n</svg>`,\n \"calendar-day-outline\": `<svg width=\"11\" height=\"12\" viewBox=\"0 0 11 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path style=\"fill-rule: evenodd; clip-rule: evenodd;\" d=\"M3.3632 1.33333H7.69653V0H8.69653V1.33333H9.8632C10.4155 1.33333 10.8632 1.78105 10.8632 2.33333V10.3333C10.8632 10.8856 10.4155 11.3333 9.8632 11.3333H1.19653C0.644248 11.3333 0.196533 10.8856 0.196533 10.3333V2.33333C0.196533 1.78105 0.644248 1.33333 1.19653 1.33333H2.3632V0H3.3632V1.33333ZM1.52987 2.66667V4H9.52987V2.66667H1.52987ZM3.8632 5.33333H1.8632V7.33333H3.8632V5.33333Z\" fill=\"currentColor\"/>\n</svg>`,\n \"chart-pie-outline\": `<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path style=\"fill-rule: evenodd; clip-rule: evenodd;\" d=\"M10.9888 9.33342C11.6481 8.34673 12 7.18669 12 6H6V0C4.81331 0 3.65328 0.351894 2.66658 1.01118C1.67989 1.67047 0.910851 2.60754 0.456725 3.7039C0.00259971 4.80026 -0.11622 6.00666 0.115291 7.17054C0.346802 8.33443 0.918247 9.40353 1.75736 10.2426C2.59648 11.0818 3.66557 11.6532 4.82946 11.8847C5.99335 12.1162 7.19975 11.9974 8.2961 11.5433C9.39246 11.0892 10.3295 10.3201 10.9888 9.33342ZM7.33334 4.66672L11.8513 4.66656C11.3422 2.42346 9.57645 0.657717 7.33334 0.148727V4.66672Z\" fill=\"currentColor\"/>\n</svg>`,\n \"paper-outline\": `<svg width=\"10\" height=\"12\" viewBox=\"0 0 10 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M1.06836 12C0.516075 12 0.0683594 11.5523 0.0683594 11V1C0.0683594 0.447715 0.516075 0 1.06836 0H3.73503C4.28731 0 4.73503 0.447715 4.73503 1V2.83333C4.73503 4.02995 5.70508 5 6.90169 5H8.40169C8.95398 5 9.40169 5.44772 9.40169 6V11C9.40169 11.5523 8.95398 12 8.40169 12H1.06836Z\" fill=\"currentColor\"/>\n<path d=\"M5.73503 2.49999V0.107381C7.61938 0.518781 9.07818 2.06865 9.35443 3.99999H7.23503C6.4066 3.99999 5.73503 3.32841 5.73503 2.49999Z\" fill=\"currentColor\"/>\n</svg>`,\n};\n","import type { TypeIconName } from \"@sproutsocial/seeds-react-icon\";\nimport { BUBBLE_ICON_MARKUP } from \"./iconMarkup\";\nimport { buildBaseChartOptions } from \"../shared/baseChartOptions\";\nimport type {\n ChartTooltipDataRow,\n SeedsChartBubbleClickEvent,\n SeedsChartBubbleDataLabelFormatterContext,\n SeedsChartOptions,\n SeedsChartPackedBubbleSeriesOptions,\n} from \"../shared/chartBase\";\nimport {\n BUBBLE_CHART_DEFAULT_MAX_SIZE,\n BUBBLE_CHART_DEFAULT_PADDING,\n BUBBLE_CHART_HEIGHT,\n} from \"../../constants/chartOptions\";\nimport type {\n BubbleCategoryDataPoint,\n BubbleChartClickData,\n BubbleChartProps,\n BubbleChartTooltipRow,\n} from \"./types\";\n\nfunction defaultPointDescriptionFormatter(point: {\n name: string;\n value: number;\n}): string {\n return `${point.name}: ${point.value}. Press Enter or Space to activate.`;\n}\n\n/**\n * A bare icon name (no `-outline`/`-solid` suffix) resolves to its default\n * variant, matching `seeds-react-icon`'s own `resolveIconName` (`outline` at\n * this label's rendered size — mirrors non-mini `<Icon>` sizing, since\n * `BUBBLE_ICON_MARKUP` only stocks the outline variant).\n */\nfunction resolveIconName(name: TypeIconName): string {\n return name.endsWith(\"-outline\") || name.endsWith(\"-solid\")\n ? name\n : `${name}-outline`;\n}\n\n// Icon markup lives in ./iconMarkup (a verbatim, temporary duplicate of v1's\n// raw-SVG map — see that file's header and CE-202). Kept out of this adapter so\n// the eventual general fix is a one-file deletion, not a surgical edit here.\nfunction buildIconMarkup(icon: TypeIconName): string | undefined {\n return BUBBLE_ICON_MARKUP[resolveIconName(icon)];\n}\n\nfunction escapeHtml(value: string): string {\n return value\n .replace(/&/g, \"&amp;\")\n .replace(/</g, \"&lt;\")\n .replace(/>/g, \"&gt;\")\n .replace(/\"/g, \"&quot;\");\n}\n\n// v1's radius thresholds (`MINIMUM_BUBBLE_RADIUS_FOR_CATEGORY_TEXT` /\n// `MINIMUM_BUBBLE_RADIUS_FOR_DATALABEL_TEXT`), generalized per SPEC decision\n// 9a: the rule is icon-presence-driven, not view-mode-driven. v1 conflated the\n// two because overview-mode categories were the only points it ever assigned\n// an icon to — incidental, not load-bearing.\nconst ICON_LABEL_TEXT_MIN_RADIUS = 40;\nconst NO_ICON_LABEL_MIN_RADIUS = 25;\n\n/**\n * Assembles a packedbubble data label as an HTML string (`useHTML: true`,\n * required — see `charts/README.md`'s known gap, mirrored from v1). Icon\n * present → icon always renders, name conditional on radius; no icon → hidden\n * below a radius floor, else the name clipped/wrapped to the bubble's\n * diameter. Mirrors v1's `dataLabelFormatter` exactly: a plain `<div>` with the\n * inline icon to the left of the name (v1 does nothing more — it relies on the\n * browser-default inline `<svg>`; see bubble.css for the Tailwind-Preflight\n * override that keeps that default intact here). An `icon` outside\n * `BUBBLE_ICON_MARKUP`'s current coverage falls through to the no-icon branch\n * (name only) rather than rendering an empty/broken icon.\n */\nfunction buildBubbleDataLabel(\n point: { name: string; icon?: TypeIconName },\n radius: number\n): string {\n const name = escapeHtml(point.name);\n const iconMarkup = point.icon ? buildIconMarkup(point.icon) : undefined;\n if (iconMarkup) {\n const showName = radius > ICON_LABEL_TEXT_MIN_RADIUS;\n return `<div>${iconMarkup}${showName ? ` <span>${name}</span>` : \"\"}</div>`;\n }\n if (radius < NO_ICON_LABEL_MIN_RADIUS) return \"\";\n const diameter = radius * 2;\n return `<div style=\"max-width: ${diameter}px; max-height: ${diameter}px; overflow: hidden; text-overflow: ellipsis; white-space: wrap;\" title=\"${name}\">${name}</div>`;\n}\n\nexport function transformBubbleDataToSeries(\n data: Array<BubbleCategoryDataPoint>\n): Array<SeedsChartPackedBubbleSeriesOptions> {\n return data.map((category, index) => ({\n type: \"packedbubble\",\n name: category.name,\n data: category.innerBubbles.map((bubble) => ({\n name: bubble.name,\n value: bubble.value,\n })),\n color: category.color,\n colorIndex: index,\n }));\n}\n\n/**\n * Keyboard activation has no `stopPropagation` and its `type` isn't `\"click\"`;\n * derive `pageX`/`pageY` from the target's bounding rect for keyboard, from\n * the raw event for a mouse click. Mirrors v1's `transformBubbleChartClickData`.\n */\nexport function transformBubbleClickData(\n event: SeedsChartBubbleClickEvent\n): BubbleChartClickData {\n const base = {\n name: event.point.name,\n value: event.point.value,\n seriesIndex: event.point.series.index,\n pointIndex: event.point.index,\n };\n const isClickEvent = event.type === \"click\";\n if (!isClickEvent && event.target) {\n const rect = (event.target as HTMLElement).getBoundingClientRect();\n return { ...base, pageX: rect.x, pageY: rect.y };\n }\n return { ...base, pageX: event.pageX ?? 0, pageY: event.pageY ?? 0 };\n}\n\n/**\n * During the split<->unsplit remount transition the tooltip context is\n * briefly missing data (name/seriesIndex undefined) — bail rather than render\n * a broken tooltip. Mirrors v1.\n */\nexport function mapBubbleTooltipRow(\n data: ChartTooltipDataRow[]\n): BubbleChartTooltipRow | null {\n const row = data[0] as BubbleChartTooltipRow | undefined;\n if (row?.name == null || row?.seriesIndex == null) return null;\n return row;\n}\n\nexport function buildBubbleChartOptions(\n props: BubbleChartProps\n): SeedsChartOptions {\n const hasOnClick = Boolean(props.onClick);\n const base = buildBaseChartOptions({\n type: \"packedbubble\",\n description: props.accessibility.description,\n svgContainerLabel: props.accessibility.svgContainerLabel,\n ...(hasOnClick\n ? {\n point: {\n descriptionFormatter:\n props.accessibility.point?.descriptionFormatter ??\n defaultPointDescriptionFormatter,\n },\n }\n : {}),\n });\n\n return {\n ...base,\n chart: {\n ...base.chart,\n type: \"packedbubble\",\n height: props.height ?? BUBBLE_CHART_HEIGHT,\n },\n plotOptions: {\n packedbubble: {\n minSize: \"30%\",\n maxSize: props.maxBubbleSize ?? BUBBLE_CHART_DEFAULT_MAX_SIZE,\n draggable: false,\n states: { hover: { enabled: false } },\n layoutAlgorithm: {\n gravitationalConstant: 0.05,\n seriesInteraction: true,\n parentNodeLimit: true,\n enableSimulation: false,\n bubblePadding: props.bubblePadding ?? BUBBLE_CHART_DEFAULT_PADDING,\n splitSeries: props.splitSeries ?? false,\n },\n dataLabels: {\n enabled: true,\n // See chartBase.tsx's SeedsChartPackedBubblePlotOptions.dataLabels —\n // the label formatter returns HTML (icon + wrapped text); preserved\n // for functional parity (known useHTML gap, mirrors bar's axis\n // labels).\n useHTML: true,\n formatter(this: SeedsChartBubbleDataLabelFormatterContext) {\n const inner =\n props.data[this.point.series.index]?.innerBubbles[\n this.point.index\n ];\n return buildBubbleDataLabel(\n { name: this.point.name, icon: inner?.icon },\n this.radius\n );\n },\n },\n accessibility: {\n enabled: true,\n keyboardNavigation: { enabled: true },\n point: { valueDescriptionFormat: \"{point.name}: {point.value}\" },\n },\n point: {\n events: {\n click: hasOnClick\n ? (event: SeedsChartBubbleClickEvent) => {\n event.stopPropagation?.();\n // Keyboard events have no `target` when not a genuine click.\n if (event.type !== \"click\" && !event.target) return;\n props.onClick!(transformBubbleClickData(event));\n }\n : undefined,\n mouseOver: props.onMouseEnter\n ? function (this: { name: string }) {\n props.onMouseEnter!({ position: this.name });\n }\n : undefined,\n mouseOut: props.onMouseLeave\n ? function (this: { name: string }) {\n props.onMouseLeave!({ position: this.name });\n }\n : undefined,\n },\n },\n },\n },\n series: transformBubbleDataToSeries(props.data),\n };\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/_work/seeds/seeds/seeds-react/seeds-react-data-viz/dist/bubble/index.js","../../src/charts/bubble/BubbleChart.tsx","../../src/charts/bubble/iconMarkup.ts","../../src/charts/bubble/adapter.ts"],"names":[],"mappings":"AAAA;AACE;AACF,uDAA6B;AAC7B;AACE;AACA;AACA;AACF,uDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACF,uDAA6B;AAC7B;AACA;ACf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S;AACA;AACA;AACA","file":"/home/runner/_work/seeds/seeds/seeds-react/seeds-react-data-viz/dist/bubble/index.js","sourcesContent":[null,"import { memo, useMemo } from \"react\";\nimport {\n ChartRenderer,\n useSeedsChartSetup,\n type ChartTooltipProps,\n} from \"../shared/chartBase\";\nimport { getChartContainerProps } from \"../shared/chartContainer\";\nimport { buildBubbleChartOptions, mapBubbleTooltipRow } from \"./adapter\";\nimport type { BubbleChartProps } from \"./types\";\n\n/**\n * BubbleChart renders a Highcharts packedbubble (clustered, axis-less) chart\n * from a list of categories, each with its own nested inner bubbles.\n *\n * Like DonutChart, it carries no `styled-components`: the wrapper is a plain\n * `<div>` and the Highcharts styling ships as static CSS. Consumers import\n * both `@sproutsocial/seeds-react-data-viz/chart-styles.css` and\n * `.../bubble.css` once (the component never self-imports its CSS).\n */\nexport const BubbleChart = memo(function BubbleChart(props: BubbleChartProps) {\n const { colors } = useSeedsChartSetup({\n series: props.data.map((d) => ({ color: d.color })),\n });\n\n const options = useMemo(() => buildBubbleChartOptions(props), [props]);\n const hasOnClick = Boolean(props.onClick);\n const hasOnPlotBackgroundClick = Boolean(props.onPlotBackgroundClick);\n\n // RAW per-category colors only — an unset category falls through to\n // chart-styles.css's --highcharts-color-N default, matching the bar\n // convention (bubble's outer categories are separate series, like bar's,\n // not donut's single-series-many-points model).\n const containerProps = getChartContainerProps({\n familyClasses: [\"seeds-chart-bubble\"],\n colors: props.data.map((d) => d.color),\n hasOnClick,\n className: props.className,\n });\n\n // `ChartRenderer` expects `(ChartTooltipProps) => ReactNode`; the consumer's\n // function expects the narrower `BubbleChartTooltipProps` (required\n // seriesIndex/pointIndex). Wrap rather than cast the function type so the\n // intent is explicit; `mapBubbleTooltipRow` applies the remount-desync null\n // guard.\n const tooltip = props.tooltip\n ? (args: ChartTooltipProps) => {\n const row = mapBubbleTooltipRow(args.data);\n if (!row) return null;\n return props.tooltip!({ ...args, data: [row] });\n }\n : undefined;\n\n return (\n <div\n {...containerProps}\n {...(hasOnPlotBackgroundClick\n ? { \"data-has-on-plot-background-click\": \"\" }\n : {})}\n onClick={props.onPlotBackgroundClick}\n >\n <ChartRenderer\n // Highcharts <12.2.0 can't re-run the packedbubble split layout when\n // `splitSeries` toggles (highcharts/highcharts#21972, fixed by #22186\n // in 12.2.0), so we force a full remount via `key`. REMOVE this `key`\n // once seeds is on Highcharts >=12.2.0.\n // Unrelated, but a watch-item for that same upgrade: the #21972 fix\n // (#22186) introduced a still-open regression, #24134, where 2+\n // packedbubble charts that are BOTH in split mode at the same time on\n // one page share a global `allParentNodes` array, causing one chart's\n // bubbles to drift outside its plot area. A single bubble chart (or\n // several where at most one is split) is unaffected — only\n // simultaneous multi-chart split mode triggers it. Doesn't affect this\n // usage today (Smart Categories renders one bubble chart at a time),\n // but if a future surface ever renders 2+ split bubble charts at\n // once post-upgrade, apply the maintainers' workaround (reset\n // `allParentNodes` on chart `init`) until Highcharts ships a fix.\n key={`Bubble-Chart-${props.splitSeries ? \"SplitSeries\" : \"\"}`}\n options={options}\n series={props.data.map((d, i) => ({\n name: d.name,\n color: d.color ?? colors[i],\n }))}\n colors={colors}\n tooltip={tooltip}\n hasOnClick={hasOnClick}\n tooltipClickLabel={props.tooltipClickLabel}\n invalidNumberLabel={props.invalidNumberLabel}\n valueFormat={props.format}\n hideLegend\n exportTitle={props.exportTitle}\n onReady={props.onReady}\n />\n </div>\n );\n});\n","/**\n * TEMPORARY — remove when CE-202 lands (this file and its import in\n * `adapter.ts`).\n *\n * Raw inline-SVG markup for the bubble chart's data-label icons, duplicated\n * verbatim from web-app-core v1's `smartCategoryToSVGMap`\n * (`SmartCategoriesBubbleChart.tsx`), re-keyed from entity type to the Seeds\n * icon name the chart's `icon` prop actually receives (the Listening consumer\n * maps entity type -> icon name via `EntityTypeIconMap`). Copying v1's exact\n * glyphs is what guarantees pixel parity with the live chart.\n *\n * WHY inline SVG rather than the Seeds sprite `<use xlink:href=\"#seeds-svgs_...\">`:\n * Highcharts renders `useHTML` data labels outside the light-DOM tree the\n * sprite sheet is injected into, so cross-tree `<use>` resolution fails. This\n * is the same wall v1 hit, which is why it hand-copied raw path data instead\n * of referencing the sprite. The general fix — a lightweight per-icon markup\n * export from seeds-icons that avoids pulling the whole ~300KB+/category\n * sprite bundle into every `seeds-react-data-viz` consumer — is tracked by\n * CE-202; when it lands, resolve icons through that and delete this file.\n *\n * Fills are `currentColor` so each glyph inherits the data-label text color.\n * Each SVG keeps its native `width`/`height` for v1-identical inline sizing.\n * An icon outside this map degrades to the no-icon (name-only) label rather\n * than rendering nothing.\n */\nexport const BUBBLE_ICON_MARKUP: Record<string, string> = {\n \"user-outline\": `<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M5.72756 6C7.38441 6 8.72756 4.65685 8.72756 3C8.72756 1.34315 7.38441 0 5.72756 0C4.07071 0 2.72756 1.34315 2.72756 3C2.72756 4.65685 4.07071 6 5.72756 6Z\" fill=\"currentColor\"/>\n<path d=\"M5.72756 12C8.50201 12 10.1833 10.1963 11.0339 8.89858C11.4669 8.23803 11.0644 7.41859 10.2861 7.28445C8.63561 7 7.15327 7 5.72756 7C4.30185 7 2.81951 7 1.16899 7.28445C0.390671 7.41859 -0.0117778 8.23803 0.421187 8.89858C1.2718 10.1963 2.95311 12 5.72756 12Z\" fill=\"currentColor\"/>\n</svg>`,\n \"location-pin-outline\": `<svg width=\"10\" height=\"12\" viewBox=\"0 0 10 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path style=\"fill-rule: evenodd; clip-rule: evenodd;\" d=\"M4.99992 12C6.33325 12 9.66659 7.244 9.66659 4.66667C9.66659 2.08934 7.57725 0 4.99992 0C2.42259 0 0.333252 2.08934 0.333252 4.66667C0.333252 7.244 3.66659 12 4.99992 12ZM4.99992 4.66667C5.36811 4.66667 5.66659 4.36819 5.66659 4C5.66659 3.63181 5.36811 3.33333 4.99992 3.33333C4.63173 3.33333 4.33325 3.63181 4.33325 4C4.33325 4.36819 4.63173 4.66667 4.99992 4.66667Z\" fill=\"currentColor\"/>\n</svg>`,\n \"cart-outline\": `<svg width=\"11\" height=\"12\" viewBox=\"0 0 11 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M0.666748 1.83333H1.76749C1.93793 1.83333 2.08092 1.96192 2.09895 2.1314L2.75892 8.33515C1.9651 8.37397 1.33341 9.02988 1.33341 9.83333C1.33341 10.6618 2.00499 11.3333 2.83341 11.3333C3.66184 11.3333 4.33341 10.6618 4.33341 9.83333C4.33341 9.777 4.33031 9.72139 4.32426 9.66667H7.34257C7.33652 9.72139 7.33341 9.777 7.33341 9.83333C7.33341 10.6618 8.00499 11.3333 8.83341 11.3333C9.66184 11.3333 10.3334 10.6618 10.3334 9.83333C10.3334 9.00491 9.66184 8.33333 8.83341 8.33333H4.09959L3.92228 6.66667H9.18028C9.65696 6.66667 10.0674 6.33021 10.1609 5.86278L10.9203 2.06537C10.9616 1.85911 10.8038 1.66667 10.5935 1.66667H3.35763C3.14364 0.98448 2.50729 0.5 1.76749 0.5H0.666748V1.83333Z\" fill=\"currentColor\"/>\n</svg>`,\n \"briefcase-outline\": `<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path style=\"fill-rule: evenodd; clip-rule: evenodd;\" d=\"M3.5 1.83333V2H1C0.447715 2 0 2.44772 0 3V10.3333C0 10.8856 0.447715 11.3333 1 11.3333H11C11.5523 11.3333 12 10.8856 12 10.3333V3C12 2.44772 11.5523 2 11 2H8.5V1.83333C8.5 0.820811 7.67919 0 6.66667 0H5.33333C4.32081 0 3.5 0.820811 3.5 1.83333ZM5.33333 1C4.8731 1 4.5 1.3731 4.5 1.83333V2H7.5V1.83333C7.5 1.3731 7.1269 1 6.66667 1H5.33333ZM6.66667 5.33333C6.66667 5.70152 6.36819 6 6 6C5.63181 6 5.33333 5.70152 5.33333 5.33333C5.33333 4.96514 5.63181 4.66667 6 4.66667C6.36819 4.66667 6.66667 4.96514 6.66667 5.33333ZM10.6667 6.88767V5.74479C9.44176 6.48334 7.81474 6.95116 6 6.95116C4.18526 6.95116 2.55823 6.48334 1.33333 5.74479V6.88767C2.64682 7.55696 4.25842 7.95116 6 7.95116C7.74158 7.95116 9.35318 7.55696 10.6667 6.88767Z\" fill=\"currentColor\"/>\n</svg>`,\n \"laptop-mobile-outline\": `<svg width=\"13\" height=\"10\" viewBox=\"0 0 13 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M2.84994 0.333313C2.29765 0.333313 1.84993 0.781028 1.84993 1.33331V7.33331H0.516602C0.516602 7.8856 0.964317 8.33331 1.5166 8.33331H6.84994V3.33331C6.84994 2.22874 7.74537 1.33331 8.84994 1.33331H11.1833C11.1833 0.781028 10.7356 0.333313 10.1833 0.333313H2.84994Z\" fill=\"currentColor\"/>\n<path style=\"fill-rule: evenodd; clip-rule: evenodd;\" d=\"M7.84994 3.33331C7.84994 2.78103 8.29765 2.33331 8.84994 2.33331H11.5166C12.0689 2.33331 12.5166 2.78103 12.5166 3.33331V8.66665C12.5166 9.21893 12.0689 9.66665 11.5166 9.66665H8.84994C8.29765 9.66665 7.84994 9.21893 7.84994 8.66665V3.33331ZM10.6833 8.16665C10.6833 8.44279 10.4594 8.66665 10.1833 8.66665C9.90713 8.66665 9.68327 8.44279 9.68327 8.16665C9.68327 7.8905 9.90713 7.66665 10.1833 7.66665C10.4594 7.66665 10.6833 7.8905 10.6833 8.16665Z\" fill=\"currentColor\"/>\n</svg>`,\n \"calendar-day-outline\": `<svg width=\"11\" height=\"12\" viewBox=\"0 0 11 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path style=\"fill-rule: evenodd; clip-rule: evenodd;\" d=\"M3.3632 1.33333H7.69653V0H8.69653V1.33333H9.8632C10.4155 1.33333 10.8632 1.78105 10.8632 2.33333V10.3333C10.8632 10.8856 10.4155 11.3333 9.8632 11.3333H1.19653C0.644248 11.3333 0.196533 10.8856 0.196533 10.3333V2.33333C0.196533 1.78105 0.644248 1.33333 1.19653 1.33333H2.3632V0H3.3632V1.33333ZM1.52987 2.66667V4H9.52987V2.66667H1.52987ZM3.8632 5.33333H1.8632V7.33333H3.8632V5.33333Z\" fill=\"currentColor\"/>\n</svg>`,\n \"chart-pie-outline\": `<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path style=\"fill-rule: evenodd; clip-rule: evenodd;\" d=\"M10.9888 9.33342C11.6481 8.34673 12 7.18669 12 6H6V0C4.81331 0 3.65328 0.351894 2.66658 1.01118C1.67989 1.67047 0.910851 2.60754 0.456725 3.7039C0.00259971 4.80026 -0.11622 6.00666 0.115291 7.17054C0.346802 8.33443 0.918247 9.40353 1.75736 10.2426C2.59648 11.0818 3.66557 11.6532 4.82946 11.8847C5.99335 12.1162 7.19975 11.9974 8.2961 11.5433C9.39246 11.0892 10.3295 10.3201 10.9888 9.33342ZM7.33334 4.66672L11.8513 4.66656C11.3422 2.42346 9.57645 0.657717 7.33334 0.148727V4.66672Z\" fill=\"currentColor\"/>\n</svg>`,\n \"paper-outline\": `<svg width=\"10\" height=\"12\" viewBox=\"0 0 10 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M1.06836 12C0.516075 12 0.0683594 11.5523 0.0683594 11V1C0.0683594 0.447715 0.516075 0 1.06836 0H3.73503C4.28731 0 4.73503 0.447715 4.73503 1V2.83333C4.73503 4.02995 5.70508 5 6.90169 5H8.40169C8.95398 5 9.40169 5.44772 9.40169 6V11C9.40169 11.5523 8.95398 12 8.40169 12H1.06836Z\" fill=\"currentColor\"/>\n<path d=\"M5.73503 2.49999V0.107381C7.61938 0.518781 9.07818 2.06865 9.35443 3.99999H7.23503C6.4066 3.99999 5.73503 3.32841 5.73503 2.49999Z\" fill=\"currentColor\"/>\n</svg>`,\n};\n","import type { TypeIconName } from \"@sproutsocial/seeds-react-icon\";\nimport { BUBBLE_ICON_MARKUP } from \"./iconMarkup\";\nimport { buildBaseChartOptions } from \"../shared/baseChartOptions\";\nimport type {\n ChartTooltipDataRow,\n SeedsChartBubbleClickEvent,\n SeedsChartBubbleDataLabelFormatterContext,\n SeedsChartOptions,\n SeedsChartPackedBubbleSeriesOptions,\n} from \"../shared/chartBase\";\nimport {\n BUBBLE_CHART_DEFAULT_MAX_SIZE,\n BUBBLE_CHART_DEFAULT_PADDING,\n BUBBLE_CHART_HEIGHT,\n} from \"../../constants/chartOptions\";\nimport type {\n BubbleCategoryDataPoint,\n BubbleChartClickData,\n BubbleChartProps,\n BubbleChartTooltipRow,\n} from \"./types\";\n\nfunction defaultPointDescriptionFormatter(point: {\n name: string;\n value: number;\n}): string {\n return `${point.name}: ${point.value}. Press Enter or Space to activate.`;\n}\n\n/**\n * A bare icon name (no `-outline`/`-solid` suffix) resolves to its default\n * variant, matching `seeds-react-icon`'s own `resolveIconName` (`outline` at\n * this label's rendered size — mirrors non-mini `<Icon>` sizing, since\n * `BUBBLE_ICON_MARKUP` only stocks the outline variant).\n */\nfunction resolveIconName(name: TypeIconName): string {\n return name.endsWith(\"-outline\") || name.endsWith(\"-solid\")\n ? name\n : `${name}-outline`;\n}\n\n// Icon markup lives in ./iconMarkup (a verbatim, temporary duplicate of v1's\n// raw-SVG map — see that file's header and CE-202). Kept out of this adapter so\n// the eventual general fix is a one-file deletion, not a surgical edit here.\nfunction buildIconMarkup(icon: TypeIconName): string | undefined {\n return BUBBLE_ICON_MARKUP[resolveIconName(icon)];\n}\n\nfunction escapeHtml(value: string): string {\n return value\n .replace(/&/g, \"&amp;\")\n .replace(/</g, \"&lt;\")\n .replace(/>/g, \"&gt;\")\n .replace(/\"/g, \"&quot;\");\n}\n\n// v1's radius thresholds (`MINIMUM_BUBBLE_RADIUS_FOR_CATEGORY_TEXT` /\n// `MINIMUM_BUBBLE_RADIUS_FOR_DATALABEL_TEXT`), generalized per SPEC decision\n// 9a: the rule is icon-presence-driven, not view-mode-driven. v1 conflated the\n// two because overview-mode categories were the only points it ever assigned\n// an icon to — incidental, not load-bearing.\nconst ICON_LABEL_TEXT_MIN_RADIUS = 40;\nconst NO_ICON_LABEL_MIN_RADIUS = 25;\n\n/**\n * Assembles a packedbubble data label as an HTML string (`useHTML: true`,\n * required — see `charts/README.md`'s known gap, mirrored from v1). Icon\n * present → icon always renders, name conditional on radius; no icon → hidden\n * below a radius floor, else the name clipped/wrapped to the bubble's\n * diameter. Mirrors v1's `dataLabelFormatter` exactly: a plain `<div>` with the\n * inline icon to the left of the name (v1 does nothing more — it relies on the\n * browser-default inline `<svg>`; see bubble.css for the Tailwind-Preflight\n * override that keeps that default intact here). An `icon` outside\n * `BUBBLE_ICON_MARKUP`'s current coverage falls through to the no-icon branch\n * (name only) rather than rendering an empty/broken icon.\n */\nfunction buildBubbleDataLabel(\n point: { name: string; icon?: TypeIconName },\n radius: number\n): string {\n const name = escapeHtml(point.name);\n const iconMarkup = point.icon ? buildIconMarkup(point.icon) : undefined;\n if (iconMarkup) {\n const showName = radius > ICON_LABEL_TEXT_MIN_RADIUS;\n return `<div>${iconMarkup}${showName ? ` <span>${name}</span>` : \"\"}</div>`;\n }\n if (radius < NO_ICON_LABEL_MIN_RADIUS) return \"\";\n const diameter = radius * 2;\n return `<div style=\"max-width: ${diameter}px; max-height: ${diameter}px; overflow: hidden; text-overflow: ellipsis; white-space: wrap;\" title=\"${name}\">${name}</div>`;\n}\n\nexport function transformBubbleDataToSeries(\n data: Array<BubbleCategoryDataPoint>\n): Array<SeedsChartPackedBubbleSeriesOptions> {\n return data.map((category, index) => ({\n type: \"packedbubble\",\n name: category.name,\n data: category.innerBubbles.map((bubble) => ({\n name: bubble.name,\n value: bubble.value,\n })),\n color: category.color,\n colorIndex: index,\n }));\n}\n\n/**\n * Keyboard activation has no `stopPropagation` and its `type` isn't `\"click\"`;\n * derive `pageX`/`pageY` from the target's bounding rect for keyboard, from\n * the raw event for a mouse click. Mirrors v1's `transformBubbleChartClickData`.\n */\nexport function transformBubbleClickData(\n event: SeedsChartBubbleClickEvent\n): BubbleChartClickData {\n const base = {\n name: event.point.name,\n value: event.point.value,\n seriesIndex: event.point.series.index,\n pointIndex: event.point.index,\n };\n const isClickEvent = event.type === \"click\";\n if (!isClickEvent && event.target) {\n const rect = (event.target as HTMLElement).getBoundingClientRect();\n return { ...base, pageX: rect.x, pageY: rect.y };\n }\n return { ...base, pageX: event.pageX ?? 0, pageY: event.pageY ?? 0 };\n}\n\n/**\n * During the split<->unsplit remount transition the tooltip context is\n * briefly missing data (name/seriesIndex undefined) — bail rather than render\n * a broken tooltip. Mirrors v1.\n */\nexport function mapBubbleTooltipRow(\n data: ChartTooltipDataRow[]\n): BubbleChartTooltipRow | null {\n const row = data[0] as BubbleChartTooltipRow | undefined;\n if (row?.name == null || row?.seriesIndex == null) return null;\n return row;\n}\n\nexport function buildBubbleChartOptions(\n props: BubbleChartProps\n): SeedsChartOptions {\n const hasOnClick = Boolean(props.onClick);\n const base = buildBaseChartOptions({\n type: \"packedbubble\",\n description: props.accessibility.description,\n svgContainerLabel: props.accessibility.svgContainerLabel,\n ...(hasOnClick\n ? {\n point: {\n descriptionFormatter:\n props.accessibility.point?.descriptionFormatter ??\n defaultPointDescriptionFormatter,\n },\n }\n : {}),\n });\n\n return {\n ...base,\n chart: {\n ...base.chart,\n type: \"packedbubble\",\n height: props.height ?? BUBBLE_CHART_HEIGHT,\n },\n plotOptions: {\n packedbubble: {\n minSize: \"30%\",\n maxSize: props.maxBubbleSize ?? BUBBLE_CHART_DEFAULT_MAX_SIZE,\n draggable: false,\n states: { hover: { enabled: false } },\n layoutAlgorithm: {\n gravitationalConstant: 0.05,\n seriesInteraction: true,\n parentNodeLimit: true,\n enableSimulation: false,\n bubblePadding: props.bubblePadding ?? BUBBLE_CHART_DEFAULT_PADDING,\n splitSeries: props.splitSeries ?? false,\n },\n dataLabels: {\n enabled: true,\n // See chartBase.tsx's SeedsChartPackedBubblePlotOptions.dataLabels —\n // the label formatter returns HTML (icon + wrapped text); preserved\n // for functional parity (known useHTML gap, mirrors bar's axis\n // labels).\n useHTML: true,\n formatter(this: SeedsChartBubbleDataLabelFormatterContext) {\n const inner =\n props.data[this.point.series.index]?.innerBubbles[\n this.point.index\n ];\n return buildBubbleDataLabel(\n { name: this.point.name, icon: inner?.icon },\n this.radius\n );\n },\n },\n accessibility: {\n enabled: true,\n keyboardNavigation: { enabled: true },\n point: { valueDescriptionFormat: \"{point.name}: {point.value}\" },\n },\n point: {\n events: {\n click: hasOnClick\n ? (event: SeedsChartBubbleClickEvent) => {\n event.stopPropagation?.();\n // Keyboard events have no `target` when not a genuine click.\n if (event.type !== \"click\" && !event.target) return;\n props.onClick!(transformBubbleClickData(event));\n }\n : undefined,\n mouseOver: props.onMouseEnter\n ? function (this: { name: string }) {\n props.onMouseEnter!({ position: this.name });\n }\n : undefined,\n mouseOut: props.onMouseLeave\n ? function (this: { name: string }) {\n props.onMouseLeave!({ position: this.name });\n }\n : undefined,\n },\n },\n },\n },\n series: transformBubbleDataToSeries(props.data),\n };\n}\n"]}
@@ -20,5 +20,7 @@ declare const BUBBLE_CHART_HEIGHT = 600;
20
20
  declare const defaultBubbleChartWidth = 600;
21
21
  declare const BUBBLE_CHART_DEFAULT_PADDING = 16;
22
22
  declare const BUBBLE_CHART_DEFAULT_MAX_SIZE = "100%";
23
+ /** Also sets the cloud's aspect ratio — a wider/shorter box biases the silhouette wide, a narrower/taller one biases it tall. */
24
+ declare const WORD_CLOUD_CHART_HEIGHT = 400;
23
25
 
24
- export { BUBBLE_CHART_DEFAULT_MAX_SIZE as B, DONUT_CHART_HALO_SIZE as D, TIME_SERIES_CHART_HEIGHT as T, VERTICAL_BAR_CHART_DEFAULT_SERIES_LIMIT as V, BUBBLE_CHART_DEFAULT_PADDING as a, BUBBLE_CHART_HEIGHT as b, DONUT_CHART_HEIGHT as c, DONUT_CHART_WIDTH as d, areaChartOptions as e, baseChartOptions as f, columnChartOptions as g, defaultBubbleChartWidth as h, donutChartOptions as i, lineChartOptions as l, timeSeriesChartOptions as t };
26
+ export { BUBBLE_CHART_DEFAULT_MAX_SIZE as B, DONUT_CHART_HALO_SIZE as D, TIME_SERIES_CHART_HEIGHT as T, VERTICAL_BAR_CHART_DEFAULT_SERIES_LIMIT as V, WORD_CLOUD_CHART_HEIGHT as W, BUBBLE_CHART_DEFAULT_PADDING as a, BUBBLE_CHART_HEIGHT as b, DONUT_CHART_HEIGHT as c, DONUT_CHART_WIDTH as d, areaChartOptions as e, baseChartOptions as f, columnChartOptions as g, defaultBubbleChartWidth as h, donutChartOptions as i, lineChartOptions as l, timeSeriesChartOptions as t };
@@ -20,5 +20,7 @@ declare const BUBBLE_CHART_HEIGHT = 600;
20
20
  declare const defaultBubbleChartWidth = 600;
21
21
  declare const BUBBLE_CHART_DEFAULT_PADDING = 16;
22
22
  declare const BUBBLE_CHART_DEFAULT_MAX_SIZE = "100%";
23
+ /** Also sets the cloud's aspect ratio — a wider/shorter box biases the silhouette wide, a narrower/taller one biases it tall. */
24
+ declare const WORD_CLOUD_CHART_HEIGHT = 400;
23
25
 
24
- export { BUBBLE_CHART_DEFAULT_MAX_SIZE as B, DONUT_CHART_HALO_SIZE as D, TIME_SERIES_CHART_HEIGHT as T, VERTICAL_BAR_CHART_DEFAULT_SERIES_LIMIT as V, BUBBLE_CHART_DEFAULT_PADDING as a, BUBBLE_CHART_HEIGHT as b, DONUT_CHART_HEIGHT as c, DONUT_CHART_WIDTH as d, areaChartOptions as e, baseChartOptions as f, columnChartOptions as g, defaultBubbleChartWidth as h, donutChartOptions as i, lineChartOptions as l, timeSeriesChartOptions as t };
26
+ export { BUBBLE_CHART_DEFAULT_MAX_SIZE as B, DONUT_CHART_HALO_SIZE as D, TIME_SERIES_CHART_HEIGHT as T, VERTICAL_BAR_CHART_DEFAULT_SERIES_LIMIT as V, WORD_CLOUD_CHART_HEIGHT as W, BUBBLE_CHART_DEFAULT_PADDING as a, BUBBLE_CHART_HEIGHT as b, DONUT_CHART_HEIGHT as c, DONUT_CHART_WIDTH as d, areaChartOptions as e, baseChartOptions as f, columnChartOptions as g, defaultBubbleChartWidth as h, donutChartOptions as i, lineChartOptions as l, timeSeriesChartOptions as t };
package/dist/charts.css CHANGED
@@ -695,3 +695,83 @@
695
695
  .highcharts-background:hover {
696
696
  fill: var(--color-button-pill-bg-hover);
697
697
  }
698
+
699
+ /**
700
+ * Seeds WordCloud family styles.
701
+ *
702
+ * The wordcloud-specific layer on top of the shared `chart-styles.css`
703
+ * foundation, implementing a three-layer opacity model:
704
+ *
705
+ * 1. Weight ramp — per-point `opacity` set once in the adapter's series
706
+ * data (wordcloud/adapter.ts), landing as an SVG
707
+ * presentation attribute (Highcharts' `WordcloudSeries`
708
+ * applies it with no styledMode guard).
709
+ * 2. Group dim — below. Gated on the wrapper's `data-active-group-index`
710
+ * attribute (set from `activeGroupId`, resolved against
711
+ * `groups`), scoped per adapter-assigned
712
+ * `.seeds-wordcloud-word--group-{n}` class.
713
+ * 3. Hover — below. Highcharts' native `.highcharts-point-hover`/
714
+ * `.highcharts-point-inactive`, inherited from
715
+ * ColumnSeries state handling.
716
+ *
717
+ * All three layers write the CSS `opacity` *property*, never `fill-opacity`:
718
+ * a presentation attribute (layer 1) resolves in the author origin at
719
+ * specificity 0, so any author `opacity` declaration here replaces it
720
+ * outright rather than multiplying with it. This matches `donut/donut.css`'s
721
+ * existing opacity-property dimming.
722
+ *
723
+ * Layers 2 and 3 can coexist (hovering a word while `activeGroupId` is set),
724
+ * and layer 3 must always win. The layer 2 rules below exclude
725
+ * `.highcharts-point-hover`/`.highcharts-point-inactive` from their selector
726
+ * for exactly this: the moment any point is hovered, every point in the
727
+ * series carries one of those two classes (`inactiveOtherPoints: true`), so
728
+ * layer 2 stops matching anything and layer 3 takes over completely, with no
729
+ * `!important` needed.
730
+ *
731
+ * Consumers import BOTH stylesheets once (the component never self-imports):
732
+ *
733
+ * import "@sproutsocial/seeds-react-data-viz/chart-styles.css";
734
+ * import "@sproutsocial/seeds-react-data-viz/wordcloud.css";
735
+ */
736
+
737
+ /* Layer 3: hover. The hovered word lifts to full opacity; every other word
738
+ drops to a flat 0.6, discarding its own weight-ramp value for the
739
+ duration of the hover. */
740
+ .seeds-chart-wordcloud .highcharts-point-hover {
741
+ opacity: 1;
742
+ transition: opacity 0s;
743
+ }
744
+
745
+ .seeds-chart-wordcloud .highcharts-point-inactive {
746
+ opacity: 0.6;
747
+ transition: opacity 0s;
748
+ }
749
+
750
+ /* Layer 2: group dim. Only active when the wrapper sets
751
+ `data-active-group-index` (a resolved `activeGroupId`); bounded by the DS
752
+ data-viz palette length (20 slots — chart-styles.css's --highcharts-color-0
753
+ through -19). Excludes hover-state classes so layer 3 always wins during a
754
+ hover (see the file header). One shared declaration: every group index
755
+ dims to the same 0.4, only the selector differs. */
756
+ .seeds-chart-wordcloud[data-active-group-index]:not([data-active-group-index="0"]) .seeds-wordcloud-word--group-0:not(.highcharts-point-hover):not(.highcharts-point-inactive),
757
+ .seeds-chart-wordcloud[data-active-group-index]:not([data-active-group-index="1"]) .seeds-wordcloud-word--group-1:not(.highcharts-point-hover):not(.highcharts-point-inactive),
758
+ .seeds-chart-wordcloud[data-active-group-index]:not([data-active-group-index="2"]) .seeds-wordcloud-word--group-2:not(.highcharts-point-hover):not(.highcharts-point-inactive),
759
+ .seeds-chart-wordcloud[data-active-group-index]:not([data-active-group-index="3"]) .seeds-wordcloud-word--group-3:not(.highcharts-point-hover):not(.highcharts-point-inactive),
760
+ .seeds-chart-wordcloud[data-active-group-index]:not([data-active-group-index="4"]) .seeds-wordcloud-word--group-4:not(.highcharts-point-hover):not(.highcharts-point-inactive),
761
+ .seeds-chart-wordcloud[data-active-group-index]:not([data-active-group-index="5"]) .seeds-wordcloud-word--group-5:not(.highcharts-point-hover):not(.highcharts-point-inactive),
762
+ .seeds-chart-wordcloud[data-active-group-index]:not([data-active-group-index="6"]) .seeds-wordcloud-word--group-6:not(.highcharts-point-hover):not(.highcharts-point-inactive),
763
+ .seeds-chart-wordcloud[data-active-group-index]:not([data-active-group-index="7"]) .seeds-wordcloud-word--group-7:not(.highcharts-point-hover):not(.highcharts-point-inactive),
764
+ .seeds-chart-wordcloud[data-active-group-index]:not([data-active-group-index="8"]) .seeds-wordcloud-word--group-8:not(.highcharts-point-hover):not(.highcharts-point-inactive),
765
+ .seeds-chart-wordcloud[data-active-group-index]:not([data-active-group-index="9"]) .seeds-wordcloud-word--group-9:not(.highcharts-point-hover):not(.highcharts-point-inactive),
766
+ .seeds-chart-wordcloud[data-active-group-index]:not([data-active-group-index="10"]) .seeds-wordcloud-word--group-10:not(.highcharts-point-hover):not(.highcharts-point-inactive),
767
+ .seeds-chart-wordcloud[data-active-group-index]:not([data-active-group-index="11"]) .seeds-wordcloud-word--group-11:not(.highcharts-point-hover):not(.highcharts-point-inactive),
768
+ .seeds-chart-wordcloud[data-active-group-index]:not([data-active-group-index="12"]) .seeds-wordcloud-word--group-12:not(.highcharts-point-hover):not(.highcharts-point-inactive),
769
+ .seeds-chart-wordcloud[data-active-group-index]:not([data-active-group-index="13"]) .seeds-wordcloud-word--group-13:not(.highcharts-point-hover):not(.highcharts-point-inactive),
770
+ .seeds-chart-wordcloud[data-active-group-index]:not([data-active-group-index="14"]) .seeds-wordcloud-word--group-14:not(.highcharts-point-hover):not(.highcharts-point-inactive),
771
+ .seeds-chart-wordcloud[data-active-group-index]:not([data-active-group-index="15"]) .seeds-wordcloud-word--group-15:not(.highcharts-point-hover):not(.highcharts-point-inactive),
772
+ .seeds-chart-wordcloud[data-active-group-index]:not([data-active-group-index="16"]) .seeds-wordcloud-word--group-16:not(.highcharts-point-hover):not(.highcharts-point-inactive),
773
+ .seeds-chart-wordcloud[data-active-group-index]:not([data-active-group-index="17"]) .seeds-wordcloud-word--group-17:not(.highcharts-point-hover):not(.highcharts-point-inactive),
774
+ .seeds-chart-wordcloud[data-active-group-index]:not([data-active-group-index="18"]) .seeds-wordcloud-word--group-18:not(.highcharts-point-hover):not(.highcharts-point-inactive),
775
+ .seeds-chart-wordcloud[data-active-group-index]:not([data-active-group-index="19"]) .seeds-wordcloud-word--group-19:not(.highcharts-point-hover):not(.highcharts-point-inactive) {
776
+ opacity: 0.4;
777
+ }
@@ -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 _chunk5JQXDK23js = require('./chunk-5JQXDK23.js');
3
+ var _chunkTNZNBMSZjs = require('./chunk-TNZNBMSZ.js');
4
4
 
5
5
  // src/charts/shared/axisOptions.ts
6
6
  function makeDatetimeAxisLabelFormatter(timezone, timeFormat) {
7
7
  return function() {
8
- const { primary, secondary } = _chunk5JQXDK23js.datetimeFormatter.call(void 0, {
8
+ const { primary, secondary } = _chunkTNZNBMSZjs.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-LKUL4EFZ.js.map
56
+ //# sourceMappingURL=chunk-2A3KLUIF.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/_work/seeds/seeds/seeds-react/seeds-react-data-viz/dist/chunk-LKUL4EFZ.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,EAAwD;AAC7D,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-LKUL4EFZ.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 { DimensionalAxis } from \"./axis\";\nimport type {\n ChartTooltipProps,\n SeedsAxisLabelFormatterContext,\n SeedsChartXAxisOptions,\n} from \"./chartBase\";\nimport { datetimeFormatter } from \"./formatters/datetimeFormatter\";\nimport type { DatetimeTimeFormat } 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: DatetimeTimeFormat | undefined\n) {\n return function (this: SeedsAxisLabelFormatterContext): 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: DimensionalAxis,\n timezone: string\n): SeedsChartXAxisOptions {\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: DimensionalAxis,\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 ChartTooltipOptionsInput = Readonly<{\n xAxis?: DimensionalAxis;\n timezone?: string;\n}>;\n\n/**\n * The tooltip's datetime-derived options as one object, so the resolver output\n * and the `ChartTooltipProps` 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 * `ChartTooltipProps` and this `Pick`, and the compiler keeps them aligned.\n */\nexport function resolveTooltipOptions(\n input: ChartTooltipOptionsInput\n): Pick<ChartTooltipProps, \"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"]}
1
+ {"version":3,"sources":["/home/runner/_work/seeds/seeds/seeds-react/seeds-react-data-viz/dist/chunk-2A3KLUIF.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,EAAwD;AAC7D,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-2A3KLUIF.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 { DimensionalAxis } from \"./axis\";\nimport type {\n ChartTooltipProps,\n SeedsAxisLabelFormatterContext,\n SeedsChartXAxisOptions,\n} from \"./chartBase\";\nimport { datetimeFormatter } from \"./formatters/datetimeFormatter\";\nimport type { DatetimeTimeFormat } 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: DatetimeTimeFormat | undefined\n) {\n return function (this: SeedsAxisLabelFormatterContext): 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: DimensionalAxis,\n timezone: string\n): SeedsChartXAxisOptions {\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: DimensionalAxis,\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 ChartTooltipOptionsInput = Readonly<{\n xAxis?: DimensionalAxis;\n timezone?: string;\n}>;\n\n/**\n * The tooltip's datetime-derived options as one object, so the resolver output\n * and the `ChartTooltipProps` 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 * `ChartTooltipProps` and this `Pick`, and the compiler keeps them aligned.\n */\nexport function resolveTooltipOptions(\n input: ChartTooltipOptionsInput\n): Pick<ChartTooltipProps, \"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"]}
@@ -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 _chunk5JQXDK23js = require('./chunk-5JQXDK23.js');
3
+ var _chunkTNZNBMSZjs = require('./chunk-TNZNBMSZ.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 _chunk5JQXDK23js.valueFormatter.call(void 0, { ...format, value: numberValue, abbreviate });
59
+ return _chunkTNZNBMSZjs.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-GHZHRFE6.js.map
68
+ //# sourceMappingURL=chunk-CWKFNAXF.js.map