gridviz 2.0.29 → 2.0.31

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 (41) hide show
  1. package/dist/gridviz.js +27764 -27711
  2. package/dist/gridviz.min.js +1 -1
  3. package/package.json +8 -5
  4. package/src/App.js +17 -14
  5. package/src/dataset/COGeo.js +1 -1
  6. package/src/dataset/CSVGrid.js +1 -2
  7. package/src/dataset/GeoTIFF.js +1 -1
  8. package/src/dataset/ParquetGrid.js +1 -2
  9. package/src/dataset/TiledGrid.js +7 -5
  10. package/src/index.js +52 -51
  11. package/src/legend/ColorCategoryLegend.js +1 -1
  12. package/src/legend/ColorDiscreteLegend.js +1 -1
  13. package/src/legend/ColorLegend.js +1 -1
  14. package/src/legend/SegmentOrientationLegend.js +1 -1
  15. package/src/legend/SegmentWidthLegend.js +1 -1
  16. package/src/legend/SizeLegend.js +1 -1
  17. package/src/style/CompositionStyle.js +12 -6
  18. package/src/style/ContourStyle.js +1 -1
  19. package/src/style/DotDensityStyle.js +4 -4
  20. package/src/style/JoyPlotStyle.js +1 -1
  21. package/src/style/KernelSmoothingOldStyle.js +1 -1
  22. package/src/style/KernelSmoothingStyle.js +1 -1
  23. package/src/style/KernelSmoothingWGLStyle.js +1 -1
  24. package/src/style/LegoStyle.js +4 -4
  25. package/src/style/MosaicStyle.js +1 -1
  26. package/src/style/NinjaStarStyle.js +2 -2
  27. package/src/style/PillarStyle.js +1 -1
  28. package/src/style/SegmentStyle.js +1 -1
  29. package/src/style/ShapeColorSizeStyle.js +1 -1
  30. package/src/style/SideCatStyle.js +1 -1
  31. package/src/style/SideStyle.js +1 -1
  32. package/src/style/SquareColorCatWGLStyle.js +4 -4
  33. package/src/style/SquareColorWGLStyle.js +4 -4
  34. package/src/style/StrokeStyle.js +1 -1
  35. package/src/style/TanakaStyle.js +2 -2
  36. package/src/style/TextStyle.js +1 -1
  37. package/src/utils/WebGLRectangleColoring.js +1 -1
  38. package/src/utils/WebGLSquareColoring.js +1 -1
  39. package/src/utils/WebGLSquareColoringAdvanced.js +1 -1
  40. package/src/utils/WebGLSquareColoringCatAdvanced.js +1 -1
  41. package/src/utils/WebGLSquareColoringKS.js +1 -1
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "gridviz",
3
- "version": "2.0.29",
3
+ "version": "2.0.31",
4
4
  "description": "Visualization tool for gridded statistics",
5
- "type": "module",
6
5
  "keywords": [
7
6
  "statistics",
8
7
  "grid",
@@ -28,6 +27,7 @@
28
27
  "url": "https://github.com/eurostat/gridviz/issues",
29
28
  "email": "Joseph.DAVIES@ext.ec.europa.eu"
30
29
  },
30
+ "type": "module",
31
31
  "main": "dist/gridviz.min.js",
32
32
  "module": "dist/gridviz.min.js",
33
33
  "exports": {
@@ -35,11 +35,11 @@
35
35
  "default": "./src/index.js"
36
36
  },
37
37
  "scripts": {
38
- "start": "export NODE_OPTIONS=--openssl-legacy-provider && webpack --config webpack.config.dev.js",
39
- "start-dev": "webpack --config webpack.config.dev.js",
38
+ "start": "export NODE_OPTIONS=--openssl-legacy-provider && webpack --config webpack.config.dev.cjs",
39
+ "start-dev": "webpack --config webpack.config.dev.cjs",
40
40
  "server": "webpack serve -c webpack.config.dev.js --static ./",
41
41
  "doc": "./node_modules/.bin/jsdoc src/ src/dataset src/legend src/style -d docs/jsdoc",
42
- "build": "webpack --config webpack.config.prod.js",
42
+ "build": "webpack --config webpack.config.prod.cjs",
43
43
  "test": "jest"
44
44
  },
45
45
  "files": [
@@ -71,5 +71,8 @@
71
71
  "webpack-cli": "^5.0.0",
72
72
  "webpack-dev-server": "^4.11.1",
73
73
  "webpack-livereload-plugin": "^3.0.2"
74
+ },
75
+ "engines": {
76
+ "node": ">=14"
74
77
  }
75
78
  }
package/src/App.js CHANGED
@@ -1,21 +1,22 @@
1
1
  //@ts-check
2
2
  'use strict'
3
3
 
4
- import { GeoCanvas } from './GeoCanvas'
5
- import { Layer } from './Layer'
6
- import { Dataset } from './Dataset'
7
- import { Tooltip } from './Tooltip'
8
-
9
- import { CSVGrid } from './dataset/CSVGrid'
4
+ // internal imports
5
+ import { GeoCanvas } from './GeoCanvas.js'
6
+ import { Layer } from './Layer.js'
7
+ import { Dataset } from './Dataset.js'
8
+ import { Tooltip } from './Tooltip.js'
9
+ import { CSVGrid } from './dataset/CSVGrid.js'
10
10
  //import { ParquetGrid } from './dataset/ParquetGrid';
11
- import { TiledGrid } from './dataset/TiledGrid'
12
- import { BackgroundLayer } from './BackgroundLayer'
13
- import { BackgroundLayerWMS } from './BackgroundLayerWMS'
14
- import { LabelLayer } from './LabelLayer'
15
- import { LineLayer } from './LineLayer'
16
-
11
+ import { TiledGrid } from './dataset/TiledGrid.js'
12
+ import { BackgroundLayer } from './BackgroundLayer.js'
13
+ import { BackgroundLayerWMS } from './BackgroundLayerWMS.js'
14
+ import { LabelLayer } from './LabelLayer.js'
15
+ import { LineLayer } from './LineLayer.js'
16
+ import { monitor, monitorDuration } from './utils/Utils.js'
17
+
18
+ // external imports
17
19
  import { select } from 'd3-selection'
18
- import { monitor, monitorDuration } from './utils/Utils'
19
20
 
20
21
  /**
21
22
  * A gridviz application.
@@ -250,7 +251,9 @@ export class App {
250
251
  }
251
252
 
252
253
  //draw image saved + draw rectangle
253
- const rectWPix = this.selectionRectangleWidthPix ? this.selectionRectangleWidthPix(focus.resolution, this.getZoomFactor()) : 4;
254
+ const rectWPix = this.selectionRectangleWidthPix
255
+ ? this.selectionRectangleWidthPix(focus.resolution, this.getZoomFactor())
256
+ : 4
254
257
  this.cg.initCanvasTransform()
255
258
  this.cg.ctx.strokeStyle = this.selectionRectangleColor
256
259
  this.cg.ctx.lineWidth = rectWPix
@@ -1,7 +1,7 @@
1
1
  //@ts-check
2
2
  'use strict'
3
3
 
4
- import { DatasetComponent } from '../DatasetComponent'
4
+ import { DatasetComponent } from '../DatasetComponent.js'
5
5
 
6
6
  /**
7
7
  * @todo
@@ -4,7 +4,7 @@
4
4
  /** @typedef {{ dims: object, crs: string, tileSizeCell: number, originPoint: {x:number,y:number}, resolutionGeo: number, tilingBounds:import("../Dataset").Envelope }} GridInfo */
5
5
 
6
6
  import { csv } from 'd3-fetch'
7
- import { DatasetComponent } from '../DatasetComponent'
7
+ import { DatasetComponent } from '../DatasetComponent.js'
8
8
 
9
9
  /**
10
10
  * A dataset composed of a single CSV file (not tiled).
@@ -43,7 +43,6 @@ export class CSVGrid extends DatasetComponent {
43
43
 
44
44
  //load data
45
45
  this.infoLoadingStatus = 'loading'
46
-
47
46
  ;(async () => {
48
47
  try {
49
48
  const data = await csv(this.url)
@@ -1,7 +1,7 @@
1
1
  //@ts-check
2
2
  'use strict'
3
3
 
4
- import { DatasetComponent } from '../DatasetComponent'
4
+ import { DatasetComponent } from '../DatasetComponent.js'
5
5
  //import { fromUrl } from "geotiff"
6
6
 
7
7
  /**
@@ -1,7 +1,7 @@
1
1
  //@ts-check
2
2
  'use strict'
3
3
 
4
- import { DatasetComponent } from '../DatasetComponent'
4
+ import { DatasetComponent } from '../DatasetComponent.js'
5
5
  import { tableFromIPC } from 'apache-arrow'
6
6
  //import { readParquet } from "parquet-wasm"
7
7
 
@@ -49,7 +49,6 @@ export class ParquetGrid extends DatasetComponent {
49
49
 
50
50
  //load data
51
51
  this.infoLoadingStatus = 'loading'
52
-
53
52
  ;(async () => {
54
53
  try {
55
54
  const resp = await fetch(this.url)
@@ -3,11 +3,14 @@
3
3
 
4
4
  /** @typedef {{ dims: object, crs: string, tileSizeCell: number, originPoint: {x:number,y:number}, resolutionGeo: number, tilingBounds:import("../Dataset").Envelope, format:import("../DatasetComponent").Format }} GridInfo */
5
5
 
6
+ // internal
7
+ import { GridTile } from './GridTile.js'
8
+ import { App } from '../App.js'
9
+ import { DatasetComponent } from '../DatasetComponent.js'
10
+ import { monitor, monitorDuration } from '../utils/Utils.js'
11
+
12
+ // external
6
13
  import { json, csv } from 'd3-fetch'
7
- import { GridTile } from './GridTile'
8
- import { App } from '../App'
9
- import { DatasetComponent } from '../DatasetComponent'
10
- import { monitor, monitorDuration } from '../utils/Utils'
11
14
  import { tableFromIPC } from 'apache-arrow'
12
15
 
13
16
  /**
@@ -142,7 +145,6 @@ export class TiledGrid extends DatasetComponent {
142
145
 
143
146
  //mark tile as loading
144
147
  this.cache[xT][yT] = 'loading'
145
-
146
148
  ;(async () => {
147
149
  //request tile
148
150
  /** @type {Array.<import("../Dataset").Cell>} */
package/src/index.js CHANGED
@@ -1,62 +1,63 @@
1
1
  //@ts-check
2
2
  'use strict'
3
3
 
4
- //the application
5
- export { App } from './App'
6
- export { GeoCanvas } from './GeoCanvas'
7
- export { Style } from './Style'
8
- export { Layer } from './Layer'
9
- export { Dataset } from './Dataset'
10
- export { DatasetComponent } from './DatasetComponent'
11
-
12
- //export dataset types
13
- export { TiledGrid } from './dataset/TiledGrid'
14
- export { CSVGrid } from './dataset/CSVGrid'
4
+ // the application
5
+ export { App } from './App.js'
6
+ export { GeoCanvas } from './GeoCanvas.js'
7
+ export { Style } from './Style.js'
8
+ export { Layer } from './Layer.js'
9
+ export { Dataset } from './Dataset.js'
10
+ export { DatasetComponent } from './DatasetComponent.js'
11
+
12
+ // export dataset types
13
+ export { TiledGrid } from './dataset/TiledGrid.js'
14
+ export { CSVGrid } from './dataset/CSVGrid.js'
15
15
  //export { ParquetGrid } from "./dataset/ParquetGrid"
16
16
  //export { GeoTIFF } from "./dataset/GeoTIFF"
17
17
 
18
- //export styles
19
- export { ShapeColorSizeStyle } from './style/ShapeColorSizeStyle'
20
- export { StrokeStyle } from './style/StrokeStyle'
21
- export { JoyPlotStyle } from './style/JoyPlotStyle'
22
- export { CompositionStyle } from './style/CompositionStyle'
23
- export { SegmentStyle } from './style/SegmentStyle'
24
- export { TextStyle } from './style/TextStyle'
25
- export { KernelSmoothingStyle } from './style/KernelSmoothingStyle'
18
+ // export styles
19
+ export { ShapeColorSizeStyle } from './style/ShapeColorSizeStyle.js'
20
+ export { StrokeStyle } from './style/StrokeStyle.js'
21
+ export { JoyPlotStyle } from './style/JoyPlotStyle.js'
22
+ export { CompositionStyle } from './style/CompositionStyle.js'
23
+ export { SegmentStyle } from './style/SegmentStyle.js'
24
+ export { TextStyle } from './style/TextStyle.js'
25
+ export { KernelSmoothingStyle } from './style/KernelSmoothingStyle.js'
26
26
  //export { KernelSmoothingOldStyle } from "./style/KernelSmoothingStyle"
27
27
  //export { KernelSmoothingWGLStyle } from "./style/KernelSmoothingStyle"
28
- export { PillarStyle } from './style/PillarStyle'
29
- export { SideStyle } from './style/SideStyle'
30
- export { ContourStyle } from './style/ContourStyle'
31
- export { SideCatStyle } from './style/SideCatStyle'
32
- export { DotDensityStyle } from './style/DotDensityStyle'
33
- export { TanakaStyle } from './style/TanakaStyle'
34
- export { LegoStyle } from './style/LegoStyle'
35
- export { SquareColorWGLStyle } from './style/SquareColorWGLStyle'
36
- export { SquareColorCatWGLStyle } from './style/SquareColorCatWGLStyle'
37
- export { MosaicStyle } from './style/MosaicStyle'
38
- export { NinjaStarStyle } from './style/NinjaStarStyle'
39
-
40
- //export additional layers
41
- export { BackgroundLayer } from './BackgroundLayer'
42
- export { BackgroundLayerWMS } from './BackgroundLayerWMS'
43
- export { LabelLayer } from './LabelLayer'
44
- export { LineLayer as BoundaryLayer } from './LineLayer'
45
-
46
- export { ColorLegend } from './legend/ColorLegend'
47
- export { ColorDiscreteLegend } from './legend/ColorDiscreteLegend'
48
- export { ColorCategoryLegend } from './legend/ColorCategoryLegend'
49
- export { SizeLegend } from './legend/SizeLegend'
50
- export { SegmentWidthLegend } from './legend/SegmentWidthLegend'
51
- export { SegmentOrientationLegend } from './legend/SegmentOrientationLegend'
52
-
53
- //export { goToStraight, zoomTo } from "./utils/zoomUtils"
28
+ export { PillarStyle } from './style/PillarStyle.js'
29
+ export { SideStyle } from './style/SideStyle.js'
30
+ export { ContourStyle } from './style/ContourStyle.js'
31
+ export { SideCatStyle } from './style/SideCatStyle.js'
32
+ export { DotDensityStyle } from './style/DotDensityStyle.js'
33
+ export { TanakaStyle } from './style/TanakaStyle.js'
34
+ export { LegoStyle } from './style/LegoStyle.js'
35
+ export { SquareColorWGLStyle } from './style/SquareColorWGLStyle.js'
36
+ export { SquareColorCatWGLStyle } from './style/SquareColorCatWGLStyle.js'
37
+ export { MosaicStyle } from './style/MosaicStyle.js'
38
+ export { NinjaStarStyle } from './style/NinjaStarStyle.js'
39
+
40
+ // export additional layers
41
+ export { BackgroundLayer } from './BackgroundLayer.js'
42
+ export { BackgroundLayerWMS } from './BackgroundLayerWMS.js'
43
+ export { LabelLayer } from './LabelLayer.js'
44
+ export { LineLayer as BoundaryLayer } from './LineLayer.js'
45
+
46
+ // export legends
47
+ export { ColorLegend } from './legend/ColorLegend.js'
48
+ export { ColorDiscreteLegend } from './legend/ColorDiscreteLegend.js'
49
+ export { ColorCategoryLegend } from './legend/ColorCategoryLegend.js'
50
+ export { SizeLegend } from './legend/SizeLegend.js'
51
+ export { SegmentWidthLegend } from './legend/SegmentWidthLegend.js'
52
+ export { SegmentOrientationLegend } from './legend/SegmentOrientationLegend.js'
53
+
54
+ // export { goToStraight, zoomTo } from "./utils/zoomUtils"
54
55
  export * from './utils/stretching.js'
55
56
 
56
- export { getClass } from './utils/Utils'
57
+ export { getClass } from './utils/Utils.js'
57
58
 
59
+ import { GeoCanvas } from './GeoCanvas.js'
58
60
  import { geoAzimuthalEqualArea } from 'd3-geo'
59
- import { GeoCanvas } from './GeoCanvas'
60
61
 
61
62
  /**
62
63
  * Returns label layer from Eurostat, for ETRS89-LAEA grids.
@@ -149,10 +150,10 @@ export const getEurostatBoundariesLayer = function (opts) {
149
150
  return p.lvl == 3
150
151
  ? [2 * zf, 2 * zf]
151
152
  : p.lvl == 2
152
- ? [5 * zf, 2 * zf]
153
- : p.lvl == 1
154
- ? [5 * zf, 2 * zf]
155
- : [10 * zf, 3 * zf]
153
+ ? [5 * zf, 2 * zf]
154
+ : p.lvl == 1
155
+ ? [5 * zf, 2 * zf]
156
+ : [10 * zf, 3 * zf]
156
157
  else if (zf < 1000)
157
158
  return p.lvl == 2 ? [5 * zf, 2 * zf] : p.lvl == 1 ? [5 * zf, 2 * zf] : [10 * zf, 3 * zf]
158
159
  else if (zf < 2000) return p.lvl == 1 ? [5 * zf, 2 * zf] : [10 * zf, 3 * zf]
@@ -1,7 +1,7 @@
1
1
  //@ts-check
2
2
  'use strict'
3
3
 
4
- import { Legend } from '../Legend'
4
+ import { Legend } from '../Legend.js'
5
5
 
6
6
  /**
7
7
  * A legend element for color categrories.
@@ -2,7 +2,7 @@
2
2
  'use strict'
3
3
 
4
4
  //import { select } from "d3-selection";
5
- import { Legend } from '../Legend'
5
+ import { Legend } from '../Legend.js'
6
6
  //import { format } from "d3-format";
7
7
 
8
8
  /**
@@ -2,7 +2,7 @@
2
2
  'use strict'
3
3
 
4
4
  //import { select } from "d3-selection";
5
- import { Legend } from '../Legend'
5
+ import { Legend } from '../Legend.js'
6
6
  import { format } from 'd3-format'
7
7
 
8
8
  /**
@@ -1,7 +1,7 @@
1
1
  //@ts-check
2
2
  'use strict'
3
3
 
4
- import { Legend } from '../Legend'
4
+ import { Legend } from '../Legend.js'
5
5
 
6
6
  /**
7
7
  * A legend element for segment orientation.
@@ -1,7 +1,7 @@
1
1
  //@ts-check
2
2
  'use strict'
3
3
 
4
- import { Legend } from '../Legend'
4
+ import { Legend } from '../Legend.js'
5
5
  import { format } from 'd3-format'
6
6
 
7
7
  /**
@@ -1,7 +1,7 @@
1
1
  //@ts-check
2
2
  'use strict'
3
3
 
4
- import { Legend } from '../Legend'
4
+ import { Legend } from '../Legend.js'
5
5
  import { format } from 'd3-format'
6
6
 
7
7
  /**
@@ -1,7 +1,7 @@
1
1
  //@ts-check
2
2
  'use strict'
3
3
 
4
- import { Style } from '../Style'
4
+ import { Style } from '../Style.js'
5
5
 
6
6
  /** @typedef {"flag"|"piechart"|"ring"|"segment"|"radar"|"agepyramid"|"halftone"} CompositionType */
7
7
 
@@ -104,7 +104,7 @@ export class CompositionStyle extends Style {
104
104
  const yc = cell.y + offset.dy + (type_ === 'agepyramid' ? 0 : r * 0.5)
105
105
 
106
106
  //compute offset angle, when relevant
107
- const offAng = this.offsetAngle ? (this.offsetAngle(cell, r, zf) * Math.PI) / 180 : 0
107
+ const offAng = this.offsetAngle ? (this.offsetAngle(cell, r, zf) * Math.PI) / 180 : 0
108
108
 
109
109
  if (type_ === 'agepyramid' || type_ === 'radar' || type_ === 'halftone') {
110
110
  //get cell category max value
@@ -118,8 +118,7 @@ export class CompositionStyle extends Style {
118
118
  let cumul = 0
119
119
  if (type_ === 'agepyramid' && this.agePyramidHeight)
120
120
  cumul = (r - this.agePyramidHeight(cell, r, zf)) / 2
121
- if (type_ === 'radar' || type_ === 'halftone')
122
- cumul = Math.PI / 2 + offAng
121
+ if (type_ === 'radar' || type_ === 'halftone') cumul = Math.PI / 2 + offAng
123
122
 
124
123
  //compute the increment, which is the value to increment the cumul for each category
125
124
  const incr =
@@ -249,9 +248,16 @@ export class CompositionStyle extends Style {
249
248
  //draw
250
249
  cg.ctx.beginPath()
251
250
  cg.ctx.moveTo(xc, yc)
252
- cg.ctx.arc(xc, yc, sG * 0.5, a1+offAng, a2+offAng)
251
+ cg.ctx.arc(xc, yc, sG * 0.5, a1 + offAng, a2 + offAng)
253
252
  if (this.pieChartInternalRadiusFactor)
254
- cg.ctx.arc(xc, yc, sG * 0.5 * this.pieChartInternalRadiusFactor, a1+offAng, a2+offAng, true)
253
+ cg.ctx.arc(
254
+ xc,
255
+ yc,
256
+ sG * 0.5 * this.pieChartInternalRadiusFactor,
257
+ a1 + offAng,
258
+ a2 + offAng,
259
+ true
260
+ )
255
261
  cg.ctx.closePath()
256
262
  cg.ctx.fill()
257
263
  } else if (type_ === 'ring') {
@@ -1,7 +1,7 @@
1
1
  //@ts-check
2
2
  'use strict'
3
3
 
4
- import { SideStyle } from './SideStyle'
4
+ import { SideStyle } from './SideStyle.js'
5
5
 
6
6
  /** @typedef {{x:number,y:number,or:"v"|"h",value:number}} Side */
7
7
 
@@ -1,12 +1,12 @@
1
1
  //@ts-check
2
2
  'use strict'
3
3
 
4
- import { Style } from '../Style'
4
+ import { Style } from '../Style.js'
5
5
  import { randomNormal } from 'd3-random'
6
- import { checkWebGLSupport, makeWebGLCanvas } from '../utils/webGLUtils'
7
- import { WebGLSquareColoring } from '../utils/WebGLSquareColoring'
6
+ import { checkWebGLSupport, makeWebGLCanvas } from '../utils/webGLUtils.js'
7
+ import { WebGLSquareColoring } from '../utils/WebGLSquareColoring.js'
8
8
  import { color } from 'd3-color'
9
- import { monitor, monitorDuration } from '../utils/Utils'
9
+ import { monitor, monitorDuration } from '../utils/Utils.js'
10
10
 
11
11
  /**
12
12
  *
@@ -1,7 +1,7 @@
1
1
  //@ts-check
2
2
  'use strict'
3
3
 
4
- import { Style } from '../Style'
4
+ import { Style } from '../Style.js'
5
5
 
6
6
  /**
7
7
  *
@@ -1,7 +1,7 @@
1
1
  //@ts-check
2
2
  'use strict'
3
3
 
4
- import { Style } from '../Style'
4
+ import { Style } from '../Style.js'
5
5
 
6
6
  /**
7
7
  * A style representing the cell as a smoothed layer, to smoothing local variations and show main trends across space.
@@ -1,7 +1,7 @@
1
1
  //@ts-check
2
2
  'use strict'
3
3
 
4
- import { Style } from '../Style'
4
+ import { Style } from '../Style.js'
5
5
  import { density2d } from 'fast-kde'
6
6
 
7
7
  /**
@@ -1,7 +1,7 @@
1
1
  //@ts-check
2
2
  'use strict'
3
3
 
4
- import { Style } from '../Style'
4
+ import { Style } from '../Style.js'
5
5
  import { makeWebGLCanvas } from '../utils/webGLUtils'
6
6
  import { WebGLSquareColoringKS } from '../utils/WebGLSquareColoringKS'
7
7
 
@@ -1,10 +1,10 @@
1
1
  //@ts-check
2
2
  'use strict'
3
3
 
4
- import { TanakaStyle } from './TanakaStyle'
5
- import { StrokeStyle } from './StrokeStyle'
6
- import { SquareColorCatWGLStyle } from './SquareColorCatWGLStyle'
7
- import { Style } from '../Style'
4
+ import { TanakaStyle } from './TanakaStyle.js'
5
+ import { StrokeStyle } from './StrokeStyle.js'
6
+ import { SquareColorCatWGLStyle } from './SquareColorCatWGLStyle.js'
7
+ import { Style } from '../Style.js'
8
8
 
9
9
  /**
10
10
  * @author Julien Gaffuri
@@ -1,7 +1,7 @@
1
1
  //@ts-check
2
2
  'use strict'
3
3
 
4
- import { Style } from '../Style'
4
+ import { Style } from '../Style.js'
5
5
 
6
6
  /**
7
7
  * @author Julien Gaffuri
@@ -1,7 +1,7 @@
1
1
  //@ts-check
2
2
  'use strict'
3
3
 
4
- import { Style } from '../Style'
4
+ import { Style } from '../Style.js'
5
5
 
6
6
  /**
7
7
  *
@@ -33,7 +33,7 @@ export class NinjaStarStyle extends Style {
33
33
 
34
34
  /** A function returning the shape.
35
35
  * @type {function(import("../Dataset").Cell):string} */
36
- this.shape = opts.shape || (() => "o")
36
+ this.shape = opts.shape || (() => 'o')
37
37
  }
38
38
 
39
39
  /**
@@ -1,7 +1,7 @@
1
1
  //@ts-check
2
2
  'use strict'
3
3
 
4
- import { Style } from '../Style'
4
+ import { Style } from '../Style.js'
5
5
 
6
6
  /**
7
7
  * @author Julien Gaffuri
@@ -1,7 +1,7 @@
1
1
  //@ts-check
2
2
  'use strict'
3
3
 
4
- import { Style } from '../Style'
4
+ import { Style } from '../Style.js'
5
5
 
6
6
  /**
7
7
  * A style where each cell is represented by a segment whose length, width, color and orientation can vary according to statistical values.
@@ -1,7 +1,7 @@
1
1
  //@ts-check
2
2
  'use strict'
3
3
 
4
- import { Style } from '../Style'
4
+ import { Style } from '../Style.js'
5
5
 
6
6
  /**
7
7
  * A very generic style that shows grid cells with specific color, size and shape.
@@ -1,7 +1,7 @@
1
1
  //@ts-check
2
2
  'use strict'
3
3
 
4
- import { Style } from '../Style'
4
+ import { Style } from '../Style.js'
5
5
 
6
6
  /** @typedef {{x:number,y:number,or:"v"|"h",v1:string|undefined,v2:string|undefined}} Side */
7
7
 
@@ -1,7 +1,7 @@
1
1
  //@ts-check
2
2
  'use strict'
3
3
 
4
- import { Style } from '../Style'
4
+ import { Style } from '../Style.js'
5
5
 
6
6
  /** @typedef {{x:number,y:number,or:"v"|"h",value:number}} Side */
7
7
 
@@ -1,10 +1,10 @@
1
1
  //@ts-check
2
2
  'use strict'
3
3
 
4
- import { Style } from '../Style'
5
- import { makeWebGLCanvas } from '../utils/webGLUtils'
6
- import { WebGLSquareColoringCatAdvanced } from '../utils/WebGLSquareColoringCatAdvanced'
7
- import { monitor, monitorDuration } from '../utils/Utils'
4
+ import { Style } from '../Style.js'
5
+ import { makeWebGLCanvas } from '../utils/webGLUtils.js'
6
+ import { WebGLSquareColoringCatAdvanced } from '../utils/WebGLSquareColoringCatAdvanced.js'
7
+ import { monitor, monitorDuration } from '../utils/Utils.js'
8
8
 
9
9
  /**
10
10
  * Style based on webGL
@@ -1,10 +1,10 @@
1
1
  //@ts-check
2
2
  'use strict'
3
3
 
4
- import { Style } from '../Style'
5
- import { makeWebGLCanvas } from '../utils/webGLUtils'
6
- import { WebGLSquareColoringAdvanced } from '../utils/WebGLSquareColoringAdvanced'
7
- import { monitor, monitorDuration } from '../utils/Utils'
4
+ import { Style } from '../Style.js'
5
+ import { makeWebGLCanvas } from '../utils/webGLUtils.js'
6
+ import { WebGLSquareColoringAdvanced } from '../utils/WebGLSquareColoringAdvanced.js'
7
+ import { monitor, monitorDuration } from '../utils/Utils.js'
8
8
 
9
9
  /**
10
10
  * Style based on webGL
@@ -1,7 +1,7 @@
1
1
  //@ts-check
2
2
  'use strict'
3
3
 
4
- import { Style } from '../Style'
4
+ import { Style } from '../Style.js'
5
5
 
6
6
  /**
7
7
  *
@@ -1,8 +1,8 @@
1
1
  //@ts-check
2
2
  'use strict'
3
3
 
4
- import { SquareColorWGLStyle } from './SquareColorWGLStyle'
5
- import { SideStyle } from './SideStyle'
4
+ import { SquareColorWGLStyle } from './SquareColorWGLStyle.js'
5
+ import { SideStyle } from './SideStyle.js'
6
6
 
7
7
  /**
8
8
  *
@@ -1,7 +1,7 @@
1
1
  //@ts-check
2
2
  'use strict'
3
3
 
4
- import { Style } from '../Style'
4
+ import { Style } from '../Style.js'
5
5
 
6
6
  /**
7
7
  *
@@ -1,7 +1,7 @@
1
1
  //@ts-check
2
2
  'use strict'
3
3
 
4
- import { initShaderProgram, createShader } from './webGLUtils'
4
+ import { initShaderProgram, createShader } from './webGLUtils.js'
5
5
 
6
6
  /**
7
7
  * Everything to easily draw colored rectangles with webGL.