From 792c3aad2fef12fa7c27776fc9936e9db1daef8b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Jan 2025 08:09:48 +0000 Subject: [PATCH 1/8] chore(components): bump react from 18.3.1 to 19.0.0 in /components Bumps [react](https://github.com/facebook/react/tree/HEAD/packages/react) from 18.3.1 to 19.0.0. - [Release notes](https://github.com/facebook/react/releases) - [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/react/commits/v19.0.0/packages/react) --- updated-dependencies: - dependency-name: react dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- components/package-lock.json | 102 +++++++++++++++++++++++------------ components/package.json | 2 +- 2 files changed, 68 insertions(+), 36 deletions(-) diff --git a/components/package-lock.json b/components/package-lock.json index 03b99e7c..6480a572 100644 --- a/components/package-lock.json +++ b/components/package-lock.json @@ -72,7 +72,7 @@ "msw": "^2.2.14", "postcss": "^8.4.38", "prettier": "^3.2.5", - "react": "^18.3.1", + "react": "^19.0.0", "storybook": "^8.0.9", "storybook-addon-fetch-mock": "^2.0.0", "tailwindcss": "^4.0.9", @@ -3039,6 +3039,59 @@ "storybook": "^8.6.14" } }, + "node_modules/@storybook/addon-docs/node_modules/@storybook/react-dom-shim": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@storybook/react-dom-shim/-/react-dom-shim-8.5.0.tgz", + "integrity": "sha512-7P8xg4FiuFpM6kQOzZynno+0zyLVs8NgsmRK58t3JRZXbda1tzlxTXzvqx4hUevvbPJGjmrB0F3xTFH+8Otnvw==", + "dev": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta", + "storybook": "^8.5.0" + } + }, + "node_modules/@storybook/addon-docs/node_modules/react": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@storybook/addon-docs/node_modules/react-dom": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", + "dev": true, + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.2" + }, + "peerDependencies": { + "react": "^18.3.1" + } + }, + "node_modules/@storybook/addon-docs/node_modules/scheduler": { + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + } + }, "node_modules/@storybook/addon-essentials": { "version": "8.6.14", "resolved": "https://registry.npmjs.org/@storybook/addon-essentials/-/addon-essentials-8.6.14.tgz", @@ -3443,22 +3496,6 @@ "storybook": "^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0" } }, - "node_modules/@storybook/react-dom-shim": { - "version": "8.6.14", - "resolved": "https://registry.npmjs.org/@storybook/react-dom-shim/-/react-dom-shim-8.6.14.tgz", - "integrity": "sha512-0hixr3dOy3f3M+HBofp3jtMQMS+sqzjKNgl7Arfuj3fvjmyXOks/yGjDImySR4imPtEllvPZfhiQNlejheaInw==", - "dev": true, - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/storybook" - }, - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta", - "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta", - "storybook": "^8.6.14" - } - }, "node_modules/@storybook/test": { "version": "8.6.14", "resolved": "https://registry.npmjs.org/@storybook/test/-/test-8.6.14.tgz", @@ -13681,29 +13718,26 @@ "license": "MIT" }, "node_modules/react": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", - "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/react/-/react-19.0.0.tgz", + "integrity": "sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==", "license": "MIT", - "dependencies": { - "loose-envify": "^1.1.0" - }, "engines": { "node": ">=0.10.0" } }, "node_modules/react-dom": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", - "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.0.0.tgz", + "integrity": "sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { - "loose-envify": "^1.1.0", - "scheduler": "^0.23.2" + "scheduler": "^0.25.0" }, "peerDependencies": { - "react": "^18.3.1" + "react": "^19.0.0" } }, "node_modules/react-is": { @@ -14113,14 +14147,12 @@ "license": "MIT" }, "node_modules/scheduler": { - "version": "0.23.2", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", - "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.25.0.tgz", + "integrity": "sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA==", "dev": true, "license": "MIT", - "dependencies": { - "loose-envify": "^1.1.0" - } + "peer": true }, "node_modules/secure-compare": { "version": "3.0.1", diff --git a/components/package.json b/components/package.json index 185e3242..d8bd5e90 100644 --- a/components/package.json +++ b/components/package.json @@ -136,7 +136,7 @@ "msw": "^2.2.14", "postcss": "^8.4.38", "prettier": "^3.2.5", - "react": "^18.3.1", + "react": "^19.0.0", "storybook": "^8.0.9", "storybook-addon-fetch-mock": "^2.0.0", "tailwindcss": "^4.0.9", From 0ad3a2273b0834cf8eea85c37dff173853a4437e Mon Sep 17 00:00:00 2001 From: Fabian Engelniederhammer Date: Thu, 23 Jan 2025 15:03:04 +0100 Subject: [PATCH 2/8] feat(components): use the React 19 syntax to declare components for React https://react.dev/blog/2024/04/25/react-19-upgrade-guide#the-jsx-namespace-in-typescript And update the React example to React 19. --- components/src/web-components/gs-app.ts | 9 ++-- .../input/gs-date-range-filter.tsx | 3 +- .../input/gs-lineage-filter.tsx | 7 ++- .../input/gs-location-filter.tsx | 5 +-- .../input/gs-mutation-filter.tsx | 5 +-- .../web-components/input/gs-text-filter.tsx | 5 +-- .../visualization/gs-aggregate.tsx | 5 +-- .../visualization/gs-mutation-comparison.tsx | 5 +-- .../visualization/gs-mutations-over-time.tsx | 5 +-- .../visualization/gs-mutations.tsx | 17 ++++--- .../gs-number-sequences-over-time.tsx | 5 +-- .../visualization/gs-prevalence-over-time.tsx | 5 +-- .../gs-relative-growth-advantage.tsx | 5 +-- .../gs-sequences-by-location.tsx | 5 +-- .../visualization/gs-statistics.tsx | 5 +-- .../gs-wastewater-mutations-over-time.tsx | 5 +-- examples/React/package.json | 10 ++--- examples/React/src/App.tsx | 44 +++++++++---------- 18 files changed, 69 insertions(+), 81 deletions(-) diff --git a/components/src/web-components/gs-app.ts b/components/src/web-components/gs-app.ts index d4e5a6a8..c715521f 100644 --- a/components/src/web-components/gs-app.ts +++ b/components/src/web-components/gs-app.ts @@ -2,7 +2,6 @@ import { provide } from '@lit/context'; import { Task } from '@lit/task'; import { html, LitElement } from 'lit'; import { customElement, property } from 'lit/decorators.js'; -import type { DetailedHTMLProps, HTMLAttributes } from 'react'; import z from 'zod'; import { lapisContext } from './lapis-context'; @@ -127,11 +126,15 @@ declare global { } } -declare global { +declare module 'react' { // eslint-disable-next-line @typescript-eslint/no-namespace namespace JSX { interface IntrinsicElements { - 'gs-app': DetailedHTMLProps, HTMLElement>; + 'gs-app': { + lapis: string; + // eslint-disable-next-line no-undef + children: React.ReactNode; + }; } } } diff --git a/components/src/web-components/input/gs-date-range-filter.tsx b/components/src/web-components/input/gs-date-range-filter.tsx index bcdc74ed..05fab425 100644 --- a/components/src/web-components/input/gs-date-range-filter.tsx +++ b/components/src/web-components/input/gs-date-range-filter.tsx @@ -1,7 +1,6 @@ import flatpickrStyle from 'flatpickr/dist/flatpickr.css?inline'; import { unsafeCSS } from 'lit'; import { customElement, property } from 'lit/decorators.js'; -import type { DetailedHTMLProps, HTMLAttributes } from 'react'; import { DateRangeFilter, type DateRangeFilterProps } from '../../preact/dateRangeFilter/date-range-filter'; import { type DateRangeOptionChangedEvent } from '../../preact/dateRangeFilter/dateRangeOption'; @@ -146,7 +145,7 @@ declare global { // eslint-disable-next-line @typescript-eslint/no-namespace namespace JSX { interface IntrinsicElements { - 'gs-date-range-filter': DetailedHTMLProps, HTMLElement>; + 'gs-date-range-filter': Partial; } } } diff --git a/components/src/web-components/input/gs-lineage-filter.tsx b/components/src/web-components/input/gs-lineage-filter.tsx index f92b630b..3ffa2158 100644 --- a/components/src/web-components/input/gs-lineage-filter.tsx +++ b/components/src/web-components/input/gs-lineage-filter.tsx @@ -1,11 +1,10 @@ import { customElement, property } from 'lit/decorators.js'; -import type { DetailedHTMLProps, HTMLAttributes } from 'react'; import { type LineageFilterChangedEvent, type LineageMultiFilterChangedEvent, } from '../../preact/lineageFilter/LineageFilterChangedEvent'; -import { LineageFilter } from '../../preact/lineageFilter/lineage-filter'; +import { LineageFilter, type LineageFilterProps } from '../../preact/lineageFilter/lineage-filter'; import { type gsEventNames } from '../../utils/gsEventNames'; import { PreactLitAdapter } from '../PreactLitAdapter'; @@ -144,11 +143,11 @@ declare global { } } -declare global { +declare module 'react' { // eslint-disable-next-line @typescript-eslint/no-namespace namespace JSX { interface IntrinsicElements { - 'gs-lineage-filter': DetailedHTMLProps, HTMLElement>; + 'gs-lineage-filter': Partial; } } } diff --git a/components/src/web-components/input/gs-location-filter.tsx b/components/src/web-components/input/gs-location-filter.tsx index 715d7ddd..f2a93f9a 100644 --- a/components/src/web-components/input/gs-location-filter.tsx +++ b/components/src/web-components/input/gs-location-filter.tsx @@ -1,5 +1,4 @@ import { customElement, property } from 'lit/decorators.js'; -import type { DetailedHTMLProps, HTMLAttributes } from 'react'; import { type LocationChangedEvent } from '../../preact/locationFilter/LocationChangedEvent'; import { LocationFilter, type LocationFilterProps } from '../../preact/locationFilter/location-filter'; @@ -108,11 +107,11 @@ declare global { } } -declare global { +declare module 'react' { // eslint-disable-next-line @typescript-eslint/no-namespace namespace JSX { interface IntrinsicElements { - 'gs-location-filter': DetailedHTMLProps, HTMLElement>; + 'gs-location-filter': Partial; } } } diff --git a/components/src/web-components/input/gs-mutation-filter.tsx b/components/src/web-components/input/gs-mutation-filter.tsx index de3ef80e..601063e8 100644 --- a/components/src/web-components/input/gs-mutation-filter.tsx +++ b/components/src/web-components/input/gs-mutation-filter.tsx @@ -1,5 +1,4 @@ import { customElement, property } from 'lit/decorators.js'; -import type { DetailedHTMLProps, HTMLAttributes } from 'react'; import { ReferenceGenomesAwaiter } from '../../preact/components/ReferenceGenomesAwaiter'; import { MutationFilter, type MutationFilterProps } from '../../preact/mutationFilter/mutation-filter'; @@ -123,11 +122,11 @@ declare global { } } -declare global { +declare module 'react' { // eslint-disable-next-line @typescript-eslint/no-namespace namespace JSX { interface IntrinsicElements { - 'gs-mutation-filter': DetailedHTMLProps, HTMLElement>; + 'gs-mutation-filter': Partial; } } } diff --git a/components/src/web-components/input/gs-text-filter.tsx b/components/src/web-components/input/gs-text-filter.tsx index b7ced074..b7511207 100644 --- a/components/src/web-components/input/gs-text-filter.tsx +++ b/components/src/web-components/input/gs-text-filter.tsx @@ -1,5 +1,4 @@ import { customElement, property } from 'lit/decorators.js'; -import type { DetailedHTMLProps, HTMLAttributes } from 'react'; import { type TextFilterChangedEvent } from '../../preact/textFilter/TextFilterChangedEvent'; import { TextFilter, type TextFilterProps } from '../../preact/textFilter/text-filter'; @@ -98,11 +97,11 @@ declare global { } } -declare global { +declare module 'react' { // eslint-disable-next-line @typescript-eslint/no-namespace namespace JSX { interface IntrinsicElements { - 'gs-text-filter': DetailedHTMLProps, HTMLElement>; + 'gs-text-filter': Partial; } } } diff --git a/components/src/web-components/visualization/gs-aggregate.tsx b/components/src/web-components/visualization/gs-aggregate.tsx index 0ad633f4..ee5b85df 100644 --- a/components/src/web-components/visualization/gs-aggregate.tsx +++ b/components/src/web-components/visualization/gs-aggregate.tsx @@ -1,5 +1,4 @@ import { customElement, property } from 'lit/decorators.js'; -import type { DetailedHTMLProps, HTMLAttributes } from 'react'; import { Aggregate, type AggregateProps } from '../../preact/aggregatedData/aggregate'; import { type Equals, type Expect } from '../../utils/typeAssertions'; @@ -129,11 +128,11 @@ declare global { } } -declare global { +declare module 'react' { // eslint-disable-next-line @typescript-eslint/no-namespace namespace JSX { interface IntrinsicElements { - 'gs-aggregate': DetailedHTMLProps, HTMLElement>; + 'gs-aggregate': Partial; } } } diff --git a/components/src/web-components/visualization/gs-mutation-comparison.tsx b/components/src/web-components/visualization/gs-mutation-comparison.tsx index 1d10888a..0a644188 100644 --- a/components/src/web-components/visualization/gs-mutation-comparison.tsx +++ b/components/src/web-components/visualization/gs-mutation-comparison.tsx @@ -1,6 +1,5 @@ import { consume } from '@lit/context'; import { customElement, property } from 'lit/decorators.js'; -import type { DetailedHTMLProps, HTMLAttributes } from 'react'; import { MutationAnnotationsContextProvider } from '../../preact/MutationAnnotationsContext'; import { MutationLinkTemplateContextProvider } from '../../preact/MutationLinkTemplateContext'; @@ -135,11 +134,11 @@ declare global { } } -declare global { +declare module 'react' { // eslint-disable-next-line @typescript-eslint/no-namespace namespace JSX { interface IntrinsicElements { - 'gs-mutation-comparison': DetailedHTMLProps, HTMLElement>; + 'gs-mutation-comparison': Partial; } } } diff --git a/components/src/web-components/visualization/gs-mutations-over-time.tsx b/components/src/web-components/visualization/gs-mutations-over-time.tsx index 1059851e..be4db12f 100644 --- a/components/src/web-components/visualization/gs-mutations-over-time.tsx +++ b/components/src/web-components/visualization/gs-mutations-over-time.tsx @@ -1,6 +1,5 @@ import { consume } from '@lit/context'; import { customElement, property } from 'lit/decorators.js'; -import type { DetailedHTMLProps, HTMLAttributes } from 'react'; import { MutationAnnotationsContextProvider } from '../../preact/MutationAnnotationsContext'; import { MutationLinkTemplateContextProvider } from '../../preact/MutationLinkTemplateContext'; @@ -177,11 +176,11 @@ declare global { } } -declare global { +declare module 'react' { // eslint-disable-next-line @typescript-eslint/no-namespace namespace JSX { interface IntrinsicElements { - 'gs-mutations-over-time': DetailedHTMLProps, HTMLElement>; + 'gs-mutations-over-time': Partial; } } } diff --git a/components/src/web-components/visualization/gs-mutations.tsx b/components/src/web-components/visualization/gs-mutations.tsx index 87ffe351..b3b64830 100644 --- a/components/src/web-components/visualization/gs-mutations.tsx +++ b/components/src/web-components/visualization/gs-mutations.tsx @@ -1,6 +1,5 @@ import { consume } from '@lit/context'; import { customElement, property } from 'lit/decorators.js'; -import type { DetailedHTMLProps, HTMLAttributes } from 'react'; import { MutationAnnotationsContextProvider } from '../../preact/MutationAnnotationsContext'; import { MutationLinkTemplateContextProvider } from '../../preact/MutationLinkTemplateContext'; @@ -85,14 +84,14 @@ export class MutationsComponent extends PreactLitAdapterWithGridJsStyles { * If not provided, the Jaccard similarity is not computed. * For details, see the [Jaccard Similarity](#jaccard-similarity) section in the component description. */ - @property({ type: Object }) + @property({type: Object}) baselineLapisFilter: (Record & { - nucleotideMutations?: string[]; - aminoAcidMutations?: string[]; - nucleotideInsertions?: string[]; - aminoAcidInsertions?: string[]; - }) + nucleotideMutations?: string[]; + aminoAcidMutations?: string[]; + nucleotideInsertions?: string[]; + aminoAcidInsertions?: string[]; + }) | undefined = undefined; /** @@ -167,11 +166,11 @@ declare global { } } -declare global { +declare module 'react' { // eslint-disable-next-line @typescript-eslint/no-namespace namespace JSX { interface IntrinsicElements { - 'gs-mutations': DetailedHTMLProps, HTMLElement>; + 'gs-mutations': Partial; } } } diff --git a/components/src/web-components/visualization/gs-number-sequences-over-time.tsx b/components/src/web-components/visualization/gs-number-sequences-over-time.tsx index 74b3bad2..397cf640 100644 --- a/components/src/web-components/visualization/gs-number-sequences-over-time.tsx +++ b/components/src/web-components/visualization/gs-number-sequences-over-time.tsx @@ -1,5 +1,4 @@ import { customElement, property } from 'lit/decorators.js'; -import type { DetailedHTMLProps, HTMLAttributes } from 'react'; import { NumberSequencesOverTime, @@ -124,11 +123,11 @@ declare global { } } -declare global { +declare module 'react' { // eslint-disable-next-line @typescript-eslint/no-namespace namespace JSX { interface IntrinsicElements { - 'gs-number-sequences-over-time': DetailedHTMLProps, HTMLElement>; + 'gs-number-sequences-over-time': Partial; } } } diff --git a/components/src/web-components/visualization/gs-prevalence-over-time.tsx b/components/src/web-components/visualization/gs-prevalence-over-time.tsx index 2c02eb06..1ce10c20 100644 --- a/components/src/web-components/visualization/gs-prevalence-over-time.tsx +++ b/components/src/web-components/visualization/gs-prevalence-over-time.tsx @@ -1,5 +1,4 @@ import { customElement, property } from 'lit/decorators.js'; -import type { DetailedHTMLProps, HTMLAttributes } from 'react'; import { PrevalenceOverTime, type PrevalenceOverTimeProps } from '../../preact/prevalenceOverTime/prevalence-over-time'; import { type Equals, type Expect } from '../../utils/typeAssertions'; @@ -191,11 +190,11 @@ declare global { } } -declare global { +declare module 'react' { // eslint-disable-next-line @typescript-eslint/no-namespace namespace JSX { interface IntrinsicElements { - 'gs-prevalence-over-time': DetailedHTMLProps, HTMLElement>; + 'gs-prevalence-over-time': Partial; } } } diff --git a/components/src/web-components/visualization/gs-relative-growth-advantage.tsx b/components/src/web-components/visualization/gs-relative-growth-advantage.tsx index 692c3bbd..551a3663 100644 --- a/components/src/web-components/visualization/gs-relative-growth-advantage.tsx +++ b/components/src/web-components/visualization/gs-relative-growth-advantage.tsx @@ -1,5 +1,4 @@ import { customElement, property } from 'lit/decorators.js'; -import type { DetailedHTMLProps, HTMLAttributes } from 'react'; import { RelativeGrowthAdvantage, @@ -145,11 +144,11 @@ declare global { } } -declare global { +declare module 'react' { // eslint-disable-next-line @typescript-eslint/no-namespace namespace JSX { interface IntrinsicElements { - 'gs-relative-growth-advantage': DetailedHTMLProps, HTMLElement>; + 'gs-relative-growth-advantage': Partial; } } } diff --git a/components/src/web-components/visualization/gs-sequences-by-location.tsx b/components/src/web-components/visualization/gs-sequences-by-location.tsx index f9a5dfbf..6e81f2eb 100644 --- a/components/src/web-components/visualization/gs-sequences-by-location.tsx +++ b/components/src/web-components/visualization/gs-sequences-by-location.tsx @@ -1,7 +1,6 @@ import leafletStyle from 'leaflet/dist/leaflet.css?inline'; import { unsafeCSS } from 'lit'; import { customElement, property } from 'lit/decorators.js'; -import type { DetailedHTMLProps, HTMLAttributes } from 'react'; import leafletStyleModifications from '../../preact/sequencesByLocation/leafletStyleModifications.css?inline'; import { @@ -217,11 +216,11 @@ declare global { } } -declare global { +declare module 'react' { // eslint-disable-next-line @typescript-eslint/no-namespace namespace JSX { interface IntrinsicElements { - 'gs-sequences-by-location': DetailedHTMLProps, HTMLElement>; + 'gs-sequences-by-location': Partial; } } } diff --git a/components/src/web-components/visualization/gs-statistics.tsx b/components/src/web-components/visualization/gs-statistics.tsx index 0225b037..4d45f8ec 100644 --- a/components/src/web-components/visualization/gs-statistics.tsx +++ b/components/src/web-components/visualization/gs-statistics.tsx @@ -1,5 +1,4 @@ import { customElement, property } from 'lit/decorators.js'; -import type { DetailedHTMLProps, HTMLAttributes } from 'react'; import { Statistics, type StatisticsProps } from '../../preact/statistic/statistics'; import type { Equals, Expect } from '../../utils/typeAssertions'; @@ -74,11 +73,11 @@ declare global { } } -declare global { +declare module 'react' { // eslint-disable-next-line @typescript-eslint/no-namespace namespace JSX { interface IntrinsicElements { - 'gs-statistics': DetailedHTMLProps, HTMLElement>; + 'gs-statistics': Partial; } } } diff --git a/components/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.tsx b/components/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.tsx index 6b8aea8f..c836ee27 100644 --- a/components/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.tsx +++ b/components/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.tsx @@ -1,6 +1,5 @@ import { consume } from '@lit/context'; import { customElement, property } from 'lit/decorators.js'; -import { type DetailedHTMLProps, type HTMLAttributes } from 'react'; import { MutationAnnotationsContextProvider } from '../../preact/MutationAnnotationsContext'; import { MutationLinkTemplateContextProvider } from '../../preact/MutationLinkTemplateContext'; @@ -110,11 +109,11 @@ declare global { } } -declare global { +declare module 'react' { // eslint-disable-next-line @typescript-eslint/no-namespace namespace JSX { interface IntrinsicElements { - 'gs-wastewater-mutations-over-time': DetailedHTMLProps, HTMLElement>; + 'gs-wastewater-mutations-over-time': Partial; } } } diff --git a/examples/React/package.json b/examples/React/package.json index c0a4ba91..3b3893c1 100644 --- a/examples/React/package.json +++ b/examples/React/package.json @@ -10,11 +10,11 @@ }, "dependencies": { "@genspectrum/dashboard-components": "file:../../components/genspectrum-dashboard-components.tgz", - "@types/react": "^18.2.66", - "@types/react-dom": "^18.2.22", - "@vitejs/plugin-react": "^4.2.1", - "react": "^18.2.0", - "react-dom": "^18.2.0", + "@types/react": "^19.0.8", + "@types/react-dom": "^19.0.3", + "@vitejs/plugin-react": "^4.3.4", + "react": "^19.0.0", + "react-dom": "^19.0.0", "typescript": "^5.2.2", "vite": "^6.2.2" } diff --git a/examples/React/src/App.tsx b/examples/React/src/App.tsx index 2a642b14..349dc756 100644 --- a/examples/React/src/App.tsx +++ b/examples/React/src/App.tsx @@ -82,14 +82,14 @@ function App() { return ( @@ -97,12 +97,12 @@ function App() {

Prevalence over time

@@ -110,12 +110,12 @@ function App() {

Prevalence over time

@@ -124,28 +124,28 @@ function App() {

Prevalence over time

Relative Growth Advantage

Date: Thu, 5 Mar 2026 10:26:15 +0100 Subject: [PATCH 3/8] fix stuff --- .../src/web-components/input/gs-date-range-filter.tsx | 2 +- examples/React/src/App.tsx | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/components/src/web-components/input/gs-date-range-filter.tsx b/components/src/web-components/input/gs-date-range-filter.tsx index 05fab425..5fcbd1a2 100644 --- a/components/src/web-components/input/gs-date-range-filter.tsx +++ b/components/src/web-components/input/gs-date-range-filter.tsx @@ -141,7 +141,7 @@ declare global { } } -declare global { +declare module 'react' { // eslint-disable-next-line @typescript-eslint/no-namespace namespace JSX { interface IntrinsicElements { diff --git a/examples/React/src/App.tsx b/examples/React/src/App.tsx index 349dc756..97b43718 100644 --- a/examples/React/src/App.tsx +++ b/examples/React/src/App.tsx @@ -9,8 +9,8 @@ import '@genspectrum/dashboard-components/components'; function App() { - const locationFilterRef = useRef(); - const dateRangeFilterRef = useRef(); + const locationFilterRef = useRef(null); + const dateRangeFilterRef = useRef(null); const [location, setLocation] = useState>({ region: undefined, @@ -71,9 +71,8 @@ function App() { }; const dataRangeOptions = [ - dateRangeOptionPresets.allTimes, - dateRangeOptionPresets.last6Months, - dateRangeOptionPresets.lastMonth, + dateRangeOptionPresets().last6Months, + dateRangeOptionPresets().lastMonth, {label: '2020', dateFrom: '2020-01-01', dateTo: '2020-12-31'}, {label: '2021', dateFrom: '2021-01-01', dateTo: '2021-12-31'}, {label: '2022', dateFrom: '2022-01-01', dateTo: '2022-12-31'}, From 9040a57026012e9d3fccbda1673544f3cb264fed Mon Sep 17 00:00:00 2001 From: Fabian Engelniederhammer Date: Thu, 5 Mar 2026 10:27:20 +0100 Subject: [PATCH 4/8] fix stuff --- components/package-lock.json | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/components/package-lock.json b/components/package-lock.json index 6480a572..93e71061 100644 --- a/components/package-lock.json +++ b/components/package-lock.json @@ -3039,22 +3039,6 @@ "storybook": "^8.6.14" } }, - "node_modules/@storybook/addon-docs/node_modules/@storybook/react-dom-shim": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@storybook/react-dom-shim/-/react-dom-shim-8.5.0.tgz", - "integrity": "sha512-7P8xg4FiuFpM6kQOzZynno+0zyLVs8NgsmRK58t3JRZXbda1tzlxTXzvqx4hUevvbPJGjmrB0F3xTFH+8Otnvw==", - "dev": true, - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/storybook" - }, - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta", - "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta", - "storybook": "^8.5.0" - } - }, "node_modules/@storybook/addon-docs/node_modules/react": { "version": "18.3.1", "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", @@ -3496,6 +3480,22 @@ "storybook": "^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0" } }, + "node_modules/@storybook/react-dom-shim": { + "version": "8.6.14", + "resolved": "https://registry.npmjs.org/@storybook/react-dom-shim/-/react-dom-shim-8.6.14.tgz", + "integrity": "sha512-0hixr3dOy3f3M+HBofp3jtMQMS+sqzjKNgl7Arfuj3fvjmyXOks/yGjDImySR4imPtEllvPZfhiQNlejheaInw==", + "dev": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta", + "storybook": "^8.6.14" + } + }, "node_modules/@storybook/test": { "version": "8.6.14", "resolved": "https://registry.npmjs.org/@storybook/test/-/test-8.6.14.tgz", From f1c7c6e16f4a8c12d5a2fd181a3d1328b98e7e61 Mon Sep 17 00:00:00 2001 From: Fabian Engelniederhammer Date: Thu, 5 Mar 2026 11:36:54 +0100 Subject: [PATCH 5/8] fix namespace declarations --- components/src/web-components/gs-app.ts | 10 +++------- .../src/web-components/input/gs-date-range-filter.tsx | 6 +++--- .../src/web-components/input/gs-lineage-filter.tsx | 8 ++++---- .../src/web-components/input/gs-location-filter.tsx | 6 +++--- .../src/web-components/input/gs-mutation-filter.tsx | 6 +++--- .../web-components/input/gs-number-range-filter.tsx | 5 ++--- components/src/web-components/input/gs-text-filter.tsx | 6 +++--- .../src/web-components/visualization/gs-aggregate.tsx | 6 +++--- .../visualization/gs-genome-data-viewer.tsx | 5 ++--- .../visualization/gs-mutation-comparison.tsx | 6 +++--- .../visualization/gs-mutations-over-time.tsx | 6 +++--- .../src/web-components/visualization/gs-mutations.tsx | 6 +++--- .../visualization/gs-number-sequences-over-time.tsx | 6 +++--- .../visualization/gs-prevalence-over-time.tsx | 6 +++--- .../visualization/gs-queries-over-time.tsx | 5 ++--- .../visualization/gs-relative-growth-advantage.tsx | 6 +++--- .../visualization/gs-sequences-by-location.tsx | 6 +++--- .../src/web-components/visualization/gs-statistics.tsx | 6 +++--- .../gs-wastewater-mutations-over-time.tsx | 6 +++--- 19 files changed, 55 insertions(+), 62 deletions(-) diff --git a/components/src/web-components/gs-app.ts b/components/src/web-components/gs-app.ts index c715521f..e5b260df 100644 --- a/components/src/web-components/gs-app.ts +++ b/components/src/web-components/gs-app.ts @@ -126,15 +126,11 @@ declare global { } } -declare module 'react' { +declare global { // eslint-disable-next-line @typescript-eslint/no-namespace - namespace JSX { + namespace React.JSX { interface IntrinsicElements { - 'gs-app': { - lapis: string; - // eslint-disable-next-line no-undef - children: React.ReactNode; - }; + 'gs-app': AppComponent; } } } diff --git a/components/src/web-components/input/gs-date-range-filter.tsx b/components/src/web-components/input/gs-date-range-filter.tsx index 5fcbd1a2..61117a7a 100644 --- a/components/src/web-components/input/gs-date-range-filter.tsx +++ b/components/src/web-components/input/gs-date-range-filter.tsx @@ -141,11 +141,11 @@ declare global { } } -declare module 'react' { +declare global { // eslint-disable-next-line @typescript-eslint/no-namespace - namespace JSX { + namespace React.JSX { interface IntrinsicElements { - 'gs-date-range-filter': Partial; + 'gs-date-range-filter': DateRangeFilterComponent; } } } diff --git a/components/src/web-components/input/gs-lineage-filter.tsx b/components/src/web-components/input/gs-lineage-filter.tsx index 3ffa2158..48a8456e 100644 --- a/components/src/web-components/input/gs-lineage-filter.tsx +++ b/components/src/web-components/input/gs-lineage-filter.tsx @@ -4,7 +4,7 @@ import { type LineageFilterChangedEvent, type LineageMultiFilterChangedEvent, } from '../../preact/lineageFilter/LineageFilterChangedEvent'; -import { LineageFilter, type LineageFilterProps } from '../../preact/lineageFilter/lineage-filter'; +import { LineageFilter } from '../../preact/lineageFilter/lineage-filter'; import { type gsEventNames } from '../../utils/gsEventNames'; import { PreactLitAdapter } from '../PreactLitAdapter'; @@ -143,11 +143,11 @@ declare global { } } -declare module 'react' { +declare global { // eslint-disable-next-line @typescript-eslint/no-namespace - namespace JSX { + namespace React.JSX { interface IntrinsicElements { - 'gs-lineage-filter': Partial; + 'gs-lineage-filter': LineageFilterComponent; } } } diff --git a/components/src/web-components/input/gs-location-filter.tsx b/components/src/web-components/input/gs-location-filter.tsx index f2a93f9a..eef0a3a0 100644 --- a/components/src/web-components/input/gs-location-filter.tsx +++ b/components/src/web-components/input/gs-location-filter.tsx @@ -107,11 +107,11 @@ declare global { } } -declare module 'react' { +declare global { // eslint-disable-next-line @typescript-eslint/no-namespace - namespace JSX { + namespace React.JSX { interface IntrinsicElements { - 'gs-location-filter': Partial; + 'gs-location-filter': LocationFilterComponent; } } } diff --git a/components/src/web-components/input/gs-mutation-filter.tsx b/components/src/web-components/input/gs-mutation-filter.tsx index 601063e8..f4343858 100644 --- a/components/src/web-components/input/gs-mutation-filter.tsx +++ b/components/src/web-components/input/gs-mutation-filter.tsx @@ -122,11 +122,11 @@ declare global { } } -declare module 'react' { +declare global { // eslint-disable-next-line @typescript-eslint/no-namespace - namespace JSX { + namespace React.JSX { interface IntrinsicElements { - 'gs-mutation-filter': Partial; + 'gs-mutation-filter': MutationFilterComponent; } } } diff --git a/components/src/web-components/input/gs-number-range-filter.tsx b/components/src/web-components/input/gs-number-range-filter.tsx index de789dab..d15ccf08 100644 --- a/components/src/web-components/input/gs-number-range-filter.tsx +++ b/components/src/web-components/input/gs-number-range-filter.tsx @@ -1,5 +1,4 @@ import { customElement, property } from 'lit/decorators.js'; -import type { DetailedHTMLProps, HTMLAttributes } from 'react'; import { type NumberRangeFilterChangedEvent, @@ -140,9 +139,9 @@ declare global { declare global { // eslint-disable-next-line @typescript-eslint/no-namespace - namespace JSX { + namespace React.JSX { interface IntrinsicElements { - 'gs-number-range-filter': DetailedHTMLProps, HTMLElement>; + 'gs-number-range-filter': NumberRangeFilterComponent; } } } diff --git a/components/src/web-components/input/gs-text-filter.tsx b/components/src/web-components/input/gs-text-filter.tsx index b7511207..bc16a118 100644 --- a/components/src/web-components/input/gs-text-filter.tsx +++ b/components/src/web-components/input/gs-text-filter.tsx @@ -97,11 +97,11 @@ declare global { } } -declare module 'react' { +declare global { // eslint-disable-next-line @typescript-eslint/no-namespace - namespace JSX { + namespace React.JSX { interface IntrinsicElements { - 'gs-text-filter': Partial; + 'gs-text-filter': TextFilterComponent; } } } diff --git a/components/src/web-components/visualization/gs-aggregate.tsx b/components/src/web-components/visualization/gs-aggregate.tsx index ee5b85df..d7ab1f25 100644 --- a/components/src/web-components/visualization/gs-aggregate.tsx +++ b/components/src/web-components/visualization/gs-aggregate.tsx @@ -128,11 +128,11 @@ declare global { } } -declare module 'react' { +declare global { // eslint-disable-next-line @typescript-eslint/no-namespace - namespace JSX { + namespace React.JSX { interface IntrinsicElements { - 'gs-aggregate': Partial; + 'gs-aggregate': AggregateComponent; } } } diff --git a/components/src/web-components/visualization/gs-genome-data-viewer.tsx b/components/src/web-components/visualization/gs-genome-data-viewer.tsx index 4db61e3c..b28e2f76 100644 --- a/components/src/web-components/visualization/gs-genome-data-viewer.tsx +++ b/components/src/web-components/visualization/gs-genome-data-viewer.tsx @@ -1,5 +1,4 @@ import { customElement, property } from 'lit/decorators.js'; -import type { DetailedHTMLProps, HTMLAttributes } from 'react'; import { GenomeDataViewer } from '../../preact/genomeViewer/genome-data-viewer'; import { PreactLitAdapter } from '../PreactLitAdapter'; @@ -53,9 +52,9 @@ declare global { declare global { // eslint-disable-next-line @typescript-eslint/no-namespace - namespace JSX { + namespace React.JSX { interface IntrinsicElements { - 'gs-genome-data-viewer': DetailedHTMLProps, HTMLElement>; + 'gs-genome-data-viewer': GenomeDataViewerComponent; } } } diff --git a/components/src/web-components/visualization/gs-mutation-comparison.tsx b/components/src/web-components/visualization/gs-mutation-comparison.tsx index 0a644188..365df385 100644 --- a/components/src/web-components/visualization/gs-mutation-comparison.tsx +++ b/components/src/web-components/visualization/gs-mutation-comparison.tsx @@ -134,11 +134,11 @@ declare global { } } -declare module 'react' { +declare global { // eslint-disable-next-line @typescript-eslint/no-namespace - namespace JSX { + namespace React.JSX { interface IntrinsicElements { - 'gs-mutation-comparison': Partial; + 'gs-mutation-comparison': MutationComparisonComponent; } } } diff --git a/components/src/web-components/visualization/gs-mutations-over-time.tsx b/components/src/web-components/visualization/gs-mutations-over-time.tsx index be4db12f..98e99b59 100644 --- a/components/src/web-components/visualization/gs-mutations-over-time.tsx +++ b/components/src/web-components/visualization/gs-mutations-over-time.tsx @@ -176,11 +176,11 @@ declare global { } } -declare module 'react' { +declare global { // eslint-disable-next-line @typescript-eslint/no-namespace - namespace JSX { + namespace React.JSX { interface IntrinsicElements { - 'gs-mutations-over-time': Partial; + 'gs-mutations-over-time': MutationsOverTimeComponent; } } } diff --git a/components/src/web-components/visualization/gs-mutations.tsx b/components/src/web-components/visualization/gs-mutations.tsx index b3b64830..8b5474c4 100644 --- a/components/src/web-components/visualization/gs-mutations.tsx +++ b/components/src/web-components/visualization/gs-mutations.tsx @@ -166,11 +166,11 @@ declare global { } } -declare module 'react' { +declare global { // eslint-disable-next-line @typescript-eslint/no-namespace - namespace JSX { + namespace React.JSX { interface IntrinsicElements { - 'gs-mutations': Partial; + 'gs-mutations': MutationsComponent; } } } diff --git a/components/src/web-components/visualization/gs-number-sequences-over-time.tsx b/components/src/web-components/visualization/gs-number-sequences-over-time.tsx index 397cf640..65a7ed67 100644 --- a/components/src/web-components/visualization/gs-number-sequences-over-time.tsx +++ b/components/src/web-components/visualization/gs-number-sequences-over-time.tsx @@ -123,11 +123,11 @@ declare global { } } -declare module 'react' { +declare global { // eslint-disable-next-line @typescript-eslint/no-namespace - namespace JSX { + namespace React.JSX { interface IntrinsicElements { - 'gs-number-sequences-over-time': Partial; + 'gs-number-sequences-over-time': NumberSequencesOverTimeComponent; } } } diff --git a/components/src/web-components/visualization/gs-prevalence-over-time.tsx b/components/src/web-components/visualization/gs-prevalence-over-time.tsx index 1ce10c20..8ede56c1 100644 --- a/components/src/web-components/visualization/gs-prevalence-over-time.tsx +++ b/components/src/web-components/visualization/gs-prevalence-over-time.tsx @@ -190,11 +190,11 @@ declare global { } } -declare module 'react' { +declare global { // eslint-disable-next-line @typescript-eslint/no-namespace - namespace JSX { + namespace React.JSX { interface IntrinsicElements { - 'gs-prevalence-over-time': Partial; + 'gs-prevalence-over-time': PrevalenceOverTimeComponent; } } } diff --git a/components/src/web-components/visualization/gs-queries-over-time.tsx b/components/src/web-components/visualization/gs-queries-over-time.tsx index 6e1c2ba2..87d1f874 100644 --- a/components/src/web-components/visualization/gs-queries-over-time.tsx +++ b/components/src/web-components/visualization/gs-queries-over-time.tsx @@ -1,5 +1,4 @@ import { customElement, property } from 'lit/decorators.js'; -import type { DetailedHTMLProps, HTMLAttributes } from 'react'; import { QueriesOverTime } from '../../preact/queriesOverTime/queries-over-time'; import { PreactLitAdapterWithGridJsStyles } from '../PreactLitAdapterWithGridJsStyles'; @@ -148,9 +147,9 @@ declare global { declare global { // eslint-disable-next-line @typescript-eslint/no-namespace - namespace JSX { + namespace React.JSX { interface IntrinsicElements { - 'gs-queries-over-time': DetailedHTMLProps, HTMLElement>; + 'gs-queries-over-time': QueriesOverTimeComponent; } } } diff --git a/components/src/web-components/visualization/gs-relative-growth-advantage.tsx b/components/src/web-components/visualization/gs-relative-growth-advantage.tsx index 551a3663..2e3e17ed 100644 --- a/components/src/web-components/visualization/gs-relative-growth-advantage.tsx +++ b/components/src/web-components/visualization/gs-relative-growth-advantage.tsx @@ -144,11 +144,11 @@ declare global { } } -declare module 'react' { +declare global { // eslint-disable-next-line @typescript-eslint/no-namespace - namespace JSX { + namespace React.JSX { interface IntrinsicElements { - 'gs-relative-growth-advantage': Partial; + 'gs-relative-growth-advantage': RelativeGrowthAdvantageComponent; } } } diff --git a/components/src/web-components/visualization/gs-sequences-by-location.tsx b/components/src/web-components/visualization/gs-sequences-by-location.tsx index 6e81f2eb..261dcb23 100644 --- a/components/src/web-components/visualization/gs-sequences-by-location.tsx +++ b/components/src/web-components/visualization/gs-sequences-by-location.tsx @@ -216,11 +216,11 @@ declare global { } } -declare module 'react' { +declare global { // eslint-disable-next-line @typescript-eslint/no-namespace - namespace JSX { + namespace React.JSX { interface IntrinsicElements { - 'gs-sequences-by-location': Partial; + 'gs-sequences-by-location': SequencesByLocationComponent; } } } diff --git a/components/src/web-components/visualization/gs-statistics.tsx b/components/src/web-components/visualization/gs-statistics.tsx index 4d45f8ec..7bf50471 100644 --- a/components/src/web-components/visualization/gs-statistics.tsx +++ b/components/src/web-components/visualization/gs-statistics.tsx @@ -73,11 +73,11 @@ declare global { } } -declare module 'react' { +declare global { // eslint-disable-next-line @typescript-eslint/no-namespace - namespace JSX { + namespace React.JSX { interface IntrinsicElements { - 'gs-statistics': Partial; + 'gs-statistics': StatisticsComponent; } } } diff --git a/components/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.tsx b/components/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.tsx index c836ee27..b13fc625 100644 --- a/components/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.tsx +++ b/components/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.tsx @@ -109,11 +109,11 @@ declare global { } } -declare module 'react' { +declare global { // eslint-disable-next-line @typescript-eslint/no-namespace - namespace JSX { + namespace React.JSX { interface IntrinsicElements { - 'gs-wastewater-mutations-over-time': Partial; + 'gs-wastewater-mutations-over-time': WastewaterMutationsOverTimeComponent; } } } From 212288526868ebe06a1fd9257599e6aa1c848462 Mon Sep 17 00:00:00 2001 From: Fabian Engelniederhammer Date: Mon, 9 Mar 2026 09:15:12 +0100 Subject: [PATCH 6/8] more speaking error on invalid props --- .../mutationsOverTime/getFilteredMutationsOverTimeData.ts | 4 +++- components/src/web-components/mutation-annotations-context.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/components/src/preact/mutationsOverTime/getFilteredMutationsOverTimeData.ts b/components/src/preact/mutationsOverTime/getFilteredMutationsOverTimeData.ts index ec607fe6..3c9bf0e9 100644 --- a/components/src/preact/mutationsOverTime/getFilteredMutationsOverTimeData.ts +++ b/components/src/preact/mutationsOverTime/getFilteredMutationsOverTimeData.ts @@ -8,7 +8,9 @@ import { type useMutationAnnotationsProvider } from '../MutationAnnotationsConte import type { DisplayedMutationType } from '../components/mutation-type-selector'; import type { DisplayedSegment } from '../components/segment-selector'; -export const displayMutationsSchema = z.array(z.string()); +export const displayMutationsSchema = z.array(z.string(), { + errorMap: () => ({ message: `invalid display mutations` }), +}); export type DisplayMutations = z.infer; export type MutationFilter = { diff --git a/components/src/web-components/mutation-annotations-context.ts b/components/src/web-components/mutation-annotations-context.ts index d8b35d46..14a917b3 100644 --- a/components/src/web-components/mutation-annotations-context.ts +++ b/components/src/web-components/mutation-annotations-context.ts @@ -14,7 +14,9 @@ const mutationAnnotationSchema = z.object({ }); export type MutationAnnotation = z.infer; -export const mutationAnnotationsSchema = z.array(mutationAnnotationSchema); +export const mutationAnnotationsSchema = z.array(mutationAnnotationSchema, { + errorMap: () => ({ message: 'invalid mutation annotations' }), +}); export type MutationAnnotations = z.infer; export const mutationAnnotationsContext = createContext(Symbol('mutation-annotations-context')); From e6e75365952f69cfc4106eedb9669f1a064f02a7 Mon Sep 17 00:00:00 2001 From: Fabian Engelniederhammer Date: Mon, 9 Mar 2026 09:27:17 +0100 Subject: [PATCH 7/8] format --- components/src/web-components/input/gs-mutation-filter.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/src/web-components/input/gs-mutation-filter.tsx b/components/src/web-components/input/gs-mutation-filter.tsx index f4343858..f5e7454f 100644 --- a/components/src/web-components/input/gs-mutation-filter.tsx +++ b/components/src/web-components/input/gs-mutation-filter.tsx @@ -66,7 +66,7 @@ export class MutationFilterComponent extends PreactLitAdapter { * All values provided must be valid mutations or insertions. * Invalid values will be ignored. */ - @property({type: Object}) + @property({ type: Object }) initialValue: { nucleotideMutations: string[]; From 869281627d96e5dc2a984705859e18637512f05a Mon Sep 17 00:00:00 2001 From: Fabian Engelniederhammer Date: Mon, 9 Mar 2026 09:28:40 +0100 Subject: [PATCH 8/8] format --- components/src/web-components/visualization/gs-mutations.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/src/web-components/visualization/gs-mutations.tsx b/components/src/web-components/visualization/gs-mutations.tsx index 8b5474c4..a5858c7f 100644 --- a/components/src/web-components/visualization/gs-mutations.tsx +++ b/components/src/web-components/visualization/gs-mutations.tsx @@ -84,7 +84,7 @@ export class MutationsComponent extends PreactLitAdapterWithGridJsStyles { * If not provided, the Jaccard similarity is not computed. * For details, see the [Jaccard Similarity](#jaccard-similarity) section in the component description. */ - @property({type: Object}) + @property({ type: Object }) baselineLapisFilter: (Record & { nucleotideMutations?: string[];