Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:Exabyte-io/wave into chore/SOF-7268
Browse files Browse the repository at this point in the history
  • Loading branch information
k0stik committed Apr 12, 2024
2 parents e4435c7 + cb3eeaa commit 0503503
Show file tree
Hide file tree
Showing 14 changed files with 845 additions and 268 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -14,7 +14,7 @@ Exabyte.io believe in a collaborative future of materials design on the web.
As below:

- the package provides a web environment for the visualization of atomic structures and is written in ECMAScript 2015 (ES6) for use on the web
- ESSE Data Convention is employed to organize and store information [[1]](#links) via [Made.js](https://github.com/exabyte-io/made.js)
- ESSE Data Convention is employed to organize and store information [[1]](#links) via [Made.js](https://github.com/mat3ra/made)
- [THREE.js](https://threejs.org/) is used for 3d visualization purposes
- High-level classes for the representation of the [viewer](src/wave.js) and modular ES6-compatible mixins for the associated functionality, ie:
- [Atoms](src/mixins/atoms.js),
Expand Down Expand Up @@ -117,7 +117,7 @@ npm test

## Dependencies

This package depends on [Made.js](https://github.com/Exabyte-io/made.js), as well as a slightly [modified version of Three.js](https://github.com/Exabyte-io/three.js/commits/v0.90.0). See [package.json](package.json) for the full list.
This package depends on [Made.js](https://github.com/mat3ra/made), as well as a slightly [modified version of Three.js](https://github.com/Exabyte-io/three.js/commits/v0.90.0). See [package.json](package.json) for the full list.

## Links

Expand Down
1,044 changes: 815 additions & 229 deletions package-lock.json

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions package.json
Expand Up @@ -61,20 +61,21 @@
"moment": "^2.29.4"
},
"peerDependencies": {
"@exabyte-io/made.js": "*",
"@mat3ra/code": "*",
"@mat3ra/made": "*",
"@exabyte-io/cove.js": "*",
"@exabyte-io/code.js": "*",
"@exabyte-io/esse.js": "*",
"react": "17.0.0",
"react-dom": "17.0.0"
},
"devDependencies": {
"@babel/preset-typescript": "^7.22.5",
"@exabyte-io/eslint-config": "^2023.8.29-1",
"@exabyte-io/made.js": "^2024.2.21-0",
"@exabyte-io/code.js": "^2024.2.20-0",
"@mat3ra/tsconfig": "^2024.3.21-5",
"@mat3ra/code": "^2024.3.25-3",
"@mat3ra/esse": "^2024.3.25-6",
"@mat3ra/made": "^2024.3.26-0",
"@exabyte-io/cove.js": "2024.2.21-1",
"@mat3ra/esse": "^2024.2.19-0",
"@types/react": "^18.2.8",
"@types/react-dom": "^18.2.4",
"@types/underscore": "^1.11.9",
Expand Down
2 changes: 1 addition & 1 deletion src/components/ParametersMenu.tsx
Expand Up @@ -89,7 +89,7 @@ function ParametersMenu(props: ParametersMenuProps) {
inputProps={{
max: 2,
min: 0,
step: 0.1,
step: 0.01,
}}
/>
</Box>
Expand Down
11 changes: 9 additions & 2 deletions src/components/ThreeDEditor.jsx
Expand Up @@ -3,7 +3,7 @@

import { DarkMaterialUITheme } from "@exabyte-io/cove.js/dist/theme";
import ThemeProvider from "@exabyte-io/cove.js/dist/theme/provider";
import { Made } from "@exabyte-io/made.js";
import { Made } from "@mat3ra/made";
import Article from "@mui/icons-material/Article";
import Autorenew from "@mui/icons-material/Autorenew";
import CheckIcon from "@mui/icons-material/Check";
Expand Down Expand Up @@ -174,6 +174,7 @@ export class ThreeDEditor extends React.Component {

handleKeyPress = (e) => {
const { isInteractive, isThreejsEditorModalShown } = this.state;
const { editable } = this.props;

// Check if interactive mode is off, or if the event originated from an input-like element
if (
Expand All @@ -185,7 +186,13 @@ export class ThreeDEditor extends React.Component {
return;
}

const handler = this.keyConfig[e.key.toLowerCase()];
// Removing the toggleThreejsEditorModal key from the keyConfig if the editor is not editable
const keyConfigAdjusted = { ...this.keyConfig };
if (!editable) {
delete keyConfigAdjusted[settings.hotKeysConfig.toggleThreejsEditorModal];
}

const handler = keyConfigAdjusted[e.key.toLowerCase()];
if (handler) {
handler.call(this);
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/ThreejsEditorModal.jsx
@@ -1,4 +1,4 @@
import { Made } from "@exabyte-io/made.js";
import { Made } from "@mat3ra/made";
import PropTypes from "prop-types";
import React from "react";
import { ModalBody } from "react-bootstrap";
Expand Down
2 changes: 1 addition & 1 deletion src/index.jsx
@@ -1,7 +1,7 @@
import "./stylesheets/main.css";
import "./MuiClassNameSetup";

import { Made } from "@exabyte-io/made.js";
import { Made } from "@mat3ra/made";
import React from "react";
import ReactDOM from "react-dom";

Expand Down
2 changes: 1 addition & 1 deletion src/mixins/bonds.js
@@ -1,4 +1,4 @@
import { Made } from "@exabyte-io/made.js";
import { Made } from "@mat3ra/made";

Check warning on line 1 in src/mixins/bonds.js

View workflow job for this annotation

GitHub Actions / run-tests

Run autofix to sort these imports!
import {
filterBondsDataByElementsAndOrder,
getElementsBondsData,
Expand Down
2 changes: 1 addition & 1 deletion src/mixins/boundary.js
@@ -1,4 +1,4 @@
import { Made } from "@exabyte-io/made.js";
import { Made } from "@mat3ra/made";
import * as THREE from "three";

import { BOUNDARY_CONDITIONS } from "../enums";
Expand Down
2 changes: 1 addition & 1 deletion src/mixins/repetition.js
@@ -1,4 +1,4 @@
import { Made } from "@exabyte-io/made.js";
import { Made } from "@mat3ra/made";
import * as THREE from "three";

import { ATOM_GROUP_NAME } from "../enums";
Expand Down
2 changes: 1 addition & 1 deletion src/utils.js
@@ -1,4 +1,4 @@
import { Made } from "@exabyte-io/made.js";
import { Made } from "@mat3ra/made";
import { sprintf } from "sprintf-js";
import * as THREE from "three";

Expand Down
3 changes: 2 additions & 1 deletion tests/__tests__/components/ThreeDEditor.jsx
@@ -1,6 +1,7 @@
import { Made } from "@exabyte-io/made.js";
import { Made } from "@mat3ra/made";
import Adapter from "@wojtekmaj/enzyme-adapter-react-17";
import Enzyme from "enzyme";
import expect from "expect";
import React from "react";

import { ThreeDEditor } from "../../../src/components/ThreeDEditor";
Expand Down
2 changes: 1 addition & 1 deletion tests/enums.js
@@ -1,4 +1,4 @@
import { Made } from "@exabyte-io/made.js";
import { Made } from "@mat3ra/made";
import fs from "fs";
import path from "path";

Expand Down
24 changes: 3 additions & 21 deletions tsconfig.json
@@ -1,29 +1,11 @@
{
"extends": "@mat3ra/tsconfig/tsconfig.json",
"compilerOptions": {
"target": "es2018",
"jsx": "react-jsx",
"module": "esNext",
"moduleResolution": "node",
"declaration": true,
"outDir": "./dist",
"noEmitOnError": false,
"isolatedModules": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true,
"types": [],
"rootDir": "./src",
"baseUrl": "./src",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"allowSyntheticDefaultImports": true,
"noFallthroughCasesInSwitch": true,
"resolveJsonModule": true,
"module": "esnext",
"jsx": "react-jsx"
},
"include": [
"./src"
Expand Down

0 comments on commit 0503503

Please sign in to comment.