diff --git a/.changeset/area-highlighted-item-and-band-point.md b/.changeset/area-highlighted-item-and-band-point.md deleted file mode 100644 index ec1a530515..0000000000 --- a/.changeset/area-highlighted-item-and-band-point.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@spectrum-charts/vega-spec-builder-s2': patch ---- - -Fix Area crashing with a controlled highlightedItem and no interactive children, and place the hover and anchor points on the upper edge of metricStart/metricEnd bands. diff --git a/.changeset/bar-dashboard-fixes.md b/.changeset/bar-dashboard-fixes.md deleted file mode 100644 index abefa42390..0000000000 --- a/.changeset/bar-dashboard-fixes.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@spectrum-charts/vega-spec-builder-s2': patch ---- - -Fix S2 bar `ChartInspect` group highlighting with hover animations, `highlightedItem` on non-interactive bars, and `shortNumber`/`shortCurrency` bar direct label formats; controlled `highlightedItem` now respects `idKey`. diff --git a/.changeset/blue-planets-jog.md b/.changeset/blue-planets-jog.md deleted file mode 100644 index a845151cc8..0000000000 --- a/.changeset/blue-planets-jog.md +++ /dev/null @@ -1,2 +0,0 @@ ---- ---- diff --git a/.changeset/bold-actors-show.md b/.changeset/bold-actors-show.md deleted file mode 100644 index a845151cc8..0000000000 --- a/.changeset/bold-actors-show.md +++ /dev/null @@ -1,2 +0,0 @@ ---- ---- diff --git a/.changeset/bold-candles-argue.md b/.changeset/bold-candles-argue.md deleted file mode 100644 index a845151cc8..0000000000 --- a/.changeset/bold-candles-argue.md +++ /dev/null @@ -1,2 +0,0 @@ ---- ---- diff --git a/.changeset/bullet-metric-axis-hidden-target.md b/.changeset/bullet-metric-axis-hidden-target.md deleted file mode 100644 index 6dc1506784..0000000000 --- a/.changeset/bullet-metric-axis-hidden-target.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@spectrum-charts/vega-spec-builder-s2': patch ---- - -Show the bullet metric axis when `showTargetValue` is set but `showTarget` is false. diff --git a/.changeset/bullet-missing-target-line.md b/.changeset/bullet-missing-target-line.md deleted file mode 100644 index 93be840c16..0000000000 --- a/.changeset/bullet-missing-target-line.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@spectrum-charts/vega-spec-builder-s2': patch ---- - -Hide the bullet target line when a row has no target value instead of drawing it at zero. diff --git a/.changeset/bullet-threshold-hover-hidden-target.md b/.changeset/bullet-threshold-hover-hidden-target.md deleted file mode 100644 index 39329eebbc..0000000000 --- a/.changeset/bullet-threshold-hover-hidden-target.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@spectrum-charts/vega-spec-builder-s2': patch ---- - -Fix a bullet chart with thresholds and `ChartInspect` failing to render when `showTargetValue` is set but `showTarget` is false. diff --git a/.changeset/bullet-value-label-color.md b/.changeset/bullet-value-label-color.md deleted file mode 100644 index 2995230f7d..0000000000 --- a/.changeset/bullet-value-label-color.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@spectrum-charts/vega-spec-builder': patch -'@spectrum-charts/vega-spec-builder-s2': patch ---- - -Bullet value labels always use gray-900 instead of the threshold color when `thresholdBarColor` is enabled, matching side labels. diff --git a/.changeset/chart-action-bar-lab.md b/.changeset/chart-action-bar-lab.md deleted file mode 100644 index a012cd59ca..0000000000 --- a/.changeset/chart-action-bar-lab.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@spectrum-charts/react-spectrum-charts-s2': minor ---- - -Move `ChartActionBar` to the lab entry point. Import it from `@spectrum-charts/react-spectrum-charts-s2/lab` instead of the package root. diff --git a/.changeset/chart-undefined-prop-defaults.md b/.changeset/chart-undefined-prop-defaults.md deleted file mode 100644 index d0db858699..0000000000 --- a/.changeset/chart-undefined-prop-defaults.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@adobe/react-spectrum-charts': patch -'@spectrum-charts/react-spectrum-charts-s2': patch ---- - -Chart props explicitly set to `undefined` now fall back to their defaults instead of overriding them. diff --git a/.changeset/clip-s2-reference-lines.md b/.changeset/clip-s2-reference-lines.md deleted file mode 100644 index 458b1a80d4..0000000000 --- a/.changeset/clip-s2-reference-lines.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@spectrum-charts/react-spectrum-charts-s2': patch -'@spectrum-charts/vega-spec-builder-s2': patch ---- - -Clip reference lines to the plot so out-of-range values no longer collapse the chart or flicker on hover. diff --git a/.changeset/dashboard-coverage-framework.md b/.changeset/dashboard-coverage-framework.md deleted file mode 100644 index a845151cc8..0000000000 --- a/.changeset/dashboard-coverage-framework.md +++ /dev/null @@ -1,2 +0,0 @@ ---- ---- diff --git a/.changeset/descending-donut-segment-order.md b/.changeset/descending-donut-segment-order.md deleted file mode 100644 index b83938257c..0000000000 --- a/.changeset/descending-donut-segment-order.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@spectrum-charts/vega-spec-builder-s2': patch -'@spectrum-charts/react-spectrum-charts-s2': patch ---- - -Sort categorical donut segments largest-first by default, with `sortOrder="data"` to preserve input order. diff --git a/.changeset/dodged-bar-focus-magnifier-support.md b/.changeset/dodged-bar-focus-magnifier-support.md deleted file mode 100644 index 4b1704976f..0000000000 --- a/.changeset/dodged-bar-focus-magnifier-support.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -'@spectrum-charts/react-spectrum-charts-s2': minor -'@spectrum-charts/vega-spec-builder-s2': minor ---- - -Improve S2 bar accessible navigation: -Updated focus element position accuracy for screen magnifiers. - -Added keyboard and focus ring support for dodged bars. - -Added meaningful summaries of focused regions for screen readers while focusing elements in dodged and stacked bars. -(e.g. "Browser: Chrome. Operating system: Windows, Downloads: 5. Operating system: Mac, Downloads: 3.") - -Whole-chart focus provides a "metric by dimension" summary (e.g. "Downloads by Browser chart, grouped by Operating system. 3 groups.") instead of a raw field-name id. - -Tabbing out of the chart now keeps the focused node so Shift+Tab returns to it (rather than resetting to the "Enter navigation area" button) - -Leaving the chart reverts the focus dimming so the non-focused marks return to full opacity. diff --git a/.changeset/donut-hover-reveals-hidden-label.md b/.changeset/donut-hover-reveals-hidden-label.md deleted file mode 100644 index 3979848fec..0000000000 --- a/.changeset/donut-hover-reveals-hidden-label.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@spectrum-charts/react-spectrum-charts-s2': minor -'@spectrum-charts/vega-spec-builder-s2': minor ---- - -S2 Donut: hovering a segment now shows its label even when it was hidden by label collision or because the segment is below the minimum label angle. Labels that would collide with the hovered label are hidden while it is hovered. (AN-495008) diff --git a/.changeset/donut-label-width-cache.md b/.changeset/donut-label-width-cache.md deleted file mode 100644 index 130715a712..0000000000 --- a/.changeset/donut-label-width-cache.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@spectrum-charts/vega-spec-builder-s2': patch ---- - -Donut segment labels measure their text once per data update instead of on every animation frame, and `getLabelWidth` reuses one canvas and caches widths. Speeds up donut draw-in with labels. diff --git a/.changeset/donut-ring-thickness-and-summary-layout.md b/.changeset/donut-ring-thickness-and-summary-layout.md deleted file mode 100644 index 0ada07ce24..0000000000 --- a/.changeset/donut-ring-thickness-and-summary-layout.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@spectrum-charts/core-s2': patch -'@spectrum-charts/vega-spec-builder-s2': patch -'@spectrum-charts/react-spectrum-charts-s2': patch ---- - -Preserve the intended visible donut ring thickness, including 40px at XL. - -Center full-circle DonutSummary stacks and bottom-align semicircles and their summaries with a 2px text inset, preserving the original spacing between values and labels. diff --git a/.changeset/donut-side-legend-gap.md b/.changeset/donut-side-legend-gap.md deleted file mode 100644 index 1f8bde681b..0000000000 --- a/.changeset/donut-side-legend-gap.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@spectrum-charts/vega-spec-builder-s2': patch -'@spectrum-charts/react-spectrum-charts-s2': patch ---- - -S2 Donut: keep a donut's left or right legend next to the donut when the chart is wider than it is tall. diff --git a/.changeset/donut-size-tier-breakpoints.md b/.changeset/donut-size-tier-breakpoints.md deleted file mode 100644 index 817039cebb..0000000000 --- a/.changeset/donut-size-tier-breakpoints.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@spectrum-charts/core-s2': patch -'@spectrum-charts/vega-spec-builder-s2': patch -'@spectrum-charts/react-spectrum-charts-s2': patch ---- - -Increase the M and L donut size-tier diameter breakpoints from 160px and 200px to 200px and 280px, respectively. diff --git a/.changeset/donut-tiered-label-ring-gap.md b/.changeset/donut-tiered-label-ring-gap.md deleted file mode 100644 index 80fd206ea5..0000000000 --- a/.changeset/donut-tiered-label-ring-gap.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@spectrum-charts/constants': minor -'@spectrum-charts/react-spectrum-charts-s2': patch -'@spectrum-charts/vega-spec-builder-s2': patch ---- - -S2 Donut: the gap between the ring and its segment labels now scales with donut size (5px for small, 10px for medium/large, 15px for extra large) instead of a fixed 20px. Donut size is now based on chart size. diff --git a/.changeset/empty-phones-camp.md b/.changeset/empty-phones-camp.md deleted file mode 100644 index a845151cc8..0000000000 --- a/.changeset/empty-phones-camp.md +++ /dev/null @@ -1,2 +0,0 @@ ---- ---- diff --git a/.changeset/five-sides-admire.md b/.changeset/five-sides-admire.md deleted file mode 100644 index a845151cc8..0000000000 --- a/.changeset/five-sides-admire.md +++ /dev/null @@ -1,2 +0,0 @@ ---- ---- diff --git a/.changeset/fix-donut-legend-resize.md b/.changeset/fix-donut-legend-resize.md deleted file mode 100644 index 47dcda4dee..0000000000 --- a/.changeset/fix-donut-legend-resize.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@spectrum-charts/react-spectrum-charts-s2': patch -'@spectrum-charts/vega-spec-builder-s2': patch ---- - -Fix donuts growing during resize and retaining unnecessary side padding when there is no surplus width for a side legend. diff --git a/.changeset/lazy-sails-divide.md b/.changeset/lazy-sails-divide.md deleted file mode 100644 index 2450a1753d..0000000000 --- a/.changeset/lazy-sails-divide.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@spectrum-charts/react-spectrum-charts-s2': patch -'@spectrum-charts/vega-spec-builder-s2': patch ---- - -The chart animations will respect the "reduce motion" setting on a users operating system. diff --git a/.changeset/legal-worlds-design.md b/.changeset/legal-worlds-design.md deleted file mode 100644 index a845151cc8..0000000000 --- a/.changeset/legal-worlds-design.md +++ /dev/null @@ -1,2 +0,0 @@ ---- ---- diff --git a/.changeset/line-missing-signal-crashes.md b/.changeset/line-missing-signal-crashes.md deleted file mode 100644 index e69a51e4aa..0000000000 --- a/.changeset/line-missing-signal-crashes.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@spectrum-charts/vega-spec-builder-s2': patch ---- - -Fix S2 Line crashes from missing signals: `highlightedItem` on a non-interactive Line, and MetricRange on a Line with draw-in animation. diff --git a/.changeset/lint-sonar.md b/.changeset/lint-sonar.md deleted file mode 100644 index a845151cc8..0000000000 --- a/.changeset/lint-sonar.md +++ /dev/null @@ -1,2 +0,0 @@ ---- ---- diff --git a/.changeset/little-dolls-flash.md b/.changeset/little-dolls-flash.md deleted file mode 100644 index a845151cc8..0000000000 --- a/.changeset/little-dolls-flash.md +++ /dev/null @@ -1,2 +0,0 @@ ---- ---- diff --git a/.changeset/long-coins-decide.md b/.changeset/long-coins-decide.md deleted file mode 100644 index ca7482dd85..0000000000 --- a/.changeset/long-coins-decide.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@spectrum-charts/react-spectrum-charts-s2': patch -'@spectrum-charts/vega-spec-builder-s2': patch -'@spectrum-charts/docs': patch ---- - -Remove the startAngle and otherItemColor prop from the S2 Donut. diff --git a/.changeset/pattern-fill-research.md b/.changeset/pattern-fill-research.md deleted file mode 100644 index a845151cc8..0000000000 --- a/.changeset/pattern-fill-research.md +++ /dev/null @@ -1,2 +0,0 @@ ---- ---- diff --git a/.changeset/preserve-hidden-series-axes.md b/.changeset/preserve-hidden-series-axes.md deleted file mode 100644 index 56b9450b5f..0000000000 --- a/.changeset/preserve-hidden-series-axes.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@spectrum-charts/react-spectrum-charts-s2': patch -'@spectrum-charts/vega-spec-builder-s2': patch ---- - -Keep Line chart axes valid when every series is hidden while preserving rescaling to visible series, and keep charts visible when every legend entry is hidden. diff --git a/.changeset/reference-line-label-position.md b/.changeset/reference-line-label-position.md deleted file mode 100644 index 6d2b9b65b8..0000000000 --- a/.changeset/reference-line-label-position.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@adobe/react-spectrum-charts': minor -'@spectrum-charts/vega-spec-builder': minor ---- - -ReferenceLine labels on vertical axes are now aligned away from the chart so long labels no longer overlap the axis or the line. Adds a `labelPosition` prop (`'axis' | 'start' | 'end'`) to draw the label inside the chart area as a badge that flips to stay within the chart bounds. diff --git a/.changeset/rich-worms-film.md b/.changeset/rich-worms-film.md deleted file mode 100644 index a845151cc8..0000000000 --- a/.changeset/rich-worms-film.md +++ /dev/null @@ -1,2 +0,0 @@ ---- ---- diff --git a/.changeset/s2-action-bar.md b/.changeset/s2-action-bar.md deleted file mode 100644 index b9ddf2a719..0000000000 --- a/.changeset/s2-action-bar.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@spectrum-charts/react-spectrum-charts-s2': minor -'@spectrum-charts/vega-spec-builder-s2': minor ---- - -Add `ChartActionBar`, a new Line child component for Spectrum 2 charts. Clicking a data point shows a floating contextual toolbar with consumer-defined actions, overflow handling for actions that don't fit inline, drag-to-reposition, and an emphasized visual style option. (#797) diff --git a/.changeset/s2-animation-ticker.md b/.changeset/s2-animation-ticker.md deleted file mode 100644 index daf33c46a5..0000000000 --- a/.changeset/s2-animation-ticker.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -'@spectrum-charts/react-spectrum-charts-s2': patch -'@spectrum-charts/vega-spec-builder-s2': patch -'@spectrum-charts/core-s2': minor ---- - -S2 animations run on a shared on-demand ticker instead of each chart's always-on Vega timer. - -- Idle charts do no animation work; off-screen charts pause. -- Animations run at the display's native refresh rate, within an 8ms per-frame budget across charts. -- Draw-in starts on the first painted frame, so slow mounts no longer skip most of the animation. diff --git a/.changeset/s2-area-dashboard.md b/.changeset/s2-area-dashboard.md deleted file mode 100644 index 4a03405d39..0000000000 --- a/.changeset/s2-area-dashboard.md +++ /dev/null @@ -1,4 +0,0 @@ ---- ---- - -Add the S2 Area variation dashboard. diff --git a/.changeset/s2-bar-dashboard.md b/.changeset/s2-bar-dashboard.md deleted file mode 100644 index a845151cc8..0000000000 --- a/.changeset/s2-bar-dashboard.md +++ /dev/null @@ -1,2 +0,0 @@ ---- ---- diff --git a/.changeset/s2-bar-draw-in.md b/.changeset/s2-bar-draw-in.md deleted file mode 100644 index 127b9735e9..0000000000 --- a/.changeset/s2-bar-draw-in.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -'@spectrum-charts/react-spectrum-charts-s2': minor -'@spectrum-charts/vega-spec-builder-s2': minor -'@spectrum-charts/core-s2': minor ---- - -S2 bars draw in, and S2 animation timing follows Spectrum 2 motion. - -- Add `'drawIn'` to the chart's `animationTypes` to grow bars from the baseline. Stacked segments fill in order, and direct labels and annotations fade in once their own bar finishes. -- Draw-in durations: line 850ms, bar 700ms, donut 750ms. Charts with more than one mark type finish together. -- Draw-in and hover use the Spectrum 2 ease-in-out curve. Hover fades take 150ms. -- Draw-in labels fade in over 50ms. -- Users who prefer reduced motion now get hover fades; previously all animation was turned off for them. Draw-in is still skipped. diff --git a/.changeset/s2-bullet-dashboard.md b/.changeset/s2-bullet-dashboard.md deleted file mode 100644 index 2f25e1f19d..0000000000 --- a/.changeset/s2-bullet-dashboard.md +++ /dev/null @@ -1,4 +0,0 @@ ---- ---- - -Add the S2 Bullet variation dashboard. diff --git a/.changeset/s2-chart-no-children.md b/.changeset/s2-chart-no-children.md deleted file mode 100644 index 33b6357db2..0000000000 --- a/.changeset/s2-chart-no-children.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@spectrum-charts/react-spectrum-charts-s2': patch ---- - -`Chart` logs an error and renders nothing when it has no children, instead of throwing. diff --git a/.changeset/s2-combo-animation-types.md b/.changeset/s2-combo-animation-types.md deleted file mode 100644 index d1642e53cf..0000000000 --- a/.changeset/s2-combo-animation-types.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@spectrum-charts/vega-spec-builder-s2': patch ---- - -S2 Combo charts now respect the chart's `animations` and `animationTypes` props. Previously the Combo's bar and line always used the default animations. diff --git a/.changeset/s2-compiler-vega-util-merge-config.md b/.changeset/s2-compiler-vega-util-merge-config.md deleted file mode 100644 index ac9ac6871d..0000000000 --- a/.changeset/s2-compiler-vega-util-merge-config.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@spectrum-charts/vega-spec-builder-s2': patch ---- - -Import `mergeConfig` from `vega-util` instead of `vega`. This was the package's only runtime import of `vega`, and it pulled a second copy of Vega and d3 into consumer apps. The code S2 charts add to a production app drops by about 19% (501 KB minified, 170 KB gzip), with no behavior change. diff --git a/.changeset/s2-component-stages-docs.md b/.changeset/s2-component-stages-docs.md deleted file mode 100644 index 3631321c2b..0000000000 --- a/.changeset/s2-component-stages-docs.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@spectrum-charts/docs': patch ---- - -Add a Component Stages page defining the pre-alpha, alpha, beta, RC, and stable stages for Spectrum 2 components. diff --git a/.changeset/s2-core-package.md b/.changeset/s2-core-package.md deleted file mode 100644 index 6193158cf5..0000000000 --- a/.changeset/s2-core-package.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@spectrum-charts/core-s2': minor -'@spectrum-charts/react-spectrum-charts-s2': minor -'@spectrum-charts/vega-spec-builder-s2': minor ---- - -Add `@spectrum-charts/core-s2`, an S2-only package with `constants`, `locales`, `tokens`, and `utils` subpath exports. The S2 packages now depend on it instead of the shared `@spectrum-charts/constants`, `themes`, `utils`, and `locales` packages, so S2 no longer has to stay in sync with S1. `@spectrum-charts/react-spectrum-charts-s2` no longer re-exports the S1-only `getSpectrumVegaConfig`. diff --git a/.changeset/s2-dashboard-header.md b/.changeset/s2-dashboard-header.md deleted file mode 100644 index a845151cc8..0000000000 --- a/.changeset/s2-dashboard-header.md +++ /dev/null @@ -1,2 +0,0 @@ ---- ---- diff --git a/.changeset/s2-default-colors.md b/.changeset/s2-default-colors.md deleted file mode 100644 index 127f2a276a..0000000000 --- a/.changeset/s2-default-colors.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@spectrum-charts/vega-spec-builder-s2': patch ---- - -Default `colors` in `buildSpec` to `s2Categorical20`, matching `Chart`. diff --git a/.changeset/s2-donut-alpha.md b/.changeset/s2-donut-alpha.md deleted file mode 100644 index 06d8c02497..0000000000 --- a/.changeset/s2-donut-alpha.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -'@spectrum-charts/react-spectrum-charts-s2': minor ---- - -S2 Donut is now an alpha component. `Donut`, `DonutSummary`, and `SegmentLabel` are exported from `@spectrum-charts/react-spectrum-charts-s2` and no longer from the `pre-alpha` subpath. Update imports: - -```diff -- import { Donut, DonutSummary, SegmentLabel } from '@spectrum-charts/react-spectrum-charts-s2/pre-alpha'; -+ import { Donut, DonutSummary, SegmentLabel } from '@spectrum-charts/react-spectrum-charts-s2'; -``` - -Alpha components now show their stage: an `@alpha` tag in their documentation comment, an Alpha badge in Storybook, and an Alpha badge in the docs. diff --git a/.changeset/s2-donut-dashboard-audit.md b/.changeset/s2-donut-dashboard-audit.md deleted file mode 100644 index a845151cc8..0000000000 --- a/.changeset/s2-donut-dashboard-audit.md +++ /dev/null @@ -1,2 +0,0 @@ ---- ---- diff --git a/.changeset/s2-donut-default-dialog.md b/.changeset/s2-donut-default-dialog.md deleted file mode 100644 index 2780d4b78a..0000000000 --- a/.changeset/s2-donut-default-dialog.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -'@spectrum-charts/constants': minor -'@spectrum-charts/react-spectrum-charts-s2': minor -'@spectrum-charts/vega-spec-builder-s2': minor ---- - -S2 Donut `ChartInspect` and `ChartPopover` now render default content (color swatch, series name, and share of the visible total with its short-number value, e.g. `65.2% (23K)`, formatted with the chart locale) without requiring children. - -When children are provided inside a `Donut`, their content replaces the default content. - -`@spectrum-charts/vega-spec-builder-s2` exports a new `formatPercentWithValue(locale)` formatter used for this content. diff --git a/.changeset/s2-donut-draw-in.md b/.changeset/s2-donut-draw-in.md deleted file mode 100644 index 0de58dff00..0000000000 --- a/.changeset/s2-donut-draw-in.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@spectrum-charts/react-spectrum-charts-s2": patch -"@spectrum-charts/vega-spec-builder-s2": patch -"@spectrum-charts/core-s2": patch ---- - -Add opt-in clockwise draw-in animations for S2 donuts with labels fading in linearly over 50ms after their slices finish drawing. diff --git a/.changeset/s2-donut-hover-opacity.md b/.changeset/s2-donut-hover-opacity.md deleted file mode 100644 index 732b7a2ce8..0000000000 --- a/.changeset/s2-donut-hover-opacity.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@spectrum-charts/react-spectrum-charts-s2": patch -"@spectrum-charts/vega-spec-builder-s2": patch ---- - -Animate S2 donut segment and label opacity with the shared hover animation system. diff --git a/.changeset/s2-donut-label-hover.md b/.changeset/s2-donut-label-hover.md deleted file mode 100644 index 15828e59e8..0000000000 --- a/.changeset/s2-donut-label-hover.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@spectrum-charts/react-spectrum-charts-s2': patch -'@spectrum-charts/vega-spec-builder-s2': patch ---- - -Match S2 donut label interactions to their slices, including animated hover highlighting, inspect tooltips, and popovers. diff --git a/.changeset/s2-donut-radius-signals.md b/.changeset/s2-donut-radius-signals.md deleted file mode 100644 index ab38f2a59f..0000000000 --- a/.changeset/s2-donut-radius-signals.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@spectrum-charts/vega-spec-builder-s2': patch ---- - -S2 Donut: smoother draw-in animation. diff --git a/.changeset/s2-dotted-round-stroke-cap.md b/.changeset/s2-dotted-round-stroke-cap.md deleted file mode 100644 index 049a8d89b2..0000000000 --- a/.changeset/s2-dotted-round-stroke-cap.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@spectrum-charts/vega-spec-builder-s2': patch ---- - -Fix dotted Scatter outlines and Trendlines rendering invisible by using round stroke caps. diff --git a/.changeset/s2-draw-in-continuity.md b/.changeset/s2-draw-in-continuity.md deleted file mode 100644 index b5a92409b4..0000000000 --- a/.changeset/s2-draw-in-continuity.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@spectrum-charts/react-spectrum-charts-s2': patch ---- - -S2 draw-in animations play once per chart mount. Re-renders and data updates no longer restart the draw-in; if one happens mid draw-in, the animation continues from where it was. A chart whose data is emptied and then restored draws in again. diff --git a/.changeset/s2-draw-in-start-gate.md b/.changeset/s2-draw-in-start-gate.md deleted file mode 100644 index 601cc79e7a..0000000000 --- a/.changeset/s2-draw-in-start-gate.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -'@spectrum-charts/react-spectrum-charts-s2': patch -'@spectrum-charts/core-s2': patch ---- - -S2 draw-in starts more smoothly. - -- On first paint a drawing-in chart fades in over 150ms with the Spectrum 2 ease-out curve instead of appearing abruptly. -- Draw-in waits up to 300ms for the page to render frames on time, so it no longer stutters while other content loads. -- A chart that re-renders before its draw-in starts plays the whole draw-in instead of skipping its beginning. diff --git a/.changeset/s2-empty-state-s2-icon.md b/.changeset/s2-empty-state-s2-icon.md deleted file mode 100644 index 2412fc0990..0000000000 --- a/.changeset/s2-empty-state-s2-icon.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@spectrum-charts/react-spectrum-charts-s2': patch ---- - -EmptyState now uses the S2 `ChartBarVert` icon instead of the undeclared S1 `@spectrum-icons/workflow` icon. This removes the S1 icon and provider code from the bundle: about 68 KB minified (7 KB gzip) less for a consumer rendering a bar chart. diff --git a/.changeset/s2-esm-output.md b/.changeset/s2-esm-output.md deleted file mode 100644 index f3dfdecb21..0000000000 --- a/.changeset/s2-esm-output.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -'@spectrum-charts/core-s2': minor -'@spectrum-charts/react-spectrum-charts-s2': minor -'@spectrum-charts/vega-spec-builder-s2': minor -'@spectrum-charts/schemas': major ---- - -Ship the S2 packages as per-module ES modules built with Rollup, so bundlers share dependencies with the app and tree-shake unused code. In a consumer webpack build this cuts what `@spectrum-charts/react-spectrum-charts-s2` adds to an app that already uses React Spectrum S2 from about 350 KB to about 175 KB gzip, mostly by no longer bundling private copies of `@react-spectrum/s2` and React Aria. - -Breaking changes: -- `@spectrum-charts/core-s2`, `@spectrum-charts/schemas`, `@spectrum-charts/vega-spec-builder-s2` and `@spectrum-charts/react-spectrum-charts-s2` are ESM-only (`"type": "module"` with an `exports` map). `require()`, the UMD global, and deep imports into `dist/` are no longer supported. -- The packages declare `engines.node >=20.19.0`. -- `@spectrum-charts/react-spectrum-charts-s2` adds `react-aria-components` `^1.14.0` as a peer dependency, so it shares React Aria context with `@react-spectrum/s2`. -- The `./alpha` and `./beta` subpath exports of `@spectrum-charts/react-spectrum-charts-s2` are removed; they never pointed at published files. -- Jest consumers must transform `@spectrum-charts/*` and stub CSS imports. See "Module format" in the S2 overview docs. - -Type declarations now resolve under `moduleResolution` `node16`/`nodenext` as well as `bundler`. diff --git a/.changeset/s2-hover-deemphasis-opacity.md b/.changeset/s2-hover-deemphasis-opacity.md deleted file mode 100644 index 15c5a9f337..0000000000 --- a/.changeset/s2-hover-deemphasis-opacity.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@spectrum-charts/vega-spec-builder-s2': patch ---- - -S2 Line, Bar and Donut: smoother hover animations on charts with many points. diff --git a/.changeset/s2-hover-fraction-lookup.md b/.changeset/s2-hover-fraction-lookup.md deleted file mode 100644 index 6e0f762be6..0000000000 --- a/.changeset/s2-hover-fraction-lookup.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@spectrum-charts/vega-spec-builder-s2': patch ---- - -S2 Line, Bar, Donut and Legend: smoother hover animations on charts with many series. diff --git a/.changeset/s2-hover-state-signal-mirror.md b/.changeset/s2-hover-state-signal-mirror.md deleted file mode 100644 index 9ef5d5217d..0000000000 --- a/.changeset/s2-hover-state-signal-mirror.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@spectrum-charts/core-s2': patch -'@spectrum-charts/vega-spec-builder-s2': patch ---- - -Speed up initial render of S2 charts with hover animations, most noticeably bar charts with many bars. diff --git a/.changeset/s2-lab-subpath.md b/.changeset/s2-lab-subpath.md deleted file mode 100644 index 5c4459712f..0000000000 --- a/.changeset/s2-lab-subpath.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -'@spectrum-charts/react-spectrum-charts-s2': minor ---- - -The S2 `pre-alpha` subpath is renamed `lab`. `Area`, `Bullet`, `Combo`, `Scatter`, `ScatterAnnotation`, `ScatterPath`, `Trendline`, and `TrendlineAnnotation` are now lab components, imported from `@spectrum-charts/react-spectrum-charts-s2/lab`. The `pre-alpha` subpath is removed. Update imports: - -```diff -- import { Scatter, ScatterPath } from '@spectrum-charts/react-spectrum-charts-s2/pre-alpha'; -+ import { Scatter, ScatterPath } from '@spectrum-charts/react-spectrum-charts-s2/lab'; -``` diff --git a/.changeset/s2-legend-default-align-start.md b/.changeset/s2-legend-default-align-start.md deleted file mode 100644 index cd78396562..0000000000 --- a/.changeset/s2-legend-default-align-start.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@spectrum-charts/themes': minor -'@spectrum-charts/react-spectrum-charts-s2': minor -'@spectrum-charts/vega-spec-builder-s2': minor -'@adobe/react-spectrum-charts': minor ---- - -S2 legends positioned at the bottom or top are now left-aligned (`align: 'start'`) by default instead of centered. This also applies to S1 charts using the `s2` prop; S1 charts without it are unchanged. Pass `align="middle"` to keep the previous centered layout. diff --git a/.changeset/s2-line-basis-points.md b/.changeset/s2-line-basis-points.md deleted file mode 100644 index fb8c0fff18..0000000000 --- a/.changeset/s2-line-basis-points.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@spectrum-charts/vega-spec-builder-s2': patch ---- - -Line: `interpolate="basis"` no longer draws static points, hover points, or hover labels. The curve does not pass through the data, so the points sat off the line. diff --git a/.changeset/s2-line-clip-draw-in.md b/.changeset/s2-line-clip-draw-in.md deleted file mode 100644 index 13236d0ee1..0000000000 --- a/.changeset/s2-line-clip-draw-in.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@spectrum-charts/vega-spec-builder-s2': patch -'@spectrum-charts/core-s2': minor ---- - -S2 Line: draw-in animation is about 3× smoother on dashboards with many line charts. Lines with alternate (dashed) segments or a primary series now keep their styling while drawing in. - -`core-s2` no longer exports the internal line draw-in data/field constants (`DRAW_IN_PREV_DATA`, `DRAW_IN_TIP_DATA`, `DRAW_IN_LERP_DATA`, `DRAW_IN_POINT_INDEX_DATA`, `DRAW_IN_TIME_MS_FIELD`, `DRAW_IN_NEXT_*_FIELD`, `DRAW_IN_POINT_INDEX_FIELD`, `DRAW_IN_TIP_FLAG`, `DRAW_IN_DOMAIN_MIN/MAX`). diff --git a/.changeset/s2-line-dashboard.md b/.changeset/s2-line-dashboard.md deleted file mode 100644 index a845151cc8..0000000000 --- a/.changeset/s2-line-dashboard.md +++ /dev/null @@ -1,2 +0,0 @@ ---- ---- diff --git a/.changeset/s2-line-hover-point-reflow.md b/.changeset/s2-line-hover-point-reflow.md deleted file mode 100644 index 7783df61c5..0000000000 --- a/.changeset/s2-line-hover-point-reflow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@spectrum-charts/vega-spec-builder-s2': patch ---- - -Fix S2 line charts reflowing by a pixel when hovering a point at the chart edge diff --git a/.changeset/s2-line-hover-thickening.md b/.changeset/s2-line-hover-thickening.md deleted file mode 100644 index a629a7c8a6..0000000000 --- a/.changeset/s2-line-hover-thickening.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@spectrum-charts/vega-spec-builder-s2': patch ---- - -Line: hovering no longer thickens lines when there is only one series or when highlighting by dimension. diff --git a/.changeset/s2-line-item-hover-clip.md b/.changeset/s2-line-item-hover-clip.md deleted file mode 100644 index e74ac0ca91..0000000000 --- a/.changeset/s2-line-item-hover-clip.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@spectrum-charts/vega-spec-builder-s2': patch ---- - -Line: `interactionMode="item"` no longer shrinks the plot. Its hover areas are now clipped to the plot. diff --git a/.changeset/s2-line-series-highlight-hover.md b/.changeset/s2-line-series-highlight-hover.md deleted file mode 100644 index 478d4d3bf8..0000000000 --- a/.changeset/s2-line-series-highlight-hover.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@spectrum-charts/vega-spec-builder-s2': patch ---- - -Line: highlighting by series no longer shows the hover rule, point, or value label. Only the other series fade. diff --git a/.changeset/s2-line-voronoi-after-draw-in.md b/.changeset/s2-line-voronoi-after-draw-in.md deleted file mode 100644 index 3580248df3..0000000000 --- a/.changeset/s2-line-voronoi-after-draw-in.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@spectrum-charts/core-s2': patch -'@spectrum-charts/vega-spec-builder-s2': patch ---- - -Improve line draw-in animation performance on interactive S2 line charts by loading the hover layer after the draw-in finishes, without changing chart layout. diff --git a/.changeset/s2-scatter-dashboard.md b/.changeset/s2-scatter-dashboard.md deleted file mode 100644 index be941753de..0000000000 --- a/.changeset/s2-scatter-dashboard.md +++ /dev/null @@ -1,4 +0,0 @@ ---- ---- - -Add the S2 Scatter variation dashboard. diff --git a/.changeset/s2-stages-lab-rc.md b/.changeset/s2-stages-lab-rc.md deleted file mode 100644 index 44354dfe0e..0000000000 --- a/.changeset/s2-stages-lab-rc.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@spectrum-charts/docs': patch ---- - -Update the Component Stages page: replace pre-alpha with lab components, add the release candidate period rules, and explain how to tell a component's stage. diff --git a/.changeset/s2-vega-chart-promise-catches.md b/.changeset/s2-vega-chart-promise-catches.md deleted file mode 100644 index 5ba1da7536..0000000000 --- a/.changeset/s2-vega-chart-promise-catches.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@spectrum-charts/react-spectrum-charts-s2': patch ---- - -Catch and log failed chart embeds in S2 `VegaChart` instead of leaving them as unhandled promise rejections. diff --git a/.changeset/s2-vertical-axis-tick-count.md b/.changeset/s2-vertical-axis-tick-count.md deleted file mode 100644 index 6cf9285b25..0000000000 --- a/.changeset/s2-vertical-axis-tick-count.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@spectrum-charts/vega-spec-builder-s2': patch ---- - -Vertical axes space their ticks by height even without `grid`, so a right axis lines up with a gridded left axis. diff --git a/.changeset/scatter-highlighted-item-signal.md b/.changeset/scatter-highlighted-item-signal.md deleted file mode 100644 index fc548b5905..0000000000 --- a/.changeset/scatter-highlighted-item-signal.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@spectrum-charts/vega-spec-builder-s2': patch ---- - -Fix Scatter rendering blank when `highlightedItem` is set without interactive children. diff --git a/.changeset/scatter-stroke-color-domain.md b/.changeset/scatter-stroke-color-domain.md deleted file mode 100644 index a0b817921f..0000000000 --- a/.changeset/scatter-stroke-color-domain.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@spectrum-charts/vega-spec-builder-s2': patch ---- - -Fix Scatter `stroke` set to a data field rendering no outline. diff --git a/.changeset/semicircle-summary-delta-layout.md b/.changeset/semicircle-summary-delta-layout.md deleted file mode 100644 index a98840d0d7..0000000000 --- a/.changeset/semicircle-summary-delta-layout.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@spectrum-charts/vega-spec-builder-s2': patch -'@spectrum-charts/react-spectrum-charts-s2': patch ---- - -Place semicircle DonutSummary deltas inside the arc, below the value and label, without moving the arc. -Hide semicircle deltas at XS/S without reserving space; show them from M upward. - -Size semicircle rings and text to match the arc diameter in wide containers. diff --git a/.changeset/sparse-fixed-metric-axis-hover.md b/.changeset/sparse-fixed-metric-axis-hover.md deleted file mode 100644 index 6ecd298b5b..0000000000 --- a/.changeset/sparse-fixed-metric-axis-hover.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@spectrum-charts/react-spectrum-charts-s2': patch -'@spectrum-charts/vega-spec-builder-s2': patch ---- - -Fix line charts collapsing, flickering, or showing hover indicators for invisible points with fixed metric-axis ranges, including ranges that exclude zero. diff --git a/.changeset/sweet-brooms-admire.md b/.changeset/sweet-brooms-admire.md deleted file mode 100644 index cc3fe8c78f..0000000000 --- a/.changeset/sweet-brooms-admire.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@spectrum-charts/vega-spec-builder-s2': minor ---- - -Hide text in the DonutSummary if it truncates down all the way to `...` diff --git a/.changeset/thirty-beds-act.md b/.changeset/thirty-beds-act.md deleted file mode 100644 index 8277a1c81b..0000000000 --- a/.changeset/thirty-beds-act.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@spectrum-charts/vega-spec-builder-s2': minor ---- - -Adjust slice gap so the pie variation of a Donut has a 1px gap. diff --git a/.changeset/tidy-dryers-heal.md b/.changeset/tidy-dryers-heal.md deleted file mode 100644 index 1791072778..0000000000 --- a/.changeset/tidy-dryers-heal.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@spectrum-charts/react-spectrum-charts-s2': patch -'@spectrum-charts/vega-spec-builder-s2': patch -'@spectrum-charts/constants': patch -'@spectrum-charts/docs': patch ---- - -Pre-Alpha S2 Donut fixes for label positioning, truncation, spacing, and dense collision handling; fixing visibility of tiny segments; and fixing semicircle summary delta overlap. diff --git a/.changeset/tiny-grapes-drum.md b/.changeset/tiny-grapes-drum.md deleted file mode 100644 index a845151cc8..0000000000 --- a/.changeset/tiny-grapes-drum.md +++ /dev/null @@ -1,2 +0,0 @@ ---- ---- diff --git a/.changeset/warm-shirts-spend.md b/.changeset/warm-shirts-spend.md deleted file mode 100644 index a845151cc8..0000000000 --- a/.changeset/warm-shirts-spend.md +++ /dev/null @@ -1,2 +0,0 @@ ---- ---- diff --git a/.changeset/wet-cities-spend.md b/.changeset/wet-cities-spend.md deleted file mode 100644 index a845151cc8..0000000000 --- a/.changeset/wet-cities-spend.md +++ /dev/null @@ -1,2 +0,0 @@ ---- ---- diff --git a/.changeset/wide-donut-labels.md b/.changeset/wide-donut-labels.md deleted file mode 100644 index 3959adac39..0000000000 --- a/.changeset/wide-donut-labels.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@spectrum-charts/core-s2': patch -'@spectrum-charts/react-spectrum-charts-s2': patch -'@spectrum-charts/vega-spec-builder-s2': patch ---- - -Give donuts a 10px base inset without labels, allow labels to use available width with a 10px edge inset, and keep donuts centered when resized. diff --git a/.changeset/xl-donut-ring-width.md b/.changeset/xl-donut-ring-width.md deleted file mode 100644 index ff55c9df7c..0000000000 --- a/.changeset/xl-donut-ring-width.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@spectrum-charts/core-s2': patch -'@spectrum-charts/react-spectrum-charts-s2': patch -'@spectrum-charts/vega-spec-builder-s2': patch ---- - -Increase the default XL donut ring thickness to 40px. diff --git a/packages/constants/CHANGELOG.md b/packages/constants/CHANGELOG.md index 5a7dd721f5..8b96b4f448 100644 --- a/packages/constants/CHANGELOG.md +++ b/packages/constants/CHANGELOG.md @@ -1,5 +1,20 @@ # @spectrum-charts/constants +## 1.54.0 + +### Minor Changes + +- 4ec4e4d: S2 Donut: the gap between the ring and its segment labels now scales with donut size (5px for small, 10px for medium/large, 15px for extra large) instead of a fixed 20px. Donut size is now based on chart size. +- 0e60423: S2 Donut `ChartInspect` and `ChartPopover` now render default content (color swatch, series name, and share of the visible total with its short-number value, e.g. `65.2% (23K)`, formatted with the chart locale) without requiring children. + + When children are provided inside a `Donut`, their content replaces the default content. + + `@spectrum-charts/vega-spec-builder-s2` exports a new `formatPercentWithValue(locale)` formatter used for this content. + +### Patch Changes + +- fd19202: Pre-Alpha S2 Donut fixes for label positioning, truncation, spacing, and dense collision handling; fixing visibility of tiny segments; and fixing semicircle summary delta overlap. + ## 1.53.0 ### Minor Changes diff --git a/packages/constants/package.json b/packages/constants/package.json index 537392b17c..a007e31fb9 100644 --- a/packages/constants/package.json +++ b/packages/constants/package.json @@ -1,6 +1,6 @@ { "name": "@spectrum-charts/constants", - "version": "1.53.0", + "version": "1.54.0", "description": "Constants used in spectrum charts", "browser": "dist/index.js", "main": "dist/index.js", diff --git a/packages/core-s2/CHANGELOG.md b/packages/core-s2/CHANGELOG.md new file mode 100644 index 0000000000..94837dec0a --- /dev/null +++ b/packages/core-s2/CHANGELOG.md @@ -0,0 +1,55 @@ +# @spectrum-charts/core-s2 + +## 0.10.0 + +### Minor Changes + +- 5147cc4: S2 animations run on a shared on-demand ticker instead of each chart's always-on Vega timer. + + - Idle charts do no animation work; off-screen charts pause. + - Animations run at the display's native refresh rate, within an 8ms per-frame budget across charts. + - Draw-in starts on the first painted frame, so slow mounts no longer skip most of the animation. + +- f6cf322: S2 bars draw in, and S2 animation timing follows Spectrum 2 motion. + + - Add `'drawIn'` to the chart's `animationTypes` to grow bars from the baseline. Stacked segments fill in order, and direct labels and annotations fade in once their own bar finishes. + - Draw-in durations: line 850ms, bar 700ms, donut 750ms. Charts with more than one mark type finish together. + - Draw-in and hover use the Spectrum 2 ease-in-out curve. Hover fades take 150ms. + - Draw-in labels fade in over 50ms. + - Users who prefer reduced motion now get hover fades; previously all animation was turned off for them. Draw-in is still skipped. + +- 6a66423: Add `@spectrum-charts/core-s2`, an S2-only package with `constants`, `locales`, `tokens`, and `utils` subpath exports. The S2 packages now depend on it instead of the shared `@spectrum-charts/constants`, `themes`, `utils`, and `locales` packages, so S2 no longer has to stay in sync with S1. `@spectrum-charts/react-spectrum-charts-s2` no longer re-exports the S1-only `getSpectrumVegaConfig`. +- 7363290: Ship the S2 packages as per-module ES modules built with Rollup, so bundlers share dependencies with the app and tree-shake unused code. In a consumer webpack build this cuts what `@spectrum-charts/react-spectrum-charts-s2` adds to an app that already uses React Spectrum S2 from about 350 KB to about 175 KB gzip, mostly by no longer bundling private copies of `@react-spectrum/s2` and React Aria. + + Breaking changes: + + - `@spectrum-charts/core-s2`, `@spectrum-charts/schemas`, `@spectrum-charts/vega-spec-builder-s2` and `@spectrum-charts/react-spectrum-charts-s2` are ESM-only (`"type": "module"` with an `exports` map). `require()`, the UMD global, and deep imports into `dist/` are no longer supported. + - The packages declare `engines.node >=20.19.0`. + - `@spectrum-charts/react-spectrum-charts-s2` adds `react-aria-components` `^1.14.0` as a peer dependency, so it shares React Aria context with `@react-spectrum/s2`. + - The `./alpha` and `./beta` subpath exports of `@spectrum-charts/react-spectrum-charts-s2` are removed; they never pointed at published files. + - Jest consumers must transform `@spectrum-charts/*` and stub CSS imports. See "Module format" in the S2 overview docs. + + Type declarations now resolve under `moduleResolution` `node16`/`nodenext` as well as `bundler`. + +- 778d18a: S2 Line: draw-in animation is about 3× smoother on dashboards with many line charts. Lines with alternate (dashed) segments or a primary series now keep their styling while drawing in. + + `core-s2` no longer exports the internal line draw-in data/field constants (`DRAW_IN_PREV_DATA`, `DRAW_IN_TIP_DATA`, `DRAW_IN_LERP_DATA`, `DRAW_IN_POINT_INDEX_DATA`, `DRAW_IN_TIME_MS_FIELD`, `DRAW_IN_NEXT_*_FIELD`, `DRAW_IN_POINT_INDEX_FIELD`, `DRAW_IN_TIP_FLAG`, `DRAW_IN_DOMAIN_MIN/MAX`). + +### Patch Changes + +- 003c7e0: Preserve the intended visible donut ring thickness, including 40px at XL. + + Center full-circle DonutSummary stacks and bottom-align semicircles and their summaries with a 2px text inset, preserving the original spacing between values and labels. + +- 0af59b6: Increase the M and L donut size-tier diameter breakpoints from 160px and 200px to 200px and 280px, respectively. +- 6106b65: Add opt-in clockwise draw-in animations for S2 donuts with labels fading in linearly over 50ms after their slices finish drawing. +- c21b4e4: S2 draw-in starts more smoothly. + + - On first paint a drawing-in chart fades in over 150ms with the Spectrum 2 ease-out curve instead of appearing abruptly. + - Draw-in waits up to 300ms for the page to render frames on time, so it no longer stutters while other content loads. + - A chart that re-renders before its draw-in starts plays the whole draw-in instead of skipping its beginning. + +- 56877b3: Speed up initial render of S2 charts with hover animations, most noticeably bar charts with many bars. +- 879a303: Improve line draw-in animation performance on interactive S2 line charts by loading the hover layer after the draw-in finishes, without changing chart layout. +- bb702bd: Give donuts a 10px base inset without labels, allow labels to use available width with a 10px edge inset, and keep donuts centered when resized. +- bb702bd: Increase the default XL donut ring thickness to 40px. diff --git a/packages/core-s2/package.json b/packages/core-s2/package.json index 887475ba08..80faacca31 100644 --- a/packages/core-s2/package.json +++ b/packages/core-s2/package.json @@ -1,6 +1,6 @@ { "name": "@spectrum-charts/core-s2", - "version": "0.9.0", + "version": "0.10.0", "description": "Constants, locales, design tokens, and utilities for Spectrum 2 charts", "type": "module", "exports": { diff --git a/packages/docs/CHANGELOG.md b/packages/docs/CHANGELOG.md new file mode 100644 index 0000000000..276dc4a6f6 --- /dev/null +++ b/packages/docs/CHANGELOG.md @@ -0,0 +1,10 @@ +# @spectrum-charts/docs + +## 1.52.1 + +### Patch Changes + +- 9cfd99c: Remove the startAngle and otherItemColor prop from the S2 Donut. +- 1ce655a: Add a Component Stages page defining the pre-alpha, alpha, beta, RC, and stable stages for Spectrum 2 components. +- 95ba388: Update the Component Stages page: replace pre-alpha with lab components, add the release candidate period rules, and explain how to tell a component's stage. +- fd19202: Pre-Alpha S2 Donut fixes for label positioning, truncation, spacing, and dense collision handling; fixing visibility of tiny segments; and fixing semicircle summary delta overlap. diff --git a/packages/docs/package.json b/packages/docs/package.json index 098de514b4..37bff9cc41 100644 --- a/packages/docs/package.json +++ b/packages/docs/package.json @@ -1,6 +1,6 @@ { "name": "@spectrum-charts/docs", - "version": "1.52.0", + "version": "1.52.1", "private": true, "scripts": { "start": "docusaurus start", diff --git a/packages/react-spectrum-charts-s2/CHANGELOG.md b/packages/react-spectrum-charts-s2/CHANGELOG.md index b1dc9ea6e4..b9a3874f6e 100644 --- a/packages/react-spectrum-charts-s2/CHANGELOG.md +++ b/packages/react-spectrum-charts-s2/CHANGELOG.md @@ -1,5 +1,175 @@ # @spectrum-charts/react-spectrum-charts-s2 +## 0.10.0 + +### Minor Changes + +- 3e0b7ce: Move `ChartActionBar` to the lab entry point. Import it from `@spectrum-charts/react-spectrum-charts-s2/lab` instead of the package root. +- bf42a3d: Improve S2 bar accessible navigation: + Updated focus element position accuracy for screen magnifiers. + + Added keyboard and focus ring support for dodged bars. + + Added meaningful summaries of focused regions for screen readers while focusing elements in dodged and stacked bars. + (e.g. "Browser: Chrome. Operating system: Windows, Downloads: 5. Operating system: Mac, Downloads: 3.") + + Whole-chart focus provides a "metric by dimension" summary (e.g. "Downloads by Browser chart, grouped by Operating system. 3 groups.") instead of a raw field-name id. + + Tabbing out of the chart now keeps the focused node so Shift+Tab returns to it (rather than resetting to the "Enter navigation area" button) + + Leaving the chart reverts the focus dimming so the non-focused marks return to full opacity. + +- 9922dc7: S2 Donut: hovering a segment now shows its label even when it was hidden by label collision or because the segment is below the minimum label angle. Labels that would collide with the hovered label are hidden while it is hovered. (AN-495008) +- ef12f11: Add `ChartActionBar`, a new Line child component for Spectrum 2 charts. Clicking a data point shows a floating contextual toolbar with consumer-defined actions, overflow handling for actions that don't fit inline, drag-to-reposition, and an emphasized visual style option. (#797) +- f6cf322: S2 bars draw in, and S2 animation timing follows Spectrum 2 motion. + + - Add `'drawIn'` to the chart's `animationTypes` to grow bars from the baseline. Stacked segments fill in order, and direct labels and annotations fade in once their own bar finishes. + - Draw-in durations: line 850ms, bar 700ms, donut 750ms. Charts with more than one mark type finish together. + - Draw-in and hover use the Spectrum 2 ease-in-out curve. Hover fades take 150ms. + - Draw-in labels fade in over 50ms. + - Users who prefer reduced motion now get hover fades; previously all animation was turned off for them. Draw-in is still skipped. + +- 6a66423: Add `@spectrum-charts/core-s2`, an S2-only package with `constants`, `locales`, `tokens`, and `utils` subpath exports. The S2 packages now depend on it instead of the shared `@spectrum-charts/constants`, `themes`, `utils`, and `locales` packages, so S2 no longer has to stay in sync with S1. `@spectrum-charts/react-spectrum-charts-s2` no longer re-exports the S1-only `getSpectrumVegaConfig`. +- 7980b5e: S2 Donut is now an alpha component. `Donut`, `DonutSummary`, and `SegmentLabel` are exported from `@spectrum-charts/react-spectrum-charts-s2` and no longer from the `pre-alpha` subpath. Update imports: + + ```diff + - import { Donut, DonutSummary, SegmentLabel } from '@spectrum-charts/react-spectrum-charts-s2/pre-alpha'; + + import { Donut, DonutSummary, SegmentLabel } from '@spectrum-charts/react-spectrum-charts-s2'; + ``` + + Alpha components now show their stage: an `@alpha` tag in their documentation comment, an Alpha badge in Storybook, and an Alpha badge in the docs. + +- 0e60423: S2 Donut `ChartInspect` and `ChartPopover` now render default content (color swatch, series name, and share of the visible total with its short-number value, e.g. `65.2% (23K)`, formatted with the chart locale) without requiring children. + + When children are provided inside a `Donut`, their content replaces the default content. + + `@spectrum-charts/vega-spec-builder-s2` exports a new `formatPercentWithValue(locale)` formatter used for this content. + +- 7363290: Ship the S2 packages as per-module ES modules built with Rollup, so bundlers share dependencies with the app and tree-shake unused code. In a consumer webpack build this cuts what `@spectrum-charts/react-spectrum-charts-s2` adds to an app that already uses React Spectrum S2 from about 350 KB to about 175 KB gzip, mostly by no longer bundling private copies of `@react-spectrum/s2` and React Aria. + + Breaking changes: + + - `@spectrum-charts/core-s2`, `@spectrum-charts/schemas`, `@spectrum-charts/vega-spec-builder-s2` and `@spectrum-charts/react-spectrum-charts-s2` are ESM-only (`"type": "module"` with an `exports` map). `require()`, the UMD global, and deep imports into `dist/` are no longer supported. + - The packages declare `engines.node >=20.19.0`. + - `@spectrum-charts/react-spectrum-charts-s2` adds `react-aria-components` `^1.14.0` as a peer dependency, so it shares React Aria context with `@react-spectrum/s2`. + - The `./alpha` and `./beta` subpath exports of `@spectrum-charts/react-spectrum-charts-s2` are removed; they never pointed at published files. + - Jest consumers must transform `@spectrum-charts/*` and stub CSS imports. See "Module format" in the S2 overview docs. + + Type declarations now resolve under `moduleResolution` `node16`/`nodenext` as well as `bundler`. + +- a02ab0f: The S2 `pre-alpha` subpath is renamed `lab`. `Area`, `Bullet`, `Combo`, `Scatter`, `ScatterAnnotation`, `ScatterPath`, `Trendline`, and `TrendlineAnnotation` are now lab components, imported from `@spectrum-charts/react-spectrum-charts-s2/lab`. The `pre-alpha` subpath is removed. Update imports: + + ```diff + - import { Scatter, ScatterPath } from '@spectrum-charts/react-spectrum-charts-s2/pre-alpha'; + + import { Scatter, ScatterPath } from '@spectrum-charts/react-spectrum-charts-s2/lab'; + ``` + +- c70b1c4: S2 legends positioned at the bottom or top are now left-aligned (`align: 'start'`) by default instead of centered. This also applies to S1 charts using the `s2` prop; S1 charts without it are unchanged. Pass `align="middle"` to keep the previous centered layout. + +### Patch Changes + +- 4c6f4bf: Chart props explicitly set to `undefined` now fall back to their defaults instead of overriding them. +- 03ebd82: Clip reference lines to the plot so out-of-range values no longer collapse the chart or flicker on hover. +- bb702bd: Sort categorical donut segments largest-first by default, with `sortOrder="data"` to preserve input order. +- 003c7e0: Preserve the intended visible donut ring thickness, including 40px at XL. + + Center full-circle DonutSummary stacks and bottom-align semicircles and their summaries with a 2px text inset, preserving the original spacing between values and labels. + +- 7cd2cfd: S2 Donut: keep a donut's left or right legend next to the donut when the chart is wider than it is tall. +- 0af59b6: Increase the M and L donut size-tier diameter breakpoints from 160px and 200px to 200px and 280px, respectively. +- 4ec4e4d: S2 Donut: the gap between the ring and its segment labels now scales with donut size (5px for small, 10px for medium/large, 15px for extra large) instead of a fixed 20px. Donut size is now based on chart size. +- ce9edf4: Fix donuts growing during resize and retaining unnecessary side padding when there is no surplus width for a side legend. +- 7426d40: The chart animations will respect the "reduce motion" setting on a users operating system. +- 9cfd99c: Remove the startAngle and otherItemColor prop from the S2 Donut. +- 7a5a8a7: Keep Line chart axes valid when every series is hidden while preserving rescaling to visible series, and keep charts visible when every legend entry is hidden. +- 5147cc4: S2 animations run on a shared on-demand ticker instead of each chart's always-on Vega timer. + + - Idle charts do no animation work; off-screen charts pause. + - Animations run at the display's native refresh rate, within an 8ms per-frame budget across charts. + - Draw-in starts on the first painted frame, so slow mounts no longer skip most of the animation. + +- 4da69dc: `Chart` logs an error and renders nothing when it has no children, instead of throwing. +- 6106b65: Add opt-in clockwise draw-in animations for S2 donuts with labels fading in linearly over 50ms after their slices finish drawing. +- 0571b96: Animate S2 donut segment and label opacity with the shared hover animation system. +- b042f60: Match S2 donut label interactions to their slices, including animated hover highlighting, inspect tooltips, and popovers. +- 125d217: S2 draw-in animations play once per chart mount. Re-renders and data updates no longer restart the draw-in; if one happens mid draw-in, the animation continues from where it was. A chart whose data is emptied and then restored draws in again. +- c21b4e4: S2 draw-in starts more smoothly. + + - On first paint a drawing-in chart fades in over 150ms with the Spectrum 2 ease-out curve instead of appearing abruptly. + - Draw-in waits up to 300ms for the page to render frames on time, so it no longer stutters while other content loads. + - A chart that re-renders before its draw-in starts plays the whole draw-in instead of skipping its beginning. + +- 4742b30: EmptyState now uses the S2 `ChartBarVert` icon instead of the undeclared S1 `@spectrum-icons/workflow` icon. This removes the S1 icon and provider code from the bundle: about 68 KB minified (7 KB gzip) less for a consumer rendering a bar chart. +- b673e8c: Catch and log failed chart embeds in S2 `VegaChart` instead of leaving them as unhandled promise rejections. +- 003c7e0: Place semicircle DonutSummary deltas inside the arc, below the value and label, without moving the arc. + Hide semicircle deltas at XS/S without reserving space; show them from M upward. + + Size semicircle rings and text to match the arc diameter in wide containers. + +- aec2a5e: Fix line charts collapsing, flickering, or showing hover indicators for invisible points with fixed metric-axis ranges, including ranges that exclude zero. +- fd19202: Pre-Alpha S2 Donut fixes for label positioning, truncation, spacing, and dense collision handling; fixing visibility of tiny segments; and fixing semicircle summary delta overlap. +- bb702bd: Give donuts a 10px base inset without labels, allow labels to use available width with a 10px edge inset, and keep donuts centered when resized. +- bb702bd: Increase the default XL donut ring thickness to 40px. +- Updated dependencies [acf2e4c] +- Updated dependencies [f172f3a] +- Updated dependencies [1bbf70e] +- Updated dependencies [7e9b98d] +- Updated dependencies [be4cf85] +- Updated dependencies [25dbb44] +- Updated dependencies [03ebd82] +- Updated dependencies [bb702bd] +- Updated dependencies [bf42a3d] +- Updated dependencies [9922dc7] +- Updated dependencies [2ff88a7] +- Updated dependencies [003c7e0] +- Updated dependencies [7cd2cfd] +- Updated dependencies [0af59b6] +- Updated dependencies [4ec4e4d] +- Updated dependencies [ce9edf4] +- Updated dependencies [7426d40] +- Updated dependencies [ea138a4] +- Updated dependencies [9cfd99c] +- Updated dependencies [7a5a8a7] +- Updated dependencies [ef12f11] +- Updated dependencies [5147cc4] +- Updated dependencies [f6cf322] +- Updated dependencies [bf2e31e] +- Updated dependencies [3454151] +- Updated dependencies [6a66423] +- Updated dependencies [e552107] +- Updated dependencies [0e60423] +- Updated dependencies [6106b65] +- Updated dependencies [0571b96] +- Updated dependencies [b042f60] +- Updated dependencies [5f0f7ee] +- Updated dependencies [dda494c] +- Updated dependencies [c21b4e4] +- Updated dependencies [7363290] +- Updated dependencies [e404467] +- Updated dependencies [eee0b6e] +- Updated dependencies [56877b3] +- Updated dependencies [c70b1c4] +- Updated dependencies [c972414] +- Updated dependencies [778d18a] +- Updated dependencies [2fe8a2c] +- Updated dependencies [3f3855e] +- Updated dependencies [39d2d54] +- Updated dependencies [74e9130] +- Updated dependencies [879a303] +- Updated dependencies [51120d6] +- Updated dependencies [32cd159] +- Updated dependencies [386e551] +- Updated dependencies [003c7e0] +- Updated dependencies [aec2a5e] +- Updated dependencies [904b468] +- Updated dependencies [d7e5b00] +- Updated dependencies [fd19202] +- Updated dependencies [bb702bd] +- Updated dependencies [bb702bd] + - @spectrum-charts/vega-spec-builder-s2@0.10.0 + - @spectrum-charts/core-s2@0.10.0 + - @spectrum-charts/schemas@2.0.0 + ## 0.9.0 ### Minor Changes diff --git a/packages/react-spectrum-charts-s2/package.json b/packages/react-spectrum-charts-s2/package.json index ad19b3d0a9..018c4e360e 100644 --- a/packages/react-spectrum-charts-s2/package.json +++ b/packages/react-spectrum-charts-s2/package.json @@ -1,6 +1,6 @@ { "name": "@spectrum-charts/react-spectrum-charts-s2", - "version": "0.9.0", + "version": "0.10.0", "description": "Declarative library for composing Spectrum 2 visualizations in React.", "type": "module", "main": "./dist/index.js", @@ -70,9 +70,9 @@ }, "dependencies": { "@internationalized/string": "^3.2.1", - "@spectrum-charts/core-s2": "0.9.0", - "@spectrum-charts/schemas": "^1.52.0", - "@spectrum-charts/vega-spec-builder-s2": "0.9.0", + "@spectrum-charts/core-s2": "0.10.0", + "@spectrum-charts/schemas": "^2.0.0", + "@spectrum-charts/vega-spec-builder-s2": "0.10.0", "d3-array": "^3.2.4", "d3-format": "^3.1.0", "data-navigator": "^2.4.1", diff --git a/packages/react-spectrum-charts/CHANGELOG.md b/packages/react-spectrum-charts/CHANGELOG.md index 94d5a5db95..73dd62e076 100644 --- a/packages/react-spectrum-charts/CHANGELOG.md +++ b/packages/react-spectrum-charts/CHANGELOG.md @@ -1,5 +1,25 @@ # @adobe/react-spectrum-charts +## 1.53.0 + +### Minor Changes + +- 003dddd: ReferenceLine labels on vertical axes are now aligned away from the chart so long labels no longer overlap the axis or the line. Adds a `labelPosition` prop (`'axis' | 'start' | 'end'`) to draw the label inside the chart area as a badge that flips to stay within the chart bounds. +- c70b1c4: S2 legends positioned at the bottom or top are now left-aligned (`align: 'start'`) by default instead of centered. This also applies to S1 charts using the `s2` prop; S1 charts without it are unchanged. Pass `align="middle"` to keep the previous centered layout. + +### Patch Changes + +- 4c6f4bf: Chart props explicitly set to `undefined` now fall back to their defaults instead of overriding them. +- Updated dependencies [25dbb44] +- Updated dependencies [4ec4e4d] +- Updated dependencies [003dddd] +- Updated dependencies [0e60423] +- Updated dependencies [c70b1c4] +- Updated dependencies [fd19202] + - @spectrum-charts/vega-spec-builder@1.53.0 + - @spectrum-charts/constants@1.54.0 + - @spectrum-charts/themes@1.53.0 + ## 1.52.1 ### Patch Changes diff --git a/packages/react-spectrum-charts/package.json b/packages/react-spectrum-charts/package.json index 9b110a102d..e8bcb310c8 100644 --- a/packages/react-spectrum-charts/package.json +++ b/packages/react-spectrum-charts/package.json @@ -1,6 +1,6 @@ { "name": "@adobe/react-spectrum-charts", - "version": "1.52.1", + "version": "1.53.0", "description": "Declarative library for composing Spectrum visualizations in React.", "browser": "./dist/index.js", "module": "./dist/index.js", @@ -75,11 +75,11 @@ "publish-package": "npm publish --access public" }, "dependencies": { - "@spectrum-charts/constants": "^1.53.0", + "@spectrum-charts/constants": "^1.54.0", "@spectrum-charts/locales": "^1.52.0", - "@spectrum-charts/themes": "^1.52.0", + "@spectrum-charts/themes": "^1.53.0", "@spectrum-charts/utils": "^1.52.0", - "@spectrum-charts/vega-spec-builder": "1.52.1", + "@spectrum-charts/vega-spec-builder": "1.53.0", "d3-format": "^3.1.0", "deepmerge": ">= 4.0.0", "immer": ">= 9.0.0", diff --git a/packages/schemas/CHANGELOG.md b/packages/schemas/CHANGELOG.md new file mode 100644 index 0000000000..e744aac75d --- /dev/null +++ b/packages/schemas/CHANGELOG.md @@ -0,0 +1,17 @@ +# @spectrum-charts/schemas + +## 2.0.0 + +### Major Changes + +- 7363290: Ship the S2 packages as per-module ES modules built with Rollup, so bundlers share dependencies with the app and tree-shake unused code. In a consumer webpack build this cuts what `@spectrum-charts/react-spectrum-charts-s2` adds to an app that already uses React Spectrum S2 from about 350 KB to about 175 KB gzip, mostly by no longer bundling private copies of `@react-spectrum/s2` and React Aria. + + Breaking changes: + + - `@spectrum-charts/core-s2`, `@spectrum-charts/schemas`, `@spectrum-charts/vega-spec-builder-s2` and `@spectrum-charts/react-spectrum-charts-s2` are ESM-only (`"type": "module"` with an `exports` map). `require()`, the UMD global, and deep imports into `dist/` are no longer supported. + - The packages declare `engines.node >=20.19.0`. + - `@spectrum-charts/react-spectrum-charts-s2` adds `react-aria-components` `^1.14.0` as a peer dependency, so it shares React Aria context with `@react-spectrum/s2`. + - The `./alpha` and `./beta` subpath exports of `@spectrum-charts/react-spectrum-charts-s2` are removed; they never pointed at published files. + - Jest consumers must transform `@spectrum-charts/*` and stub CSS imports. See "Module format" in the S2 overview docs. + + Type declarations now resolve under `moduleResolution` `node16`/`nodenext` as well as `bundler`. diff --git a/packages/schemas/package.json b/packages/schemas/package.json index 59b6b15400..d78bbc40fb 100644 --- a/packages/schemas/package.json +++ b/packages/schemas/package.json @@ -1,6 +1,6 @@ { "name": "@spectrum-charts/schemas", - "version": "1.52.0", + "version": "2.0.0", "description": "Custom A2UI catalog defining chart component contracts for agent-driven chart generation with React Spectrum Charts", "type": "module", "main": "dist/index.js", diff --git a/packages/themes/CHANGELOG.md b/packages/themes/CHANGELOG.md new file mode 100644 index 0000000000..4b171c88f8 --- /dev/null +++ b/packages/themes/CHANGELOG.md @@ -0,0 +1,14 @@ +# @spectrum-charts/themes + +## 1.53.0 + +### Minor Changes + +- c70b1c4: S2 legends positioned at the bottom or top are now left-aligned (`align: 'start'`) by default instead of centered. This also applies to S1 charts using the `s2` prop; S1 charts without it are unchanged. Pass `align="middle"` to keep the previous centered layout. + +### Patch Changes + +- Updated dependencies [4ec4e4d] +- Updated dependencies [0e60423] +- Updated dependencies [fd19202] + - @spectrum-charts/constants@1.54.0 diff --git a/packages/themes/package.json b/packages/themes/package.json index 43e39f69b8..fbea13425f 100644 --- a/packages/themes/package.json +++ b/packages/themes/package.json @@ -1,6 +1,6 @@ { "name": "@spectrum-charts/themes", - "version": "1.52.0", + "version": "1.53.0", "description": "Spectrum colors and themes used for spectrum charts", "browser": "dist/index.js", "main": "dist/index.js", @@ -29,7 +29,7 @@ "webpack-cli": "^5.0.1" }, "dependencies": { - "@spectrum-charts/constants": "^1.52.0", + "@spectrum-charts/constants": "^1.54.0", "@spectrum-charts/utils": "^1.52.0", "vega": "^6.2.0" } diff --git a/packages/vega-spec-builder-s2/CHANGELOG.md b/packages/vega-spec-builder-s2/CHANGELOG.md index fb7cfd745e..9162930109 100644 --- a/packages/vega-spec-builder-s2/CHANGELOG.md +++ b/packages/vega-spec-builder-s2/CHANGELOG.md @@ -1,5 +1,133 @@ # @spectrum-charts/vega-spec-builder-s2 +## 0.10.0 + +### Minor Changes + +- bf42a3d: Improve S2 bar accessible navigation: + Updated focus element position accuracy for screen magnifiers. + + Added keyboard and focus ring support for dodged bars. + + Added meaningful summaries of focused regions for screen readers while focusing elements in dodged and stacked bars. + (e.g. "Browser: Chrome. Operating system: Windows, Downloads: 5. Operating system: Mac, Downloads: 3.") + + Whole-chart focus provides a "metric by dimension" summary (e.g. "Downloads by Browser chart, grouped by Operating system. 3 groups.") instead of a raw field-name id. + + Tabbing out of the chart now keeps the focused node so Shift+Tab returns to it (rather than resetting to the "Enter navigation area" button) + + Leaving the chart reverts the focus dimming so the non-focused marks return to full opacity. + +- 9922dc7: S2 Donut: hovering a segment now shows its label even when it was hidden by label collision or because the segment is below the minimum label angle. Labels that would collide with the hovered label are hidden while it is hovered. (AN-495008) +- ef12f11: Add `ChartActionBar`, a new Line child component for Spectrum 2 charts. Clicking a data point shows a floating contextual toolbar with consumer-defined actions, overflow handling for actions that don't fit inline, drag-to-reposition, and an emphasized visual style option. (#797) +- f6cf322: S2 bars draw in, and S2 animation timing follows Spectrum 2 motion. + + - Add `'drawIn'` to the chart's `animationTypes` to grow bars from the baseline. Stacked segments fill in order, and direct labels and annotations fade in once their own bar finishes. + - Draw-in durations: line 850ms, bar 700ms, donut 750ms. Charts with more than one mark type finish together. + - Draw-in and hover use the Spectrum 2 ease-in-out curve. Hover fades take 150ms. + - Draw-in labels fade in over 50ms. + - Users who prefer reduced motion now get hover fades; previously all animation was turned off for them. Draw-in is still skipped. + +- 6a66423: Add `@spectrum-charts/core-s2`, an S2-only package with `constants`, `locales`, `tokens`, and `utils` subpath exports. The S2 packages now depend on it instead of the shared `@spectrum-charts/constants`, `themes`, `utils`, and `locales` packages, so S2 no longer has to stay in sync with S1. `@spectrum-charts/react-spectrum-charts-s2` no longer re-exports the S1-only `getSpectrumVegaConfig`. +- 0e60423: S2 Donut `ChartInspect` and `ChartPopover` now render default content (color swatch, series name, and share of the visible total with its short-number value, e.g. `65.2% (23K)`, formatted with the chart locale) without requiring children. + + When children are provided inside a `Donut`, their content replaces the default content. + + `@spectrum-charts/vega-spec-builder-s2` exports a new `formatPercentWithValue(locale)` formatter used for this content. + +- 7363290: Ship the S2 packages as per-module ES modules built with Rollup, so bundlers share dependencies with the app and tree-shake unused code. In a consumer webpack build this cuts what `@spectrum-charts/react-spectrum-charts-s2` adds to an app that already uses React Spectrum S2 from about 350 KB to about 175 KB gzip, mostly by no longer bundling private copies of `@react-spectrum/s2` and React Aria. + + Breaking changes: + + - `@spectrum-charts/core-s2`, `@spectrum-charts/schemas`, `@spectrum-charts/vega-spec-builder-s2` and `@spectrum-charts/react-spectrum-charts-s2` are ESM-only (`"type": "module"` with an `exports` map). `require()`, the UMD global, and deep imports into `dist/` are no longer supported. + - The packages declare `engines.node >=20.19.0`. + - `@spectrum-charts/react-spectrum-charts-s2` adds `react-aria-components` `^1.14.0` as a peer dependency, so it shares React Aria context with `@react-spectrum/s2`. + - The `./alpha` and `./beta` subpath exports of `@spectrum-charts/react-spectrum-charts-s2` are removed; they never pointed at published files. + - Jest consumers must transform `@spectrum-charts/*` and stub CSS imports. See "Module format" in the S2 overview docs. + + Type declarations now resolve under `moduleResolution` `node16`/`nodenext` as well as `bundler`. + +- c70b1c4: S2 legends positioned at the bottom or top are now left-aligned (`align: 'start'`) by default instead of centered. This also applies to S1 charts using the `s2` prop; S1 charts without it are unchanged. Pass `align="middle"` to keep the previous centered layout. +- 904b468: Hide text in the DonutSummary if it truncates down all the way to `...` +- d7e5b00: Adjust slice gap so the pie variation of a Donut has a 1px gap. + +### Patch Changes + +- acf2e4c: Fix Area crashing with a controlled highlightedItem and no interactive children, and place the hover and anchor points on the upper edge of metricStart/metricEnd bands. +- f172f3a: Fix S2 bar `ChartInspect` group highlighting with hover animations, `highlightedItem` on non-interactive bars, and `shortNumber`/`shortCurrency` bar direct label formats; controlled `highlightedItem` now respects `idKey`. +- 1bbf70e: Show the bullet metric axis when `showTargetValue` is set but `showTarget` is false. +- 7e9b98d: Hide the bullet target line when a row has no target value instead of drawing it at zero. +- be4cf85: Fix a bullet chart with thresholds and `ChartInspect` failing to render when `showTargetValue` is set but `showTarget` is false. +- 25dbb44: Bullet value labels always use gray-900 instead of the threshold color when `thresholdBarColor` is enabled, matching side labels. +- 03ebd82: Clip reference lines to the plot so out-of-range values no longer collapse the chart or flicker on hover. +- bb702bd: Sort categorical donut segments largest-first by default, with `sortOrder="data"` to preserve input order. +- 2ff88a7: Donut segment labels measure their text once per data update instead of on every animation frame, and `getLabelWidth` reuses one canvas and caches widths. Speeds up donut draw-in with labels. +- 003c7e0: Preserve the intended visible donut ring thickness, including 40px at XL. + + Center full-circle DonutSummary stacks and bottom-align semicircles and their summaries with a 2px text inset, preserving the original spacing between values and labels. + +- 7cd2cfd: S2 Donut: keep a donut's left or right legend next to the donut when the chart is wider than it is tall. +- 0af59b6: Increase the M and L donut size-tier diameter breakpoints from 160px and 200px to 200px and 280px, respectively. +- 4ec4e4d: S2 Donut: the gap between the ring and its segment labels now scales with donut size (5px for small, 10px for medium/large, 15px for extra large) instead of a fixed 20px. Donut size is now based on chart size. +- ce9edf4: Fix donuts growing during resize and retaining unnecessary side padding when there is no surplus width for a side legend. +- 7426d40: The chart animations will respect the "reduce motion" setting on a users operating system. +- ea138a4: Fix S2 Line crashes from missing signals: `highlightedItem` on a non-interactive Line, and MetricRange on a Line with draw-in animation. +- 9cfd99c: Remove the startAngle and otherItemColor prop from the S2 Donut. +- 7a5a8a7: Keep Line chart axes valid when every series is hidden while preserving rescaling to visible series, and keep charts visible when every legend entry is hidden. +- 5147cc4: S2 animations run on a shared on-demand ticker instead of each chart's always-on Vega timer. + + - Idle charts do no animation work; off-screen charts pause. + - Animations run at the display's native refresh rate, within an 8ms per-frame budget across charts. + - Draw-in starts on the first painted frame, so slow mounts no longer skip most of the animation. + +- bf2e31e: S2 Combo charts now respect the chart's `animations` and `animationTypes` props. Previously the Combo's bar and line always used the default animations. +- 3454151: Import `mergeConfig` from `vega-util` instead of `vega`. This was the package's only runtime import of `vega`, and it pulled a second copy of Vega and d3 into consumer apps. The code S2 charts add to a production app drops by about 19% (501 KB minified, 170 KB gzip), with no behavior change. +- e552107: Default `colors` in `buildSpec` to `s2Categorical20`, matching `Chart`. +- 6106b65: Add opt-in clockwise draw-in animations for S2 donuts with labels fading in linearly over 50ms after their slices finish drawing. +- 0571b96: Animate S2 donut segment and label opacity with the shared hover animation system. +- b042f60: Match S2 donut label interactions to their slices, including animated hover highlighting, inspect tooltips, and popovers. +- 5f0f7ee: S2 Donut: smoother draw-in animation. +- dda494c: Fix dotted Scatter outlines and Trendlines rendering invisible by using round stroke caps. +- e404467: S2 Line, Bar and Donut: smoother hover animations on charts with many points. +- eee0b6e: S2 Line, Bar, Donut and Legend: smoother hover animations on charts with many series. +- 56877b3: Speed up initial render of S2 charts with hover animations, most noticeably bar charts with many bars. +- c972414: Line: `interpolate="basis"` no longer draws static points, hover points, or hover labels. The curve does not pass through the data, so the points sat off the line. +- 778d18a: S2 Line: draw-in animation is about 3× smoother on dashboards with many line charts. Lines with alternate (dashed) segments or a primary series now keep their styling while drawing in. + + `core-s2` no longer exports the internal line draw-in data/field constants (`DRAW_IN_PREV_DATA`, `DRAW_IN_TIP_DATA`, `DRAW_IN_LERP_DATA`, `DRAW_IN_POINT_INDEX_DATA`, `DRAW_IN_TIME_MS_FIELD`, `DRAW_IN_NEXT_*_FIELD`, `DRAW_IN_POINT_INDEX_FIELD`, `DRAW_IN_TIP_FLAG`, `DRAW_IN_DOMAIN_MIN/MAX`). + +- 2fe8a2c: Fix S2 line charts reflowing by a pixel when hovering a point at the chart edge +- 3f3855e: Line: hovering no longer thickens lines when there is only one series or when highlighting by dimension. +- 39d2d54: Line: `interactionMode="item"` no longer shrinks the plot. Its hover areas are now clipped to the plot. +- 74e9130: Line: highlighting by series no longer shows the hover rule, point, or value label. Only the other series fade. +- 879a303: Improve line draw-in animation performance on interactive S2 line charts by loading the hover layer after the draw-in finishes, without changing chart layout. +- 51120d6: Vertical axes space their ticks by height even without `grid`, so a right axis lines up with a gridded left axis. +- 32cd159: Fix Scatter rendering blank when `highlightedItem` is set without interactive children. +- 386e551: Fix Scatter `stroke` set to a data field rendering no outline. +- 003c7e0: Place semicircle DonutSummary deltas inside the arc, below the value and label, without moving the arc. + Hide semicircle deltas at XS/S without reserving space; show them from M upward. + + Size semicircle rings and text to match the arc diameter in wide containers. + +- aec2a5e: Fix line charts collapsing, flickering, or showing hover indicators for invisible points with fixed metric-axis ranges, including ranges that exclude zero. +- fd19202: Pre-Alpha S2 Donut fixes for label positioning, truncation, spacing, and dense collision handling; fixing visibility of tiny segments; and fixing semicircle summary delta overlap. +- bb702bd: Give donuts a 10px base inset without labels, allow labels to use available width with a 10px edge inset, and keep donuts centered when resized. +- bb702bd: Increase the default XL donut ring thickness to 40px. +- Updated dependencies [003c7e0] +- Updated dependencies [0af59b6] +- Updated dependencies [5147cc4] +- Updated dependencies [f6cf322] +- Updated dependencies [6a66423] +- Updated dependencies [6106b65] +- Updated dependencies [c21b4e4] +- Updated dependencies [7363290] +- Updated dependencies [56877b3] +- Updated dependencies [778d18a] +- Updated dependencies [879a303] +- Updated dependencies [bb702bd] +- Updated dependencies [bb702bd] + - @spectrum-charts/core-s2@0.10.0 + ## 0.9.0 ### Minor Changes diff --git a/packages/vega-spec-builder-s2/package.json b/packages/vega-spec-builder-s2/package.json index bf4bc29305..d65c1093d0 100644 --- a/packages/vega-spec-builder-s2/package.json +++ b/packages/vega-spec-builder-s2/package.json @@ -1,6 +1,6 @@ { "name": "@spectrum-charts/vega-spec-builder-s2", - "version": "0.9.0", + "version": "0.10.0", "description": "Vega spec builder for Spectrum 2 charts (S2 always enabled)", "type": "module", "main": "dist/index.js", @@ -34,7 +34,7 @@ "publish-package": "npm publish --access public --registry https://registry.npmjs.org" }, "dependencies": { - "@spectrum-charts/core-s2": "0.9.0", + "@spectrum-charts/core-s2": "0.10.0", "d3-format": "^3.1.0", "deepmerge": "^4.3.1", "immer": "^10.1.1", diff --git a/packages/vega-spec-builder/CHANGELOG.md b/packages/vega-spec-builder/CHANGELOG.md index f8c89af227..dac93b4784 100644 --- a/packages/vega-spec-builder/CHANGELOG.md +++ b/packages/vega-spec-builder/CHANGELOG.md @@ -1,5 +1,21 @@ # @spectrum-charts/vega-spec-builder +## 1.53.0 + +### Minor Changes + +- 003dddd: ReferenceLine labels on vertical axes are now aligned away from the chart so long labels no longer overlap the axis or the line. Adds a `labelPosition` prop (`'axis' | 'start' | 'end'`) to draw the label inside the chart area as a badge that flips to stay within the chart bounds. + +### Patch Changes + +- 25dbb44: Bullet value labels always use gray-900 instead of the threshold color when `thresholdBarColor` is enabled, matching side labels. +- Updated dependencies [4ec4e4d] +- Updated dependencies [0e60423] +- Updated dependencies [c70b1c4] +- Updated dependencies [fd19202] + - @spectrum-charts/constants@1.54.0 + - @spectrum-charts/themes@1.53.0 + ## 1.52.1 ### Patch Changes diff --git a/packages/vega-spec-builder/package.json b/packages/vega-spec-builder/package.json index 6dd881b76a..a0975a045f 100644 --- a/packages/vega-spec-builder/package.json +++ b/packages/vega-spec-builder/package.json @@ -1,6 +1,6 @@ { "name": "@spectrum-charts/vega-spec-builder", - "version": "1.52.1", + "version": "1.53.0", "description": "Vega spec builder for spectrum charts", "browser": "dist/index.js", "main": "dist/index.js", @@ -23,9 +23,9 @@ "publish-package": "npm publish --access public" }, "dependencies": { - "@spectrum-charts/constants": "^1.53.0", + "@spectrum-charts/constants": "^1.54.0", "@spectrum-charts/locales": "^1.52.0", - "@spectrum-charts/themes": "^1.52.0", + "@spectrum-charts/themes": "^1.53.0", "@spectrum-charts/utils": "^1.52.0", "immer": "^10.1.1", "vega": "^6.2.0",