From ba1c24d0a20c8b29d4c1aab63ff86c1fd74042ac Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Thu, 19 Dec 2024 14:02:47 -0800 Subject: [PATCH] update: latest standata --- dist/MaterialsDesigner.d.ts | 1192 ++++++++++++++++- dist/MaterialsDesigner.js | 3 +- .../jupyterlite/BaseJupyterLiteComponent.js | 2 +- package.json | 4 +- src/MaterialsDesigner.jsx | 3 +- 5 files changed, 1198 insertions(+), 6 deletions(-) diff --git a/dist/MaterialsDesigner.d.ts b/dist/MaterialsDesigner.d.ts index 39627c97..81e67dda 100644 --- a/dist/MaterialsDesigner.d.ts +++ b/dist/MaterialsDesigner.d.ts @@ -50,4 +50,1194 @@ declare namespace MaterialsDesigner { } import React from "react"; import PropTypes from "prop-types"; -declare const materialConfigs: any[]; +declare const materialConfigs: ({ + name: string; + lattice: { + type: string; + a: number; + b: number; + c: number; + alpha: number; + beta: number; + gamma: number; + units: { + length: string; + angle: string; + }; + }; + basis: { + units: string; + elements: { + id: number; + value: string; + }[]; + coordinates: { + id: number; + value: number[]; + }[]; + }; + external: { + id: string; + source: string; + doi: string; + url: string; + origin: boolean; + }; + isNonPeriodic: boolean; +} | { + name: string; + lattice: { + type: string; + a: number; + b: number; + c: number; + alpha: number; + beta: number; + gamma: number; + units: { + length: string; + angle: string; + }; + }; + basis: { + units: string; + elements: { + id: number; + value: string; + }[]; + coordinates: { + id: number; + value: number[]; + }[]; + }; + external: { + id: string; + source: string; + doi: string; + url: string; + origin: boolean; + }; + isNonPeriodic: boolean; +} | { + name: string; + lattice: { + type: string; + a: number; + b: number; + c: number; + alpha: number; + beta: number; + gamma: number; + units: { + length: string; + angle: string; + }; + }; + basis: { + units: string; + elements: { + id: number; + value: string; + }[]; + coordinates: { + id: number; + value: number[]; + }[]; + }; + external: { + id: string; + source: string; + doi: string; + url: string; + origin: boolean; + }; + isNonPeriodic: boolean; +} | { + name: string; + lattice: { + type: string; + a: number; + b: number; + c: number; + alpha: number; + beta: number; + gamma: number; + units: { + length: string; + angle: string; + }; + }; + basis: { + units: string; + elements: { + id: number; + value: string; + }[]; + coordinates: { + id: number; + value: number[]; + }[]; + }; + external: { + id: string; + source: string; + doi: null; + url: string; + origin: boolean; + }; + isNonPeriodic: boolean; +} | { + name: string; + lattice: { + type: string; + a: number; + b: number; + c: number; + alpha: number; + beta: number; + gamma: number; + units: { + length: string; + angle: string; + }; + }; + basis: { + units: string; + elements: { + id: number; + value: string; + }[]; + coordinates: { + id: number; + value: number[]; + }[]; + }; + external: { + id: string; + source: string; + doi: string; + url: string; + origin: boolean; + }; + isNonPeriodic: boolean; +} | { + name: string; + lattice: { + type: string; + a: number; + b: number; + c: number; + alpha: number; + beta: number; + gamma: number; + units: { + length: string; + angle: string; + }; + }; + basis: { + units: string; + elements: { + id: number; + value: string; + }[]; + coordinates: { + id: number; + value: number[]; + }[]; + }; + external: { + id: string; + source: string; + doi: string; + url: string; + origin: boolean; + }; + isNonPeriodic: boolean; +} | { + name: string; + lattice: { + type: string; + a: number; + b: number; + c: number; + alpha: number; + beta: number; + gamma: number; + units: { + length: string; + angle: string; + }; + }; + basis: { + units: string; + elements: { + id: number; + value: string; + }[]; + coordinates: { + id: number; + value: number[]; + }[]; + }; + external: { + id: string; + source: string; + doi: string; + url: string; + origin: boolean; + }; + isNonPeriodic: boolean; +} | { + name: string; + lattice: { + type: string; + a: number; + b: number; + c: number; + alpha: number; + beta: number; + gamma: number; + units: { + length: string; + angle: string; + }; + }; + basis: { + units: string; + elements: { + id: number; + value: string; + }[]; + coordinates: { + id: number; + value: number[]; + }[]; + }; + external: { + id: string; + source: string; + doi: string; + url: string; + origin: boolean; + }; + isNonPeriodic: boolean; +} | { + name: string; + lattice: { + type: string; + a: number; + b: number; + c: number; + alpha: number; + beta: number; + gamma: number; + units: { + length: string; + angle: string; + }; + }; + basis: { + units: string; + elements: { + id: number; + value: string; + }[]; + coordinates: { + id: number; + value: number[]; + }[]; + }; + external: { + id: string; + source: string; + doi: string; + url: string; + origin: boolean; + }; + isNonPeriodic: boolean; +} | { + name: string; + lattice: { + type: string; + a: number; + b: number; + c: number; + alpha: number; + beta: number; + gamma: number; + units: { + length: string; + angle: string; + }; + }; + basis: { + units: string; + elements: { + id: number; + value: string; + }[]; + coordinates: { + id: number; + value: number[]; + }[]; + }; + external: { + id: string; + source: string; + doi: string; + url: string; + origin: boolean; + }; + isNonPeriodic: boolean; +} | { + name: string; + lattice: { + type: string; + a: number; + b: number; + c: number; + alpha: number; + beta: number; + gamma: number; + units: { + length: string; + angle: string; + }; + }; + basis: { + units: string; + elements: { + id: number; + value: string; + }[]; + coordinates: { + id: number; + value: number[]; + }[]; + }; + external: { + id: string; + source: string; + doi: string; + url: string; + origin: boolean; + }; + isNonPeriodic: boolean; +} | { + name: string; + lattice: { + type: string; + a: number; + b: number; + c: number; + alpha: number; + beta: number; + gamma: number; + units: { + length: string; + angle: string; + }; + }; + basis: { + units: string; + elements: { + id: number; + value: string; + }[]; + coordinates: { + id: number; + value: number[]; + }[]; + }; + external: { + id: string; + source: string; + doi: string; + url: string; + origin: boolean; + }; + isNonPeriodic: boolean; +} | { + name: string; + lattice: { + type: string; + a: number; + b: number; + c: number; + alpha: number; + beta: number; + gamma: number; + units: { + length: string; + angle: string; + }; + }; + basis: { + units: string; + elements: { + id: number; + value: string; + }[]; + coordinates: { + id: number; + value: number[]; + }[]; + }; + external: { + id: string; + source: string; + doi: string; + url: string; + origin: boolean; + }; + isNonPeriodic: boolean; +} | { + name: string; + lattice: { + type: string; + a: number; + b: number; + c: number; + alpha: number; + beta: number; + gamma: number; + units: { + length: string; + angle: string; + }; + }; + basis: { + units: string; + elements: { + id: number; + value: string; + }[]; + coordinates: { + id: number; + value: number[]; + }[]; + }; + external: { + id: string; + source: string; + doi: string; + url: string; + origin: boolean; + }; + isNonPeriodic: boolean; +} | { + name: string; + lattice: { + type: string; + a: number; + b: number; + c: number; + alpha: number; + beta: number; + gamma: number; + units: { + length: string; + angle: string; + }; + }; + basis: { + units: string; + elements: { + id: number; + value: string; + }[]; + coordinates: { + id: number; + value: number[]; + }[]; + }; + external: { + id: string; + source: string; + doi: string; + url: string; + origin: boolean; + }; + isNonPeriodic: boolean; +} | { + name: string; + lattice: { + type: string; + a: number; + b: number; + c: number; + alpha: number; + beta: number; + gamma: number; + units: { + length: string; + angle: string; + }; + }; + basis: { + units: string; + elements: { + id: number; + value: string; + }[]; + coordinates: { + id: number; + value: number[]; + }[]; + }; + external: { + id: string; + source: string; + doi: string; + url: string; + origin: boolean; + }; + isNonPeriodic: boolean; +} | { + name: string; + lattice: { + type: string; + a: number; + b: number; + c: number; + alpha: number; + beta: number; + gamma: number; + units: { + length: string; + angle: string; + }; + }; + basis: { + units: string; + elements: { + id: number; + value: string; + }[]; + coordinates: { + id: number; + value: number[]; + }[]; + }; + external: { + id: string; + source: string; + doi: string; + url: string; + origin: boolean; + }; + isNonPeriodic: boolean; +} | { + name: string; + lattice: { + type: string; + a: number; + b: number; + c: number; + alpha: number; + beta: number; + gamma: number; + units: { + length: string; + angle: string; + }; + }; + basis: { + units: string; + elements: { + id: number; + value: string; + }[]; + coordinates: { + id: number; + value: number[]; + }[]; + }; + external: { + id: string; + source: string; + doi: string; + url: string; + origin: boolean; + }; + isNonPeriodic: boolean; +} | { + name: string; + lattice: { + type: string; + a: number; + b: number; + c: number; + alpha: number; + beta: number; + gamma: number; + units: { + length: string; + angle: string; + }; + }; + basis: { + units: string; + elements: { + id: number; + value: string; + }[]; + coordinates: { + id: number; + value: number[]; + }[]; + }; + external: { + id: string; + source: string; + doi: null; + url: string; + origin: boolean; + }; + isNonPeriodic: boolean; +} | { + name: string; + lattice: { + type: string; + a: number; + b: number; + c: number; + alpha: number; + beta: number; + gamma: number; + units: { + length: string; + angle: string; + }; + }; + basis: { + units: string; + elements: { + id: number; + value: string; + }[]; + coordinates: { + id: number; + value: number[]; + }[]; + }; + external: { + id: string; + source: string; + doi: null; + url: string; + origin: boolean; + }; + isNonPeriodic: boolean; +} | { + name: string; + lattice: { + type: string; + a: number; + b: number; + c: number; + alpha: number; + beta: number; + gamma: number; + units: { + length: string; + angle: string; + }; + }; + basis: { + units: string; + elements: { + id: number; + value: string; + }[]; + coordinates: { + id: number; + value: number[]; + }[]; + }; + external: { + id: string; + source: string; + doi: string; + url: string; + origin: boolean; + }; + isNonPeriodic: boolean; +} | { + name: string; + lattice: { + type: string; + a: number; + b: number; + c: number; + alpha: number; + beta: number; + gamma: number; + units: { + length: string; + angle: string; + }; + }; + basis: { + units: string; + elements: { + id: number; + value: string; + }[]; + coordinates: { + id: number; + value: number[]; + }[]; + }; + external: { + id: string; + source: string; + doi: string; + url: string; + origin: boolean; + }; + isNonPeriodic: boolean; +} | { + name: string; + lattice: { + type: string; + a: number; + b: number; + c: number; + alpha: number; + beta: number; + gamma: number; + units: { + length: string; + angle: string; + }; + }; + basis: { + units: string; + elements: { + id: number; + value: string; + }[]; + coordinates: { + id: number; + value: number[]; + }[]; + }; + external: { + id: string; + source: string; + doi: null; + url: string; + origin: boolean; + }; + isNonPeriodic: boolean; +} | { + name: string; + lattice: { + type: string; + a: number; + b: number; + c: number; + alpha: number; + beta: number; + gamma: number; + units: { + length: string; + angle: string; + }; + }; + basis: { + units: string; + elements: { + id: number; + value: string; + }[]; + coordinates: { + id: number; + value: number[]; + }[]; + }; + external: { + id: string; + source: string; + doi: string; + url: string; + origin: boolean; + }; + isNonPeriodic: boolean; +} | { + name: string; + lattice: { + type: string; + a: number; + b: number; + c: number; + alpha: number; + beta: number; + gamma: number; + units: { + length: string; + angle: string; + }; + }; + basis: { + units: string; + elements: { + id: number; + value: string; + }[]; + coordinates: { + id: number; + value: number[]; + }[]; + }; + external: { + id: string; + source: string; + doi: string; + url: string; + origin: boolean; + }; + isNonPeriodic: boolean; +} | { + name: string; + lattice: { + type: string; + a: number; + b: number; + c: number; + alpha: number; + beta: number; + gamma: number; + units: { + length: string; + angle: string; + }; + }; + basis: { + units: string; + elements: { + id: number; + value: string; + }[]; + coordinates: { + id: number; + value: number[]; + }[]; + }; + external: { + id: string; + source: string; + doi: string; + url: string; + origin: boolean; + }; + isNonPeriodic: boolean; +} | { + name: string; + lattice: { + type: string; + a: number; + b: number; + c: number; + alpha: number; + beta: number; + gamma: number; + units: { + length: string; + angle: string; + }; + }; + basis: { + units: string; + elements: { + id: number; + value: string; + }[]; + coordinates: { + id: number; + value: number[]; + }[]; + }; + external: { + id: string; + source: string; + doi: string; + url: string; + origin: boolean; + }; + isNonPeriodic: boolean; +} | { + name: string; + lattice: { + type: string; + a: number; + b: number; + c: number; + alpha: number; + beta: number; + gamma: number; + units: { + length: string; + angle: string; + }; + }; + basis: { + units: string; + elements: { + id: number; + value: string; + }[]; + coordinates: { + id: number; + value: number[]; + }[]; + }; + external: { + id: string; + source: string; + doi: string; + url: string; + origin: boolean; + }; + isNonPeriodic: boolean; +} | { + name: string; + lattice: { + type: string; + a: number; + b: number; + c: number; + alpha: number; + beta: number; + gamma: number; + units: { + length: string; + angle: string; + }; + }; + basis: { + units: string; + elements: { + id: number; + value: string; + }[]; + coordinates: { + id: number; + value: number[]; + }[]; + }; + external: { + id: string; + source: string; + doi: string; + url: string; + origin: boolean; + }; + isNonPeriodic: boolean; +} | { + name: string; + lattice: { + type: string; + a: number; + b: number; + c: number; + alpha: number; + beta: number; + gamma: number; + units: { + length: string; + angle: string; + }; + }; + basis: { + units: string; + elements: { + id: number; + value: string; + }[]; + coordinates: { + id: number; + value: number[]; + }[]; + }; + external: { + id: string; + source: string; + doi: null; + url: string; + origin: boolean; + }; + isNonPeriodic: boolean; +} | { + name: string; + lattice: { + type: string; + a: number; + b: number; + c: number; + alpha: number; + beta: number; + gamma: number; + units: { + length: string; + angle: string; + }; + }; + basis: { + units: string; + elements: { + id: number; + value: string; + }[]; + coordinates: { + id: number; + value: number[]; + }[]; + }; + external: { + id: string; + source: string; + doi: string; + url: string; + origin: boolean; + }; + isNonPeriodic: boolean; +} | { + name: string; + lattice: { + type: string; + a: number; + b: number; + c: number; + alpha: number; + beta: number; + gamma: number; + units: { + length: string; + angle: string; + }; + }; + basis: { + units: string; + elements: { + id: number; + value: string; + }[]; + coordinates: { + id: number; + value: number[]; + }[]; + }; + external: { + id: string; + source: string; + doi: string; + url: string; + origin: boolean; + }; + isNonPeriodic: boolean; +} | { + name: string; + lattice: { + type: string; + a: number; + b: number; + c: number; + alpha: number; + beta: number; + gamma: number; + units: { + length: string; + angle: string; + }; + }; + basis: { + units: string; + elements: { + id: number; + value: string; + }[]; + coordinates: { + id: number; + value: number[]; + }[]; + }; + external: { + id: string; + source: string; + doi: string; + url: string; + origin: boolean; + }; + isNonPeriodic: boolean; +} | { + name: string; + lattice: { + type: string; + a: number; + b: number; + c: number; + alpha: number; + beta: number; + gamma: number; + units: { + length: string; + angle: string; + }; + }; + basis: { + units: string; + elements: { + id: number; + value: string; + }[]; + coordinates: { + id: number; + value: number[]; + }[]; + }; + external: { + id: string; + source: string; + doi: string; + url: string; + origin: boolean; + }; + isNonPeriodic: boolean; +} | { + name: string; + lattice: { + type: string; + a: number; + b: number; + c: number; + alpha: number; + beta: number; + gamma: number; + units: { + length: string; + angle: string; + }; + }; + basis: { + units: string; + elements: { + id: number; + value: string; + }[]; + coordinates: { + id: number; + value: number[]; + }[]; + }; + external: { + id: string; + source: string; + doi: string; + url: string; + origin: boolean; + }; + isNonPeriodic: boolean; +})[]; diff --git a/dist/MaterialsDesigner.js b/dist/MaterialsDesigner.js index 7e87b031..df7c6939 100644 --- a/dist/MaterialsDesigner.js +++ b/dist/MaterialsDesigner.js @@ -3,7 +3,7 @@ import IconByName from "@exabyte-io/cove.js/dist/mui/components/icon/IconByName" import FullscreenComponentMixin from "@exabyte-io/cove.js/dist/other/fullscreen"; import ThemeProvider from "@exabyte-io/cove.js/dist/theme/provider"; // eslint-disable-next-line import/no-unresolved -import data from "@mat3ra/standata/lib/runtime_data/materials"; +import { MaterialStandata } from "@mat3ra/standata"; import AppBar from "@mui/material/AppBar"; import Box from "@mui/material/Box"; import Grid from "@mui/material/Grid"; @@ -25,6 +25,7 @@ import BasisEditor from "./components/source_editor/Basis"; import LatticeEditor from "./components/source_editor/Lattice"; import { Material } from "./material"; import { theme } from "./settings"; +const data = MaterialStandata.runtimeData; const materialConfigs = Object.values(data.filesMapByName); const APP_BAR_HEIGHT = 54; const GRID_CONFIG_BY_VISIBILITY = { diff --git a/dist/components/include/jupyterlite/BaseJupyterLiteComponent.js b/dist/components/include/jupyterlite/BaseJupyterLiteComponent.js index c6e0948e..8afc8f1f 100644 --- a/dist/components/include/jupyterlite/BaseJupyterLiteComponent.js +++ b/dist/components/include/jupyterlite/BaseJupyterLiteComponent.js @@ -7,7 +7,7 @@ import React from "react"; class BaseJupyterLiteSessionComponent extends React.Component { constructor() { super(...arguments); - this.DEFAULT_NOTEBOOK_PATH = "api-examples/other/materials_designer/Introduction.ipynb"; + this.DEFAULT_NOTEBOOK_PATH = "made/Introduction.ipynb"; this.jupyterLiteSessionRef = React.createRef(); this.sendMaterials = () => { var _a; diff --git a/package.json b/package.json index 93e8a80a..9fdabe0c 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ "@mat3ra/code": "2024.3.25-3", "@mat3ra/esse": "2024.6.4-1", "@mat3ra/made": "2024.7.31-1", - "@mat3ra/standata": "^2024.12.18-0", + "@mat3ra/standata": "2024.12.19-0", "@mat3ra/tsconfig": "^2024.3.23-2", "@types/debug": "^4.1.12", "@types/mocha": "^10.0.1", @@ -122,7 +122,7 @@ "not op_mini all" ], "engines": { - "node": ">=14.0", + "node": ">=20.0", "npm": ">=6.14" } } diff --git a/src/MaterialsDesigner.jsx b/src/MaterialsDesigner.jsx index 75f22a57..15fe283c 100644 --- a/src/MaterialsDesigner.jsx +++ b/src/MaterialsDesigner.jsx @@ -2,7 +2,7 @@ import IconByName from "@exabyte-io/cove.js/dist/mui/components/icon/IconByName" import FullscreenComponentMixin from "@exabyte-io/cove.js/dist/other/fullscreen"; import ThemeProvider from "@exabyte-io/cove.js/dist/theme/provider"; // eslint-disable-next-line import/no-unresolved -import data from "@mat3ra/standata/lib/runtime_data/materials"; +import { MaterialStandata } from "@mat3ra/standata"; import AppBar from "@mui/material/AppBar"; import Box from "@mui/material/Box"; import Grid from "@mui/material/Grid"; @@ -28,6 +28,7 @@ import LatticeEditor from "./components/source_editor/Lattice"; import { Material } from "./material"; import { theme } from "./settings"; +const data = MaterialStandata.runtimeData; const materialConfigs = Object.values(data.filesMapByName); const APP_BAR_HEIGHT = 54;