Skip to content

Commit 2358e81

Browse files
committed
Fixed type errors
1 parent 6402736 commit 2358e81

File tree

9 files changed

+82
-9
lines changed

9 files changed

+82
-9
lines changed

packages/column-components/src/flooding-surface.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export class TriangleBars extends UUIDComponent<TriangleBarsProps> {
6161
order: 2,
6262
};
6363

64+
// @ts-ignore
6465
context: ColumnCtx<ColumnDivision>;
6566

6667
render() {

packages/column-views/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@
8585
"@types/d3-scale": "^4.0.9",
8686
"parcel": "^2.16.0",
8787
"postcss": "^8.0.0",
88-
"postcss-modules": "^6.0.0"
88+
"postcss-modules": "^6.0.0",
89+
"vite": "^7.3.0"
8990
},
9091
"files": [
9192
"dist",

packages/column-views/src/age-model-overlay.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ import styles from "./age-model-overlay.module.sass";
2626
import { useAPIResult } from "@macrostrat/ui-components";
2727
import { useCompositeScale, useMacrostratUnits } from "./data-provider";
2828
import { buildColumnSurfaces } from "./prepare-units/dynamic-scales";
29+
import { ExtUnit } from "./prepare-units";
30+
import { UnitLong } from "@macrostrat/api-types";
2931
const h = hyper.styled(styles);
3032

3133
interface AgeModelSurface {
@@ -47,7 +49,7 @@ interface AgeModelSurface {
4749
}
4850

4951
export function BoundaryAgeModelOverlay() {
50-
const col_id = useMacrostratUnits()?.[0]?.col_id;
52+
const col_id = (useMacrostratUnits() as ExtUnit[])?.[0]?.col_id;
5153
const scale = useCompositeScale();
5254

5355
const ageModel = useAPIResult(
@@ -77,7 +79,7 @@ export function ComputedSurfacesOverlay() {
7779
/** Overlay showing age surfaces. This is like the boundary age model overlay but
7880
* it is computed on the fly from unit tops and bottoms.
7981
*/
80-
const units = useMacrostratUnits();
82+
const units = useMacrostratUnits() as UnitLong[];
8183
const surfaces = buildColumnSurfaces(units);
8284
const scale = useCompositeScale();
8385

packages/column-views/src/data-provider/core.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,19 @@ import { BaseUnit } from "@macrostrat/api-types";
44
import { ReactNode, useEffect, useRef } from "react";
55
import h from "@macrostrat/hyper";
66

7-
export const scope = createIsolation();
7+
interface StateIsolation {
8+
Provider: (props: {
9+
store?: any;
10+
initialValues?: AtomMap;
11+
children: ReactNode;
12+
}) => ReactNode;
13+
useStore: () => any;
14+
useAtom: any;
15+
useAtomValue: any;
16+
useSetAtom: any;
17+
}
18+
19+
export const scope: StateIsolation = createIsolation();
820

921
export type AtomMap = [WritableAtom<any, any, any>, any][];
1022

packages/column-views/src/data-provider/store.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import {
2121
ScopedProvider,
2222
} from "./core";
2323

24-
interface ColumnStateProviderProps<
24+
export interface ColumnStateProviderProps<
2525
T extends BaseUnit,
2626
> extends Partial<UnitSelectionCallbacks> {
2727
children: ReactNode;
@@ -80,7 +80,7 @@ export interface MacrostratColumnDataContext<T extends BaseUnit> {
8080
allowUnitSelection?: boolean;
8181
}
8282

83-
interface ColumnDataProviderProps<T extends BaseUnit>
83+
export interface ColumnDataProviderProps<T extends BaseUnit>
8484
extends MacrostratColumnDataContext<T>, ColumnStateProviderProps<T> {
8585
children: ReactNode;
8686
}

packages/column-views/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"extends": "../../tsconfig.base.json",
33
"compilerOptions": {
44
"baseUrl": "../../",
5-
"include": ["./src", "../../global.d.ts"]
5+
"include": ["./src", "../../global.d.ts"],
66
}
77
}

packages/timescale/src/age-axis.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function AgeAxis(props: AgeAxisProps) {
3939
"svg.timescale-axis",
4040
{ ...size, style },
4141
h(Axis, {
42-
scale,
42+
scale: scale as any,
4343
numTicks: Math.floor(length / 50),
4444
tickLabelProps(tickValue, index) {
4545
const vertProps = isHorizontal

tsconfig.base.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"esModuleInterop": true,
99
"downlevelIteration": true,
1010
"skipLibCheck": true,
11+
"noEmitOnError": false,
1112
"lib": ["esnext", "es2017", "dom"],
1213
"target": "ESNext", // "ES3" (default), "ES5", "ES6"/"ES2015", "ES2016", "ES2017" or "ESNext".
1314
"paths": {

yarn.lock

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2361,6 +2361,7 @@ __metadata:
23612361
postcss-modules: "npm:^6.0.0"
23622362
react-spring: "npm:^9.7.5"
23632363
topojson-client: "npm:^3.1.0"
2364+
vite: "npm:^7.3.0"
23642365
zustand: "npm:^5.0.3"
23652366
zustand-computed: "npm:^2.0.2"
23662367
peerDependencies:
@@ -7964,7 +7965,7 @@ __metadata:
79647965
languageName: node
79657966
linkType: hard
79667967

7967-
"esbuild@npm:^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0 || ^0.26.0 || ^0.27.0":
7968+
"esbuild@npm:^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0 || ^0.26.0 || ^0.27.0, esbuild@npm:^0.27.0":
79687969
version: 0.27.1
79697970
resolution: "esbuild@npm:0.27.1"
79707971
dependencies:
@@ -14149,6 +14150,61 @@ __metadata:
1414914150
languageName: node
1415014151
linkType: hard
1415114152

14153+
"vite@npm:^7.3.0":
14154+
version: 7.3.0
14155+
resolution: "vite@npm:7.3.0"
14156+
dependencies:
14157+
esbuild: "npm:^0.27.0"
14158+
fdir: "npm:^6.5.0"
14159+
fsevents: "npm:~2.3.3"
14160+
picomatch: "npm:^4.0.3"
14161+
postcss: "npm:^8.5.6"
14162+
rollup: "npm:^4.43.0"
14163+
tinyglobby: "npm:^0.2.15"
14164+
peerDependencies:
14165+
"@types/node": ^20.19.0 || >=22.12.0
14166+
jiti: ">=1.21.0"
14167+
less: ^4.0.0
14168+
lightningcss: ^1.21.0
14169+
sass: ^1.70.0
14170+
sass-embedded: ^1.70.0
14171+
stylus: ">=0.54.8"
14172+
sugarss: ^5.0.0
14173+
terser: ^5.16.0
14174+
tsx: ^4.8.1
14175+
yaml: ^2.4.2
14176+
dependenciesMeta:
14177+
fsevents:
14178+
optional: true
14179+
peerDependenciesMeta:
14180+
"@types/node":
14181+
optional: true
14182+
jiti:
14183+
optional: true
14184+
less:
14185+
optional: true
14186+
lightningcss:
14187+
optional: true
14188+
sass:
14189+
optional: true
14190+
sass-embedded:
14191+
optional: true
14192+
stylus:
14193+
optional: true
14194+
sugarss:
14195+
optional: true
14196+
terser:
14197+
optional: true
14198+
tsx:
14199+
optional: true
14200+
yaml:
14201+
optional: true
14202+
bin:
14203+
vite: bin/vite.js
14204+
checksum: 10c0/0457c196cdd5761ec351c0f353945430fbad330e615b9eeab729c8ae163334f18acdc1d9cd7d9d673dbf111f07f6e4f0b25d4ac32360e65b4a6df9991046f3ff
14205+
languageName: node
14206+
linkType: hard
14207+
1415214208
"vt-pbf@npm:^3.1.3":
1415314209
version: 3.1.3
1415414210
resolution: "vt-pbf@npm:3.1.3"

0 commit comments

Comments
 (0)