@sproutsocial/seeds-react-data-viz 0.25.1 → 0.26.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/bar/index.js +10 -10
  2. package/dist/bubble/index.js +4 -4
  3. package/dist/charts.css +139 -12
  4. package/dist/{chunk-2A3KLUIF.js → chunk-BRIU5SPJ.js} +3 -3
  5. package/dist/{chunk-2A3KLUIF.js.map → chunk-BRIU5SPJ.js.map} +1 -1
  6. package/dist/{chunk-TNZNBMSZ.js → chunk-NU2RCATK.js} +95 -47
  7. package/dist/chunk-NU2RCATK.js.map +1 -0
  8. package/dist/{chunk-CWKFNAXF.js → chunk-PIZ4MT2B.js} +3 -3
  9. package/dist/{chunk-CWKFNAXF.js.map → chunk-PIZ4MT2B.js.map} +1 -1
  10. package/dist/donut/index.js +4 -4
  11. package/dist/esm/bar/index.js +3 -3
  12. package/dist/esm/bubble/index.js +1 -1
  13. package/dist/esm/{chunk-AJGRGRI6.js → chunk-GHP4TT7H.js} +2 -2
  14. package/dist/esm/{chunk-CIG5NERD.js → chunk-OZ7SPMTQ.js} +2 -2
  15. package/dist/esm/{chunk-V63L6753.js → chunk-XEFCGFCF.js} +69 -21
  16. package/dist/esm/chunk-XEFCGFCF.js.map +1 -0
  17. package/dist/esm/donut/index.js +1 -1
  18. package/dist/esm/line-area/index.js +3 -3
  19. package/dist/esm/sparkline/index.js +2 -2
  20. package/dist/esm/wordcloud/index.js +32 -4
  21. package/dist/esm/wordcloud/index.js.map +1 -1
  22. package/dist/line-area/index.js +10 -10
  23. package/dist/sparkline/index.js +6 -6
  24. package/dist/wordcloud/index.d.mts +8 -1
  25. package/dist/wordcloud/index.d.ts +8 -1
  26. package/dist/wordcloud/index.js +40 -12
  27. package/dist/wordcloud/index.js.map +1 -1
  28. package/dist/wordcloud.css +138 -11
  29. package/package.json +1 -1
  30. package/dist/chunk-TNZNBMSZ.js.map +0 -1
  31. package/dist/esm/chunk-V63L6753.js.map +0 -1
  32. /package/dist/esm/{chunk-AJGRGRI6.js.map → chunk-GHP4TT7H.js.map} +0 -0
  33. /package/dist/esm/{chunk-CIG5NERD.js.map → chunk-OZ7SPMTQ.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/charts/wordcloud/WordCloud.tsx"],"sourcesContent":["import { memo, useMemo, useRef } from \"react\";\nimport { useMeasure } from \"@sproutsocial/seeds-react-hooks\";\nimport { useSeedsChartSetup, ChartRenderer } from \"../shared/chartBase\";\nimport { getChartContainerProps } from \"../shared/chartContainer\";\nimport {\n buildWordCloudOptions,\n deriveMaxFontSize,\n deriveMaxWordCount,\n deriveWordPadding,\n} from \"./adapter\";\nimport type { WordCloudGroup, WordCloudProps } from \"./types\";\n\n/**\n * Resolves `activeGroupId` to its index in `groups` for the container's\n * `data-active-group-index` attribute (layer 2 CSS dimming, wordcloud.css).\n * An unresolvable id (unknown, or no `groups`) is treated the same as\n * null/undefined — no dimming — rather than falling back to group 0, which\n * would incorrectly mark group 0 as \"active\" and dim everything else.\n */\nfunction resolveActiveGroupIndex(\n activeGroupId: string | null | undefined,\n groups: ReadonlyArray<WordCloudGroup> | undefined\n): number | undefined {\n if (activeGroupId == null || !groups?.length) return undefined;\n const index = groups.findIndex((group) => group.id === activeGroupId);\n return index === -1 ? undefined : index;\n}\n\n/**\n * WordCloud renders a Highcharts wordcloud chart from a flat list of weighted\n * words, optionally grouped (competitive coloring + externally-driven dimming\n * via `activeGroupId`).\n *\n * Like BubbleChart/DonutChart, it carries no `styled-components`: the wrapper\n * is a plain `<div>` and the Highcharts styling ships as static CSS. Consumers\n * import both `@sproutsocial/seeds-react-data-viz/chart-styles.css` and\n * `.../wordcloud.css` once (the component never self-imports its CSS).\n */\nexport const WordCloud = memo(function WordCloud(props: WordCloudProps) {\n // One \"series\" input per group (or a single default entry when ungrouped),\n // matching bubble/donut's convention: colorIndex slots map 1:1 to entries\n // here, so the resolved `colors` array sizes and resolves correctly for\n // both the live chart and the styledMode:false export clone.\n const { colors } = useSeedsChartSetup({\n series: props.groups?.length\n ? props.groups.map((group) => ({ color: group.color }))\n : [{ color: undefined }],\n });\n\n const containerRef = useRef<HTMLDivElement>(null);\n // `synchronous: true` reads the container's bounds before first paint\n // instead of waiting on ResizeObserver's own (always-async) first\n // callback — otherwise every derive* below sees a false `width: 0` on\n // mount and renders the widest-case guess before snapping to the real\n // layout a tick later (the flash this family shipped with through Slice\n // 8). An explicit `props.width` skips measurement entirely.\n const { width: measuredWidth } = useMeasure(containerRef, true);\n const width = props.width ?? measuredWidth;\n // These derived values, not raw `width`, drive the memo dependency below.\n // Each is a step function of width (`deriveMaxFontSize`/`deriveMaxWordCount`/\n // `deriveWordPadding` in adapter.ts), so a resize tick that lands in the\n // same bucket for all three — most of them, during a drag-resize — leaves\n // the dependency array unchanged and the options object keeps its identity\n // instead of forcing Highcharts to re-lay out the cloud on every\n // ResizeObserver callback.\n const derivedMaxFontSize = deriveMaxFontSize(width);\n const derivedMaxWordCount = deriveMaxWordCount(width);\n const derivedWordPadding = deriveWordPadding(width);\n const options = useMemo(\n () => buildWordCloudOptions(props, width),\n // eslint-disable-next-line react-hooks/exhaustive-deps -- `width` is intentionally excluded; see the comment above `derivedMaxFontSize`.\n [props, derivedMaxFontSize, derivedMaxWordCount, derivedWordPadding]\n );\n const activeGroupIndex = resolveActiveGroupIndex(\n props.activeGroupId,\n props.groups\n );\n\n const containerProps = getChartContainerProps({\n familyClasses: [\"seeds-chart-wordcloud\"],\n // RAW per-group colors only — an unset group falls through to\n // chart-styles.css's --highcharts-color-N default, matching the\n // bubble/bar convention. Only an explicit consumer override is inlined.\n colors: props.groups?.map((group) => group.color) ?? [],\n hasOnClick: Boolean(props.onClick),\n className: props.className,\n });\n\n return (\n <div\n ref={containerRef}\n {...containerProps}\n {...(activeGroupIndex !== undefined\n ? { \"data-active-group-index\": activeGroupIndex }\n : {})}\n >\n {\n // Gate the chart's one-and-only real mount on a genuinely measured\n // width. This container `<div>` still always renders (measuring it\n // is what produces `measuredWidth` in the first place) — but a\n // `width` of 0 means \"no room to lay out yet,\" not \"assume the\n // widest case,\" so nothing else renders until it's positive. This\n // is also what makes Highcharts' native center-burst entrance\n // animation (plotOptions.wordcloud.animation, above) fire on first\n // paint: `chart.hasRendered` never gets set by a wrong-then-corrected\n // double render.\n width > 0 && (\n <ChartRenderer\n options={options}\n // A single Highcharts series (all words), so a single entry here —\n // its only job is satisfying ChartRenderer's non-empty-series check,\n // since hideLegend suppresses the legend this would otherwise feed.\n series={options.series?.length ? [{ name: \"Word Cloud\" }] : []}\n colors={colors}\n hideLegend\n onReady={props.onReady}\n />\n )\n }\n </div>\n );\n});\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAAS,MAAM,SAAS,cAAc;AACtC,SAAS,kBAAkB;AA0GjB;AAxFV,SAAS,wBACP,eACA,QACoB;AACpB,MAAI,iBAAiB,QAAQ,CAAC,QAAQ,OAAQ,QAAO;AACrD,QAAM,QAAQ,OAAO,UAAU,CAAC,UAAU,MAAM,OAAO,aAAa;AACpE,SAAO,UAAU,KAAK,SAAY;AACpC;AAYO,IAAM,YAAY,KAAK,SAASA,WAAU,OAAuB;AAKtE,QAAM,EAAE,OAAO,IAAI,mBAAmB;AAAA,IACpC,QAAQ,MAAM,QAAQ,SAClB,MAAM,OAAO,IAAI,CAAC,WAAW,EAAE,OAAO,MAAM,MAAM,EAAE,IACpD,CAAC,EAAE,OAAO,OAAU,CAAC;AAAA,EAC3B,CAAC;AAED,QAAM,eAAe,OAAuB,IAAI;AAOhD,QAAM,EAAE,OAAO,cAAc,IAAI,WAAW,cAAc,IAAI;AAC9D,QAAM,QAAQ,MAAM,SAAS;AAQ7B,QAAM,qBAAqB,kBAAkB,KAAK;AAClD,QAAM,sBAAsB,mBAAmB,KAAK;AACpD,QAAM,qBAAqB,kBAAkB,KAAK;AAClD,QAAM,UAAU;AAAA,IACd,MAAM,sBAAsB,OAAO,KAAK;AAAA;AAAA,IAExC,CAAC,OAAO,oBAAoB,qBAAqB,kBAAkB;AAAA,EACrE;AACA,QAAM,mBAAmB;AAAA,IACvB,MAAM;AAAA,IACN,MAAM;AAAA,EACR;AAEA,QAAM,iBAAiB,uBAAuB;AAAA,IAC5C,eAAe,CAAC,uBAAuB;AAAA;AAAA;AAAA;AAAA,IAIvC,QAAQ,MAAM,QAAQ,IAAI,CAAC,UAAU,MAAM,KAAK,KAAK,CAAC;AAAA,IACtD,YAAY,QAAQ,MAAM,OAAO;AAAA,IACjC,WAAW,MAAM;AAAA,EACnB,CAAC;AAED,SACE;AAAA,IAAC;AAAA;AAAA,MACC,KAAK;AAAA,MACJ,GAAG;AAAA,MACH,GAAI,qBAAqB,SACtB,EAAE,2BAA2B,iBAAiB,IAC9C,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAYH,kBAAQ,KACN;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UAIA,QAAQ,QAAQ,QAAQ,SAAS,CAAC,EAAE,MAAM,aAAa,CAAC,IAAI,CAAC;AAAA,UAC7D;AAAA,UACA,YAAU;AAAA,UACV,SAAS,MAAM;AAAA;AAAA,MACjB;AAAA;AAAA,EAGN;AAEJ,CAAC;","names":["WordCloud"]}
