vvplot 0.7.1 → 0.7.2

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.
package/dist/vvplot.d.ts CHANGED
@@ -43,10 +43,12 @@ ymax: any;
43
43
  svg: any;
44
44
  serialize(options: any): string;
45
45
  export(options: any): Promise<string>;
46
- serializeLegend(options: any): any;
46
+ serializeLegend(key: any, options: any): string;
47
+ exportLegend(key: any, options: any): Promise<string>;
47
48
  $emit: (event: "rangechange" | "resize" | "select" | "update:range" | "update:rangePreview", ...args: any[]) => void;
48
49
  flip: boolean;
49
50
  clip: boolean;
51
+ overflow: string;
50
52
  reverse?: Record<string, any> | undefined;
51
53
  action?: Record<string, any> | unknown[] | undefined;
52
54
  range?: Record<string, any> | undefined;
@@ -61,13 +63,13 @@ resize?: any;
61
63
  minRange?: Record<string, any> | undefined;
62
64
  expandAdd?: Record<string, any> | undefined;
63
65
  axes?: Record<string, any> | unknown[] | undefined;
64
- legendTeleport?: any;
65
66
  aes?: Record<string, any> | undefined;
66
67
  extend?: Record<string, any> | undefined;
67
68
  rangePreview?: Record<string, any> | undefined;
68
69
  $props: {
69
70
  readonly flip?: boolean | undefined;
70
71
  readonly clip?: boolean | undefined;
72
+ readonly overflow?: string | undefined;
71
73
  readonly reverse?: Record<string, any> | undefined;
72
74
  readonly action?: Record<string, any> | unknown[] | undefined;
73
75
  readonly range?: Record<string, any> | undefined;
@@ -82,7 +84,6 @@ readonly resize?: any;
82
84
  readonly minRange?: Record<string, any> | undefined;
83
85
  readonly expandAdd?: Record<string, any> | undefined;
84
86
  readonly axes?: Record<string, any> | unknown[] | undefined;
85
- readonly legendTeleport?: any;
86
87
  readonly aes?: Record<string, any> | undefined;
87
88
  readonly extend?: Record<string, any> | undefined;
88
89
  readonly rangePreview?: Record<string, any> | undefined;
@@ -201,57 +202,59 @@ export declare namespace components {
201
202
  _default_6 as VVAction,
202
203
  _default_7 as VVSelection,
203
204
  _default_8 as VVGeom,
204
- _default_9 as VVGeomBar,
205
- _default_10 as VVGeomBlank,
206
- _default_11 as VVGeomBoxplot,
207
- _default_12 as VVGeomCol,
208
- _default_13 as VVGeomCurve,
209
- _default_14 as VVGeomDensity,
210
- _default_15 as VVGeomEllipse,
211
- _default_16 as VVGeomHistogram,
212
- _default_17 as VVGeomLine,
213
- _default_18 as VVGeomLinerange,
214
- _default_19 as VVGeomMarkdown,
215
- _default_20 as VVGeomMarkdownsegment,
216
- _default_21 as VVGeomPath,
217
- _default_22 as VVGeomPoint,
218
- _default_23 as VVGeomPolygon,
219
- _default_24 as VVGeomRect,
220
- _default_25 as VVGeomSegment,
221
- _default_26 as VVGeomShape,
222
- _default_27 as VVGeomStick,
223
- _default_28 as VVGeomText,
224
- _default_29 as VVGeomTextsegment,
225
- _default_30 as VVGeomTile,
226
- _default_31 as VVGeomViolin
205
+ _default_9 as VVLegend,
206
+ _default_10 as VVGuide,
207
+ _default_11 as VVGeomBar,
208
+ _default_12 as VVGeomBlank,
209
+ _default_13 as VVGeomBoxplot,
210
+ _default_14 as VVGeomCol,
211
+ _default_15 as VVGeomCurve,
212
+ _default_16 as VVGeomDensity,
213
+ _default_17 as VVGeomEllipse,
214
+ _default_18 as VVGeomHistogram,
215
+ _default_19 as VVGeomLine,
216
+ _default_20 as VVGeomLinerange,
217
+ _default_21 as VVGeomMarkdown,
218
+ _default_22 as VVGeomMarkdownsegment,
219
+ _default_23 as VVGeomPath,
220
+ _default_24 as VVGeomPoint,
221
+ _default_25 as VVGeomPolygon,
222
+ _default_26 as VVGeomRect,
223
+ _default_27 as VVGeomSegment,
224
+ _default_28 as VVGeomShape,
225
+ _default_29 as VVGeomStick,
226
+ _default_30 as VVGeomText,
227
+ _default_31 as VVGeomTextsegment,
228
+ _default_32 as VVGeomTile,
229
+ _default_33 as VVGeomViolin
227
230
  }
228
231
  }
