@genspectrum/dashboard-components 1.15.0 → 1.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/custom-elements.json +2 -2
  2. package/dist/components.d.ts +65 -66
  3. package/dist/components.js +12 -14
  4. package/dist/components.js.map +1 -1
  5. package/dist/util.d.ts +66 -63
  6. package/package.json +2 -9
  7. package/src/preact/mutationsOverTime/getFilteredMutationsOverTimeData.ts +3 -1
  8. package/src/preact/queriesOverTime/queries-over-time-row-label-tooltip.stories.tsx +8 -10
  9. package/src/preact/queriesOverTime/queries-over-time-row-label-tooltip.tsx +7 -17
  10. package/src/preact/queriesOverTime/queries-over-time.tsx +1 -1
  11. package/src/utilEntrypoint.ts +1 -1
  12. package/src/web-components/gs-app.ts +2 -3
  13. package/src/web-components/input/gs-date-range-filter.tsx +2 -3
  14. package/src/web-components/input/gs-lineage-filter.tsx +2 -3
  15. package/src/web-components/input/gs-location-filter.tsx +2 -3
  16. package/src/web-components/input/gs-mutation-filter.tsx +3 -4
  17. package/src/web-components/input/gs-number-range-filter.tsx +2 -3
  18. package/src/web-components/input/gs-text-filter.tsx +2 -3
  19. package/src/web-components/mutation-annotations-context.ts +3 -1
  20. package/src/web-components/visualization/gs-aggregate.tsx +2 -3
  21. package/src/web-components/visualization/gs-genome-data-viewer.tsx +2 -3
  22. package/src/web-components/visualization/gs-mutation-comparison.tsx +2 -3
  23. package/src/web-components/visualization/gs-mutations-over-time.tsx +2 -3
  24. package/src/web-components/visualization/gs-mutations.tsx +7 -8
  25. package/src/web-components/visualization/gs-number-sequences-over-time.tsx +2 -3
  26. package/src/web-components/visualization/gs-prevalence-over-time.tsx +2 -3
  27. package/src/web-components/visualization/gs-queries-over-time.tsx +2 -3
  28. package/src/web-components/visualization/gs-relative-growth-advantage.tsx +2 -3
  29. package/src/web-components/visualization/gs-sequences-by-location.tsx +2 -3
  30. package/src/web-components/visualization/gs-statistics.tsx +2 -3
  31. package/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.tsx +2 -3
  32. package/standalone-bundle/dashboard-components.js +12 -14
  33. package/standalone-bundle/dashboard-components.js.map +1 -1
package/dist/util.d.ts CHANGED
@@ -71,6 +71,25 @@ export declare type ConfidenceIntervalMethod = default_2.infer<typeof confidence
71
71
 
72
72
  declare const confidenceIntervalMethodSchema: default_2.ZodUnion<[default_2.ZodLiteral<"wilson">, default_2.ZodLiteral<"none">]>;
73
73
 
74
+ export declare type CountCoverageQuery = default_2.infer<typeof countCoverageQuerySchema>;
75
+
76
+ declare const countCoverageQuerySchema: default_2.ZodObject<{
77
+ displayLabel: default_2.ZodString;
78
+ description: default_2.ZodOptional<default_2.ZodString>;
79
+ countQuery: default_2.ZodString;
80
+ coverageQuery: default_2.ZodString;
81
+ }, "strip", default_2.ZodTypeAny, {
82
+ displayLabel: string;
83
+ countQuery: string;
84
+ coverageQuery: string;
85
+ description?: string | undefined;
86
+ }, {
87
+ displayLabel: string;
88
+ countQuery: string;
89
+ coverageQuery: string;
90
+ description?: string | undefined;
91
+ }>;
92
+
74
93
  export declare type CustomColumn = default_2.infer<typeof customColumnSchema>;
75
94
 
76
95
  declare const customColumnSchema: default_2.ZodObject<{
@@ -868,22 +887,6 @@ export declare type QueriesOverTimeView = default_2.infer<typeof queriesOverTime
868
887
 
869
888
  declare const queriesOverTimeViewSchema: default_2.ZodLiteral<"grid">;
870
889
 
871
- export declare type QueryDefinition = default_2.infer<typeof queryDefinition>;
872
-
873
- declare const queryDefinition: default_2.ZodObject<{
874
- displayLabel: default_2.ZodOptional<default_2.ZodString>;
875
- countQuery: default_2.ZodString;
876
- coverageQuery: default_2.ZodString;
877
- }, "strip", default_2.ZodTypeAny, {
878
- countQuery: string;
879
- coverageQuery: string;
880
- displayLabel?: string | undefined;
881
- }, {
882
- countQuery: string;
883
- coverageQuery: string;
884
- displayLabel?: string | undefined;
885
- }>;
886
-
887
890
  export declare type RelativeGrowthAdvantageProps = default_2.infer<typeof relativeGrowthAdvantagePropsSchema>;
888
891
 
889
892
  declare const relativeGrowthAdvantagePropsSchema: default_2.ZodObject<{
@@ -1095,9 +1098,9 @@ declare global {
1095
1098
 
1096
1099
 
1097
1100
  declare global {
1098
- namespace JSX {
1101
+ namespace React.JSX {
1099
1102
  interface IntrinsicElements {
1100
- 'gs-app': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1103
+ 'gs-app': AppComponent;
1101
1104
  }
1102
1105
  }
1103
1106
  }
@@ -1105,15 +1108,15 @@ declare global {
1105
1108
 
1106
1109
  declare global {
1107
1110
  interface HTMLElementTagNameMap {
1108
- 'gs-wastewater-mutations-over-time': WastewaterMutationsOverTimeComponent;
1111
+ 'gs-genome-data-viewer': GenomeDataViewerComponent;
1109
1112
  }
1110
1113
  }
1111
1114
 
1112
1115
 
1113
1116
  declare global {
1114
- namespace JSX {
1117
+ namespace React.JSX {
1115
1118
  interface IntrinsicElements {
1116
- 'gs-wastewater-mutations-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1119
+ 'gs-genome-data-viewer': GenomeDataViewerComponent;
1117
1120
  }
1118
1121
  }
1119
1122
  }
@@ -1121,15 +1124,15 @@ declare global {
1121
1124
 
1122
1125
  declare global {
1123
1126
  interface HTMLElementTagNameMap {
1124
- 'gs-genome-data-viewer': GenomeDataViewerComponent;
1127
+ 'gs-mutation-comparison': MutationComparisonComponent;
1125
1128
  }
1126
1129
  }
1127
1130
 
1128
1131
 
1129
1132
  declare global {
1130
- namespace JSX {
1133
+ namespace React.JSX {
1131
1134
  interface IntrinsicElements {
1132
- 'gs-genome-data-viewer': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1135
+ 'gs-mutation-comparison': MutationComparisonComponent;
1133
1136
  }
1134
1137
  }
1135
1138
  }
@@ -1137,15 +1140,15 @@ declare global {
1137
1140
 
1138
1141
  declare global {
1139
1142
  interface HTMLElementTagNameMap {
1140
- 'gs-mutation-comparison': MutationComparisonComponent;
1143
+ 'gs-mutations': MutationsComponent;
1141
1144
  }
1142
1145
  }
1143
1146
 
1144
1147
 
1145
1148
  declare global {
1146
- namespace JSX {
1149
+ namespace React.JSX {
1147
1150
  interface IntrinsicElements {
1148
- 'gs-mutation-comparison': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1151
+ 'gs-mutations': MutationsComponent;
1149
1152
  }
1150
1153
  }
1151
1154
  }
@@ -1153,15 +1156,15 @@ declare global {
1153
1156
 
1154
1157
  declare global {
1155
1158
  interface HTMLElementTagNameMap {
1156
- 'gs-mutations': MutationsComponent;
1159
+ 'gs-prevalence-over-time': PrevalenceOverTimeComponent;
1157
1160
  }
1158
1161
  }
1159
1162
 
1160
1163
 
1161
1164
  declare global {
1162
- namespace JSX {
1165
+ namespace React.JSX {
1163
1166
  interface IntrinsicElements {
1164
- 'gs-mutations': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1167
+ 'gs-prevalence-over-time': PrevalenceOverTimeComponent;
1165
1168
  }
1166
1169
  }
1167
1170
  }
@@ -1169,15 +1172,15 @@ declare global {
1169
1172
 
1170
1173
  declare global {
1171
1174
  interface HTMLElementTagNameMap {
1172
- 'gs-prevalence-over-time': PrevalenceOverTimeComponent;
1175
+ 'gs-relative-growth-advantage': RelativeGrowthAdvantageComponent;
1173
1176
  }
1174
1177
  }
1175
1178
 
1176
1179
 
1177
1180
  declare global {
1178
- namespace JSX {
1181
+ namespace React.JSX {
1179
1182
  interface IntrinsicElements {
1180
- 'gs-prevalence-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1183
+ 'gs-relative-growth-advantage': RelativeGrowthAdvantageComponent;
1181
1184
  }
1182
1185
  }
1183
1186
  }
@@ -1185,15 +1188,15 @@ declare global {
1185
1188
 
1186
1189
  declare global {
1187
1190
  interface HTMLElementTagNameMap {
1188
- 'gs-relative-growth-advantage': RelativeGrowthAdvantageComponent;
1191
+ 'gs-number-sequences-over-time': NumberSequencesOverTimeComponent;
1189
1192
  }
1190
1193
  }
1191
1194
 
1192
1195
 
1193
1196
  declare global {
1194
- namespace JSX {
1197
+ namespace React.JSX {
1195
1198
  interface IntrinsicElements {
1196
- 'gs-relative-growth-advantage': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1199
+ 'gs-number-sequences-over-time': NumberSequencesOverTimeComponent;
1197
1200
  }
1198
1201
  }
1199
1202
  }
@@ -1207,9 +1210,9 @@ declare global {
1207
1210
 
1208
1211
 
1209
1212
  declare global {
1210
- namespace JSX {
1213
+ namespace React.JSX {
1211
1214
  interface IntrinsicElements {
1212
- 'gs-aggregate': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1215
+ 'gs-aggregate': AggregateComponent;
1213
1216
  }
1214
1217
  }
1215
1218
  }
@@ -1217,15 +1220,15 @@ declare global {
1217
1220
 
1218
1221
  declare global {
1219
1222
  interface HTMLElementTagNameMap {
1220
- 'gs-number-sequences-over-time': NumberSequencesOverTimeComponent;
1223
+ 'gs-mutations-over-time': MutationsOverTimeComponent;
1221
1224
  }
1222
1225
  }
1223
1226
 
1224
1227
 
1225
1228
  declare global {
1226
- namespace JSX {
1229
+ namespace React.JSX {
1227
1230
  interface IntrinsicElements {
1228
- 'gs-number-sequences-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1231
+ 'gs-mutations-over-time': MutationsOverTimeComponent;
1229
1232
  }
1230
1233
  }
1231
1234
  }
@@ -1239,9 +1242,9 @@ declare global {
1239
1242
 
1240
1243
 
1241
1244
  declare global {
1242
- namespace JSX {
1245
+ namespace React.JSX {
1243
1246
  interface IntrinsicElements {
1244
- 'gs-queries-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1247
+ 'gs-queries-over-time': QueriesOverTimeComponent;
1245
1248
  }
1246
1249
  }
1247
1250
  }
@@ -1249,15 +1252,15 @@ declare global {
1249
1252
 
1250
1253
  declare global {
1251
1254
  interface HTMLElementTagNameMap {
1252
- 'gs-mutations-over-time': MutationsOverTimeComponent;
1255
+ 'gs-statistics': StatisticsComponent;
1253
1256
  }
1254
1257
  }
1255
1258
 
1256
1259
 
1257
1260
  declare global {
1258
- namespace JSX {
1261
+ namespace React.JSX {
1259
1262
  interface IntrinsicElements {
1260
- 'gs-mutations-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1263
+ 'gs-statistics': StatisticsComponent;
1261
1264
  }
1262
1265
  }
1263
1266
  }
@@ -1271,9 +1274,9 @@ declare global {
1271
1274
 
1272
1275
 
1273
1276
  declare global {
1274
- namespace JSX {
1277
+ namespace React.JSX {
1275
1278
  interface IntrinsicElements {
1276
- 'gs-sequences-by-location': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1279
+ 'gs-sequences-by-location': SequencesByLocationComponent;
1277
1280
  }
1278
1281
  }
1279
1282
  }
@@ -1281,15 +1284,15 @@ declare global {
1281
1284
 
1282
1285
  declare global {
1283
1286
  interface HTMLElementTagNameMap {
1284
- 'gs-statistics': StatisticsComponent;
1287
+ 'gs-wastewater-mutations-over-time': WastewaterMutationsOverTimeComponent;
1285
1288
  }
1286
1289
  }
1287
1290
 
1288
1291
 
1289
1292
  declare global {
1290
- namespace JSX {
1293
+ namespace React.JSX {
1291
1294
  interface IntrinsicElements {
1292
- 'gs-statistics': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1295
+ 'gs-wastewater-mutations-over-time': WastewaterMutationsOverTimeComponent;
1293
1296
  }
1294
1297
  }
1295
1298
  }
@@ -1307,9 +1310,9 @@ declare global {
1307
1310
 
1308
1311
 
1309
1312
  declare global {
1310
- namespace JSX {
1313
+ namespace React.JSX {
1311
1314
  interface IntrinsicElements {
1312
- 'gs-date-range-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1315
+ 'gs-date-range-filter': DateRangeFilterComponent;
1313
1316
  }
1314
1317
  }
1315
1318
  }
@@ -1326,9 +1329,9 @@ declare global {
1326
1329
 
1327
1330
 
1328
1331
  declare global {
1329
- namespace JSX {
1332
+ namespace React.JSX {
1330
1333
  interface IntrinsicElements {
1331
- 'gs-location-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1334
+ 'gs-location-filter': LocationFilterComponent;
1332
1335
  }
1333
1336
  }
1334
1337
  }
@@ -1345,9 +1348,9 @@ declare global {
1345
1348
 
1346
1349
 
1347
1350
  declare global {
1348
- namespace JSX {
1351
+ namespace React.JSX {
1349
1352
  interface IntrinsicElements {
1350
- 'gs-text-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1353
+ 'gs-text-filter': TextFilterComponent;
1351
1354
  }
1352
1355
  }
1353
1356
  }
@@ -1364,9 +1367,9 @@ declare global {
1364
1367
 
1365
1368
 
1366
1369
  declare global {
1367
- namespace JSX {
1370
+ namespace React.JSX {
1368
1371
  interface IntrinsicElements {
1369
- 'gs-mutation-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1372
+ 'gs-mutation-filter': MutationFilterComponent;
1370
1373
  }
1371
1374
  }
1372
1375
  }
@@ -1384,9 +1387,9 @@ declare global {
1384
1387
 
1385
1388
 
1386
1389
  declare global {
1387
- namespace JSX {
1390
+ namespace React.JSX {
1388
1391
  interface IntrinsicElements {
1389
- 'gs-lineage-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1392
+ 'gs-lineage-filter': LineageFilterComponent;
1390
1393
  }
1391
1394
  }
1392
1395
  }
@@ -1404,9 +1407,9 @@ declare global {
1404
1407
 
1405
1408
 
1406
1409
  declare global {
1407
- namespace JSX {
1410
+ namespace React.JSX {
1408
1411
  interface IntrinsicElements {
1409
- 'gs-number-range-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1412
+ 'gs-number-range-filter': NumberRangeFilterComponent;
1410
1413
  }
1411
1414
  }
1412
1415
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@genspectrum/dashboard-components",
3
- "version": "1.15.0",
3
+ "version": "1.16.0",
4
4
  "description": "GenSpectrum web components for building dashboards",
5
5
  "type": "module",
6
6
  "license": "AGPL-3.0-only",
@@ -15,13 +15,6 @@
15
15
  "publishConfig": {
16
16
  "access": "public"
17
17
  },
18
- "imports": {
19
- "#*": [
20
- "./*",
21
- "./*.ts",
22
- "./*.tsx"
23
- ]
24
- },
25
18
  "exports": {
26
19
  "./components": {
27
20
  "types": "./dist/components.d.ts",
@@ -136,7 +129,7 @@
136
129
  "msw": "^2.2.14",
137
130
  "postcss": "^8.4.38",
138
131
  "prettier": "^3.2.5",
139
- "react": "^18.3.1",
132
+ "react": "^19.0.0",
140
133
  "storybook": "^8.0.9",
141
134
  "storybook-addon-fetch-mock": "^2.0.0",
142
135
  "tailwindcss": "^4.0.9",
@@ -8,7 +8,9 @@ import { type useMutationAnnotationsProvider } from '../MutationAnnotationsConte
8
8
  import type { DisplayedMutationType } from '../components/mutation-type-selector';
9
9
  import type { DisplayedSegment } from '../components/segment-selector';
10
10
 
11
- export const displayMutationsSchema = z.array(z.string());
11
+ export const displayMutationsSchema = z.array(z.string(), {
12
+ errorMap: () => ({ message: `invalid display mutations` }),
13
+ });
12
14
  export type DisplayMutations = z.infer<typeof displayMutationsSchema>;
13
15
 
14
16
  export type MutationFilter = {
@@ -23,20 +23,20 @@ export const Default: StoryObj<QueriesOverTimeRowLabelTooltipProps> = {
23
23
  render: (args) => <QueriesOverTimeRowLabelTooltip {...args} />,
24
24
  args: {
25
25
  query: {
26
- displayLabel: 'S:F456L (single mutation)',
27
- description: 'This mutation is associated with increased transmissibility.',
28
- countQuery: 'S:456L',
26
+ displayLabel: 'Foo variant',
27
+ description: 'These mutations are associated with increased transmissibility.',
28
+ countQuery: 'S:451L & S:452L & S:453L & S:454L & S:455L & S:456L & S:457L & S:458L & S:459L & S:460L',
29
29
  coverageQuery: '!S:456N',
30
30
  },
31
31
  },
32
32
  play: async ({ canvasElement }) => {
33
33
  const canvas = within(canvasElement);
34
- await expect(canvas.getByText('S:F456L (single mutation)', { exact: true })).toBeVisible();
35
- await expect(canvas.getByText('This mutation is associated with increased transmissibility.')).toBeVisible();
34
+ await expect(canvas.getByText('Foo variant', { exact: true })).toBeVisible();
35
+ await expect(canvas.getByText('These mutations are associated with increased transmissibility.')).toBeVisible();
36
36
  await expect(canvas.getByText('Count query:')).toBeVisible();
37
- await expect(canvas.getByText('S:456L')).toBeVisible();
38
- await expect(canvas.getByText('Coverage query:')).toBeVisible();
39
- await expect(canvas.getByText('!S:456N')).toBeVisible();
37
+ await expect(
38
+ canvas.getByText('S:451L & S:452L & S:453L & S:454L & S:455L & S:456L & S:457L & S:458L & S:459L & S:460L'),
39
+ ).toBeVisible();
40
40
  },
41
41
  };
42
42
 
@@ -54,7 +54,5 @@ export const WithoutDescription: StoryObj<QueriesOverTimeRowLabelTooltipProps> =
54
54
  await expect(canvas.getByText('S:R346T', { exact: true })).toBeVisible();
55
55
  await expect(canvas.getByText('Count query:')).toBeVisible();
56
56
  await expect(canvas.getByText('S:346T')).toBeVisible();
57
- await expect(canvas.getByText('Coverage query:')).toBeVisible();
58
- await expect(canvas.getByText('!S:346N')).toBeVisible();
59
57
  },
60
58
  };
@@ -8,25 +8,15 @@ export type QueriesOverTimeRowLabelTooltipProps = {
8
8
 
9
9
  export const QueriesOverTimeRowLabelTooltip: FunctionComponent<QueriesOverTimeRowLabelTooltipProps> = ({ query }) => {
10
10
  return (
11
- <div className='flex flex-col gap-2'>
11
+ <div className='flex flex-col gap-2 max-w-xl'>
12
12
  <div className='font-bold'>{query.displayLabel}</div>
13
13
  {query.description && <div className='text-sm text-gray-700'>{query.description}</div>}
14
- <div className='flex flex-col gap-1'>
15
- <div className='text-sm'>
16
- <span className='text-gray-600'>Count query:</span>
17
- <div className='p-2 border border-gray-200 rounded bg-gray-50 overflow-x-auto'>
18
- <pre className='text-xs'>
19
- <code>{query.countQuery}</code>
20
- </pre>
21
- </div>
22
- </div>
23
- <div className='text-sm'>
24
- <span className='text-gray-600'>Coverage query:</span>
25
- <div className='p-2 border border-gray-200 rounded bg-gray-50 overflow-x-auto'>
26
- <pre className='text-xs'>
27
- <code>{query.coverageQuery}</code>
28
- </pre>
29
- </div>
14
+ <div className='text-sm'>
15
+ <span className='text-gray-600'>Count query:</span>
16
+ <div className='p-2 border border-gray-200 rounded bg-gray-50'>
17
+ <pre className='text-xs whitespace-pre-wrap'>
18
+ <code>{query.countQuery}</code>
19
+ </pre>
30
20
  </div>
31
21
  </div>
32
22
  </div>
@@ -177,7 +177,7 @@ const QueriesOverTimeTabs: FunctionComponent<QueriesOverTimeTabsProps> = ({
177
177
  position='right'
178
178
  portalTarget={tooltipPortalTarget}
179
179
  >
180
- <div className='text-center'>
180
+ <div className='text-center whitespace-nowrap mr-2'>
181
181
  <span>{value}</span>
182
182
  </div>
183
183
  </PortalTooltip>
@@ -54,4 +54,4 @@ export {
54
54
  export { type MeanProportionInterval } from './preact/mutationsOverTime/mutations-over-time';
55
55
  export { type CustomColumn } from './preact/components/features-over-time-grid';
56
56
 
57
- export { type QueryDefinition } from './lapisApi/lapisTypes';
57
+ export { type CountCoverageQuery } from './preact/queriesOverTime/queries-over-time';
@@ -2,7 +2,6 @@ import { provide } from '@lit/context';
2
2
  import { Task } from '@lit/task';
3
3
  import { html, LitElement } from 'lit';
4
4
  import { customElement, property } from 'lit/decorators.js';
5
- import type { DetailedHTMLProps, HTMLAttributes } from 'react';
6
5
  import z from 'zod';
7
6
 
8
7
  import { lapisContext } from './lapis-context';
@@ -129,9 +128,9 @@ declare global {
129
128
 
130
129
  declare global {
131
130
  // eslint-disable-next-line @typescript-eslint/no-namespace
132
- namespace JSX {
131
+ namespace React.JSX {
133
132
  interface IntrinsicElements {
134
- 'gs-app': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
133
+ 'gs-app': AppComponent;
135
134
  }
136
135
  }
137
136
  }
@@ -1,7 +1,6 @@
1
1
  import flatpickrStyle from 'flatpickr/dist/flatpickr.css?inline';
2
2
  import { unsafeCSS } from 'lit';
3
3
  import { customElement, property } from 'lit/decorators.js';
4
- import type { DetailedHTMLProps, HTMLAttributes } from 'react';
5
4
 
6
5
  import { DateRangeFilter, type DateRangeFilterProps } from '../../preact/dateRangeFilter/date-range-filter';
7
6
  import { type DateRangeOptionChangedEvent } from '../../preact/dateRangeFilter/dateRangeOption';
@@ -144,9 +143,9 @@ declare global {
144
143
 
145
144
  declare global {
146
145
  // eslint-disable-next-line @typescript-eslint/no-namespace
147
- namespace JSX {
146
+ namespace React.JSX {
148
147
  interface IntrinsicElements {
149
- 'gs-date-range-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
148
+ 'gs-date-range-filter': DateRangeFilterComponent;
150
149
  }
151
150
  }
152
151
  }
@@ -1,5 +1,4 @@
1
1
  import { customElement, property } from 'lit/decorators.js';
2
- import type { DetailedHTMLProps, HTMLAttributes } from 'react';
3
2
 
4
3
  import {
5
4
  type LineageFilterChangedEvent,
@@ -146,9 +145,9 @@ declare global {
146
145
 
147
146
  declare global {
148
147
  // eslint-disable-next-line @typescript-eslint/no-namespace
149
- namespace JSX {
148
+ namespace React.JSX {
150
149
  interface IntrinsicElements {
151
- 'gs-lineage-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
150
+ 'gs-lineage-filter': LineageFilterComponent;
152
151
  }
153
152
  }
154
153
  }
@@ -1,5 +1,4 @@
1
1
  import { customElement, property } from 'lit/decorators.js';
2
- import type { DetailedHTMLProps, HTMLAttributes } from 'react';
3
2
 
4
3
  import { type LocationChangedEvent } from '../../preact/locationFilter/LocationChangedEvent';
5
4
  import { LocationFilter, type LocationFilterProps } from '../../preact/locationFilter/location-filter';
@@ -110,9 +109,9 @@ declare global {
110
109
 
111
110
  declare global {
112
111
  // eslint-disable-next-line @typescript-eslint/no-namespace
113
- namespace JSX {
112
+ namespace React.JSX {
114
113
  interface IntrinsicElements {
115
- 'gs-location-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
114
+ 'gs-location-filter': LocationFilterComponent;
116
115
  }
117
116
  }
118
117
  }
@@ -1,5 +1,4 @@
1
1
  import { customElement, property } from 'lit/decorators.js';
2
- import type { DetailedHTMLProps, HTMLAttributes } from 'react';
3
2
 
4
3
  import { ReferenceGenomesAwaiter } from '../../preact/components/ReferenceGenomesAwaiter';
5
4
  import { MutationFilter, type MutationFilterProps } from '../../preact/mutationFilter/mutation-filter';
@@ -67,7 +66,7 @@ export class MutationFilterComponent extends PreactLitAdapter {
67
66
  * All values provided must be valid mutations or insertions.
68
67
  * Invalid values will be ignored.
69
68
  */
70
- @property({type: Object})
69
+ @property({ type: Object })
71
70
  initialValue:
72
71
  {
73
72
  nucleotideMutations: string[];
@@ -125,9 +124,9 @@ declare global {
125
124
 
126
125
  declare global {
127
126
  // eslint-disable-next-line @typescript-eslint/no-namespace
128
- namespace JSX {
127
+ namespace React.JSX {
129
128
  interface IntrinsicElements {
130
- 'gs-mutation-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
129
+ 'gs-mutation-filter': MutationFilterComponent;
131
130
  }
132
131
  }
133
132
  }
@@ -1,5 +1,4 @@
1
1
  import { customElement, property } from 'lit/decorators.js';
2
- import type { DetailedHTMLProps, HTMLAttributes } from 'react';
3
2
 
4
3
  import {
5
4
  type NumberRangeFilterChangedEvent,
@@ -140,9 +139,9 @@ declare global {
140
139
 
141
140
  declare global {
142
141
  // eslint-disable-next-line @typescript-eslint/no-namespace
143
- namespace JSX {
142
+ namespace React.JSX {
144
143
  interface IntrinsicElements {
145
- 'gs-number-range-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
144
+ 'gs-number-range-filter': NumberRangeFilterComponent;
146
145
  }
147
146
  }
148
147
  }
@@ -1,5 +1,4 @@
1
1
  import { customElement, property } from 'lit/decorators.js';
2
- import type { DetailedHTMLProps, HTMLAttributes } from 'react';
3
2
 
4
3
  import { type TextFilterChangedEvent } from '../../preact/textFilter/TextFilterChangedEvent';
5
4
  import { TextFilter, type TextFilterProps } from '../../preact/textFilter/text-filter';
@@ -100,9 +99,9 @@ declare global {
100
99
 
101
100
  declare global {
102
101
  // eslint-disable-next-line @typescript-eslint/no-namespace
103
- namespace JSX {
102
+ namespace React.JSX {
104
103
  interface IntrinsicElements {
105
- 'gs-text-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
104
+ 'gs-text-filter': TextFilterComponent;
106
105
  }
107
106
  }
108
107
  }
@@ -14,7 +14,9 @@ const mutationAnnotationSchema = z.object({
14
14
  });
15
15
  export type MutationAnnotation = z.infer<typeof mutationAnnotationSchema>;
16
16
 
17
- export const mutationAnnotationsSchema = z.array(mutationAnnotationSchema);
17
+ export const mutationAnnotationsSchema = z.array(mutationAnnotationSchema, {
18
+ errorMap: () => ({ message: 'invalid mutation annotations' }),
19
+ });
18
20
  export type MutationAnnotations = z.infer<typeof mutationAnnotationsSchema>;
19
21
 
20
22
  export const mutationAnnotationsContext = createContext<MutationAnnotations>(Symbol('mutation-annotations-context'));
@@ -1,5 +1,4 @@
1
1
  import { customElement, property } from 'lit/decorators.js';
2
- import type { DetailedHTMLProps, HTMLAttributes } from 'react';
3
2
 
4
3
  import { Aggregate, type AggregateProps } from '../../preact/aggregatedData/aggregate';
5
4
  import { type Equals, type Expect } from '../../utils/typeAssertions';
@@ -131,9 +130,9 @@ declare global {
131
130
 
132
131
  declare global {
133
132
  // eslint-disable-next-line @typescript-eslint/no-namespace
134
- namespace JSX {
133
+ namespace React.JSX {
135
134
  interface IntrinsicElements {
136
- 'gs-aggregate': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
135
+ 'gs-aggregate': AggregateComponent;
137
136
  }
138
137
  }
139
138
  }
@@ -1,5 +1,4 @@
1
1
  import { customElement, property } from 'lit/decorators.js';
2
- import type { DetailedHTMLProps, HTMLAttributes } from 'react';
3
2
 
4
3
  import { GenomeDataViewer } from '../../preact/genomeViewer/genome-data-viewer';
5
4
  import { PreactLitAdapter } from '../PreactLitAdapter';
@@ -53,9 +52,9 @@ declare global {
53
52
 
54
53
  declare global {
55
54
  // eslint-disable-next-line @typescript-eslint/no-namespace
56
- namespace JSX {
55
+ namespace React.JSX {
57
56
  interface IntrinsicElements {
58
- 'gs-genome-data-viewer': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
57
+ 'gs-genome-data-viewer': GenomeDataViewerComponent;
59
58
  }
60
59
  }
61
60
  }