Skip to content

Commit 83f105d

Browse files
authored
Merge pull request #5413 from plotly/add-strict-bundle
Add strict partial bundles
2 parents e1705fd + c0a3d92 commit 83f105d

File tree

5 files changed

+89
-1
lines changed

5 files changed

+89
-1
lines changed

dist/plotly-strict.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/**
2+
* plotly.js (strict) v2.0.0
3+
* Copyright 2012-2021, Plotly, Inc.
4+
* All rights reserved.
5+
* Licensed under the MIT license
6+
*/

dist/plotly-strict.min.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/**
2+
* plotly.js (strict) v2.0.0
3+
* Copyright 2012-2021, Plotly, Inc.
4+
* All rights reserved.
5+
* Licensed under the MIT license
6+
*/

lib/index-strict.js

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
/**
2+
* Copyright 2012-2021, Plotly, Inc.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the MIT license found in the
6+
* LICENSE file in the root directory of this source tree.
7+
*/
8+
9+
'use strict';
10+
11+
var Plotly = require('./core');
12+
13+
// traces
14+
Plotly.register([
15+
require('./bar'),
16+
require('./box'),
17+
require('./heatmap'),
18+
require('./histogram'),
19+
require('./histogram2d'),
20+
require('./histogram2dcontour'),
21+
require('./contour'),
22+
require('./scatterternary'),
23+
require('./violin'),
24+
require('./funnel'),
25+
require('./waterfall'),
26+
require('./image'),
27+
28+
require('./pie'),
29+
require('./sunburst'),
30+
require('./treemap'),
31+
require('./funnelarea'),
32+
33+
require('./scattergeo'),
34+
require('./choropleth'),
35+
36+
require('./parcoords'),
37+
require('./parcats'),
38+
39+
require('./scattermapbox'),
40+
require('./choroplethmapbox'),
41+
require('./densitymapbox'),
42+
43+
require('./sankey'),
44+
require('./indicator'),
45+
46+
require('./table'),
47+
48+
require('./carpet'),
49+
require('./scattercarpet'),
50+
require('./contourcarpet'),
51+
52+
require('./ohlc'),
53+
require('./candlestick'),
54+
55+
require('./scatterpolar'),
56+
require('./barpolar')
57+
]);
58+
59+
// transforms
60+
Plotly.register([
61+
require('./aggregate'),
62+
require('./filter'),
63+
require('./groupby'),
64+
require('./sort')
65+
]);
66+
67+
// components
68+
Plotly.register([
69+
require('./calendars')
70+
]);
71+
72+
module.exports = Plotly;

tasks/stats.js

+4
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ function getMainBundleInfo() {
136136
'Starting in `v1.39.0`, each plotly.js partial bundle has a corresponding npm package with no dependencies.',
137137
'',
138138
'Starting in `v1.50.0`, the minified version of each partial bundle is also published to npm in a separate "dist min" package.',
139+
'',
140+
'Starting in `v2.0.0`, the strict partial bundle includes everything except the traces that require function constructors.',
141+
'Over time we hope to include more of the remaining trace types here, after which we intend to work on other strict CSP issues ',
142+
'such as inline CSS that we may not be able to include in the main bundle.',
139143
''
140144
];
141145
}

tasks/util/constants.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ try {
2525
}
2626

2727
var partialBundleNames = [
28-
'basic', 'cartesian', 'geo', 'gl3d', 'gl2d', 'mapbox', 'finance'
28+
'basic', 'cartesian', 'geo', 'gl3d', 'gl2d', 'mapbox', 'finance', 'strict'
2929
];
3030

3131
var partialBundlePaths = partialBundleNames.map(function(name) {

0 commit comments

Comments
 (0)