From f5c2c1cb8b2f4d9a3716190337ddf79a306ee54f 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/2] 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 c0e988b2..fcb5c125 100644 --- a/components/package-lock.json +++ b/components/package-lock.json @@ -66,7 +66,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": "^3.4.3", @@ -2374,6 +2374,59 @@ "storybook": "^8.5.0" } }, + "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.5.0", "resolved": "https://registry.npmjs.org/@storybook/addon-essentials/-/addon-essentials-8.5.0.tgz", @@ -2780,22 +2833,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.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/test": { "version": "8.5.0", "resolved": "https://registry.npmjs.org/@storybook/test/-/test-8.5.0.tgz", @@ -12381,29 +12418,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": { @@ -12801,14 +12835,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 49ee5014..1e926ed9 100644 --- a/components/package.json +++ b/components/package.json @@ -135,7 +135,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": "^3.4.3", From 1eb4204e1e6589e16956c50b9883d4d0abfd0f4d Mon Sep 17 00:00:00 2001 From: Fabian Engelniederhammer Date: Thu, 23 Jan 2025 15:03:04 +0100 Subject: [PATCH 2/2] 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/app.ts | 9 ++-- .../input/gs-date-range-selector.tsx | 5 +-- .../input/gs-lineage-filter.tsx | 5 +-- .../input/gs-location-filter.tsx | 5 +-- .../input/gs-mutation-filter.tsx | 5 +-- .../web-components/input/gs-text-input.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 | 12 ++--- examples/React/src/App.tsx | 44 +++++++++---------- 18 files changed, 70 insertions(+), 82 deletions(-) diff --git a/components/src/web-components/app.ts b/components/src/web-components/app.ts index 9a389db0..448dd11a 100644 --- a/components/src/web-components/app.ts +++ b/components/src/web-components/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'; @@ -88,11 +87,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-selector.tsx b/components/src/web-components/input/gs-date-range-selector.tsx index 750066f9..192fa118 100644 --- a/components/src/web-components/input/gs-date-range-selector.tsx +++ b/components/src/web-components/input/gs-date-range-selector.tsx @@ -1,5 +1,4 @@ import { customElement, property } from 'lit/decorators.js'; -import type { DetailedHTMLProps, HTMLAttributes } from 'react'; import { DateRangeSelector, type DateRangeSelectorProps } from '../../preact/dateRangeSelector/date-range-selector'; import { type DateRangeOptionChangedEvent } from '../../preact/dateRangeSelector/dateRangeOption'; @@ -134,11 +133,11 @@ declare global { } } -declare global { +declare module 'react' { // eslint-disable-next-line @typescript-eslint/no-namespace namespace JSX { interface IntrinsicElements { - 'gs-date-range-selector': DetailedHTMLProps, HTMLElement>; + 'gs-date-range-selector': Partial; } } } diff --git a/components/src/web-components/input/gs-lineage-filter.tsx b/components/src/web-components/input/gs-lineage-filter.tsx index 503f4b39..e3a19eed 100644 --- a/components/src/web-components/input/gs-lineage-filter.tsx +++ b/components/src/web-components/input/gs-lineage-filter.tsx @@ -1,5 +1,4 @@ import { customElement, property } from 'lit/decorators.js'; -import type { DetailedHTMLProps, HTMLAttributes } from 'react'; import { type LineageFilterChangedEvent } from '../../preact/lineageFilter/LineageFilterChangedEvent'; import { LineageFilter, type LineageFilterProps } from '../../preact/lineageFilter/lineage-filter'; @@ -95,11 +94,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 a13b7779..545364b0 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'; @@ -99,11 +98,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 d2dd6a32..2bdc17dc 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'; @@ -99,11 +98,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-input.tsx b/components/src/web-components/input/gs-text-input.tsx index 7529f70f..760b90dc 100644 --- a/components/src/web-components/input/gs-text-input.tsx +++ b/components/src/web-components/input/gs-text-input.tsx @@ -1,5 +1,4 @@ import { customElement, property } from 'lit/decorators.js'; -import type { DetailedHTMLProps, HTMLAttributes } from 'react'; import { type TextInputChangedEvent } from '../../preact/textInput/TextInputChangedEvent'; import { TextInput, type TextInputProps } from '../../preact/textInput/text-input'; @@ -89,11 +88,11 @@ declare global { } } -declare global { +declare module 'react' { // eslint-disable-next-line @typescript-eslint/no-namespace namespace JSX { interface IntrinsicElements { - 'gs-text-input': DetailedHTMLProps, HTMLElement>; + 'gs-text-input': Partial; } } } diff --git a/components/src/web-components/visualization/gs-aggregate.tsx b/components/src/web-components/visualization/gs-aggregate.tsx index 77ef751d..046148dd 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, type AggregateView } from '../../preact/aggregatedData/aggregate'; import { type Equals, type Expect } from '../../utils/typeAssertions'; @@ -126,11 +125,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 9bd1412c..e4a9e4ae 100644 --- a/components/src/web-components/visualization/gs-mutation-comparison.tsx +++ b/components/src/web-components/visualization/gs-mutation-comparison.tsx @@ -1,5 +1,4 @@ import { customElement, property } from 'lit/decorators.js'; -import type { DetailedHTMLProps, HTMLAttributes } from 'react'; import { MutationComparison, type MutationComparisonProps } from '../../preact/mutationComparison/mutation-comparison'; import { type Equals, type Expect } from '../../utils/typeAssertions'; @@ -108,11 +107,11 @@ declare global { } } -declare global { +declare module 'react' { // eslint-disable-next-line @typescript-eslint/no-namespace namespace JSX { interface IntrinsicElements { - 'gs-mutation-comparison-component': 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 68e6e10e..6ffad441 100644 --- a/components/src/web-components/visualization/gs-mutations-over-time.tsx +++ b/components/src/web-components/visualization/gs-mutations-over-time.tsx @@ -1,5 +1,4 @@ import { customElement, property } from 'lit/decorators.js'; -import type { DetailedHTMLProps, HTMLAttributes } from 'react'; import { MutationsOverTime, type MutationsOverTimeProps } from '../../preact/mutationsOverTime/mutations-over-time'; import type { Equals, Expect } from '../../utils/typeAssertions'; @@ -108,11 +107,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 091af992..831d964e 100644 --- a/components/src/web-components/visualization/gs-mutations.tsx +++ b/components/src/web-components/visualization/gs-mutations.tsx @@ -1,5 +1,4 @@ import { customElement, property } from 'lit/decorators.js'; -import type { DetailedHTMLProps, HTMLAttributes } from 'react'; import { Mutations, type MutationsProps } from '../../preact/mutations/mutations'; import type { Equals, Expect } from '../../utils/typeAssertions'; @@ -75,14 +74,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; /** @@ -141,11 +140,11 @@ declare global { } } -declare global { +declare module 'react' { // eslint-disable-next-line @typescript-eslint/no-namespace namespace JSX { interface IntrinsicElements { - 'gs-mutations-component': 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 ed2a2a03..497081a7 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, @@ -121,11 +120,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 152b8fe0..923fde7d 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'; @@ -188,11 +187,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 01cf6d98..f2f49a4a 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, @@ -142,11 +141,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 702842de..c03686bf 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/map/leafletStyleModifications.css?inline'; import { SequencesByLocation, type SequencesByLocationProps } from '../../preact/map/sequences-by-location'; @@ -211,11 +210,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 ffe8173c..b8ee32ed 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'; @@ -71,11 +70,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 4d33e90d..468be749 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,5 +1,4 @@ import { customElement, property } from 'lit/decorators.js'; -import { type DetailedHTMLProps, type HTMLAttributes } from 'react'; import { WastewaterMutationsOverTime, @@ -81,11 +80,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 e1b21055..0049c541 100644 --- a/examples/React/package.json +++ b/examples/React/package.json @@ -10,12 +10,12 @@ }, "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": "^5.2.0" + "vite": "^6.0.11" } } diff --git a/examples/React/src/App.tsx b/examples/React/src/App.tsx index b8cb99de..4e5c83aa 100644 --- a/examples/React/src/App.tsx +++ b/examples/React/src/App.tsx @@ -67,15 +67,15 @@ function App() { return ( @@ -83,12 +83,12 @@ function App() {

Prevalence over time

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

Prevalence over time

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

Prevalence over time

Relative Growth Advantage