@juspay/svelte-ui-components 2.105.0 → 2.106.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -157,12 +157,13 @@
157
157
  let plotWidth = $derived(
158
158
  Math.max(0, chartWidth - marginX * 2 - firstColumnLabelGutter - lastColumnLabelGutter)
159
159
  );
160
+ let plotHeight = $derived(Math.max(0, chartHeight - MARGIN * 2));
160
161
  let layout = $derived(
161
162
  computeSankeyLayout(
162
163
  nodes,
163
164
  links,
164
165
  plotWidth,
165
- Math.max(0, chartHeight - MARGIN * 2),
166
+ plotHeight,
166
167
  nodeWidth,
167
168
  nodePadding,
168
169
  iterations,
@@ -482,6 +483,10 @@
482
483
  {:else}
483
484
  <ChartContainer bind:width={chartWidth} bind:height={chartHeight} {aspectRatio} {maxHeight}>
484
485
  <g transform="translate({marginX + firstColumnLabelGutter}, {MARGIN})">
486
+ <!-- Optional backdrop panel behind the diagram (--sankey-plot-background,
487
+ transparent by default). Spans exactly the plot: first column's bars
488
+ to last column's bars, header row excluded. -->
489
+ <rect class="sankey-plot-bg" x={0} y={0} width={plotWidth} height={plotHeight} />
485
490
  {#if columnLabels != null && columnLabels.length > 0}
486
491
  {#each columnLabels.slice(0, columnCount) as label, ci (ci)}
487
492
  <text
@@ -579,6 +584,10 @@
579
584
  width: 100%;
580
585
  position: relative;
581
586
  }
587
+ .sankey-plot-bg {
588
+ fill: var(--sankey-plot-background, transparent);
589
+ pointer-events: none;
590
+ }
582
591
  .sankey-link {
583
592
  transition: stroke-opacity var(--chart-transition-duration, 0.2s) ease;
584
593
  cursor: pointer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juspay/svelte-ui-components",
3
- "version": "2.105.0",
3
+ "version": "2.106.0",
4
4
  "description": "A themeable Svelte 5 UI component library with CSS custom property driven styling",
5
5
  "keywords": [
6
6
  "svelte",