229
232
 
230
233
  export declare namespace components_2 {
231
234
  export {
232
- _default_9 as VVGeomBar,
233
- _default_10 as VVGeomBlank,
234
- _default_11 as VVGeomBoxplot,
235
- _default_12 as VVGeomCol,
236
- _default_13 as VVGeomCurve,
237
- _default_14 as VVGeomDensity,
238
- _default_15 as VVGeomEllipse,
239
- _default_16 as VVGeomHistogram,
240
- _default_17 as VVGeomLine,
241
- _default_18 as VVGeomLinerange,
242
- _default_19 as VVGeomMarkdown,
243
- _default_20 as VVGeomMarkdownsegment,
244
- _default_21 as VVGeomPath,
245
- _default_22 as VVGeomPoint,
246
- _default_23 as VVGeomPolygon,
247
- _default_24 as VVGeomRect,
248
- _default_25 as VVGeomSegment,
249
- _default_26 as VVGeomShape,
250
- _default_27 as VVGeomStick,
251
- _default_28 as VVGeomText,
252
- _default_29 as VVGeomTextsegment,
253
- _default_30 as VVGeomTile,
254
- _default_31 as VVGeomViolin
235
+ _default_11 as VVGeomBar,
236
+ _default_12 as VVGeomBlank,
237
+ _default_13 as VVGeomBoxplot,
238
+ _default_14 as VVGeomCol,
239
+ _default_15 as VVGeomCurve,
240
+ _default_16 as VVGeomDensity,
241
+ _default_17 as VVGeomEllipse,
242
+ _default_18 as VVGeomHistogram,
243
+ _default_19 as VVGeomLine,
244
+ _default_20 as VVGeomLinerange,
245
+ _default_21 as VVGeomMarkdown,
246
+ _default_22 as VVGeomMarkdownsegment,
247
+ _default_23 as VVGeomPath,
248
+ _default_24 as VVGeomPoint,
249
+ _default_25 as VVGeomPolygon,
250
+ _default_26 as VVGeomRect,
251
+ _default_27 as VVGeomSegment,
252
+ _default_28 as VVGeomShape,
253
+ _default_29 as VVGeomStick,
254
+ _default_30 as VVGeomText,
255
+ _default_31 as VVGeomTextsegment,
256
+ _default_32 as VVGeomTile,
257
+ _default_33 as VVGeomViolin
255
258
  }
256
259
  }
257
260
 
@@ -324,7 +327,11 @@ declare const _default_30: DefineComponent< {}, {}, {}, {}, {}, ComponentOpti
324
327
 
325
328
  declare const _default_31: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
326
329
 
