plotly.js 2.10.1 → 2.11.0

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.
Files changed (70) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/CONTRIBUTING.md +17 -0
  3. package/README.md +3 -3
  4. package/dist/README.md +22 -22
  5. package/dist/plotly-basic.js +2 -2
  6. package/dist/plotly-basic.min.js +2 -2
  7. package/dist/plotly-cartesian.js +2 -2
  8. package/dist/plotly-cartesian.min.js +2 -2
  9. package/dist/plotly-finance.js +2 -2
  10. package/dist/plotly-finance.min.js +2 -2
  11. package/dist/plotly-geo-assets.js +2 -2
  12. package/dist/plotly-geo.js +2 -2
  13. package/dist/plotly-geo.min.js +2 -2
  14. package/dist/plotly-gl2d.js +380 -344
  15. package/dist/plotly-gl2d.min.js +10 -10
  16. package/dist/plotly-gl3d.js +2 -2
  17. package/dist/plotly-gl3d.min.js +2 -2
  18. package/dist/plotly-mapbox.js +2 -2
  19. package/dist/plotly-mapbox.min.js +2 -2
  20. package/dist/plotly-strict.js +40193 -939
  21. package/dist/plotly-strict.min.js +11 -11
  22. package/dist/plotly-with-meta.js +656 -615
  23. package/dist/plotly.js +627 -586
  24. package/dist/plotly.min.js +3 -3
  25. package/lib/index-strict.js +5 -0
  26. package/package.json +5 -4
  27. package/src/generated/regl-codegen/0919c57b995304312da30a5af7873a319bfb7b7e22ff6b4fa203ecbd5774ebfc +1462 -0
  28. package/src/generated/regl-codegen/13c0ae156483f2bcbd7ff29404f0abfd8689ff43f41791a6c7469868690a4260 +3391 -0
  29. package/src/generated/regl-codegen/19769c875db736c08a744c0a6aabe28276ed06aa24fdb7c36506a9f4c1f56f13 +3375 -0
  30. package/src/generated/regl-codegen/21cec01aa93887c70e86d7f1bc84d6837da0b1f5c1ff4cadd42ac6eb37f9f316 +2488 -0
  31. package/src/generated/regl-codegen/4df455b48c9de7d9f1de4b9481b505c09613ba7f90d2b4e360e673839566688e +662 -0
  32. package/src/generated/regl-codegen/53f2bf051e4ba66c90f343d29aa8da9e4029454c0d428f8e46e94dfddc97c8c6 +459 -0
  33. package/src/generated/regl-codegen/59568c77bcbe6343ee6109df49ceeb78c8a8a8a81872e88fb077f9a3d6dc0567 +637 -0
  34. package/src/generated/regl-codegen/6c3ff5a68d2906faf59307b58a799389f916ebdd3f7732ce75967575041988fc +2226 -0
  35. package/src/generated/regl-codegen/7c8e7f36e693904898ece5f7f8b49b23c69d98397567c3915a45647209eb7da4 +2052 -0
  36. package/src/generated/regl-codegen/8a43b073e4f3e9c0e499c8ac9c253f2aa1e3d3de2febfccc6526b52295dbf770 +664 -0
  37. package/src/generated/regl-codegen/909861c036d6f1ef40ba2dfcc33ef32489d2fe05fa7b7984d5ff315ddceb17b1 +454 -0
  38. package/src/generated/regl-codegen/c759965c8d66b2b356ae7455825df829f2ba7d4e7e903236f8c8d3bc5f45bd44 +2116 -0
  39. package/src/generated/regl-codegen/f9448a214a3e3cd439b767559aa71a4d1ccf5a8f39b8b756973e71acd33ff956 +2755 -0
  40. package/src/generated/regl-codegen/ff8495670417d5d0e4caa9942ad63b4dff0242a390ac1cb807c78ca326d6f3ce +639 -0
  41. package/src/lib/prepare_regl.js +7 -3
  42. package/src/traces/parcoords/base_index.js +24 -0
  43. package/src/traces/parcoords/index.js +4 -22
  44. package/src/traces/parcoords/plot-strict.js +9 -0
  45. package/src/traces/parcoords/plot.js +5 -2
  46. package/src/traces/parcoords/regl_precompiled.js +12 -0
  47. package/src/traces/parcoords/strict.js +7 -0
  48. package/src/traces/scattergl/base_index.js +29 -0
  49. package/src/traces/scattergl/index.js +3 -26
  50. package/src/traces/scattergl/plot.js +5 -2
  51. package/src/traces/scattergl/plot_strict.js +9 -0
  52. package/src/traces/scattergl/regl_precompiled.js +24 -0
  53. package/src/traces/scattergl/strict.js +7 -0
  54. package/src/traces/scatterpolargl/base_index.js +29 -0
  55. package/src/traces/scatterpolargl/index.js +3 -26
  56. package/src/traces/scatterpolargl/plot.js +4 -0
  57. package/src/traces/scatterpolargl/plot_strict.js +13 -0
  58. package/src/traces/scatterpolargl/regl_precompiled.js +24 -0
  59. package/src/traces/scatterpolargl/strict.js +7 -0
  60. package/src/traces/splom/base_index.js +36 -0
  61. package/src/traces/splom/base_plot.js +5 -2
  62. package/src/traces/splom/base_plot_strict.js +9 -0
  63. package/src/traces/splom/index.js +3 -33
  64. package/src/traces/splom/regl_precompiled.js +24 -0
  65. package/src/traces/splom/strict.js +7 -0
  66. package/src/version.js +1 -1
  67. package/tasks/bundle.js +18 -0
  68. package/tasks/partial_bundle.js +26 -23
  69. package/tasks/stats.js +3 -3
  70. package/tasks/util/constants.js +13 -1
