Skip to content

Commit adec2aa

Browse files
Merge branch 'main' into homo-nuclei-assignments-highlight
2 parents 0bc3468 + d41aa0c commit adec2aa

48 files changed

Lines changed: 363 additions & 297 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Build test application
2626
env:
2727
NODE_OPTIONS: --max-old-space-size=3072
28-
run: npm run build-no-minify
28+
run: node --run build-no-minify
2929
- name: Run E2E tests on ${{ matrix.project }}
3030
run: npx playwright test --project ${{ matrix.project }}
3131
continue-on-error: ${{ matrix.project == 'webkit' }}

.github/workflows/nodejs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
node-version-file: package.json
2525
- run: npm ci
2626
- name: Run Knip
27-
run: npm run knip
27+
run: node --run knip
2828
stylelint:
2929
runs-on: ubuntu-latest
3030
steps:
@@ -35,4 +35,4 @@ jobs:
3535
- name: Install dependencies
3636
run: npm ci
3737
- name: Run Stylelint
38-
run: npm run stylelint
38+
run: node --run stylelint

.github/workflows/npm-prerelease.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
# Changelog
22

3+
## [1.4.0](https://github.com/cheminfo/nmrium/compare/v1.3.0...v1.4.0) (2025-10-09)
4+
5+
6+
### Features
7+
8+
* add yellow highlight to assigned 2D signals ([c39c27b](https://github.com/cheminfo/nmrium/commit/c39c27bd55d5498f6c7046665d4a475ad08d511e)), closes [#3718](https://github.com/cheminfo/nmrium/issues/3718)
9+
* CT exports with alias atoms ([e777d01](https://github.com/cheminfo/nmrium/commit/e777d017d90fae940d96f8b385aacf1cd7c15a96))
10+
* improve export publication string options ([#3677](https://github.com/cheminfo/nmrium/issues/3677)) ([8f134c5](https://github.com/cheminfo/nmrium/commit/8f134c58e793a46221a76e7351c2ec0055ebb93b))
11+
* position the ranges assignment popup near the cursor ([fcd2015](https://github.com/cheminfo/nmrium/commit/fcd2015712e9232e338896c54064cdc791e6c099))
12+
13+
14+
### Bug Fixes
15+
16+
* clear structure query should reset hexagon icon state ([e916fec](https://github.com/cheminfo/nmrium/commit/e916fec3a6db0db7a9aefb80e1e1bf5a6a255e5b))
17+
* correctly assign both x and y axes in 2D ([76fdc89](https://github.com/cheminfo/nmrium/commit/76fdc89131c980f18fbb904642e9934a5ca5eb7a))
18+
* correctly position zone assignment popup ([ce43d72](https://github.com/cheminfo/nmrium/commit/ce43d723835eac5d2e661c2ea5ba656452626423))
19+
* debounce and set peak picking minMaxRatio default to 0.01 ([1a454e5](https://github.com/cheminfo/nmrium/commit/1a454e5ffb144e92c1ded8f4cd188e113551f2e1))
20+
* only render dialog contents styles with fallback ([#3746](https://github.com/cheminfo/nmrium/issues/3746)) ([df969c6](https://github.com/cheminfo/nmrium/commit/df969c608c3671c3978e5ad820692d16a63dd2e0))
21+
* prevent duplicate entries in export and import menus ([a9ddcfc](https://github.com/cheminfo/nmrium/commit/a9ddcfc6e652e605e1d4c5e3e93a596b8d25688b)), closes [#3715](https://github.com/cheminfo/nmrium/issues/3715)
22+
* recalculate ranges integrations when sum changes ([97a1387](https://github.com/cheminfo/nmrium/commit/97a1387ac281af9c995ebbff135d7e034f9f5ab7))
23+
* revert auto peak-picking threshold to 0.05 ([#3747](https://github.com/cheminfo/nmrium/issues/3747)) ([3aca81e](https://github.com/cheminfo/nmrium/commit/3aca81edda93df64bec36b50d25e989a05d5c52f))
24+
325
## [1.3.0](https://github.com/cheminfo/nmrium/compare/v1.2.1...v1.3.0) (2025-09-02)
426

527

README_DEV.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ The test file's name should end with `.test.{js,jsx,ts,tsx}`.
6767

6868
For example, tests for the file located in `src/data/data1d/autoPeakPicking.js` should be written in `src/data/data1d/__tests__/autoPeakPicking.test.js`.
6969

70-
You can run all unit tests with `npm run test-only`.
70+
You can run all unit tests with `node --run test-only`.
7171

7272
### End-to-end tests
7373

@@ -76,9 +76,9 @@ End-to-end (e2e) tests are written in the [`test-e2e` directory](https://github.
7676
We use [Playwright](https://playwright.dev/docs/intro/) to write and run the tests
7777
in real browsers.
7878

79-
You can run all e2e tests with `npm run test-e2e`.
80-
Note that to test your latest changes, the dev server should be running (`npm run dev`).
81-
Otherwise, the last unminified production build from `npm run build-no-minify` will be used.
79+
You can run all e2e tests with `node --run test-e2e`.
80+
Note that to test your latest changes, the dev server should be running (`node --run dev`).
81+
Otherwise, the last unminified production build from `node --run build-no-minify` will be used.
8282

8383
## Useful links
8484

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,46 @@
11
{
22
"name": "nmrium",
33
"description": "React component to display and process nuclear magnetic resonance (NMR) spectra.",
4-
"version": "1.3.0",
4+
"version": "1.4.0",
55
"license": "MIT",
66
"type": "module",
77
"exports": {
8-
".": "./lib/component/main/index.js"
8+
".": {
9+
"nmrium-internal": "./src/component/main/index.ts",
10+
"default": "./lib/component/main/index.js"
11+
}
912
},
1013
"files": [
1114
"lib",
1215
"src"
1316
],
1417
"scripts": {
15-
"build": "vite build --outDir build",
16-
"cspell": "cspell lint \"**/*.tsx\"",
17-
"postbuild": "rm build/data/cytisine/2d/HMBC_Cytisin_RI+FT.dx && rm build/data/cytisine/2d/HSQC_Cytisin_RI+FT.dx",
18-
"build-cloudflare": "npm run set-version-sha && npm run build-with-profiling && npm run copy-samples-toc",
19-
"build-no-minify": "cross-env NO_MINIFY=true npm run build",
20-
"build-with-profiling": "cross-env WITH_PROFILING=true NO_MINIFY=true npm run build",
18+
"build": "vite build --outDir build && node --run build-clean",
19+
"build-clean": "rm build/data/cytisine/2d/HMBC_Cytisin_RI+FT.dx && rm build/data/cytisine/2d/HSQC_Cytisin_RI+FT.dx",
20+
"build-cloudflare": "node --run set-version-sha && node --run build-with-profiling && node --run copy-samples-toc",
21+
"build-no-minify": "cross-env NO_MINIFY=true node --run build",
22+
"build-with-profiling": "cross-env WITH_PROFILING=true NO_MINIFY=true node --run build",
2123
"check-types": "tsc --noEmit",
2224
"compile": "tsc --project tsconfig.build.json",
2325
"copy-samples-toc": "cp src/demo/samples.json build/",
2426
"clean-lib": "rimraf lib",
27+
"cspell": "cspell lint \"**/*.tsx\"",
2528
"dev": "vite --host localhost --port 3000 --open",
2629
"eslint": "eslint . --cache",
27-
"eslint-fix": "npm run eslint -- --fix",
30+
"eslint-fix": "node --run eslint -- --fix",
2831
"install:clean": "rm -rf node_modules/ && rm -rf package-lock.json && npm install && npm start",
2932
"knip": "knip",
3033
"playwright": "playwright test --ui",
31-
"prepack": "npm run clean-lib && npm run compile",
32-
"prepublishOnly": "npm run set-version-npm",
34+
"prepack": "node --run clean-lib && node --run compile",
35+
"prepublishOnly": "node --run set-version-npm",
3336
"prettier": "prettier --check src test-e2e",
3437
"prettier-write": "prettier --write src test-e2e",
3538
"set-version-npm": "VERSION=$(jq .version package.json | tr -d '\"') && echo \"export default { version: 'v$VERSION' };\" > src/versionInfo.ts",
3639
"set-version-sha": "SHA=$(git rev-parse HEAD) && echo \"export default { version: 'git-$SHA' };\" > src/versionInfo.ts",
37-
"start": "npm run dev",
40+
"start": "node --run dev",
3841
"stylelint": "stylelint \"**/*.{css,tsx}\"",
39-
"stylelint-fix": "npm run stylelint -- --fix",
40-
"test": "npm run test-only && npm run check-types && npm run eslint && npm run prettier && npm run stylelint && npm run knip && npm run build-no-minify && npm run test-e2e",
42+
"stylelint-fix": "node --run stylelint -- --fix",
43+
"test": "node --run test-only && node --run check-types && node --run eslint && node --run prettier && node --run stylelint && node --run knip && node --run build-no-minify && node --run test-e2e",
4144
"test-only": "vitest run --coverage",
4245
"test-e2e": "playwright test --project chromium",
4346
"test-e2e-server": "serve -l tcp://localhost:3000 build"

playwright.config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { ViewportSize} from '@playwright/test';
1+
import type { ViewportSize } from '@playwright/test';
22
import { defineConfig, devices } from '@playwright/test';
33

44
const viewportOverride: ViewportSize = {
@@ -28,8 +28,8 @@ export default defineConfig({
2828
},
2929
webServer: {
3030
command: process.env.CI
31-
? 'npm run test-e2e-server'
32-
: 'npm run dev -- --no-open',
31+
? 'node --run test-e2e-server'
32+
: 'node --run dev -- --no-open',
3333
port: 3000,
3434
reuseExistingServer: true,
3535
},

src/component/1d-2d/FieldEdition.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,6 @@ function stopPropagation(e: any) {
3838
e.stopPropagation();
3939
}
4040

41-
function keyDownCheck(event: React.KeyboardEvent<HTMLInputElement>) {
42-
if (event.key === 'Enter') {
43-
return true;
44-
} else if (event.key === 'Escape') {
45-
return false;
46-
}
47-
}
48-
4941
export function FieldEdition(props: FieldEditionsProps) {
5042
const { value, inputType = 'text', onChange, children, PopoverProps } = props;
5143
const [isOpen, setIsOpen] = useState(false);
@@ -84,7 +76,7 @@ function Field(props: FieldProps) {
8476
});
8577

8678
function handleKeyDown(event: React.KeyboardEvent<HTMLInputElement>) {
87-
if (keyDownCheck(event)) {
79+
if (event.key === 'Enter') {
8880
void handleSubmit(onChange)();
8981
}
9082
}

0 commit comments

Comments
 (0)