327
- declare const _default_32: DefineComponent< {}, {
330
+ declare const _default_32: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
331
+
332
+ declare const _default_33: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
333
+
334
+ declare const _default_34: DefineComponent< {}, {
328
335
  alpha: number;
329
336
  translateX: number;
330
337
  translateY: number;
@@ -349,7 +356,7 @@ readonly linetype?: string | undefined;
349
356
  };
350
357
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, SVGPathElement>;
351
358
 
352
- declare const _default_33: DefineComponent< {}, {
359
+ declare const _default_35: DefineComponent< {}, {
353
360
  alpha: number;
354
361
  angle: number;
355
362
  translateX: number;
@@ -380,7 +387,7 @@ readonly linetype?: string | undefined;
380
387
  };
381
388
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, SVGEllipseElement>;
382
389
 
383
- declare const _default_34: DefineComponent< {}, {
390
+ declare const _default_36: DefineComponent< {}, {
384
391
  alpha: number;
385
392
  translateX: number;
386
393
  translateY: number;
@@ -409,7 +416,7 @@ readonly linetype?: string | undefined;
409
416
  };
410
417
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, SVGLineElement>;
411
418
 
412
- declare const _default_35: DefineComponent< {}, {
419
+ declare const _default_37: DefineComponent< {}, {
413
420
  x: number;
414
421
  y: number;
415
422
  alpha: number;
@@ -458,7 +465,7 @@ readonly textLength?: number | undefined;
458
465
  ele: SVGTextElement;
459
466
  }, SVGTextElement>;
460
467
 
461
- declare const _default_36: DefineComponent< {}, {
468
+ declare const _default_38: DefineComponent< {}, {
462
469
  alpha: number;
463
470
  translateX: number;
464
471
  translateY: number;
@@ -481,7 +488,7 @@ readonly d?: string | undefined;
481
488
  };
482
489
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, SVGPathElement>;
483
490
 
484
- declare const _default_37: DefineComponent< {}, {
491
+ declare const _default_39: DefineComponent< {}, {
485
492
  x: number;
486
493
  y: number;
487
494
  alpha: number;
@@ -512,7 +519,9 @@ readonly shape?: string | undefined;
512
519
  };
513
520
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
514
521
 
515
- declare const _default_38: DefineComponent< {}, {
522
+ declare const _default_4: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
523
+
524
+ declare const _default_40: DefineComponent< {}, {
516
525
  alpha: number;
517
526
  translateX: number;
518
527
  translateY: number;
@@ -535,11 +544,9 @@ readonly linetype?: string | undefined;
535
544
  };
536
545
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, SVGPolygonElement>;
537
546
 
538
- declare const _default_39: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
547
+ declare const _default_41: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
539
548
 
540
- declare const _default_4: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
541
-
542
- declare const _default_40: DefineComponent< {}, {
549
+ declare const _default_42: DefineComponent< {}, {
543
550
  x: number;
544
551
  y: number;
545
552
  alpha: number;
@@ -568,14 +575,14 @@ readonly linetype?: string | undefined;
568
575
  };
569
576
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, SVGRectElement>;
570
577
 
571
- declare namespace _default_41 {
578
+ declare namespace _default_43 {
572
579
  let scale_attrs: never[];
573
580
  function coord_scale(ds: any, levels: any): null;
574
581
  function get_range(ds: any, orientation: any): any;
575
582
  function validate(d: any): null;
576
583
  }
577
584
 
578
- declare namespace _default_42 {
585
+ declare namespace _default_44 {
579
586
  let legend_glyph: string;
580
587
  let scale_attrs: string[];
581
588
  function coord_scale(ds: any, levels: any): {
@@ -634,7 +641,7 @@ declare namespace _default_42 {
634
641
  function validate(d: any): any;
635
642
  }
636
643
 
637
- declare namespace _default_43 {
644
+ declare namespace _default_45 {
638
645
  let legend_glyph: string;
639
646
  let scale_attrs: string[];
640
647
  function coord_scale(ds: any, levels: any): {
@@ -644,7 +651,7 @@ declare namespace _default_43 {
644
651
  function validate(d: any): any;
645
652
  }
646
653
 
647
- declare namespace _default_44 {
654
+ declare namespace _default_46 {
648
655
  let legend_glyph: string;
649
656
  let scale_attrs: string[];
650
657
  function coord_scale(ds: any, levels: any): {
@@ -658,7 +665,7 @@ declare namespace _default_44 {
658
665
  function validate(d: any): any;
659
666
  }
660
667
 
661
- declare namespace _default_45 {
668
+ declare namespace _default_47 {
662
669
  let legend_glyph: string;
663
670
  let scale_attrs: string[];
664
671
  function coord_scale(ds: any, levels: any): {
@@ -671,7 +678,7 @@ declare namespace _default_45 {
671
678
  function validate(d: any): any;
672
679
  }
673
680
 
674
- declare namespace _default_46 {
681
+ declare namespace _default_48 {
675
682
  let legend_glyph: string;
676
683
  let scale_attrs: string[];
677
684
  function coord_scale(ds: any, levels: any): {
@@ -682,7 +689,7 @@ declare namespace _default_46 {
682
689
  function validate(d: any): any;
683
690
  }
684
691
 
685
- declare namespace _default_47 {
692
+ declare namespace _default_49 {
686
693
  let legend_glyph: string;
687
694
  let scale_attrs: string[];
688
695
  function coord_scale(ds: any, levels: any): {
@@ -695,7 +702,9 @@ declare namespace _default_47 {
695
702
  function validate(d: any): any;
696
703
  }
697
704
 
698
- declare namespace _default_48 {
705
+ declare const _default_5: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
706
+
707
+ declare namespace _default_50 {
699
708
  let legend_glyph: string;
700
709
  let scale_attrs: string[];
701
710
  function coord_scale(ds: any, levels: any): {
@@ -706,7 +715,7 @@ declare namespace _default_48 {
706
715
  function validate(d: any): any;
707
716
  }
708
717
 
709
- declare namespace _default_49 {
718
+ declare namespace _default_51 {
710
719
  let legend_glyph: string;
711
720
  let scale_attrs: string[];
712
721
  function coord_scale(ds: any, levels: any): {
@@ -716,9 +725,7 @@ declare namespace _default_49 {
716
725
  function validate(d: any): any;
717
726
  }
718
727
 
719
- declare const _default_5: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
720
-
721
- declare namespace _default_50 {
728
+ declare namespace _default_52 {
722
729
  let legend_glyph: string;
723
730
  let scale_attrs: string[];
724
731
  function coord_scale(ds: any, levels: any): {
@@ -731,7 +738,7 @@ declare namespace _default_50 {
731
738
  function validate(d: any): any;
732
739
  }
733
740
 
734
- declare namespace _default_51 {
741
+ declare namespace _default_53 {
735
742
  let legend_glyph: string;
736
743
  let scale_attrs: string[];
737
744
  function coord_scale(ds: any, levels: any): {
@@ -742,7 +749,7 @@ declare namespace _default_51 {
742
749
  function validate(d: any): any;
743
750
  }
744
751
 
745
- declare namespace _default_52 {
752
+ declare namespace _default_54 {
746
753
  let legend_glyph: string;
747
754
  let scale_attrs: string[];
748
755
  function coord_scale(ds: any, levels: any): {
@@ -756,7 +763,7 @@ declare namespace _default_52 {
756
763
  function validate(d: any): any;
757
764
  }
758
765
 
759
- declare namespace _default_53 {
766
+ declare namespace _default_55 {
760
767
  let legend_glyph: string;
761
768
  let scale_attrs: string[];
762
769
  function coord_scale(ds: any, levels: any): {
@@ -767,7 +774,7 @@ declare namespace _default_53 {
767
774
  function validate(d: any): any;
768
775
  }
769
776
 
770
- declare namespace _default_54 {
777
+ declare namespace _default_56 {
771
778
  let legend_glyph: string;
772
779
  let scale_attrs: string[];
773
780
  function coord_scale(ds: any, levels: any): {
@@ -780,7 +787,7 @@ declare namespace _default_54 {
780
787
  function validate(d: any): any;
781
788
  }
782
789
 
783
- declare namespace _default_55 {
790
+ declare namespace _default_57 {
784
791
  let legend_glyph: string;
785
792
  let scale_attrs: string[];
786
793
  function coord_scale(ds: any, levels: any): {
@@ -794,10 +801,6 @@ declare namespace _default_55 {
794
801
  function validate(d: any): any;
795
802
  }
796
803
 
797
- declare const _default_56: StatTransform;
798
-
799
- declare const _default_57: StatTransform;
800
-
801
804
  declare const _default_58: StatTransform;
802
805
 
803
806
  declare const _default_59: StatTransform;
@@ -840,7 +843,11 @@ declare const _default_75: StatTransform;
840
843
 
841
844
  declare const _default_76: StatTransform;
842
845
 
843
- declare const _default_77: DefineComponent< {}, {
846
+ declare const _default_77: StatTransform;
847
+
848
+ declare const _default_78: StatTransform;
849
+
850
+ declare const _default_79: DefineComponent< {}, {
844
851
  data?: Record<string, any> | undefined;
845
852
  render?: string | undefined;
846
853
  dpi?: number | undefined;
@@ -851,7 +858,9 @@ readonly dpi?: number | undefined;
851
858
  };
852
859
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, SVGGElement>;
853
860
 
854
- declare const _default_78: DefineComponent< {}, {
861
+ declare const _default_8: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
862
+
863
+ declare const _default_80: DefineComponent< {}, {
855
864
  dispatchEvent(event: any): any;
856
865
  data?: Record<string, any> | undefined;
857
866
  render?: string | undefined;
@@ -912,7 +921,7 @@ readonly groupStyle?: any;
912
921
  }, {}, {}, {}, {}> | null;
913
922
  }, any>;
914
923
 
915
- declare const _default_79: DefineComponent< {}, {
924
+ declare const _default_81: DefineComponent< {}, {
916
925
  dispatchEvent(event: any): any;
917
926
  data?: Record<string, any> | undefined;
918
927
  render?: string | undefined;
@@ -973,9 +982,7 @@ readonly groupStyle?: any;
973
982
  }, {}, {}, {}, {}> | null;
974
983
  }, any>;
975
984
 
976
- declare const _default_8: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
977
-
978
- declare const _default_80: DefineComponent< {}, {
985
+ declare const _default_82: DefineComponent< {}, {
979
986
  dispatchEvent(event: any): any;
980
987
  data?: Record<string, any> | undefined;
981
988
  render?: string | undefined;
@@ -1036,7 +1043,7 @@ readonly groupStyle?: any;
1036
1043
  }, {}, {}, {}, {}> | null;
1037
1044
  }, any>;
1038
1045
 
1039
- declare const _default_81: DefineComponent< {}, {
1046
+ declare const _default_83: DefineComponent< {}, {
1040
1047
  dispatchEvent(event: any): any;
1041
1048
  data?: Record<string, any> | undefined;
1042
1049
  render?: string | undefined;
@@ -1097,7 +1104,7 @@ readonly groupStyle?: any;
1097
1104
  }, {}, {}, {}, {}> | null;
1098
1105
  }, any>;
1099
1106
 
1100
- declare const _default_82: DefineComponent< {}, {
1107
+ declare const _default_84: DefineComponent< {}, {
1101
1108
  data?: Record<string, any> | undefined;
1102
1109
  render?: string | undefined;
1103
1110
  dpi?: number | undefined;
@@ -1108,7 +1115,7 @@ readonly dpi?: number | undefined;
1108
1115
  };
1109
1116
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, SVGGElement>;
1110
1117
 
1111
- declare const _default_83: DefineComponent< {}, {
1118
+ declare const _default_85: DefineComponent< {}, {
1112
1119
  data?: Record<string, any> | undefined;
1113
1120
  render?: string | undefined;
1114
1121
  dpi?: number | undefined;
@@ -1119,7 +1126,7 @@ readonly dpi?: number | undefined;
1119
1126
  };
1120
1127
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, SVGGElement>;
1121
1128
 
1122
- declare const _default_84: DefineComponent< {}, {
1129
+ declare const _default_86: DefineComponent< {}, {
1123
1130
  dispatchEvent(event: any): any;
1124
1131
  data?: Record<string, any> | undefined;
1125
1132
  render?: string | undefined;
@@ -1180,7 +1187,7 @@ readonly groupStyle?: any;
1180
1187
  }, {}, {}, {}, {}> | null;
1181
1188
  }, any>;
1182
1189
 
1183
- declare const _default_85: DefineComponent< {}, {
1190
+ declare const _default_87: DefineComponent< {}, {
1184
1191
  dispatchEvent(event: any): any;
1185
1192
  data?: Record<string, any> | undefined;
1186
1193
  render?: string | undefined;
@@ -1241,7 +1248,7 @@ readonly groupStyle?: any;
1241
1248
  }, {}, {}, {}, {}> | null;
1242
1249
  }, any>;
1243
1250
 
1244
- declare const _default_86: DefineComponent< {}, {
1251
+ declare const _default_88: DefineComponent< {}, {
1245
1252
  dispatchEvent(event: any): any;
1246
1253
  data?: Record<string, any> | undefined;
1247
1254
  render?: string | undefined;
@@ -1302,7 +1309,7 @@ readonly groupStyle?: any;
1302
1309
  }, {}, {}, {}, {}> | null;
1303
1310
  }, any>;
1304
1311
 
1305
- declare const _default_87: DefineComponent< {}, {
1312
+ declare const _default_89: DefineComponent< {}, {
1306
1313
  dispatchEvent(event: any): any;
1307
1314
  data?: Record<string, any> | undefined;
1308
1315
  render?: string | undefined;
@@ -1363,7 +1370,9 @@ readonly groupStyle?: any;
1363
1370
  }, {}, {}, {}, {}> | null;
1364
1371
  }, any>;
1365
1372
 
1366
- declare const _default_88: DefineComponent< {}, {
1373
+ declare const _default_9: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
1374
+
1375
+ declare const _default_90: DefineComponent< {}, {
1367
1376
  dispatchEvent(event: any): any;
1368
1377
  data?: Record<string, any> | undefined;
1369
1378
  render?: string | undefined;
@@ -1424,8 +1433,6 @@ readonly groupStyle?: any;
1424
1433
  }, {}, {}, {}, {}> | null;
1425
1434
  }, any>;
1426
1435
 
1427
- declare const _default_9: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
1428
-
1429
1436
  /**
1430
1437
  * Decorate a stat transform with metadata used by the plotting engine.
1431
1438
  *
@@ -1443,15 +1450,15 @@ export declare function defineStat(transform: StatTransform, { core_attrs }?: {
1443
1450
 
1444
1451
  export declare namespace elements {
1445
1452
  export {
1446
- _default_32 as curve,
1447
- _default_33 as ellipse,
1448
- _default_34 as line,
1449
- _default_35 as markdown,
1450
- _default_36 as path,
1451
- _default_37 as point,
1452
- _default_38 as polygon,
1453
- _default_39 as text,
1454
- _default_40 as tile
1453
+ _default_34 as curve,
1454
+ _default_35 as ellipse,
1455
+ _default_36 as line,
1456
+ _default_37 as markdown,
1457
+ _default_38 as path,
1458
+ _default_39 as point,
1459
+ _default_40 as polygon,
1460
+ _default_41 as text,
1461
+ _default_42 as tile
1455
1462
  }
1456
1463
  }
1457
1464
 
@@ -1500,6 +1507,37 @@ declare class EnumLevel extends Array<any> {
1500
1507
  apply(arr: string[]): EnumElement[];
1501
1508
  }
1502
1509
 
1510
+ /**
1511
+ * Export an SVG element to a string, inlining images as data URLs.
1512
+ * @param {SVGElement} svgElement
1513
+ * @param {Object} options
1514
+ * @param {string} options.unit - The unit for width and height (default: 'mm').
1515
+ * @returns {string}
1516
+ */
1517
+ declare async function exportSVG(svgElement, { unit = 'mm' } = {}) {
1518
+ if (!(svgElement instanceof SVGElement)) return null
1519
+ let svg = normalizeSVG(svgElement)
1520
+ if (!unitInPx[unit]) unit = ''
1521
+ svg.setAttribute('width', svg.viewBox.baseVal.width / unitInPx[unit] + unit)
1522
+ svg.setAttribute('height', svg.viewBox.baseVal.height / unitInPx[unit] + unit)
1523
+ const cache = new Map()
1524
+ for (let el of svg.querySelectorAll('image')) {
1525
+ let href = el.getAttribute('href') ?? el.getAttribute('xlink:href')
1526
+ if (href.startsWith('data:')) continue
1527
+ try {
1528
+ let response = await fetch(href)
1529
+ if (!response.ok) throw new Error(`Failed to fetch image: ${response.status}`)
1530
+ cache.set(href, await blobToDataURL(await response.blob()))
1531
+ } catch (e) {
1532
+ console.warn(`Failed to inline image ${href}: ${e.message}`)
1533
+ }
1534
+ if (cache.has(href)) {
1535
+ el.setAttribute('href', cache.get(href))
1536
+ }
1537
+ }
1538
+ return new XMLSerializer().serializeToString(svg)
1539
+ }
1540
+
1503
1541
  export declare interface GeomDefinition {
1504
1542
  legend_glyph?: LegendGlyph | LegendGlyph[];
1505
1543
  scale_attrs?: string[];
@@ -1511,21 +1549,21 @@ export declare interface GeomDefinition {
1511
1549
 
1512
1550
  export declare namespace geoms {
1513
1551
  export {
1514
- _default_41 as blank,
1515
- _default_42 as boxplot,
1516
- _default_43 as curve,
1517
- _default_44 as ellipse,
1518
- _default_45 as line,
1519
- _default_46 as markdown,
1520
- _default_47 as markdownsegment,
1521
- _default_48 as point,
1522
- _default_49 as polygon,
1523
- _default_50 as rect,
1524
- _default_51 as shape,
1525
- _default_52 as stick,
1526
- _default_53 as text,
1527
- _default_54 as textsegment,
1528
- _default_55 as tile
1552
+ _default_43 as blank,
1553
+ _default_44 as boxplot,
1554
+ _default_45 as curve,
1555
+ _default_46 as ellipse,
1556
+ _default_47 as line,
1557
+ _default_48 as markdown,
1558
+ _default_49 as markdownsegment,
1559
+ _default_50 as point,
1560
+ _default_51 as polygon,
1561
+ _default_52 as rect,
1562
+ _default_53 as shape,
1563
+ _default_54 as stick,
1564
+ _default_55 as text,
1565
+ _default_56 as textsegment,
1566
+ _default_57 as tile
1529
1567
  }
1530
1568
  }
1531
1569
 
@@ -1885,21 +1923,21 @@ export declare interface RendererProps {
1885
1923
 
1886
1924
  export declare namespace renderers {
1887
1925
  export {
1888
- _default_77 as blank,
1889
- _default_78 as boxplot,
1890
- _default_79 as curve,
1891
- _default_80 as ellipse,
1892
- _default_81 as line,
1893
- _default_82 as markdown,
1894
- _default_83 as markdownsegment,
1895
- _default_84 as point,
1896
- _default_85 as polygon,
1897
- _default_86 as rect,
1898
- _default_79 as shape,
1899
- _default_81 as stick,
1900
- _default_87 as text,
1901
- _default_88 as textsegment,
1902
- _default_86 as tile
1926
+ _default_79 as blank,
1927
+ _default_80 as boxplot,
1928
+ _default_81 as curve,
1929
+ _default_82 as ellipse,
1930
+ _default_83 as line,
1931
+ _default_84 as markdown,
1932
+ _default_85 as markdownsegment,
1933
+ _default_86 as point,
1934
+ _default_87 as polygon,
1935
+ _default_88 as rect,
1936
+ _default_81 as shape,
1937
+ _default_83 as stick,
1938
+ _default_89 as text,
1939
+ _default_90 as textsegment,
1940
+ _default_88 as tile
1903
1941
  }
1904
1942
  }
1905
1943
 
@@ -1935,29 +1973,45 @@ export declare function resolveRenderer(ref: string | Object | Function): Object
1935
1973
  */
1936
1974
  export declare function resolveStat(ref: string | Function): Function | undefined;
1937
1975
 
1976
+ /**
1977
+ * Serialize an SVG element to a string.
1978
+ * @param {SVGElement} svgElement
1979
+ * @param {Object} options
1980
+ * @param {string} options.unit - The unit for width and height (default: 'mm').
1981
+ * @returns {string}
1982
+ */
1983
+ declare function serializeSVG(svgElement, { unit = 'mm' } = {}) {
1984
+ if (!(svgElement instanceof SVGElement)) return null
1985
+ let svg = normalizeSVG(svgElement)
1986
+ if (!unitInPx[unit]) unit = ''
1987
+ svg.setAttribute('width', svg.viewBox.baseVal.width / unitInPx[unit] + unit)
1988
+ svg.setAttribute('height', svg.viewBox.baseVal.height / unitInPx[unit] + unit)
1989
+ return new XMLSerializer().serializeToString(svg)
1990
+ }
1991
+
1938
1992
  export declare namespace stats {
1939
1993
  export {
1940
- _default_56 as bar,
1941
- _default_57 as boxplot,
1942
- _default_58 as col,
1943
- _default_59 as curve,
1944
- _default_60 as density,
1945
- _default_61 as ellipse,
1946
- _default_62 as histogram,
1947
- _default_63 as identity,
1948
- _default_64 as line,
1949
- _default_65 as linerange,
1950
- _default_66 as path,
1951
- _default_67 as point,
1952
- _default_68 as polygon,
1953
- _default_69 as rect,
1954
- _default_70 as segment,
1955
- _default_71 as shape,
1956
- _default_72 as stick,
1957
- _default_73 as text,
1958
- _default_74 as textsegment,
1959
- _default_75 as tile,
1960
- _default_76 as violin
1994
+ _default_58 as bar,
1995
+ _default_59 as boxplot,
1996
+ _default_60 as col,
1997
+ _default_61 as curve,
1998
+ _default_62 as density,
1999
+ _default_63 as ellipse,
2000
+ _default_64 as histogram,
2001
+ _default_65 as identity,
2002
+ _default_66 as line,
2003
+ _default_67 as linerange,
2004
+ _default_68 as path,
2005
+ _default_69 as point,
2006
+ _default_70 as polygon,
2007
+ _default_71 as rect,
2008
+ _default_72 as segment,
2009
+ _default_73 as shape,
2010
+ _default_74 as stick,
2011
+ _default_75 as text,
2012
+ _default_76 as textsegment,
2013
+ _default_77 as tile,
2014
+ _default_78 as violin
1961
2015
  }
1962
2016
  }
1963
2017
 
@@ -2121,7 +2175,9 @@ export declare namespace vvutils {
2121
2175
  EnumElement,
2122
2176
  EnumLevel,
2123
2177
  numutils,
2124
- vecutils
2178
+ vecutils,
2179
+ serializeSVG,
2180
+ exportSVG
2125
2181
  }
2126
2182
  }
2127
2183