package/CHANGELOG.md CHANGED
@@ -9,6 +9,13 @@ To see all merged commits on the master branch that will be part of the next plo
9
9
 
10
10
  where X.Y.Z is the semver of most recent plotly.js release.
11
11
 
12
+ ## [2.11.0] -- 2022-03-11
13
+
14
+ ### Added
15
+ - Add a CSP complaint variation of regl-based traces i.e. `parcoords`, `splom`, `scattergl`, `scatterpolargl` to the "strict" bundle [[#6083](https://github.com/plotly/plotly.js/pull/6083)]
16
+ - Add `scattersmith` trace to the "strict" bundle [[#6135](https://github.com/plotly/plotly.js/pull/6135)]
17
+
18
+
12
19
  ## [2.10.1] -- 2022-03-08
13
20
 
14
21
  ### Fixed
package/CONTRIBUTING.md CHANGED
@@ -162,6 +162,23 @@ npm run schema
162
162
 
163
163
  **IMPORTANT:** please do not change and commit any files in the "dist" folder
164
164
 
165
+ #### Step 9: REGL - Review & commit potential changes to precompiled regl shaders
166
+
167
+ If you are implementing a new feature that involves regl shaders, or if you are
168
+ making changes that affect the usage of regl shaders, you would need to run
169
+
170
+ ```bash
171
+ npm run regl-codegen
172
+ ```
173
+
174
+ to regenerate the regl code. This opens a browser window, runs through all
175
+ traces with 'regl' in the tags, and stores the captured code into
176
+ [src/generated/regl-codegen](https://github.com/plotly/plotly.js/blob/master/src/generated/regl-codegen). If no updates are necessary, it would be a no-op, but
177
+ if there are changes, you would need to commit them.
178
+
179
+ This is needed because regl performs codegen in runtime which breaks CSP
180
+ compliance, and so for strict builds we pre-generate regl shader code here.
181
+
165
182
  #### Other npm scripts that may be of interest in development
166
183
 
167
184
  - `npm run preprocess`: pre-processes the css and svg source file in js. This
package/README.md CHANGED
@@ -55,7 +55,7 @@ You may also consider using [`plotly.js-dist`](https://www.npmjs.com/package/plo
55
55
 
56
56
  ```html
57
57
  <head>
58
- <script src="https://cdn.plot.ly/plotly-2.10.1.min.js"></script>
58
+ <script src="https://cdn.plot.ly/plotly-2.11.0.min.js"></script>
59
59
  </head>
60
60
  <body>
61
61
  <div id="gd"></div>
@@ -72,7 +72,7 @@ You may also consider using [`plotly.js-dist`](https://www.npmjs.com/package/plo
72
72
  Alternatively you may consider using [native ES6 import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) in the script tag.
73
73
  ```html
74
74
  <script type="module">
75
- import "https://cdn.plot.ly/plotly-2.10.1.min.js"
75
+ import "https://cdn.plot.ly/plotly-2.11.0.min.js"
76
76
  Plotly.newPlot("gd", [{ y: [1, 2, 3] }])
77
77
  </script>
78
78
  ```
@@ -82,7 +82,7 @@ Fastly supports Plotly.js with free CDN service. Read more at <https://www.fastl
82
82
  ### Un-minified versions are also available on CDN
83
83
  While non-minified source files may contain characters outside UTF-8, it is recommended that you specify the `charset` when loading those bundles.
84
84
  ```html
85
- <script src="https://cdn.plot.ly/plotly-2.10.1.js" charset="utf-8"></script>
85
+ <script src="https://cdn.plot.ly/plotly-2.11.0.js" charset="utf-8"></script>
86
86
  ```
87
87
 
88
88
  > Please note that as of v2 the "plotly-latest" outputs (e.g. https://cdn.plot.ly/plotly-latest.min.js) will no longer be updated on the CDN, and will stay at the last v1 patch v1.58.5. Therefore, to use the CDN with plotly.js v2 and higher, you must specify an exact plotly.js version.
package/dist/README.md CHANGED
@@ -46,9 +46,9 @@ The main plotly.js bundles weight in at:
46
46
  | 8.3 MB | 3.5 MB | 1 MB | 8.6 MB |
47
47
 
48
48
  #### CDN links
49
- > https://cdn.plot.ly/plotly-2.10.1.js
49
+ > https://cdn.plot.ly/plotly-2.11.0.js
50
50
 
51
- > https://cdn.plot.ly/plotly-2.10.1.min.js
51
+ > https://cdn.plot.ly/plotly-2.11.0.min.js
52
52
 
53
53
 
54
54
  #### npm packages
@@ -79,7 +79,7 @@ plotly.js also ships with several _partial_ bundles:
79
79
 
80
80
  > The minified version of each partial bundle is also published to npm in a separate "dist-min" package.
81
81
 
82
- > The strict partial bundle includes everything except the traces that require function constructors. Over time we hope to include more of the remaining trace types here, after which we intend to work on other strict CSP issues such as inline CSS that we may not be able to include in the main bundle.
82
+ > The strict bundle now includes all traces, but the regl-based traces are built differently to avoid function constructors. This results in about a 10% larger bundle size, which is why this method is not used by default. Over time we intend to use the strict bundle to work on other strict CSP issues such as inline CSS.
83
83
 
84
84
  ---
85
85
 
@@ -94,9 +94,9 @@ The `basic` partial bundle contains trace modules `bar`, `pie` and `scatter`.
94
94
  | 2.7 MB | 977.9 kB | 318.5 kB |
95
95
 
96
96
  #### CDN links
97
- > https://cdn.plot.ly/plotly-basic-2.10.1.js
97
+ > https://cdn.plot.ly/plotly-basic-2.11.0.js
98
98
 
99
- > https://cdn.plot.ly/plotly-basic-2.10.1.min.js
99
+ > https://cdn.plot.ly/plotly-basic-2.11.0.min.js
100
100
 
101
101
 
102
102
  #### npm packages
@@ -117,9 +117,9 @@ The `cartesian` partial bundle contains trace modules `bar`, `box`, `contour`, `
117
117
  | 3.3 MB | 1.2 MB | 391.5 kB |
118
118
 
119
119
  #### CDN links
120
- > https://cdn.plot.ly/plotly-cartesian-2.10.1.js
120
+ > https://cdn.plot.ly/plotly-cartesian-2.11.0.js
121
121
 
122
- > https://cdn.plot.ly/plotly-cartesian-2.10.1.min.js
122
+ > https://cdn.plot.ly/plotly-cartesian-2.11.0.min.js
123
123
 
124
124
 
125
125
  #### npm packages
@@ -140,9 +140,9 @@ The `geo` partial bundle contains trace modules `choropleth`, `scatter` and `sca
140
140
  | 3.1 MB | 1.1 MB | 361.2 kB |
141
141
 
142
142
  #### CDN links
143
- > https://cdn.plot.ly/plotly-geo-2.10.1.js
143
+ > https://cdn.plot.ly/plotly-geo-2.11.0.js
144
144
 
145
- > https://cdn.plot.ly/plotly-geo-2.10.1.min.js
145
+ > https://cdn.plot.ly/plotly-geo-2.11.0.min.js
146
146
 
147
147
 
148
148
  #### npm packages
@@ -163,9 +163,9 @@ The `gl3d` partial bundle contains trace modules `cone`, `isosurface`, `mesh3d`,
163
163
  | 3.9 MB | 1.5 MB | 482.2 kB |
164
164
 
165
165
  #### CDN links
166
- > https://cdn.plot.ly/plotly-gl3d-2.10.1.js
166
+ > https://cdn.plot.ly/plotly-gl3d-2.11.0.js
167
167
 
168
- > https://cdn.plot.ly/plotly-gl3d-2.10.1.min.js
168
+ > https://cdn.plot.ly/plotly-gl3d-2.11.0.min.js
169
169
 
170
170
 
171
171
  #### npm packages
@@ -183,12 +183,12 @@ The `gl2d` partial bundle contains trace modules `heatmapgl`, `parcoords`, `poin
183
183
 
184
184
  | Raw size | Minified size | Minified + gzip size |
185
185
  |------|-----------------|------------------------|
186
- | 4.4 MB | 1.8 MB | 572.8 kB |
186
+ | 4.4 MB | 1.8 MB | 574.4 kB |
187
187
 
188
188
  #### CDN links
189
- > https://cdn.plot.ly/plotly-gl2d-2.10.1.js
189
+ > https://cdn.plot.ly/plotly-gl2d-2.11.0.js
190
190
 
191
- > https://cdn.plot.ly/plotly-gl2d-2.10.1.min.js
191
+ > https://cdn.plot.ly/plotly-gl2d-2.11.0.min.js
192
192
 
193
193
 
194
194
  #### npm packages
@@ -209,9 +209,9 @@ The `mapbox` partial bundle contains trace modules `choroplethmapbox`, `densitym
209
209
  | 4.3 MB | 1.7 MB | 515.4 kB |
210
210
 
211
211
  #### CDN links
212
- > https://cdn.plot.ly/plotly-mapbox-2.10.1.js
212
+ > https://cdn.plot.ly/plotly-mapbox-2.11.0.js
213
213
 
214
- > https://cdn.plot.ly/plotly-mapbox-2.10.1.min.js
214
+ > https://cdn.plot.ly/plotly-mapbox-2.11.0.min.js
215
215
 
216
216
 
217
217
  #### npm packages
@@ -232,9 +232,9 @@ The `finance` partial bundle contains trace modules `bar`, `candlestick`, `funne
232
232
  | 2.9 MB | 1.1 MB | 351.2 kB |
233
233
 
234
234
  #### CDN links
235
- > https://cdn.plot.ly/plotly-finance-2.10.1.js
235
+ > https://cdn.plot.ly/plotly-finance-2.11.0.js
236
236
 
237
- > https://cdn.plot.ly/plotly-finance-2.10.1.min.js
237
+ > https://cdn.plot.ly/plotly-finance-2.11.0.min.js
238
238
 
239
239
 
240
240
  #### npm packages
@@ -246,18 +246,18 @@ The `finance` partial bundle contains trace modules `bar`, `candlestick`, `funne
246
246
 
247
247
  ### plotly.js strict
248
248
 
249
- The `strict` partial bundle contains trace modules `bar`, `barpolar`, `box`, `candlestick`, `carpet`, `choropleth`, `choroplethmapbox`, `cone`, `contour`, `contourcarpet`, `densitymapbox`, `funnel`, `funnelarea`, `heatmap`, `heatmapgl`, `histogram`, `histogram2d`, `histogram2dcontour`, `icicle`, `image`, `indicator`, `isosurface`, `mesh3d`, `ohlc`, `parcats`, `pie`, `pointcloud`, `sankey`, `scatter`, `scatter`, `scatter3d`, `scattercarpet`, `scattergeo`, `scattermapbox`, `scatterpolar`, `scatterternary`, `streamtube`, `sunburst`, `surface`, `table`, `treemap`, `violin`, `volume` and `waterfall`.
249
+ The `strict` partial bundle contains trace modules `bar`, `barpolar`, `box`, `candlestick`, `carpet`, `choropleth`, `choroplethmapbox`, `cone`, `contour`, `contourcarpet`, `densitymapbox`, `funnel`, `funnelarea`, `heatmap`, `heatmapgl`, `histogram`, `histogram2d`, `histogram2dcontour`, `icicle`, `image`, `indicator`, `isosurface`, `mesh3d`, `ohlc`, `parcats`, `parcoords`, `pie`, `pointcloud`, `sankey`, `scatter`, `scattergl`, `scatter3d`, `scattercarpet`, `scattergeo`, `scattermapbox`, `scatterpolar`, `scatterpolargl`, `scattersmith`, `scatterternary`, `splom`, `streamtube`, `sunburst`, `surface`, `table`, `treemap`, `violin`, `volume` and `waterfall`.
250
250
 
251
251
  #### Stats
252
252
 
253
253
  | Raw size | Minified size | Minified + gzip size |
254
254
  |------|-----------------|------------------------|
255
- | 7.7 MB | 3.2 MB | 960.1 kB |
255
+ | 8.8 MB | 3.9 MB | 1.1 MB |
256
256
 
257
257
  #### CDN links
258
- > https://cdn.plot.ly/plotly-strict-2.10.1.js
258
+ > https://cdn.plot.ly/plotly-strict-2.11.0.js
259
259
 
260
- > https://cdn.plot.ly/plotly-strict-2.10.1.min.js
260
+ > https://cdn.plot.ly/plotly-strict-2.11.0.min.js
261
261
 
262
262
 
263
263
  #### npm packages
@@ -1,5 +1,5 @@
1
1
  /**
2
- * plotly.js (basic) v2.10.1
2
+ * plotly.js (basic) v2.11.0
3
3
  * Copyright 2012-2022, Plotly, Inc.
4
4
  * All rights reserved.
5
5
  * Licensed under the MIT license
@@ -82787,7 +82787,7 @@ function getSortFunc(opts, d2c) {
82787
82787
  'use strict';
82788
82788
 
82789
82789
  // package version injected by `npm run preprocess`
82790
- exports.version = '2.10.1';
82790
+ exports.version = '2.11.0';
82791
82791
 
82792
82792
  },{}]},{},[8])(8)
82793
82793
  });