Skip to content

Version Packages (next)#846

Merged
techniq merged 1 commit intonextfrom
changeset-release/next
Apr 29, 2026
Merged

Version Packages (next)#846
techniq merged 1 commit intonextfrom
changeset-release/next

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to next, this PR will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

next is currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, run changeset pre exit on next.

⚠️⚠️⚠️⚠️⚠️⚠️

Releases

layerchart@2.0.0-next.60

Minor Changes

  • breaking: Move heavy-dep components into sub-path exports (#845)

    The following components are no longer re-exported from 'layerchart' and must be imported from new sub-paths:

    • 'layerchart/geo'GeoCircle, GeoClipPath, GeoEdgeFade, GeoLegend, GeoPath, GeoPoint, GeoProjection, GeoRaster, GeoSpline, GeoTile, GeoVisible, Graticule, TileImage
    • 'layerchart/hierarchy'Tree, Treemap, Pack, Partition
    • 'layerchart/force'ForceSimulation
    • 'layerchart/graph'Dagre, Sankey, Chord, Ribbon

    This isolates each group's external d3 dependency (@dagrejs/dagre ~22 KB, d3-geo ~15 KB, d3-force ~7 KB, d3-hierarchy ~6 KB, d3-sankey ~6 KB, d3-chord ~2 KB) behind an opt-in import — defending against bundlers that don't tree-shake the root barrel cleanly.

    Voronoi/Hull stay at root (already lazy-loaded via TooltipContext). Contour/Density/Raster/BoxPlot/Violin/Threshold and high-level charts (LineChart, BarChart, etc.) remain at root.

    Migration: update affected imports, e.g.

    -import { Tree, GeoPath, ForceSimulation } from 'layerchart';
    +import { Tree } from 'layerchart/hierarchy';
    +import { GeoPath } from 'layerchart/geo';
    +import { ForceSimulation } from 'layerchart/force';

Patch Changes

  • perf: Lazy-load opt-in features in core path (#845)

    5 components/dependencies that previously sat in every <Chart> user's sync graph are now dynamically imported only when the corresponding feature is used:

    • BrushContext in Chart — only loads when <Chart brush={...}> is set (default undefined)
    • DefaultTooltip in ChartChildren — only loads when tooltipContext is set and no custom tooltip snippet is provided
    • d3-quadtree in TooltipContext — only loads when mode is 'quadtree', 'quadtree-x', or 'quadtree-y'
    • Spline in Grid — only loads when rendering radial linear grid lines (<Chart radial> with radialY="linear")
    • Bar in Highlight — only loads when <Chart highlight={{ bar: ... }}> is set (default false)

    Result: ~10 KB gz off core (115.6 → 105.25 KB) and comparable savings on every cartesian/geo/graph/hierarchy scenario, with no impact on rendered output for users who already opt into these features.

    Also switches internal @layerstack/svelte-actions imports from the barrel (@layerstack/svelte-actions) to sub-paths (@layerstack/svelte-actions/styles, @layerstack/svelte-actions/portal). No production bundle effect — bundlers already tree-shake the unused popover.js — but it stops the Svelte REPL/CDN from eagerly fetching @floating-ui/dom (popover's transitive dep) when consumers load layerchart from a CDN.

@github-actions github-actions Bot force-pushed the changeset-release/next branch from 0672846 to 0a8e15f Compare April 27, 2026 17:21
@techniq techniq merged commit 9c074ba into next Apr 29, 2026
@techniq techniq deleted the changeset-release/next branch April 29, 2026 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant