Selaa lähdekoodia

package updates

Alexander Rose 1 vuosi sitten
vanhempi
commit
9b5fd2595c

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 269 - 250
package-lock.json


+ 18 - 18
package.json

@@ -104,7 +104,7 @@
   "license": "MIT",
   "devDependencies": {
     "@graphql-codegen/add": "^5.0.0",
-    "@graphql-codegen/cli": "^4.0.1",
+    "@graphql-codegen/cli": "^5.0.0",
     "@graphql-codegen/time": "^5.0.0",
     "@graphql-codegen/typescript": "^4.0.1",
     "@graphql-codegen/typescript-graphql-files-modules": "^2.2.1",
@@ -114,36 +114,36 @@
     "@types/gl": "^6.0.2",
     "@types/jpeg-js": "^0.3.7",
     "@types/pngjs": "^6.0.1",
-    "@types/jest": "^29.5.2",
-    "@types/react": "^18.2.14",
-    "@types/react-dom": "^18.2.6",
-    "@typescript-eslint/eslint-plugin": "^5.61.0",
-    "@typescript-eslint/parser": "^5.61.0",
+    "@types/jest": "^29.5.4",
+    "@types/react": "^18.2.21",
+    "@types/react-dom": "^18.2.7",
+    "@typescript-eslint/eslint-plugin": "^6.5.0",
+    "@typescript-eslint/parser": "^6.5.0",
     "benchmark": "^2.1.4",
-    "concurrently": "^8.2.0",
+    "concurrently": "^8.2.1",
     "cpx2": "^5.0.0",
     "crypto-browserify": "^3.12.0",
     "css-loader": "^6.8.1",
-    "eslint": "^8.44.0",
+    "eslint": "^8.48.0",
     "extra-watch-webpack-plugin": "^1.0.3",
     "file-loader": "^6.2.0",
     "fs-extra": "^11.1.1",
-    "graphql": "^16.7.1",
+    "graphql": "^16.8.0",
     "http-server": "^14.1.1",
-    "jest": "^29.6.1",
+    "jest": "^29.6.4",
     "mini-css-extract-plugin": "^2.7.6",
     "path-browserify": "^1.0.1",
     "raw-loader": "^4.0.2",
     "react": "^18.2.0",
     "react-dom": "^18.2.0",
-    "sass": "^1.63.6",
+    "sass": "^1.66.1",
     "sass-loader": "^13.3.2",
     "simple-git": "^3.19.1",
     "stream-browserify": "^3.0.0",
     "style-loader": "^3.3.3",
     "ts-jest": "^29.1.1",
-    "typescript": "^5.1.6",
-    "webpack": "^5.88.1",
+    "typescript": "^5.2.2",
+    "webpack": "^5.88.2",
     "webpack-cli": "^5.1.4"
   },
   "dependencies": {
@@ -151,7 +151,7 @@
     "@types/benchmark": "^2.1.2",
     "@types/compression": "1.7.2",
     "@types/express": "^4.17.17",
-    "@types/node": "^16.18.38",
+    "@types/node": "^16.18.47",
     "@types/node-fetch": "^2.6.4",
     "@types/swagger-ui-dist": "3.30.1",
     "argparse": "^2.0.1",
@@ -161,11 +161,11 @@
     "express": "^4.18.2",
     "h264-mp4-encoder": "^1.0.12",
     "immer": "^9.0.21",
-    "immutable": "^4.3.0",
-    "node-fetch": "^2.6.12",
+    "immutable": "^4.3.4",
+    "node-fetch": "^2.7.0",
     "rxjs": "^7.8.1",
-    "swagger-ui-dist": "^5.1.0",
-    "tslib": "^2.6.0",
+    "swagger-ui-dist": "^5.4.2",
+    "tslib": "^2.6.2",
     "util.promisify": "^1.1.2",
     "xhr2": "^0.2.1"
   },

+ 3 - 3
src/extensions/alpha-orbitals/_spec/collocation.spec.ts

@@ -50,7 +50,7 @@ const _testBasis: Basis = {
                 0.025886090588624934,
                 0.019164790004065606,
                 -0.013539970104105408
-            ] as Vec3,
+            ],
             'shells': [
                 {
                     'angularMomentum': [0],
@@ -101,7 +101,7 @@ const _testBasis: Basis = {
                 0.5082729578468134,
                 1.6880351220025265,
                 0.4963443067810461
-            ] as Vec3,
+            ],
             'shells': [
                 {
                     'angularMomentum': [0],
@@ -158,7 +158,7 @@ const _testBasis: Basis = {
                 1.1367367844436005,
                 -0.47018519422670163,
                 -1.356802622574504
-            ] as Vec3,
+            ],
             'shells': [
                 {
                     'angularMomentum': [0],

+ 1 - 1
src/extensions/alpha-orbitals/collocation.ts

@@ -53,7 +53,7 @@ export async function sphericalCollocation(
                     L,
                     shell.coefficients[amIndex++],
                     shell.exponents,
-                    atom.center,
+                    atom.center as unknown as Vec3,
                     cutoffThreshold,
                     alpha
                 );

+ 2 - 2
src/extensions/alpha-orbitals/data-model.ts

@@ -22,7 +22,7 @@ export interface SphericalElectronShell {
 export interface Basis {
     atoms: {
         // in Bohr units!
-        center: Vec3;
+        center: [number, number, number];
         shells: SphericalElectronShell[];
     }[];
 }
@@ -78,7 +78,7 @@ export function initCubeGrid(params: CubeGridComputationParams): CubeGridInfo {
     const count = geometry.length;
     const box = Box3D.expand(
         Box3D(),
-        Box3D.fromVec3Array(Box3D(), geometry),
+        Box3D.fromVec3Array(Box3D(), geometry as unknown as Vec3[]),
         Vec3.create(expand, expand, expand)
     );
     const size = Box3D.size(Vec3(), box);

+ 1 - 1
src/mol-math/linear-algebra/3d/euler.ts

@@ -135,7 +135,7 @@ namespace Euler {
         return out;
     }
 
-    const _mat4 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] as Mat4;
+    const _mat4 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] as unknown as Mat4;
     export function fromQuat(out: Euler, q: Quat, order: Order) {
         Mat4.fromQuat(_mat4, q);
         return fromMat4(out, _mat4, order);

+ 6 - 6
src/mol-math/linear-algebra/3d/mat3.ts

@@ -407,12 +407,12 @@ namespace Mat3 {
         return out;
     }
 
-    const tmpR0 = [0.1, 0.0, 0.0] as Vec3;
-    const tmpR1 = [0.1, 0.0, 0.0] as Vec3;
-    const tmpR2 = [0.1, 0.0, 0.0] as Vec3;
-    const tmpR0xR1 = [0.1, 0.0, 0.0] as Vec3;
-    const tmpR0xR2 = [0.1, 0.0, 0.0] as Vec3;
-    const tmpR1xR2 = [0.1, 0.0, 0.0] as Vec3;
+    const tmpR0 = [0.1, 0.0, 0.0] as unknown as Vec3;
+    const tmpR1 = [0.1, 0.0, 0.0] as unknown as Vec3;
+    const tmpR2 = [0.1, 0.0, 0.0] as unknown as Vec3;
+    const tmpR0xR1 = [0.1, 0.0, 0.0] as unknown as Vec3;
+    const tmpR0xR2 = [0.1, 0.0, 0.0] as unknown as Vec3;
+    const tmpR1xR2 = [0.1, 0.0, 0.0] as unknown as Vec3;
     /**
      * Calculates the eigenvector for the given eigenvalue `e` of matrix `a`
      */

+ 4 - 4
src/mol-math/linear-algebra/3d/mat4.ts

@@ -750,7 +750,7 @@ namespace Mat4 {
         return out;
     }
 
-    const _v3 = [0, 0, 0] as Vec3;
+    const _v3 = [0, 0, 0] as unknown as Vec3;
     const _m4 = zero();
     export function decompose(m: Mat4, position: Vec3, quaternion: Quat, scale: Vec3) {
 
@@ -1233,9 +1233,9 @@ namespace Mat4 {
         return Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq));
     }
 
-    const xAxis = [1, 0, 0] as Vec3;
-    const yAxis = [0, 1, 0] as Vec3;
-    const zAxis = [0, 0, 1] as Vec3;
+    const xAxis = [1, 0, 0] as unknown as Vec3;
+    const yAxis = [0, 1, 0] as unknown as Vec3;
+    const zAxis = [0, 0, 1] as unknown as Vec3;
 
     /** Rotation matrix for 90deg around x-axis */
     export const rotX90: ReadonlyMat4 = fromRotation(zero(), degToRad(90), xAxis);

+ 5 - 5
src/mol-math/linear-algebra/3d/quat.ts

@@ -339,7 +339,7 @@ namespace Quat {
         return out;
     }
 
-    const fromUnitVec3Temp = [0, 0, 0] as Vec3;
+    const fromUnitVec3Temp = [0, 0, 0] as unknown as Vec3;
     /** Quaternion from two normalized unit vectors. */
     export function fromUnitVec3(out: Quat, a: Vec3, b: Vec3) {
         // assumes a and b are normalized
@@ -457,9 +457,9 @@ namespace Quat {
      *
      * Both vectors are assumed to be unit length.
      */
-    const rotTmpVec3 = [0, 0, 0] as Vec3;
-    const rotTmpVec3UnitX = [1, 0, 0] as Vec3;
-    const rotTmpVec3UnitY = [0, 1, 0] as Vec3;
+    const rotTmpVec3 = [0, 0, 0] as unknown as Vec3;
+    const rotTmpVec3UnitX = [1, 0, 0] as unknown as Vec3;
+    const rotTmpVec3UnitY = [0, 1, 0] as unknown as Vec3;
     export function rotationTo(out: Quat, a: Vec3, b: Vec3) {
         const dot = Vec3.dot(a, b);
         if (dot < -0.999999) {
@@ -502,7 +502,7 @@ namespace Quat {
      * axes. Each axis is a vec3 and is expected to be unit length and
      * perpendicular to all other specified axes.
      */
-    const axesTmpMat = [0, 0, 0, 0, 0, 0, 0, 0, 0] as Mat3;
+    const axesTmpMat = [0, 0, 0, 0, 0, 0, 0, 0, 0] as unknown as Mat3;
     export function setAxes(out: Quat, view: Vec3, right: Vec3, up: Vec3) {
         axesTmpMat[0] = right[0];
         axesTmpMat[3] = right[1];

+ 4 - 4
src/mol-math/linear-algebra/_spec/vec3.spec.ts

@@ -7,10 +7,10 @@
 import { Vec3 } from '../3d/vec3';
 
 describe('vec3', () => {
-    const vec1 = [1, 2, 3] as Vec3;
-    const vec2 = [2, 3, 1] as Vec3;
-    const orthVec1 = [0, 1, 0] as Vec3;
-    const orthVec2 = [1, 0, 0] as Vec3;
+    const vec1 = Vec3.create(1, 2, 3);
+    const vec2 = Vec3.create(2, 3, 1);
+    const orthVec1 = Vec3.create(0, 1, 0);
+    const orthVec2 = Vec3.create(1, 0, 0);
 
     it('angle calculation', () => {
         expect(Vec3.angle(vec1, vec1) * 360 / (2 * Math.PI)).toBe(0.0);

+ 1 - 1
src/mol-theme/color/operator-hkl.ts

@@ -50,7 +50,7 @@ function hklKeySplit(key: string) {
     const h = parseInt(key.substr(0, len));
     const k = parseInt(key.substr(len, len));
     const l = parseInt(key.substr(len + len, len));
-    return [h - hklOffset, k - hklOffset, l - hklOffset] as Vec3;
+    return Vec3.create(h - hklOffset, k - hklOffset, l - hklOffset);
 }
 
 function formatHkl(hkl: Vec3) {

+ 2 - 2
src/mol-util/color/color.ts

@@ -111,7 +111,7 @@ export namespace Color {
         return ((r << 16) | (g << 8) | b) as Color;
     }
 
-    const tmpSaturateHcl = [0, 0, 0] as Hcl;
+    const tmpSaturateHcl = [0, 0, 0] as unknown as Hcl;
     export function saturate(c: Color, amount: number): Color {
         Hcl.fromColor(tmpSaturateHcl, c);
         return Hcl.toColor(Hcl.saturate(tmpSaturateHcl, tmpSaturateHcl, amount));
@@ -121,7 +121,7 @@ export namespace Color {
         return saturate(c, -amount);
     }
 
-    const tmpDarkenLab = [0, 0, 0] as Lab;
+    const tmpDarkenLab = [0, 0, 0] as unknown as Lab;
     export function darken(c: Color, amount: number): Color {
         Lab.fromColor(tmpDarkenLab, c);
         return Lab.toColor(Lab.darken(tmpDarkenLab, tmpDarkenLab, amount));

+ 3 - 3
src/mol-util/color/distinct.ts

@@ -36,8 +36,8 @@ function distance(colorA: Lab, colorB: Lab) {
 }
 
 const LabTolerance = 2;
-const tmpCheckColorHcl = [0, 0, 0] as Hcl;
-const tmpCheckColorLab = [0, 0, 0] as Lab;
+const tmpCheckColorHcl = [0, 0, 0] as unknown as Hcl;
+const tmpCheckColorLab = [0, 0, 0] as unknown as Lab;
 function checkColor(lab: Lab, props: DistinctColorsProps) {
     Lab.toHcl(tmpCheckColorHcl, lab);
     // roundtrip to RGB for conversion tolerance testing
@@ -157,7 +157,7 @@ export function distinctColors(count: number, props: Partial<DistinctColorsProps
             const aAvg = arraySum(As) / size;
             const bAvg = arraySum(Bs) / size;
 
-            colors[i] = [lAvg, aAvg, bAvg] as Lab;
+            colors[i] = [lAvg, aAvg, bAvg] as unknown as Lab;
         }
 
         if (deepEqual(lastColors, colors)) break;

+ 3 - 3
src/mol-util/color/spaces/hcl.ts

@@ -43,7 +43,7 @@ namespace Hcl {
         return out;
     }
 
-    const tmpFromColorLab = [0, 0, 0] as Lab;
+    const tmpFromColorLab = [0, 0, 0] as unknown as Lab;
     export function fromColor(out: Hcl, color: Color): Hcl {
         return Lab.toHcl(out, Lab.fromColor(tmpFromColorLab, color));
     }
@@ -52,7 +52,7 @@ namespace Hcl {
         return Lab.toHcl(hcl, lab);
     }
 
-    const tmpToColorLab = [0, 0, 0] as Lab;
+    const tmpToColorLab = [0, 0, 0] as unknown as Lab;
     export function toColor(hcl: Hcl): Color {
         return Lab.toColor(toLab(tmpToColorLab, hcl));
     }
@@ -92,7 +92,7 @@ namespace Hcl {
         return saturate(out, c, -amount);
     }
 
-    const tmpDarkenLab = [0, 0, 0] as Lab;
+    const tmpDarkenLab = [0, 0, 0] as unknown as Lab;
     export function darken(out: Hcl, c: Hcl, amount: number): Hcl {
         toLab(tmpDarkenLab, c);
         return Lab.toHcl(out, Lab.darken(tmpDarkenLab, tmpDarkenLab, amount));

+ 1 - 1
src/mol-util/color/spaces/lab.ts

@@ -107,7 +107,7 @@ namespace Lab {
         return darken(out, c, -amount);
     }
 
-    const tmpSaturateHcl = [0, 0, 0] as Hcl;
+    const tmpSaturateHcl = [0, 0, 0] as unknown as Hcl;
     export function saturate(out: Lab, c: Lab, amount: number): Lab {
         toHcl(tmpSaturateHcl, c);
         return Hcl.toLab(out, Hcl.saturate(tmpSaturateHcl, tmpSaturateHcl, amount));

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä