11'use strict' ;
22
3- var constants = require ( './constants' ) ;
3+ import type { AttributeMap , AttrsToType } from '../../types/lib/attributes' ;
44
5- module . exports = {
5+ const constants = require ( './constants' ) ;
6+
7+ /**
8+ * @generates ModeBar
9+ */
10+ const attributes = {
611 editType : 'modebar' ,
712
813 orientation : {
914 valType : 'enumerated' ,
10- values : [ 'v' , 'h' ] ,
15+ values : [ 'v' , 'h' ] as const ,
1116 dflt : 'h' ,
1217 editType : 'modebar' ,
13- description : 'Sets the orientation of the modebar.'
18+ description : 'Sets the orientation of the modebar.' ,
1419 } ,
1520 bgcolor : {
1621 valType : 'color' ,
1722 editType : 'modebar' ,
18- description : 'Sets the background color of the modebar.'
23+ description : 'Sets the background color of the modebar.' ,
1924 } ,
2025 color : {
2126 valType : 'color' ,
2227 editType : 'modebar' ,
23- description : 'Sets the color of the icons in the modebar.'
28+ description : 'Sets the color of the icons in the modebar.' ,
2429 } ,
2530 activecolor : {
2631 valType : 'color' ,
2732 editType : 'modebar' ,
28- description : 'Sets the color of the active or hovered on icons in the modebar.'
33+ description : 'Sets the color of the active or hovered on icons in the modebar.' ,
2934 } ,
3035 uirevision : {
3136 valType : 'any' ,
3237 editType : 'none' ,
3338 description : [
3439 'Controls persistence of user-driven changes related to the modebar,' ,
3540 'including `hovermode`, `dragmode`, and `showspikes` at both the' ,
36- 'root level and inside subplots. Defaults to `layout.uirevision`.'
37- ] . join ( ' ' )
41+ 'root level and inside subplots. Defaults to `layout.uirevision`.' ,
42+ ] . join ( ' ' ) ,
3843 } ,
3944 add : {
4045 valType : 'string' ,
@@ -46,8 +51,8 @@ module.exports = {
4651 'Please note that these buttons will only be shown if they are' ,
4752 'compatible with all trace types used in a graph.' ,
4853 'Similar to `config.modeBarButtonsToAdd` option.' ,
49- 'This may include *' + constants . backButtons . join ( '*, *' ) + '*.'
50- ] . join ( ' ' )
54+ 'This may include *' + constants . backButtons . join ( '*, *' ) + '*.' ,
55+ ] . join ( ' ' ) ,
5156 } ,
5257 remove : {
5358 valType : 'string' ,
@@ -57,7 +62,11 @@ module.exports = {
5762 description : [
5863 'Determines which predefined modebar buttons to remove.' ,
5964 'Similar to `config.modeBarButtonsToRemove` option.' ,
60- 'This may include *' + constants . foreButtons . join ( '*, *' ) + '*.'
61- ] . join ( ' ' )
62- }
63- } ;
65+ 'This may include *' + constants . foreButtons . join ( '*, *' ) + '*.' ,
66+ ] . join ( ' ' ) ,
67+ } ,
68+ } as const satisfies AttributeMap ;
69+
70+ export type ModeBarAttributes = AttrsToType < typeof attributes > ;
71+
72+ export default attributes ;
0 commit comments