@@ -616,27 +616,27 @@ export type LinkableMarkProps = {
616
616
/**
617
617
* if set, the mark element will be wrapped in a <a> link element
618
618
*/
619
- href : ConstantAccessor < string > ;
619
+ href ? : ConstantAccessor < string > ;
620
620
/**
621
621
* the relationship of the target object to the link object (e.g. "noopener")
622
622
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/a#rel
623
623
*/
624
- rel : ConstantAccessor < string > ;
624
+ rel ? : ConstantAccessor < string > ;
625
625
/**
626
626
* the link target mime type, e.g. "text/csv"
627
627
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/a#type
628
628
*/
629
- type : ConstantAccessor < string > ;
629
+ type ? : ConstantAccessor < string > ;
630
630
/**
631
631
* the target of the link, e.g. "_blank" or "_self"
632
632
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/a#target
633
633
*/
634
- target : ConstantAccessor < '_self' | '_blank' | '_parent' | '_top' | string > ;
634
+ target ? : ConstantAccessor < '_self' | '_blank' | '_parent' | '_top' | string > ;
635
635
/**
636
636
* if set to true, the link will be downloaded instead of navigating to it
637
637
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#download
638
638
*/
639
- download : ConstantAccessor < boolean > ;
639
+ download ? : ConstantAccessor < boolean > ;
640
640
// allow data-sveltekit-* attributes on the link element, e.g. data-sveltekit-reload
641
641
[ key : `data-sveltekit-${string } `] : string | boolean ;
642
642
} ;
@@ -833,6 +833,8 @@ export type AutoMarginStores = {
833
833
autoMarginBottom : Writable < Map < string , number > > ;
834
834
} ;
835
835
836
+ type IgnoreDefaults = 'data' | 'facet' | ChannelName | 'title' ;
837
+
836
838
/**
837
839
* these are the default options for the plot marks that can be set using
838
840
* the 'svelteplot/defaults' context.
@@ -902,147 +904,152 @@ export type PlotDefaults = {
902
904
/**
903
905
* default props for area marks, applied to area, areaX, and areaY marks
904
906
*/
905
- area : Partial < Omit < AreaMarkProps , 'data' | 'facet' | ChannelName > > ;
907
+ area : Partial < Omit < AreaMarkProps , IgnoreDefaults > > ;
906
908
/**
907
909
* default props for areaX marks
908
910
*/
909
- areaX : Partial < Omit < AreaMarkProps , 'data' | 'facet' | ChannelName > > ;
911
+ areaX : Partial < Omit < AreaMarkProps , IgnoreDefaults > > ;
910
912
/**
911
913
* default props for areaY marks
912
914
*/
913
- areaY : Partial < Omit < AreaMarkProps , 'data' | 'facet' | ChannelName > > ;
915
+ areaY : Partial < Omit < AreaMarkProps , IgnoreDefaults > > ;
914
916
/**
915
917
* default props for arrow marks
916
918
*/
917
- arrow : Partial < Omit < ArrowMarkProps , 'data' | 'facet' | ChannelName > > ;
919
+ arrow : Partial < Omit < ArrowMarkProps , IgnoreDefaults > > ;
918
920
/**
919
921
* default props for axis marks, applied to both axisX and axisY marks
920
922
*/
921
- axis : Partial < BaseMarkProps > ;
923
+ axis : Partial <
924
+ Omit <
925
+ AxisXMarkProps ,
926
+ 'data' | 'facet' | ChannelName | 'facetAnchor' | 'labelAnchor' | 'anchor'
927
+ >
928
+ > ;
922
929
/**
923
930
* default props for axisX marks
924
931
*/
925
- axisX : Partial < Omit < AxisXMarkProps , 'data' | 'facet' | ChannelName > > ;
932
+ axisX : Partial < Omit < AxisXMarkProps , IgnoreDefaults > > ;
926
933
/**
927
934
* default props for axisY marks
928
935
*/
929
- axisY : Partial < Omit < AxisYMarkProps , 'data' | 'facet' | ChannelName > > ;
936
+ axisY : Partial < Omit < AxisYMarkProps , IgnoreDefaults > > ;
930
937
/**
931
938
* default props for bar marks, applied to both barX and barY marks
932
939
*/
933
- bar : Partial < Omit < BarXMarkProps , 'data' | 'facet' | ChannelName > > ;
940
+ bar : Partial < Omit < BarXMarkProps , IgnoreDefaults > > ;
934
941
/**
935
942
* default props for barX marks
936
943
*/
937
- barX : Partial < Omit < BarXMarkProps , 'data' | 'facet' | ChannelName > > ;
944
+ barX : Partial < Omit < BarXMarkProps , IgnoreDefaults > > ;
938
945
/**
939
946
* default props for barY marks
940
947
*/
941
- barY : Partial < Omit < BarXMarkProps , 'data' | 'facet' | ChannelName > > ;
948
+ barY : Partial < Omit < BarXMarkProps , IgnoreDefaults > > ;
942
949
/**
943
950
* default props for brush marks, applied to brush, brushX and brushY marks
944
951
*/
945
- brush : Partial < Omit < BrushMarkProps , 'data' | 'facet' | ' limitDimension' | ChannelName > > ;
952
+ brush : Partial < Omit < BrushMarkProps , IgnoreDefaults | 'limitDimension' > > ;
946
953
/**
947
954
* default props for brushX marks
948
955
*/
949
- brushX : Partial < Omit < BrushXMarkProps , 'data' | 'facet' | ChannelName > > ;
956
+ brushX : Partial < Omit < BrushXMarkProps , IgnoreDefaults > > ;
950
957
/**
951
958
* default props for brushY marks
952
959
*/
953
- brushY : Partial < Omit < BrushYMarkProps , 'data' | 'facet' | ChannelName > > ;
960
+ brushY : Partial < Omit < BrushYMarkProps , IgnoreDefaults > > ;
954
961
/**
955
962
* default props for cell marks
956
963
*/
957
- cell : Partial < Omit < CellMarkProps , 'data' | 'facet' | ChannelName > > ;
964
+ cell : Partial < Omit < CellMarkProps , IgnoreDefaults > > ;
958
965
/**
959
966
* default props for dot marks
960
967
*/
961
- dot : Partial < Omit < DotMarkProps , 'data' | 'facet' | ChannelName > > ;
968
+ dot : Partial < Omit < DotMarkProps , IgnoreDefaults > > ;
962
969
/**
963
970
* default props for frame marks
964
971
*/
965
972
frame : Partial < FrameMarkProps > ;
966
973
/**
967
974
* default props for geo marks
968
975
*/
969
- geo : Partial < Omit < GeoMarkProps , 'data' | 'facet' | ChannelName > > ;
976
+ geo : Partial < Omit < GeoMarkProps , IgnoreDefaults > > ;
970
977
/**
971
978
* default props for graticule marks
972
979
*/
973
- graticule : Partial < Omit < GraticuleMarkProps , 'data' | 'facet' | ChannelName > > ;
980
+ graticule : Partial < Omit < GraticuleMarkProps , IgnoreDefaults > > ;
974
981
/**
975
982
* default props for grid marks, applied to both gridX and gridY marks
976
983
*/
977
- grid : Partial < Omit < AxisXMarkProps , 'data' | 'facet' | ChannelName > > ;
984
+ grid : Partial < Omit < AxisXMarkProps , IgnoreDefaults > > ;
978
985
/**
979
986
* default props for gridX marks
980
987
*/
981
- gridX : Partial < Omit < AxisXMarkProps , 'data' | 'facet' | ChannelName > > ;
988
+ gridX : Partial < Omit < AxisXMarkProps , IgnoreDefaults > > ;
982
989
/**
983
990
* default props for gridY marks
984
991
*/
985
- gridY : Partial < Omit < AxisYMarkProps , 'data' | 'facet' | ChannelName > > ;
992
+ gridY : Partial < Omit < AxisYMarkProps , IgnoreDefaults > > ;
986
993
/**
987
994
* default props for line marks
988
995
*/
989
- line : Partial < Omit < LineMarkProps , 'data' | 'facet' | ChannelName > > ;
996
+ line : Partial < Omit < LineMarkProps , IgnoreDefaults > > ;
990
997
/**
991
998
* default props for link marks
992
999
*/
993
- link : Partial < Omit < LinkMarkProps , 'data' | 'facet' | ChannelName > > ;
1000
+ link : Partial < Omit < LinkMarkProps , IgnoreDefaults > > ;
994
1001
/**
995
1002
* default props for rect marks, applied to rect and rectX marks
996
1003
*/
997
- rect : Partial < Omit < RectMarkProps , 'data' | 'facet' | ChannelName > > ;
1004
+ rect : Partial < Omit < RectMarkProps , IgnoreDefaults > > ;
998
1005
/**
999
1006
* default props for rectX marks
1000
1007
*/
1001
- rectX : Partial < Omit < RectXMarkProps , 'data' | 'facet' | ChannelName > > ;
1008
+ rectX : Partial < Omit < RectXMarkProps , IgnoreDefaults > > ;
1002
1009
/**
1003
1010
* default props for rectY marks
1004
1011
*/
1005
- rectY : Partial < Omit < RectYMarkProps , 'data' | 'facet' | ChannelName > > ;
1012
+ rectY : Partial < Omit < RectYMarkProps , IgnoreDefaults > > ;
1006
1013
/**
1007
1014
* default props for rule marks
1008
1015
*/
1009
- rule : Partial < Omit < RuleXMarkProps , 'data' | 'facet' | ChannelName > > ;
1016
+ rule : Partial < Omit < RuleXMarkProps , IgnoreDefaults > > ;
1010
1017
/**
1011
1018
* default props for rule marks
1012
1019
*/
1013
- ruleX : Partial < Omit < RuleXMarkProps , 'data' | 'facet' | ChannelName > > ;
1020
+ ruleX : Partial < Omit < RuleXMarkProps , IgnoreDefaults > > ;
1014
1021
/**
1015
1022
* default props for rule marks
1016
1023
*/
1017
- ruleY : Partial < Omit < RuleYMarkProps , 'data' | 'facet' | ChannelName > > ;
1024
+ ruleY : Partial < Omit < RuleYMarkProps , IgnoreDefaults > > ;
1018
1025
/**
1019
1026
* default props for sphere marks
1020
1027
*/
1021
1028
sphere : Partial < SphereMarkProps > ;
1022
1029
/**
1023
1030
* default props for spike marks
1024
1031
*/
1025
- spike : Partial < Omit < SpikeMarkProps , 'data' | 'facet' | ChannelName > > ;
1032
+ spike : Partial < Omit < SpikeMarkProps , IgnoreDefaults > > ;
1026
1033
/**
1027
1034
* default props for text marks
1028
1035
*/
1029
- text : Partial < Omit < TextMarkProps , 'data' | 'facet' | ChannelName > > ;
1036
+ text : Partial < Omit < TextMarkProps , IgnoreDefaults > > ;
1030
1037
/**
1031
1038
* default props for tick marks, applied to tickX and tickY marks
1032
1039
*/
1033
- tick : Partial < Omit < TickXMarkProps , 'data' | 'facet' | ChannelName > > ;
1040
+ tick : Partial < Omit < TickXMarkProps , IgnoreDefaults > > ;
1034
1041
/**
1035
1042
* default props for tickX marks
1036
1043
*/
1037
- tickX : Partial < Omit < TickXMarkProps , 'data' | 'facet' | ChannelName > > ;
1044
+ tickX : Partial < Omit < TickXMarkProps , IgnoreDefaults > > ;
1038
1045
/**
1039
1046
* default props for tickY marks
1040
1047
*/
1041
- tickY : Partial < Omit < TickYMarkProps , 'data' | 'facet' | ChannelName > > ;
1048
+ tickY : Partial < Omit < TickYMarkProps , IgnoreDefaults > > ;
1042
1049
/**
1043
1050
* default props for vector marks
1044
1051
*/
1045
- vector : Partial < Omit < VectorMarkProps , 'data' | 'facet' | ChannelName > > ;
1052
+ vector : Partial < Omit < VectorMarkProps , IgnoreDefaults > > ;
1046
1053
} ;
1047
1054
1048
1055
export type MapIndexObject = {
0 commit comments