Skip to content

Commit

Permalink
[C] get fixed types
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgoff committed Nov 8, 2023
1 parent b22c70c commit 5724d6a
Show file tree
Hide file tree
Showing 14 changed files with 37 additions and 14 deletions.
2 changes: 1 addition & 1 deletion packages/epo-widget-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"react-i18next": "^12.2.0"
},
"dependencies": {
"@rubin-epo/epo-react-lib": "^2.0.1",
"@rubin-epo/epo-react-lib": "^2.0.3",
"lodash": "^4.17.21",
"styled-components": "^6.0.4",
"use-resize-observer": "^9.1.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ describe("Blinker", () => {

fireEvent.click(nextButton);

expect(testProps.blinkCallback).toHaveBeenCalled();
waitFor(() => {
expect(testProps.blinkCallback).toHaveBeenCalled();
expect(testProps.blinkCallback).toHaveBeenCalledWith(
testProps.activeIndex + 1
);
Expand Down
2 changes: 1 addition & 1 deletion packages/epo-widget-lib/src/atomic/Blinker/Blinker.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FunctionComponent, PropsWithChildren, useState } from "react";
import { ImageShape } from "@rubin-epo/epo-react-lib";
import { ImageShape } from "@rubin-epo/epo-react-lib/Image";
import useInterval from "@/hooks/useInterval";
import * as Styled from "./styles";
import { getClampedArrayIndex } from "@/lib/utils";
Expand Down
2 changes: 1 addition & 1 deletion packages/epo-widget-lib/src/atomic/Blinker/Image/Image.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ImageShape } from "@rubin-epo/epo-react-lib";
import { ImageShape } from "@rubin-epo/epo-react-lib/Image";
import { FunctionComponent } from "react";
import * as Styled from "./styles";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ImageShape } from "@rubin-epo/epo-react-lib";
import { ImageShape } from "@rubin-epo/epo-react-lib/Image";

export const mockImages: ImageShape[] = [
{
Expand Down
2 changes: 1 addition & 1 deletion packages/epo-widget-lib/src/atomic/Blinker/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const BlinkerContainer = styled.div`
height: 100%;
`;

const breakSize: string = token("BREAK_MOBILE") as string;
const breakSize = token("BREAK_MOBILE");

export const BlinkerControls = styled(Controls)`
grid-row: 2;
Expand Down
2 changes: 1 addition & 1 deletion packages/epo-widget-lib/src/types/astro.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ImageShape } from "@rubin-epo/epo-react-lib";
import { ImageShape } from "@rubin-epo/epo-react-lib/Image";

export type Band = "u" | "g" | "r" | "i" | "z" | "y";
export type SourceType = "supernova" | "galaxy" | "galaxyFilter";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
import { prepareData } from "./utilities";

import ColorTool from ".";
import { Option } from "@rubin-epo/epo-react-lib";
import { Option } from "@rubin-epo/epo-react-lib/Select";
import { useState } from "react";

const meta: Meta<typeof ColorTool> = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
colorOptions,
multiSpectralOptions,
} from "./__mocks__";
import { Option } from "@rubin-epo/epo-react-lib";
import { Option } from "@rubin-epo/epo-react-lib/Select";
import ColorTool from ".";
import { getCategoryName } from "./utilities";

Expand Down
3 changes: 2 additions & 1 deletion packages/epo-widget-lib/src/widgets/ColorTool/ColorTool.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import {
resetFilters,
} from "./utilities";
import * as Styled from "./styles";
import { Select, Option, ListboxOption } from "@rubin-epo/epo-react-lib";
import Select, { Option } from "@rubin-epo/epo-react-lib/Select";
import { ListboxOption } from "@rubin-epo/epo-react-lib/SelectListbox";
import FilterControls from "./FilterControls";
import ImageComposite from "./ImageComposite";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import SelectListbox from "@rubin-epo/epo-react-lib/SelectListbox";
import { ListboxOption } from "@rubin-epo/epo-react-lib";
import SelectListbox, {
ListboxOption,
} from "@rubin-epo/epo-react-lib/SelectListbox";
import { FunctionComponent } from "react";
import { ImageFilter } from "../ColorTool";
import { getBrightnessValue } from "../utilities";
Expand Down
2 changes: 1 addition & 1 deletion packages/epo-widget-lib/src/widgets/ColorTool/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const WidgetContainer = styled.section`
container: colorTool / inline-size;
`;

const breakSize = token("BREAK_LARGE_TABLET_MIN") as string;
const breakSize = token("BREAK_LARGE_TABLET_MIN");

export const WidgetLayout = styled.div`
--widget-areas: "title" "subtitle" "image" "caption" "controls" "reset";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { FunctionComponent, MouseEvent, ReactNode, useState } from "react";
import { Alert, Source } from "@/types/astro";
import { useTranslation } from "react-i18next";
import { ImageShape } from "@rubin-epo/epo-react-lib";
import { ImageShape } from "@rubin-epo/epo-react-lib/Image";
import IconComposer from "@rubin-epo/epo-react-lib/IconComposer";
import * as Styled from "./styles";
import Points from "./Points";
Expand Down
21 changes: 21 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2636,6 +2636,27 @@
estree-walker "^2.0.2"
picomatch "^2.3.1"

"@rubin-epo/epo-react-lib@^2.0.3":
version "2.0.3"
resolved "https://registry.yarnpkg.com/@rubin-epo/epo-react-lib/-/epo-react-lib-2.0.3.tgz#6b9567e88bb4d0992d35cce8e432ae80a79e8395"
integrity sha512-gTwTzPyhAFoC4DyD0P79YpN1YdrrK4/oId4F5RXyMyj84bnlDgThF92b7Pk//uQTmjVlIPaEHylyE8SivNDGsg==
dependencies:
"@castiron/style-mixins" "^1.0.6"
"@headlessui/react" "^1.7.5"
flickity "^3.0.0"
focus-trap "^7.4.2"
i18next "^22.4.10"
react "^18.2.0"
react-dom "^18.2.0"
react-i18next "^12.0.0"
react-player "^2.12.0"
react-share "^4.4.1"
react-slider "^2.0.4"
react-uid "^2.3.2"
storybook "^7.1.0"
styled-components "^6.0.4"
upgrade "^1.1.0"

"@rushstack/[email protected]":
version "3.59.5"
resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.59.5.tgz#38034d4c38b5ddd7d1c7f04233ce1b2209b7ae1f"
Expand Down

0 comments on commit 5724d6a

Please sign in to comment.