@@ -17,6 +17,15 @@ var Plotly = require('./plotly');
17
17
// package version injected by `npm run preprocess`
18
18
exports . version = '1.16.2' ;
19
19
20
+ // inject promise polyfill
21
+ require ( 'es6-promise' ) . polyfill ( ) ;
22
+
23
+ // inject plot css
24
+ require ( '../build/plotcss' ) ;
25
+
26
+ // inject default MathJax config
27
+ require ( './fonts/mathjax_config' ) ;
28
+
20
29
// plot api
21
30
exports . plot = Plotly . plot ;
22
31
exports . newPlot = Plotly . newPlot ;
@@ -30,20 +39,34 @@ exports.deleteTraces = Plotly.deleteTraces;
30
39
exports . moveTraces = Plotly . moveTraces ;
31
40
exports . purge = Plotly . purge ;
32
41
exports . setPlotConfig = require ( './plot_api/set_plot_config' ) ;
33
- exports . register = Plotly . register ;
42
+ exports . register = require ( './plot_api/ register' ) ;
34
43
exports . toImage = require ( './plot_api/to_image' ) ;
35
44
exports . downloadImage = require ( './snapshot/download' ) ;
36
45
exports . validate = require ( './plot_api/validate' ) ;
37
46
47
+ // scatter is the only trace included by default
48
+ exports . register ( require ( './traces/scatter' ) ) ;
49
+
50
+ // register all registrable components modules
51
+ exports . register ( [
52
+ require ( './components/legend' ) ,
53
+ require ( './components/annotations' ) ,
54
+ require ( './components/shapes' ) ,
55
+ require ( './components/images' ) ,
56
+ require ( './components/updatemenus' ) ,
57
+ require ( './components/rangeslider' ) ,
58
+ require ( './components/rangeselector' )
59
+ ] ) ;
60
+
38
61
// plot icons
39
62
exports . Icons = require ( '../build/ploticon' ) ;
40
63
41
64
// unofficial 'beta' plot methods, use at your own risk
42
65
exports . Plots = Plotly . Plots ;
43
66
exports . Fx = Plotly . Fx ;
44
- exports . Snapshot = Plotly . Snapshot ;
45
- exports . PlotSchema = Plotly . PlotSchema ;
46
- exports . Queue = Plotly . Queue ;
67
+ exports . Snapshot = require ( './snapshot' ) ;
68
+ exports . PlotSchema = require ( './plot_api/plot_schema' ) ;
69
+ exports . Queue = require ( './lib/queue' ) ;
47
70
48
71
// export d3 used in the bundle
49
72
exports . d3 = require ( 'd3' ) ;
0 commit comments