1
+ {"version":3,"sources":["../../../src/charts/wordcloud/WordCloud.tsx"],"sourcesContent":["import { memo, useMemo, useRef } from \"react\";\nimport { useMeasure } from \"@sproutsocial/seeds-react-hooks\";\nimport { useSeedsChartSetup, ChartRenderer } from \"../shared/chartBase\";\nimport { getChartContainerProps } from \"../shared/chartContainer\";\nimport {\n buildWordCloudOptions,\n deriveMaxFontSize,\n deriveMaxWordCount,\n deriveWordPadding,\n} from \"./adapter\";\nimport type {\n SeedsChartWordCloudSeriesOptions,\n WordCloudGroup,\n WordCloudProps,\n} from \"./types\";\n\n/**\n * Resolves `activeGroupId` to its index in `groups` for the container's\n * `data-active-group-index` attribute (layer 2 CSS dimming, wordcloud.css).\n * An unresolvable id (unknown, or no `groups`) is treated the same as\n * null/undefined — no dimming — rather than falling back to group 0, which\n * would incorrectly mark group 0 as \"active\" and dim everything else.\n */\nfunction resolveActiveGroupIndex(\n activeGroupId: string | null | undefined,\n groups: ReadonlyArray<WordCloudGroup> | undefined\n): number | undefined {\n if (activeGroupId == null || !groups?.length) return undefined;\n const index = groups.findIndex((group) => group.id === activeGroupId);\n return index === -1 ? undefined : index;\n}\n\n/**\n * Resolves `activeNames` to the rendered indices of matching points, for the\n * container's `data-active-word-indices` attribute. Reads `points` off the\n * already-built options (not a fresh transform) so indices match what's\n * actually on screen, including `allocateWordsAcrossGroups`'s reordering.\n * Names are unbounded, unlike `activeGroupId`'s small `groups` list, so this\n * keys off each point's bounded position instead — see wordcloud.css's\n * `--index-N` rules (bounded by `WORD_CLOUD_MAXIMUM_WORD_COUNT`).\n */\nfunction resolveActiveWordIndices(\n activeNames: ReadonlyArray<string> | null | undefined,\n points: ReadonlyArray<{ name: string }> | undefined\n): ReadonlyArray<number> | undefined {\n if (!activeNames?.length || !points?.length) return undefined;\n const activeSet = new Set(activeNames);\n const indices = points\n .map((point, i) => (activeSet.has(point.name) ? i : -1))\n .filter((i) => i !== -1);\n return indices.length ? indices : undefined;\n}\n\n/**\n * WordCloud renders a Highcharts wordcloud chart from a flat list of weighted\n * words, optionally grouped (competitive coloring + externally-driven dimming\n * via `activeGroupId` or `activeNames`).\n *\n * Like BubbleChart/DonutChart, it carries no `styled-components`: the wrapper\n * is a plain `<div>` and the Highcharts styling ships as static CSS. Consumers\n * import both `@sproutsocial/seeds-react-data-viz/chart-styles.css` and\n * `.../wordcloud.css` once (the component never self-imports its CSS).\n */\nexport const WordCloud = memo(function WordCloud(props: WordCloudProps) {\n // One \"series\" input per group (or a single default entry when ungrouped),\n // matching bubble/donut's convention: colorIndex slots map 1:1 to entries\n // here, so the resolved `colors` array sizes and resolves correctly for\n // both the live chart and the styledMode:false export clone.\n const { colors } = useSeedsChartSetup({\n series: props.groups?.length\n ? props.groups.map((group) => ({ color: group.color }))\n : [{ color: undefined }],\n });\n\n const containerRef = useRef<HTMLDivElement>(null);\n // `synchronous: true` reads the container's bounds before first paint\n // instead of waiting on ResizeObserver's own (always-async) first\n // callback — otherwise every derive* below sees a false `width: 0` on\n // mount and renders the widest-case guess before snapping to the real\n // layout a tick later (the flash this family shipped with through Slice\n // 8). An explicit `props.width` skips measurement entirely.\n const { width: measuredWidth } = useMeasure(containerRef, true);\n const width = props.width ?? measuredWidth;\n // These derived values, not raw `width`, drive the memo dependency below.\n // Each is a step function of width (`deriveMaxFontSize`/`deriveMaxWordCount`/\n // `deriveWordPadding` in adapter.ts), so a resize tick that lands in the\n // same bucket for all three — most of them, during a drag-resize — leaves\n // the dependency array unchanged and the options object keeps its identity\n // instead of forcing Highcharts to re-lay out the cloud on every\n // ResizeObserver callback.\n const derivedMaxFontSize = deriveMaxFontSize(width);\n const derivedMaxWordCount = deriveMaxWordCount(width);\n const derivedWordPadding = deriveWordPadding(width);\n // Whether `activeNames` is supplied at all, not its current null/array\n // value — see `buildWordCloudOptions`'s `hasActiveNames` doc comment.\n // Stable across hover transitions, so it's safe in the memo deps below.\n const hasActiveNames = props.activeNames !== undefined;\n const options = useMemo(\n () => buildWordCloudOptions(props, width, hasActiveNames),\n // eslint-disable-next-line react-hooks/exhaustive-deps -- `width` excluded (see above); the rest is only what `buildWordCloudOptions` reads, not `props` wholesale, so an activeGroupId/activeNames/className/onReady change doesn't rebuild this.\n [\n props.data,\n props.groups,\n props.opacityRange,\n props.description,\n props.height,\n props.minFontSize,\n props.maxFontSize,\n props.wordPadding,\n props.onClick,\n props.onWordHover,\n hasActiveNames,\n derivedMaxFontSize,\n derivedMaxWordCount,\n derivedWordPadding,\n ]\n );\n const activeGroupIndex = resolveActiveGroupIndex(\n props.activeGroupId,\n props.groups\n );\n const renderedPoints = (\n options.series?.[0] as SeedsChartWordCloudSeriesOptions | undefined\n )?.data;\n const activeWordIndices = resolveActiveWordIndices(\n props.activeNames,\n renderedPoints\n );\n\n const containerProps = getChartContainerProps({\n familyClasses: [\"seeds-chart-wordcloud\"],\n // RAW per-group colors only — an unset group falls through to\n // chart-styles.css's --highcharts-color-N default, matching the\n // bubble/bar convention. Only an explicit consumer override is inlined.\n colors: props.groups?.map((group) => group.color) ?? [],\n hasOnClick: Boolean(props.onClick),\n className: props.className,\n });\n\n return (\n <div\n ref={containerRef}\n {...containerProps}\n {...(activeGroupIndex !== undefined\n ? { \"data-active-group-index\": activeGroupIndex }\n : {})}\n {...(activeWordIndices !== undefined\n ? { \"data-active-word-indices\": activeWordIndices.join(\" \") }\n : {})}\n >\n {\n // Gate the chart's one-and-only real mount on a genuinely measured\n // width. This container `<div>` still always renders (measuring it\n // is what produces `measuredWidth` in the first place) — but a\n // `width` of 0 means \"no room to lay out yet,\" not \"assume the\n // widest case,\" so nothing else renders until it's positive. This\n // is also what makes Highcharts' native center-burst entrance\n // animation (plotOptions.wordcloud.animation, above) fire on first\n // paint: `chart.hasRendered` never gets set by a wrong-then-corrected\n // double render.\n width > 0 && (\n <ChartRenderer\n options={options}\n // A single Highcharts series (all words), so a single entry here —\n // its only job is satisfying ChartRenderer's non-empty-series check,\n // since hideLegend suppresses the legend this would otherwise feed.\n series={options.series?.length ? [{ name: \"Word Cloud\" }] : []}\n colors={colors}\n hideLegend\n onReady={props.onReady}\n />\n )\n }\n </div>\n );\n});\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAAS,MAAM,SAAS,cAAc;AACtC,SAAS,kBAAkB;AAgKjB;AA1IV,SAAS,wBACP,eACA,QACoB;AACpB,MAAI,iBAAiB,QAAQ,CAAC,QAAQ,OAAQ,QAAO;AACrD,QAAM,QAAQ,OAAO,UAAU,CAAC,UAAU,MAAM,OAAO,aAAa;AACpE,SAAO,UAAU,KAAK,SAAY;AACpC;AAWA,SAAS,yBACP,aACA,QACmC;AACnC,MAAI,CAAC,aAAa,UAAU,CAAC,QAAQ,OAAQ,QAAO;AACpD,QAAM,YAAY,IAAI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AA;AAAA,IAIvC,QAAQ,MAAM,QAAQ,IAAI,CAAC,UAAU,MAAM,KAAK,KAAK,CAAC;AAAA,IACtD,YAAY,QAAQ,MAAM,OAAO;AAAA,IACjC,WAAW,MAAM;AAAA,EACnB,CAAC;AAED,SACE;AAAA,IAAC;AAAA;AAAA,MACC,KAAK;AAAA,MACJ,GAAG;AAAA,MACH,GAAI,qBAAqB,SACtB,EAAE,2BAA2B,iBAAiB,IAC9C,CAAC;AAAA,MACJ,GAAI,sBAAsB,SACvB,EAAE,4BAA4B,kBAAkB,KAAK,GAAG,EAAE,IAC1D,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAYH,kBAAQ,KACN;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UAIA,QAAQ,QAAQ,QAAQ,SAAS,CAAC,EAAE,MAAM,aAAa,CAAC,IAAI,CAAC;AAAA,UAC7D;AAAA,UACA,YAAU;AAAA,UACV,SAAS,MAAM;AAAA;AAAA,MACjB;AAAA;AAAA,EAGN;AAEJ,CAAC;","names":["WordCloud"]}
@@ -2,11 +2,11 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkCWKFNAXFjs = require('../chunk-CWKFNAXF.js');
5
+ var _chunkPIZ4MT2Bjs = require('../chunk-PIZ4MT2B.js');
6
6
 
7
7
 
8
8
 
9
- var _chunk2A3KLUIFjs = require('../chunk-2A3KLUIF.js');
9
+ var _chunkBRIU5SPJjs = require('../chunk-BRIU5SPJ.js');
10
10
 
11
11
 
12
12
  var _chunk6EIJCJCNjs = require('../chunk-6EIJCJCN.js');
@@ -14,7 +14,7 @@ var _chunk6EIJCJCNjs = require('../chunk-6EIJCJCN.js');
14
14
 
15
15
 
16
16
 
17
- var _chunkTNZNBMSZjs = require('../chunk-TNZNBMSZ.js');
17
+ var _chunkNU2RCATKjs = require('../chunk-NU2RCATK.js');
18
18
 
19
19
 
20
20
  var _chunkLWDHU4QKjs = require('../chunk-LWDHU4QK.js');
@@ -44,12 +44,12 @@ function withIsolatedPointMarkers(data) {
44
44
  });
