svelteplot 0.3.6-pr-124.1 → 0.3.6-pr-127.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.
@@ -519,7 +519,20 @@
519
519
  {/if}
520
520
  </FacetGrid>
521
521
  </svg>
522
- {#if overlay}<div class="plot-overlay">{@render overlay?.()}</div>{/if}
522
+ {#if overlay}<div class="plot-overlay">
523
+ {@render overlay?.({
524
+ width,
525
+ height,
526
+ options: plotOptions,
527
+ scales: plotState.scales,
528
+ mapXY,
529
+ hasProjection,
530
+ hasExplicitAxisX,
531
+ hasExplicitAxisY,
532
+ hasExplicitGridX,
533
+ hasExplicitGridY
534
+ })}
535
+ </div>{/if}
523
536
  </div>
524
537
  {#if footer}
525
538
  <figcaption class="plot-footer">
@@ -432,7 +432,12 @@ export type PlotOptions = {
432
432
  * The overlay snippet is useful for adding a layer of custom HTML markup
433
433
  * in front of the SVG body of your plot, e.g. for HTML tooltips.
434
434
  */
435
- overlay: Snippet;
435
+ overlay: Snippet<[{
436
+ width: number;
437
+ height: number;
438
+ options: PlotOptions;
439
+ scales: PlotScales;
440
+ }]>;
436
441
  facetAxes: Snippet;
437
442
  /**
438
443
  * if you set testid, the plot container will get a data-testid attribute which
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svelteplot",
3
- "version": "0.3.6-pr-124.1",
3
+ "version": "0.3.6-pr-127.0",
4
4
  "license": "ISC",
5
5
  "author": {
6
6
  "name": "Gregor Aisch",