45
45
  }
46
46
  function buildLineAreaChartOptions(props) {
47
- const tooltipOptions = _chunk2A3KLUIFjs.resolveTooltipOptions.call(void 0, props);
47
+ const tooltipOptions = _chunkBRIU5SPJjs.resolveTooltipOptions.call(void 0, props);
48
48
  const isStacked = AREA_VARIANTS.has(props.variant) && Boolean(props.stacking);
49
- const { annotations, lookup: annotationLookup } = _chunkCWKFNAXFjs.buildAnnotationConfig.call(void 0,
49
+ const { annotations, lookup: annotationLookup } = _chunkPIZ4MT2Bjs.buildAnnotationConfig.call(void 0,
50
50
  props.annotations
51
51
  );
52
- const base = _chunkTNZNBMSZjs.buildBaseChartOptions.call(void 0, {
52
+ const base = _chunkNU2RCATKjs.buildBaseChartOptions.call(void 0, {
53
53
  type: props.variant,
54
54
  description: props.description,
55
55
  reserveTopMargin: Boolean(annotations),
@@ -70,7 +70,7 @@ function buildLineAreaChartOptions(props) {
70
70
  // spacing ([10, 10, 15, 10]) shrinks the plot area.
71
71
  spacing: [5, 1, 0, 2]
72
72
  },
73
- xAxis: _chunk2A3KLUIFjs.buildDimensionalAxis.call(void 0, props.xAxis, _nullishCoalesce(tooltipOptions.timezone, () => ( "UTC"))),
73
+ xAxis: _chunkBRIU5SPJjs.buildDimensionalAxis.call(void 0, props.xAxis, _nullishCoalesce(tooltipOptions.timezone, () => ( "UTC"))),
74
74
  yAxis: {
75
75
  min: _optionalChain([props, 'access', _ => _.yAxis, 'optionalAccess', _2 => _2.min]),
76
76
  max: _optionalChain([props, 'access', _3 => _3.yAxis, 'optionalAccess', _4 => _4.max]),
@@ -88,7 +88,7 @@ function buildLineAreaChartOptions(props) {
88
88
  labels: {
89
89
  // A declarative `format` drives ticks through the shared valueFormatter;
90
90
  // absent it, the zero-config decimal default (1.20K / 1.20M / 1.20B).
91
- formatter: _optionalChain([props, 'access', _9 => _9.yAxis, 'optionalAccess', _10 => _10.format]) ? _chunkCWKFNAXFjs.makeValueAxisLabelFormatter.call(void 0, props.yAxis.format) : _chunkCWKFNAXFjs.defaultValueAxisLabelFormatter
91
+ formatter: _optionalChain([props, 'access', _9 => _9.yAxis, 'optionalAccess', _10 => _10.format]) ? _chunkPIZ4MT2Bjs.makeValueAxisLabelFormatter.call(void 0, props.yAxis.format) : _chunkPIZ4MT2Bjs.defaultValueAxisLabelFormatter
92
92
  }
93
93
  },
94
94
  plotOptions: {
@@ -131,7 +131,7 @@ function buildLineAreaChartOptions(props) {
131
131
  var _jsxruntime = require('react/jsx-runtime');
132
132
  var AREA_VARIANTS2 = /* @__PURE__ */ new Set(["area", "areaspline"]);
133
133
  var LineAreaChart = _react.memo.call(void 0, function LineAreaChart2(props) {
134
- const { colors, patterns } = _chunkTNZNBMSZjs.useSeedsChartSetup.call(void 0, {
134
+ const { colors, patterns } = _chunkNU2RCATKjs.useSeedsChartSetup.call(void 0, {
135
135
  series: props.series,
136
136
  includePatterns: true
137
137
  });
@@ -159,7 +159,7 @@ var LineAreaChart = _react.memo.call(void 0, function LineAreaChart2(props) {
159
159
  className: props.className
160
160
  }),
161
161
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
162
- _chunkTNZNBMSZjs.ChartRenderer,
162
+ _chunkNU2RCATKjs.ChartRenderer,
163
163
  {
164
164
  options,
165
165
  series: props.series,
@@ -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
3
 
4
- var _chunk2A3KLUIFjs = require('../chunk-2A3KLUIF.js');
4
+ var _chunkBRIU5SPJjs = require('../chunk-BRIU5SPJ.js');
5
5
 
6
6
 
7
7
 
8
- var _chunkTNZNBMSZjs = require('../chunk-TNZNBMSZ.js');
8
+ var _chunkNU2RCATKjs = require('../chunk-NU2RCATK.js');
9
9
  require('../chunk-LWDHU4QK.js');
10
10
 
11
11
  // src/charts/sparkline/SparklineChart.tsx
@@ -19,12 +19,12 @@ function highchartsType(variant) {
19
19
  var SPARKLINE_SERIES_NAME = "sparkline";
20
20
  function buildSparklineChartOptions(props) {
21
21
  const type = highchartsType(props.variant);
22
- const tooltipOptions = _chunk2A3KLUIFjs.resolveTooltipOptions.call(void 0, props);
22
+ const tooltipOptions = _chunkBRIU5SPJjs.resolveTooltipOptions.call(void 0, props);
23
23
  const xAxis = props.xAxis ? {
24
- ..._chunk2A3KLUIFjs.buildDimensionalAxis.call(void 0, props.xAxis, _nullishCoalesce(tooltipOptions.timezone, () => ( "UTC"))),
24
+ ..._chunkBRIU5SPJjs.buildDimensionalAxis.call(void 0, props.xAxis, _nullishCoalesce(tooltipOptions.timezone, () => ( "UTC"))),
25
25
  visible: false
26
26
  } : { type: "linear", visible: false };
27
- const base = _chunkTNZNBMSZjs.buildBaseChartOptions.call(void 0, {
27
+ const base = _chunkNU2RCATKjs.buildBaseChartOptions.call(void 0, {
28
28
  type,
29
29
  description: props.description,
30
30
  timezone: tooltipOptions.timezone
@@ -101,7 +101,7 @@ var SparklineChart = _react.memo.call(void 0, function SparklineChart2(props) {
101
101
  className,
102
102
  style: { "--seeds-sparkline-color": trendColor },
103
103
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
104
- _chunkTNZNBMSZjs.ChartRenderer,
104
+ _chunkNU2RCATKjs.ChartRenderer,
105
105
  {
106
106
  options,
107
107
  series: [{ name: SPARKLINE_SERIES_NAME, color: trendColor }],
@@ -31,6 +31,8 @@ interface WordCloudProps {
31
31
  groups?: Array<WordCloudGroup>;
32
32
  /** Dims every word outside this group. Null or undefined means no dimming. */
33
33
  activeGroupId?: string | null;
34
+ /** Raises every word whose name is in this set to full opacity and dims the rest — the consumer decides what belongs in the set (e.g. every word matching the hovered term's text). Null or undefined means no emphasis. */
35
+ activeNames?: ReadonlyArray<string> | null;
34
36
  minFontSize?: number;
35
37
  maxFontSize?: number;
36
38
  /** [min, max] weight-driven opacity ramp. Defaults to [0.6, 1]; pass [1, 1] to disable. */
@@ -44,13 +46,18 @@ interface WordCloudProps {
44
46
  description: string;
45
47
  className?: string;
46
48
  onClick?: (data: WordCloudClickData) => void;
49
+ /** Fires on pointer enter with the hovered word's name (and `groupId`, if grouped); `null` on pointer leave. */
50
+ onWordHover?: (data: {
51
+ name: string;
52
+ groupId?: string;
53
+ } | null) => void;
47
54
  onReady?: (handle: ChartExportHandle) => void;
48
55
  }
49
56
 
50
57
  /**
51
58
  * WordCloud renders a Highcharts wordcloud chart from a flat list of weighted
52
59
  * words, optionally grouped (competitive coloring + externally-driven dimming
53
- * via `activeGroupId`).
60
+ * via `activeGroupId` or `activeNames`).
54
61
  *
55
62
  * Like BubbleChart/DonutChart, it carries no `styled-components`: the wrapper
56
63
  * is a plain `<div>` and the Highcharts styling ships as static CSS. Consumers
@@ -31,6 +31,8 @@ interface WordCloudProps {
31
31
  groups?: Array<WordCloudGroup>;
32
32
  /** Dims every word outside this group. Null or undefined means no dimming. */
33
33
  activeGroupId?: string | null;
34
+ /** Raises every word whose name is in this set to full opacity and dims the rest — the consumer decides what belongs in the set (e.g. every word matching the hovered term's text). Null or undefined means no emphasis. */
35
+ activeNames?: ReadonlyArray<string> | null;
34
36
  minFontSize?: number;
35
37
  maxFontSize?: number;
36
38
  /** [min, max] weight-driven opacity ramp. Defaults to [0.6, 1]; pass [1, 1] to disable. */
@@ -44,13 +46,18 @@ interface WordCloudProps {
44
46
  description: string;
45
47
  className?: string;
46
48
  onClick?: (data: WordCloudClickData) => void;
49
+ /** Fires on pointer enter with the hovered word's name (and `groupId`, if grouped); `null` on pointer leave. */
50
+ onWordHover?: (data: {
51
+ name: string;
52
+ groupId?: string;
53
+ } | null) => void;
47
54
  onReady?: (handle: ChartExportHandle) => void;
48
55
  }
49
56
 
50
57
  /**
51
58
  * WordCloud renders a Highcharts wordcloud chart from a flat list of weighted
52
59
  * words, optionally grouped (competitive coloring + externally-driven dimming
53
- * via `activeGroupId`).
60
+ * via `activeGroupId` or `activeNames`).
54
61
  *
55
62
  * Like BubbleChart/DonutChart, it carries no `styled-components`: the wrapper
56
63
  * is a plain `<div>` and the Highcharts styling ships as static CSS. Consumers
@@ -8,7 +8,7 @@ var _chunk6EIJCJCNjs = require('../chunk-6EIJCJCN.js');
8
8
 
9
9
 
10
10
 
11
- var _chunkTNZNBMSZjs = require('../chunk-TNZNBMSZ.js');
11
+ var _chunkNU2RCATKjs = require('../chunk-NU2RCATK.js');
12
12
  require('../chunk-LWDHU4QK.js');
13
13
 
14
14
  // src/charts/wordcloud/WordCloud.tsx
@@ -20,31 +20,58 @@ function resolveActiveGroupIndex(activeGroupId, groups) {
20
20
  const index = groups.findIndex((group) => group.id === activeGroupId);
21
21
  return index === -1 ? void 0 : index;
22
22
  }
23
+ function resolveActiveWordIndices(activeNames, points) {
24
+ if (!_optionalChain([activeNames, 'optionalAccess', _2 => _2.length]) || !_optionalChain([points, 'optionalAccess', _3 => _3.length])) return void 0;
25
+ const activeSet = new Set(activeNames);
26
+ const indices = points.map((point, i) => activeSet.has(point.name) ? i : -1).filter((i) => i !== -1);
27
+ return indices.length ? indices : void 0;
28
+ }
23
29
  var WordCloud = _react.memo.call(void 0, function WordCloud2(props) {
24
- const { colors } = _chunkTNZNBMSZjs.useSeedsChartSetup.call(void 0, {
25
- series: _optionalChain([props, 'access', _2 => _2.groups, 'optionalAccess', _3 => _3.length]) ? props.groups.map((group) => ({ color: group.color })) : [{ color: void 0 }]
30
+ const { colors } = _chunkNU2RCATKjs.useSeedsChartSetup.call(void 0, {
31
+ series: _optionalChain([props, 'access', _4 => _4.groups, 'optionalAccess', _5 => _5.length]) ? props.groups.map((group) => ({ color: group.color })) : [{ color: void 0 }]
26
32
  });
27
33
  const containerRef = _react.useRef.call(void 0, null);
28
34
  const { width: measuredWidth } = _seedsreacthooks.useMeasure.call(void 0, containerRef, true);
29
35
  const width = _nullishCoalesce(props.width, () => ( measuredWidth));
30
- const derivedMaxFontSize = _chunkTNZNBMSZjs.deriveMaxFontSize.call(void 0, width);
31
- const derivedMaxWordCount = _chunkTNZNBMSZjs.deriveMaxWordCount.call(void 0, width);
32
- const derivedWordPadding = _chunkTNZNBMSZjs.deriveWordPadding.call(void 0, width);
36
+ const derivedMaxFontSize = _chunkNU2RCATKjs.deriveMaxFontSize.call(void 0, width);
37
+ const derivedMaxWordCount = _chunkNU2RCATKjs.deriveMaxWordCount.call(void 0, width);
38
+ const derivedWordPadding = _chunkNU2RCATKjs.deriveWordPadding.call(void 0, width);
39
+ const hasActiveNames = props.activeNames !== void 0;
33
40
  const options = _react.useMemo.call(void 0,
34
- () => _chunkTNZNBMSZjs.buildWordCloudOptions.call(void 0, props, width),
35
- // eslint-disable-next-line react-hooks/exhaustive-deps -- `width` is intentionally excluded; see the comment above `derivedMaxFontSize`.
36
- [props, derivedMaxFontSize, derivedMaxWordCount, derivedWordPadding]
41
+ () => _chunkNU2RCATKjs.buildWordCloudOptions.call(void 0, props, width, hasActiveNames),
42
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- `width` excluded (see above); the rest is only what `buildWordCloudOptions` reads, not `props` wholesale, so an activeGroupId/activeNames/className/onReady change doesn't rebuild this.
43
+ [
44
+ props.data,
45
+ props.groups,
46
+ props.opacityRange,
47
+ props.description,
48
+ props.height,
49
+ props.minFontSize,
50
+ props.maxFontSize,
51
+ props.wordPadding,
52
+ props.onClick,
53
+ props.onWordHover,
54
+ hasActiveNames,
55
+ derivedMaxFontSize,
56
+ derivedMaxWordCount,
57
+ derivedWordPadding
58
+ ]
37
59
  );
38
60
  const activeGroupIndex = resolveActiveGroupIndex(
39
61
  props.activeGroupId,
40
62
  props.groups
41
63
  );
64
+ const renderedPoints = _optionalChain([options, 'access', _6 => _6.series, 'optionalAccess', _7 => _7[0], 'optionalAccess', _8 => _8.data]);
65
+ const activeWordIndices = resolveActiveWordIndices(
66
+ props.activeNames,
67
+ renderedPoints
68
+ );
42
69
  const containerProps = _chunk6EIJCJCNjs.getChartContainerProps.call(void 0, {
43
70
  familyClasses: ["seeds-chart-wordcloud"],
44
71
  // RAW per-group colors only — an unset group falls through to
45
72
  // chart-styles.css's --highcharts-color-N default, matching the
46
73
  // bubble/bar convention. Only an explicit consumer override is inlined.
47
- colors: _nullishCoalesce(_optionalChain([props, 'access', _4 => _4.groups, 'optionalAccess', _5 => _5.map, 'call', _6 => _6((group) => group.color)]), () => ( [])),
74
+ colors: _nullishCoalesce(_optionalChain([props, 'access', _9 => _9.groups, 'optionalAccess', _10 => _10.map, 'call', _11 => _11((group) => group.color)]), () => ( [])),
48
75
  hasOnClick: Boolean(props.onClick),
49
76
  className: props.className
50
77
  });
@@ -54,6 +81,7 @@ var WordCloud = _react.memo.call(void 0, function WordCloud2(props) {
54
81
  ref: containerRef,
55
82
  ...containerProps,
56
83
  ...activeGroupIndex !== void 0 ? { "data-active-group-index": activeGroupIndex } : {},
84
+ ...activeWordIndices !== void 0 ? { "data-active-word-indices": activeWordIndices.join(" ") } : {},
57
85
  // Gate the chart's one-and-only real mount on a genuinely measured
58
86
  // width. This container `<div>` still always renders (measuring it
59
87
  // is what produces `measuredWidth` in the first place) — but a
@@ -64,10 +92,10 @@ var WordCloud = _react.memo.call(void 0, function WordCloud2(props) {
64
92
  // paint: `chart.hasRendered` never gets set by a wrong-then-corrected
65
93
  // double render.
66
94
  children: width > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
67
- _chunkTNZNBMSZjs.ChartRenderer,
95
+ _chunkNU2RCATKjs.ChartRenderer,
68
96
  {
69
97
  options,
70
- series: _optionalChain([options, 'access', _7 => _7.series, 'optionalAccess', _8 => _8.length]) ? [{ name: "Word Cloud" }] : [],
98
+ series: _optionalChain([options, 'access', _12 => _12.series, 'optionalAccess', _13 => _13.length]) ? [{ name: "Word Cloud" }] : [],
71
99
  colors,
72
100
  hideLegend: true,
73
101
  onReady: props.onReady
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/_work/seeds/seeds/seeds-react/seeds-react-data-viz/dist/wordcloud/index.js","../../src/charts/word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IAAA;AAAA,UACV,OAAA,EAAS,KAAA,CAAM;AAAA,QAAA;AAAA,MACjB;AAAA,IAAA;AAAA,EAGN,CAAA;AAEJ,CAAC,CAAA;AD3CD;AACE;AACF,8BAAC","file":"/home/runner/_work/seeds/seeds/seeds-react/seeds-react-data-viz/dist/wordcloud/index.js","sourcesContent":[null,"import { memo, useMemo, useRef } from \"react\";\nimport { useMeasure } from \"@sproutsocial/seeds-react-hooks\";\nimport { useSeedsChartSetup, ChartRenderer } from \"../shared/chartBase\";\nimport { getChartContainerProps } from \"../shared/chartContainer\";\nimport {\n buildWordCloudOptions,\n deriveMaxFontSize,\n deriveMaxWordCount,\n deriveWordPadding,\n} from \"./adapter\";\nimport type { WordCloudGroup, WordCloudProps } from \"./types\";\n\n/**\n * Resolves `activeGroupId` to its index in `groups` for the container's\n * `data-active-group-index` attribute (layer 2 CSS dimming, wordcloud.css).\n * An unresolvable id (unknown, or no `groups`) is treated the same as\n * null/undefined — no dimming — rather than falling back to group 0, which\n * would incorrectly mark group 0 as \"active\" and dim everything else.\n */\nfunction resolveActiveGroupIndex(\n activeGroupId: string | null | undefined,\n groups: ReadonlyArray<WordCloudGroup> | undefined\n): number | undefined {\n if (activeGroupId == null || !groups?.length) return undefined;\n const index = groups.findIndex((group) => group.id === activeGroupId);\n return index === -1 ? undefined : index;\n}\n\n/**\n * WordCloud renders a Highcharts wordcloud chart from a flat list of weighted\n * words, optionally grouped (competitive coloring + externally-driven dimming\n * via `activeGroupId`).\n *\n * Like BubbleChart/DonutChart, it carries no `styled-components`: the wrapper\n * is a plain `<div>` and the Highcharts styling ships as static CSS. Consumers\n * import both `@sproutsocial/seeds-react-data-viz/chart-styles.css` and\n * `.../wordcloud.css` once (the component never self-imports its CSS).\n */\nexport const WordCloud = memo(function WordCloud(props: WordCloudProps) {\n // One \"series\" input per group (or a single default entry when ungrouped),\n // matching bubble/donut's convention: colorIndex slots map 1:1 to entries\n // here, so the resolved `colors` array sizes and resolves correctly for\n // both the live chart and the styledMode:false export clone.\n const { colors } = useSeedsChartSetup({\n series: props.groups?.length\n ? props.groups.map((group) => ({ color: group.color }))\n : [{ color: undefined }],\n });\n\n const containerRef = useRef<HTMLDivElement>(null);\n // `synchronous: true` reads the container's bounds before first paint\n // instead of waiting on ResizeObserver's own (always-async) first\n // callback — otherwise every derive* below sees a false `width: 0` on\n // mount and renders the widest-case guess before snapping to the real\n // layout a tick later (the flash this family shipped with through Slice\n // 8). An explicit `props.width` skips measurement entirely.\n const { width: measuredWidth } = useMeasure(containerRef, true);\n const width = props.width ?? measuredWidth;\n // These derived values, not raw `width`, drive the memo dependency below.\n // Each is a step function of width (`deriveMaxFontSize`/`deriveMaxWordCount`/\n // `deriveWordPadding` in adapter.ts), so a resize tick that lands in the\n // same bucket for all three — most of them, during a drag-resize — leaves\n // the dependency array unchanged and the options object keeps its identity\n // instead of forcing Highcharts to re-lay out the cloud on every\n // ResizeObserver callback.\n const derivedMaxFontSize = deriveMaxFontSize(width);\n const derivedMaxWordCount = deriveMaxWordCount(width);\n const derivedWordPadding = deriveWordPadding(width);\n const options = useMemo(\n () => buildWordCloudOptions(props, width),\n // eslint-disable-next-line react-hooks/exhaustive-deps -- `width` is intentionally excluded; see the comment above `derivedMaxFontSize`.\n [props, derivedMaxFontSize, derivedMaxWordCount, derivedWordPadding]\n );\n const activeGroupIndex = resolveActiveGroupIndex(\n props.activeGroupId,\n props.groups\n );\n\n const containerProps = getChartContainerProps({\n familyClasses: [\"seeds-chart-wordcloud\"],\n // RAW per-group colors only — an unset group falls through to\n // chart-styles.css's --highcharts-color-N default, matching the\n // bubble/bar convention. Only an explicit consumer override is inlined.\n colors: props.groups?.map((group) => group.color) ?? [],\n hasOnClick: Boolean(props.onClick),\n className: props.className,\n });\n\n return (\n <div\n ref={containerRef}\n {...containerProps}\n {...(activeGroupIndex !== undefined\n ? { \"data-active-group-index\": activeGroupIndex }\n : {})}\n >\n {\n // Gate the chart's one-and-only real mount on a genuinely measured\n // width. This container `<div>` still always renders (measuring it\n // is what produces `measuredWidth` in the first place) — but a\n // `width` of 0 means \"no room to lay out yet,\" not \"assume the\n // widest case,\" so nothing else renders until it's positive. This\n // is also what makes Highcharts' native center-burst entrance\n // animation (plotOptions.wordcloud.animation, above) fire on first\n // paint: `chart.hasRendered` never gets set by a wrong-then-corrected\n // double render.\n width > 0 && (\n <ChartRenderer\n options={options}\n // A single Highcharts series (all words), so a single entry here —\n // its only job is satisfying ChartRenderer's non-empty-series check,\n // since hideLegend suppresses the legend this would otherwise feed.\n series={options.series?.length ? [{ name: \"Word Cloud\" }] : []}\n colors={colors}\n hideLegend\n onReady={props.onReady}\n />\n )\n }\n </div>\n );\n});\n"]}
1
+ {"version":3,"sources":["/home/runner/_work/seeds/seeds/seeds-react/seeds-react-data-viz/dist/wordcloud/index.js","../../src/charts/wordcloud/WordCloud.tsx"],"names":["WordCloud"],"mappings":"AAAA;AACE;AACF,uDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACF,uDAA6B;AAC7B,gCAA6B;AAC7B;AACA;ACbA,8BAAsC;AACtC,kEAA2B;AAgKjB,+CAAA;AA1IV,SAAS,uBAAA,CACP,aAAA,EACA,MAAA,EACoB;AACpB,EAAA,GAAA,CAAI,cAAA,GAAiB,KAAA,GAAQ,iBAAC,MAAA,2BAAQ,QAAA,EAAQ,OAAO,KAAA,CAAA;AACrD,EAAA,MAAM,MAAA,EAAQ,MAAA,CAAO,SAAA,CAAU,CAAC,KAAA,EAAA,GAAU,KAAA,CAAM,GAAA,IAAO,aAAa,CAAA;AACpE,EAAA,OAAO,MAAA,IAAU,CAAA,EAAA,EAAK,KAAA,EAAA,EAAY,KAAA;AACpC;AAWA,SAAS,wBAAA,CACP,WAAA,EACA,MAAA,EACmC;AACnC,EAAA,GAAA,CAAI,iBAAC,WAAA,6BAAa,SAAA,GAAU,iBAAC,MAAA,6BAAQ,QAAA,EAAQ,OAAO,KAAA,CAAA;AACpD,EAAA,MAAM,UAAA,EAAY,IAAI,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EACtB,EAAE,yBAAA,EAA2B,iBAAiB,EAAA,EAC9C,CAAC,CAAA;AAAA,MACJ,GAAI,kBAAA,IAAsB,KAAA,EAAA,EACvB,EAAE,0BAAA,EAA4B,iBAAA,CAAkB,IAAA,CAAK,GAAG,EAAE,EAAA,EAC1D,CAAC,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAYH,QAAA,EAAA,MAAA,EAAQ,EAAA,mBACN,6BAAA;AAAA,QAAC,8BAAA;AAAA,QAAA;AAAA,UACC,OAAA;AAAA,UAIA,MAAA,kBAAQ,OAAA,uBAAQ,MAAA,+BAAQ,SAAA,EAAS,CAAC,EAAE,IAAA,EAAM,aAAa,CAAC,EAAA,EAAI,CAAC,CAAA;AAAA,UAC7D,MAAA;AAAA,UACA,UAAA,EAAU,IAAA;AAAA,UACV,OAAA,EAAS,KAAA,CAAM;AAAA,QAAA;AAAA,MACjB;AAAA,IAAA;AAAA,EAGN,CAAA;AAEJ,CAAC,CAAA;ADrED;AACE;AACF,8BAAC","file":"/home/runner/_work/seeds/seeds/seeds-react/seeds-react-data-viz/dist/wordcloud/index.js","sourcesContent":[null,"import { memo, useMemo, useRef } from \"react\";\nimport { useMeasure } from \"@sproutsocial/seeds-react-hooks\";\nimport { useSeedsChartSetup, ChartRenderer } from \"../shared/chartBase\";\nimport { getChartContainerProps } from \"../shared/chartContainer\";\nimport {\n buildWordCloudOptions,\n deriveMaxFontSize,\n deriveMaxWordCount,\n deriveWordPadding,\n} from \"./adapter\";\nimport type {\n SeedsChartWordCloudSeriesOptions,\n WordCloudGroup,\n WordCloudProps,\n} from \"./types\";\n\n/**\n * Resolves `activeGroupId` to its index in `groups` for the container's\n * `data-active-group-index` attribute (layer 2 CSS dimming, wordcloud.css).\n * An unresolvable id (unknown, or no `groups`) is treated the same as\n * null/undefined — no dimming — rather than falling back to group 0, which\n * would incorrectly mark group 0 as \"active\" and dim everything else.\n */\nfunction resolveActiveGroupIndex(\n activeGroupId: string | null | undefined,\n groups: ReadonlyArray<WordCloudGroup> | undefined\n): number | undefined {\n if (activeGroupId == null || !groups?.length) return undefined;\n const index = groups.findIndex((group) => group.id === activeGroupId);\n return index === -1 ? undefined : index;\n}\n\n/**\n * Resolves `activeNames` to the rendered indices of matching points, for the\n * container's `data-active-word-indices` attribute. Reads `points` off the\n * already-built options (not a fresh transform) so indices match what's\n * actually on screen, including `allocateWordsAcrossGroups`'s reordering.\n * Names are unbounded, unlike `activeGroupId`'s small `groups` list, so this\n * keys off each point's bounded position instead — see wordcloud.css's\n * `--index-N` rules (bounded by `WORD_CLOUD_MAXIMUM_WORD_COUNT`).\n */\nfunction resolveActiveWordIndices(\n activeNames: ReadonlyArray<string> | null | undefined,\n points: ReadonlyArray<{ name: string }> | undefined\n): ReadonlyArray<number> | undefined {\n if (!activeNames?.length || !points?.length) return undefined;\n const activeSet = new Set(activeNames);\n const indices = points\n .map((point, i) => (activeSet.has(point.name) ? i : -1))\n .filter((i) => i !== -1);\n return indices.length ? indices : undefined;\n}\n\n/**\n * WordCloud renders a Highcharts wordcloud chart from a flat list of weighted\n * words, optionally grouped (competitive coloring + externally-driven dimming\n * via `activeGroupId` or `activeNames`).\n *\n * Like BubbleChart/DonutChart, it carries no `styled-components`: the wrapper\n * is a plain `<div>` and the Highcharts styling ships as static CSS. Consumers\n * import both `@sproutsocial/seeds-react-data-viz/chart-styles.css` and\n * `.../wordcloud.css` once (the component never self-imports its CSS).\n */\nexport const WordCloud = memo(function WordCloud(props: WordCloudProps) {\n // One \"series\" input per group (or a single default entry when ungrouped),\n // matching bubble/donut's convention: colorIndex slots map 1:1 to entries\n // here, so the resolved `colors` array sizes and resolves correctly for\n // both the live chart and the styledMode:false export clone.\n const { colors } = useSeedsChartSetup({\n series: props.groups?.length\n ? props.groups.map((group) => ({ color: group.color }))\n : [{ color: undefined }],\n });\n\n const containerRef = useRef<HTMLDivElement>(null);\n // `synchronous: true` reads the container's bounds before first paint\n // instead of waiting on ResizeObserver's own (always-async) first\n // callback — otherwise every derive* below sees a false `width: 0` on\n // mount and renders the widest-case guess before snapping to the real\n // layout a tick later (the flash this family shipped with through Slice\n // 8). An explicit `props.width` skips measurement entirely.\n const { width: measuredWidth } = useMeasure(containerRef, true);\n const width = props.width ?? measuredWidth;\n // These derived values, not raw `width`, drive the memo dependency below.\n // Each is a step function of width (`deriveMaxFontSize`/`deriveMaxWordCount`/\n // `deriveWordPadding` in adapter.ts), so a resize tick that lands in the\n // same bucket for all three — most of them, during a drag-resize — leaves\n // the dependency array unchanged and the options object keeps its identity\n // instead of forcing Highcharts to re-lay out the cloud on every\n // ResizeObserver callback.\n const derivedMaxFontSize = deriveMaxFontSize(width);\n const derivedMaxWordCount = deriveMaxWordCount(width);\n const derivedWordPadding = deriveWordPadding(width);\n // Whether `activeNames` is supplied at all, not its current null/array\n // value — see `buildWordCloudOptions`'s `hasActiveNames` doc comment.\n // Stable across hover transitions, so it's safe in the memo deps below.\n const hasActiveNames = props.activeNames !== undefined;\n const options = useMemo(\n () => buildWordCloudOptions(props, width, hasActiveNames),\n // eslint-disable-next-line react-hooks/exhaustive-deps -- `width` excluded (see above); the rest is only what `buildWordCloudOptions` reads, not `props` wholesale, so an activeGroupId/activeNames/className/onReady change doesn't rebuild this.\n [\n props.data,\n props.groups,\n props.opacityRange,\n props.description,\n props.height,\n props.minFontSize,\n props.maxFontSize,\n props.wordPadding,\n props.onClick,\n props.onWordHover,\n hasActiveNames,\n derivedMaxFontSize,\n derivedMaxWordCount,\n derivedWordPadding,\n ]\n );\n const activeGroupIndex = resolveActiveGroupIndex(\n props.activeGroupId,\n props.groups\n );\n const renderedPoints = (\n options.series?.[0] as SeedsChartWordCloudSeriesOptions | undefined\n )?.data;\n const activeWordIndices = resolveActiveWordIndices(\n props.activeNames,\n renderedPoints\n );\n\n const containerProps = getChartContainerProps({\n familyClasses: [\"seeds-chart-wordcloud\"],\n // RAW per-group colors only — an unset group falls through to\n // chart-styles.css's --highcharts-color-N default, matching the\n // bubble/bar convention. Only an explicit consumer override is inlined.\n colors: props.groups?.map((group) => group.color) ?? [],\n hasOnClick: Boolean(props.onClick),\n className: props.className,\n });\n\n return (\n <div\n ref={containerRef}\n {...containerProps}\n {...(activeGroupIndex !== undefined\n ? { \"data-active-group-index\": activeGroupIndex }\n : {})}\n {...(activeWordIndices !== undefined\n ? { \"data-active-word-indices\": activeWordIndices.join(\" \") }\n : {})}\n >\n {\n // Gate the chart's one-and-only real mount on a genuinely measured\n // width. This container `<div>` still always renders (measuring it\n // is what produces `measuredWidth` in the first place) — but a\n // `width` of 0 means \"no room to lay out yet,\" not \"assume the\n // widest case,\" so nothing else renders until it's positive. This\n // is also what makes Highcharts' native center-burst entrance\n // animation (plotOptions.wordcloud.animation, above) fire on first\n // paint: `chart.hasRendered` never gets set by a wrong-then-corrected\n // double render.\n width > 0 && (\n <ChartRenderer\n options={options}\n // A single Highcharts series (all words), so a single entry here —\n // its only job is satisfying ChartRenderer's non-empty-series check,\n // since hideLegend suppresses the legend this would otherwise feed.\n series={options.series?.length ? [{ name: \"Word Cloud\" }] : []}\n colors={colors}\n hideLegend\n onReady={props.onReady}\n />\n )\n }\n </div>\n );\n});\n"]}
@@ -2,7 +2,7 @@
2
2
  * Seeds WordCloud family styles.
3
3
  *
4
4
  * The wordcloud-specific layer on top of the shared `chart-styles.css`
5
- * foundation, implementing a three-layer opacity model:
5
+ * foundation, implementing a four-layer opacity model:
6
6
  *
7
7
  * 1. Weight ramp — per-point `opacity` set once in the adapter's series
8
8
  * data (wordcloud/adapter.ts), landing as an SVG
@@ -12,23 +12,39 @@
12
12
  * attribute (set from `activeGroupId`, resolved against
13
13
  * `groups`), scoped per adapter-assigned
14
14
  * `.seeds-wordcloud-word--group-{n}` class.
15
+ * 2b. Name dim — below. Gated on the wrapper's `data-active-word-indices`
16
+ * attribute (set from `activeNames`, resolved by
17
+ * `WordCloud.tsx`'s `resolveActiveWordIndices` against
18
+ * the rendered points — names are unbounded, unlike
19
+ * `groups`, so this keys off each point's bounded
20
+ * rendered position instead), scoped per
21
+ * `.seeds-wordcloud-word--index-{n}` class. The active
22
+ * set can contain several indices at once (e.g. every
23
+ * occurrence of a hovered term across competitor
24
+ * groups), so this layer uses the list-attribute
25
+ * selector (`~=`) instead of layer 2's exact match (`=`).
15
26
  * 3. Hover — below. Highcharts' native `.highcharts-point-hover`/
16
27
  * `.highcharts-point-inactive`, inherited from
17
- * ColumnSeries state handling.
28
+ * ColumnSeries state handling. Only active when the
29
+ * consumer hasn't opted into layer 2b (see
30
+ * `buildWordCloudOptions`'s `hasActiveNames` — the
31
+ * consumer's own set drives dimming unopposed once
32
+ * they've taken it over, instead of fighting Highcharts'
33
+ * own hover-triggered `inactiveOtherPoints`).
18
34
  *
19
- * All three layers write the CSS `opacity` *property*, never `fill-opacity`:
20
- * a presentation attribute (layer 1) resolves in the author origin at
35
+ * All layers write the CSS `opacity` *property*, never `fill-opacity`: a
36
+ * presentation attribute (layer 1) resolves in the author origin at
21
37
  * specificity 0, so any author `opacity` declaration here replaces it
22
38
  * outright rather than multiplying with it. This matches `donut/donut.css`'s
23
39
  * existing opacity-property dimming.
24
40
  *
25
- * Layers 2 and 3 can coexist (hovering a word while `activeGroupId` is set),
26
- * and layer 3 must always win. The layer 2 rules below exclude
27
- * `.highcharts-point-hover`/`.highcharts-point-inactive` from their selector
28
- * for exactly this: the moment any point is hovered, every point in the
29
- * series carries one of those two classes (`inactiveOtherPoints: true`), so
30
- * layer 2 stops matching anything and layer 3 takes over completely, with no
31
- * `!important` needed.
41
+ * Layers 2/2b and 3 can coexist (hovering a word while `activeGroupId` is
42
+ * set), and layer 3 must always win when it's active. The layer 2/2b rules
43
+ * below exclude `.highcharts-point-hover`/`.highcharts-point-inactive` from
44
+ * their selector for exactly this: the moment any point is hovered (with
45
+ * `inactiveOtherPoints: true`), every point in the series carries one of
46
+ * those two classes, so layers 2/2b stop matching anything and layer 3 takes
47
+ * over completely, with no `!important` needed.
32
48
  *
33
49
  * Consumers import BOTH stylesheets once (the component never self-imports):
34
50
  *
@@ -77,3 +93,114 @@
77
93
  .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) {
78
94
  opacity: 0.4;
79
95
  }
96
+
97
+ /* Layer 2b: name dim. Only active when the wrapper sets
98
+ `data-active-word-indices` (resolved from `activeNames` against the
99
+ rendered points); bounded by `WORD_CLOUD_MAXIMUM_WORD_COUNT` (100 —
100
+ adapter.ts). Excludes hover-state classes so layer 3 always wins during a
101
+ hover (see the file header). Uses the list-attribute selector (`~=`),
102
+ unlike layer 2's exact match (`=`), since several indices can be active at
103
+ once. One shared declaration: every index dims to the same 0.4, only the
104
+ selector differs. */
105
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="0"]) .seeds-wordcloud-word--index-0:not(.highcharts-point-hover):not(.highcharts-point-inactive),
106
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="1"]) .seeds-wordcloud-word--index-1:not(.highcharts-point-hover):not(.highcharts-point-inactive),
107
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="2"]) .seeds-wordcloud-word--index-2:not(.highcharts-point-hover):not(.highcharts-point-inactive),
108
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="3"]) .seeds-wordcloud-word--index-3:not(.highcharts-point-hover):not(.highcharts-point-inactive),
109
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="4"]) .seeds-wordcloud-word--index-4:not(.highcharts-point-hover):not(.highcharts-point-inactive),
110
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="5"]) .seeds-wordcloud-word--index-5:not(.highcharts-point-hover):not(.highcharts-point-inactive),
111
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="6"]) .seeds-wordcloud-word--index-6:not(.highcharts-point-hover):not(.highcharts-point-inactive),
112
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="7"]) .seeds-wordcloud-word--index-7:not(.highcharts-point-hover):not(.highcharts-point-inactive),
113
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="8"]) .seeds-wordcloud-word--index-8:not(.highcharts-point-hover):not(.highcharts-point-inactive),
114
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="9"]) .seeds-wordcloud-word--index-9:not(.highcharts-point-hover):not(.highcharts-point-inactive),
115
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="10"]) .seeds-wordcloud-word--index-10:not(.highcharts-point-hover):not(.highcharts-point-inactive),
116
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="11"]) .seeds-wordcloud-word--index-11:not(.highcharts-point-hover):not(.highcharts-point-inactive),
117
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="12"]) .seeds-wordcloud-word--index-12:not(.highcharts-point-hover):not(.highcharts-point-inactive),
118
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="13"]) .seeds-wordcloud-word--index-13:not(.highcharts-point-hover):not(.highcharts-point-inactive),
119
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="14"]) .seeds-wordcloud-word--index-14:not(.highcharts-point-hover):not(.highcharts-point-inactive),
120
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="15"]) .seeds-wordcloud-word--index-15:not(.highcharts-point-hover):not(.highcharts-point-inactive),
121
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="16"]) .seeds-wordcloud-word--index-16:not(.highcharts-point-hover):not(.highcharts-point-inactive),
122
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="17"]) .seeds-wordcloud-word--index-17:not(.highcharts-point-hover):not(.highcharts-point-inactive),
123
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="18"]) .seeds-wordcloud-word--index-18:not(.highcharts-point-hover):not(.highcharts-point-inactive),
124
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="19"]) .seeds-wordcloud-word--index-19:not(.highcharts-point-hover):not(.highcharts-point-inactive),
125
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="20"]) .seeds-wordcloud-word--index-20:not(.highcharts-point-hover):not(.highcharts-point-inactive),
126
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="21"]) .seeds-wordcloud-word--index-21:not(.highcharts-point-hover):not(.highcharts-point-inactive),
127
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="22"]) .seeds-wordcloud-word--index-22:not(.highcharts-point-hover):not(.highcharts-point-inactive),
128
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="23"]) .seeds-wordcloud-word--index-23:not(.highcharts-point-hover):not(.highcharts-point-inactive),
129
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="24"]) .seeds-wordcloud-word--index-24:not(.highcharts-point-hover):not(.highcharts-point-inactive),
130
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="25"]) .seeds-wordcloud-word--index-25:not(.highcharts-point-hover):not(.highcharts-point-inactive),
131
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="26"]) .seeds-wordcloud-word--index-26:not(.highcharts-point-hover):not(.highcharts-point-inactive),
132
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="27"]) .seeds-wordcloud-word--index-27:not(.highcharts-point-hover):not(.highcharts-point-inactive),
133
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="28"]) .seeds-wordcloud-word--index-28:not(.highcharts-point-hover):not(.highcharts-point-inactive),
134
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="29"]) .seeds-wordcloud-word--index-29:not(.highcharts-point-hover):not(.highcharts-point-inactive),
135
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="30"]) .seeds-wordcloud-word--index-30:not(.highcharts-point-hover):not(.highcharts-point-inactive),
136
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="31"]) .seeds-wordcloud-word--index-31:not(.highcharts-point-hover):not(.highcharts-point-inactive),
137
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="32"]) .seeds-wordcloud-word--index-32:not(.highcharts-point-hover):not(.highcharts-point-inactive),
138
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="33"]) .seeds-wordcloud-word--index-33:not(.highcharts-point-hover):not(.highcharts-point-inactive),
139
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="34"]) .seeds-wordcloud-word--index-34:not(.highcharts-point-hover):not(.highcharts-point-inactive),
140
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="35"]) .seeds-wordcloud-word--index-35:not(.highcharts-point-hover):not(.highcharts-point-inactive),
141
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="36"]) .seeds-wordcloud-word--index-36:not(.highcharts-point-hover):not(.highcharts-point-inactive),
142
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="37"]) .seeds-wordcloud-word--index-37:not(.highcharts-point-hover):not(.highcharts-point-inactive),
143
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="38"]) .seeds-wordcloud-word--index-38:not(.highcharts-point-hover):not(.highcharts-point-inactive),
144
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="39"]) .seeds-wordcloud-word--index-39:not(.highcharts-point-hover):not(.highcharts-point-inactive),
145
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="40"]) .seeds-wordcloud-word--index-40:not(.highcharts-point-hover):not(.highcharts-point-inactive),
146
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="41"]) .seeds-wordcloud-word--index-41:not(.highcharts-point-hover):not(.highcharts-point-inactive),
147
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="42"]) .seeds-wordcloud-word--index-42:not(.highcharts-point-hover):not(.highcharts-point-inactive),
148
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="43"]) .seeds-wordcloud-word--index-43:not(.highcharts-point-hover):not(.highcharts-point-inactive),
149
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="44"]) .seeds-wordcloud-word--index-44:not(.highcharts-point-hover):not(.highcharts-point-inactive),
150
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="45"]) .seeds-wordcloud-word--index-45:not(.highcharts-point-hover):not(.highcharts-point-inactive),
151
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="46"]) .seeds-wordcloud-word--index-46:not(.highcharts-point-hover):not(.highcharts-point-inactive),
152
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="47"]) .seeds-wordcloud-word--index-47:not(.highcharts-point-hover):not(.highcharts-point-inactive),
153
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="48"]) .seeds-wordcloud-word--index-48:not(.highcharts-point-hover):not(.highcharts-point-inactive),
154
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="49"]) .seeds-wordcloud-word--index-49:not(.highcharts-point-hover):not(.highcharts-point-inactive),
155
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="50"]) .seeds-wordcloud-word--index-50:not(.highcharts-point-hover):not(.highcharts-point-inactive),
156
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="51"]) .seeds-wordcloud-word--index-51:not(.highcharts-point-hover):not(.highcharts-point-inactive),
157
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="52"]) .seeds-wordcloud-word--index-52:not(.highcharts-point-hover):not(.highcharts-point-inactive),
158
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="53"]) .seeds-wordcloud-word--index-53:not(.highcharts-point-hover):not(.highcharts-point-inactive),
159
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="54"]) .seeds-wordcloud-word--index-54:not(.highcharts-point-hover):not(.highcharts-point-inactive),
160
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="55"]) .seeds-wordcloud-word--index-55:not(.highcharts-point-hover):not(.highcharts-point-inactive),
161
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="56"]) .seeds-wordcloud-word--index-56:not(.highcharts-point-hover):not(.highcharts-point-inactive),
162
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="57"]) .seeds-wordcloud-word--index-57:not(.highcharts-point-hover):not(.highcharts-point-inactive),
163
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="58"]) .seeds-wordcloud-word--index-58:not(.highcharts-point-hover):not(.highcharts-point-inactive),
164
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="59"]) .seeds-wordcloud-word--index-59:not(.highcharts-point-hover):not(.highcharts-point-inactive),
165
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="60"]) .seeds-wordcloud-word--index-60:not(.highcharts-point-hover):not(.highcharts-point-inactive),
166
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="61"]) .seeds-wordcloud-word--index-61:not(.highcharts-point-hover):not(.highcharts-point-inactive),
167
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="62"]) .seeds-wordcloud-word--index-62:not(.highcharts-point-hover):not(.highcharts-point-inactive),
168
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="63"]) .seeds-wordcloud-word--index-63:not(.highcharts-point-hover):not(.highcharts-point-inactive),
169
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="64"]) .seeds-wordcloud-word--index-64:not(.highcharts-point-hover):not(.highcharts-point-inactive),
170
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="65"]) .seeds-wordcloud-word--index-65:not(.highcharts-point-hover):not(.highcharts-point-inactive),
171
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="66"]) .seeds-wordcloud-word--index-66:not(.highcharts-point-hover):not(.highcharts-point-inactive),
172
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="67"]) .seeds-wordcloud-word--index-67:not(.highcharts-point-hover):not(.highcharts-point-inactive),
173
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="68"]) .seeds-wordcloud-word--index-68:not(.highcharts-point-hover):not(.highcharts-point-inactive),
174
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="69"]) .seeds-wordcloud-word--index-69:not(.highcharts-point-hover):not(.highcharts-point-inactive),
175
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="70"]) .seeds-wordcloud-word--index-70:not(.highcharts-point-hover):not(.highcharts-point-inactive),
176
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="71"]) .seeds-wordcloud-word--index-71:not(.highcharts-point-hover):not(.highcharts-point-inactive),
177
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="72"]) .seeds-wordcloud-word--index-72:not(.highcharts-point-hover):not(.highcharts-point-inactive),
178
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="73"]) .seeds-wordcloud-word--index-73:not(.highcharts-point-hover):not(.highcharts-point-inactive),
179
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="74"]) .seeds-wordcloud-word--index-74:not(.highcharts-point-hover):not(.highcharts-point-inactive),
180
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="75"]) .seeds-wordcloud-word--index-75:not(.highcharts-point-hover):not(.highcharts-point-inactive),
181
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="76"]) .seeds-wordcloud-word--index-76:not(.highcharts-point-hover):not(.highcharts-point-inactive),
182
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="77"]) .seeds-wordcloud-word--index-77:not(.highcharts-point-hover):not(.highcharts-point-inactive),
183
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="78"]) .seeds-wordcloud-word--index-78:not(.highcharts-point-hover):not(.highcharts-point-inactive),
184
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="79"]) .seeds-wordcloud-word--index-79:not(.highcharts-point-hover):not(.highcharts-point-inactive),
185
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="80"]) .seeds-wordcloud-word--index-80:not(.highcharts-point-hover):not(.highcharts-point-inactive),
186
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="81"]) .seeds-wordcloud-word--index-81:not(.highcharts-point-hover):not(.highcharts-point-inactive),
187
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="82"]) .seeds-wordcloud-word--index-82:not(.highcharts-point-hover):not(.highcharts-point-inactive),
188
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="83"]) .seeds-wordcloud-word--index-83:not(.highcharts-point-hover):not(.highcharts-point-inactive),
189
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="84"]) .seeds-wordcloud-word--index-84:not(.highcharts-point-hover):not(.highcharts-point-inactive),
190
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="85"]) .seeds-wordcloud-word--index-85:not(.highcharts-point-hover):not(.highcharts-point-inactive),
191
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="86"]) .seeds-wordcloud-word--index-86:not(.highcharts-point-hover):not(.highcharts-point-inactive),
192
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="87"]) .seeds-wordcloud-word--index-87:not(.highcharts-point-hover):not(.highcharts-point-inactive),
193
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="88"]) .seeds-wordcloud-word--index-88:not(.highcharts-point-hover):not(.highcharts-point-inactive),
194
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="89"]) .seeds-wordcloud-word--index-89:not(.highcharts-point-hover):not(.highcharts-point-inactive),
195
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="90"]) .seeds-wordcloud-word--index-90:not(.highcharts-point-hover):not(.highcharts-point-inactive),
196
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="91"]) .seeds-wordcloud-word--index-91:not(.highcharts-point-hover):not(.highcharts-point-inactive),
197
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="92"]) .seeds-wordcloud-word--index-92:not(.highcharts-point-hover):not(.highcharts-point-inactive),
198
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="93"]) .seeds-wordcloud-word--index-93:not(.highcharts-point-hover):not(.highcharts-point-inactive),
199
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="94"]) .seeds-wordcloud-word--index-94:not(.highcharts-point-hover):not(.highcharts-point-inactive),
200
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="95"]) .seeds-wordcloud-word--index-95:not(.highcharts-point-hover):not(.highcharts-point-inactive),
201
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="96"]) .seeds-wordcloud-word--index-96:not(.highcharts-point-hover):not(.highcharts-point-inactive),
202
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="97"]) .seeds-wordcloud-word--index-97:not(.highcharts-point-hover):not(.highcharts-point-inactive),
203
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="98"]) .seeds-wordcloud-word--index-98:not(.highcharts-point-hover):not(.highcharts-point-inactive),
204
+ .seeds-chart-wordcloud[data-active-word-indices]:not([data-active-word-indices~="99"]) .seeds-wordcloud-word--index-99:not(.highcharts-point-hover):not(.highcharts-point-inactive) {
205
+ opacity: 0.4;
206
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sproutsocial/seeds-react-data-viz",
3
- "version": "0.25.1",
3
+ "version": "0.26.1",
4
4
  "description": "Seeds React Data Viz Components",
5
5
  "author": "Sprout Social, Inc.",
6
6
  "license": "MIT",