This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [["https://cdn.midjourney.com/bd317521-32d7-4fcf-acef-64726fa7be68/0_7.png"], | |
| ["https://cdn.midjourney.com/abdc20a8-dfdc-449b-8ce8-8cdd5901f4f4/0_1.png"], | |
| ["https://cdn.midjourney.com/b2721737-1c59-41e5-90dc-61abff68fe41/0_0.png"], | |
| ["https://cdn.midjourney.com/ef526e55-c8c5-420d-a8e1-5a1a34a5c694/0_2.png"]] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use skia_safe::{ | |
| gpu::gl::FramebufferInfo, | |
| gpu::BackendRenderTarget, | |
| gpu::DirectContext, | |
| Color, | |
| Paint, | |
| PaintStyle, | |
| Surface, | |
| Rect, | |
| Point, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type EnumInputProps = | |
| | { | |
| isMultiSelect: true; | |
| options: EnumOption[]; | |
| selected: EnumOption[]; | |
| onChange: (value: string[]) => void; | |
| } | |
| | { | |
| isMultiSelect: false; | |
| options: EnumOption[]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const fetchRetry = async ( | |
| fetch: () => Promise<Response>, | |
| maxTries: number = 4 | |
| ): Promise<Response | "error"> => { | |
| for (let tries = 0; tries < maxTries; tries++) { | |
| if (tries !== 0) { | |
| await wait(Math.pow(2, tries + 1) * 1000); | |
| } | |
| try { | |
| const response = await fetch(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { FC, useState } from "react"; | |
| import styled from "styled-components"; | |
| import { useAppSelector } from "../../state"; | |
| import { selectActiveTab } from "../../state/selectors"; | |
| import { colors } from "../../styles"; | |
| import { assertNever } from "../../util"; | |
| import { ConnectedModulesPage } from "../modules/ModulesPage"; | |
| import styles from "./MainView.module.scss"; | |
| import { TablesPage } from "./TablesPage"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const rows: any = []; | |
| for (let i = 0; i < 14; i++) { | |
| const [key, ordinal] = await Promise.all([ | |
| extra.keyGenerator.nextKey(), | |
| extra.ordinalGenerator.nextOrdinal(), | |
| ]); | |
| rows.push({ | |
| key, | |
| values: [{ kind: "string", value: ordinal }], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const getIsRangeAlreadyCorrect = () => { | |
| const ranges = gridApi.getCellRanges(); | |
| if (ranges == null || ranges.length !== 1) { | |
| return false; | |
| } | |
| const range = ranges[0]!; | |
| if (range.columns.length !== 1) { | |
| return false; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (isSearchBarClosing) { | |
| (async () => { | |
| await wait(300); | |
| if (gridApi == null) { | |
| return; | |
| } | |
| const ranges = gridApi.getCellRanges(); | |
| if (ranges?.length !== 1) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { log } from "../logging"; | |
| import { usePrevious } from "./usePrevious"; | |
| // NOTE(gab): Put dependencies in an object & see which deps makes | |
| // components rerender | |
| export const useDependencyDebugger = ( | |
| dependencies: Record<string, unknown> | |
| ): void => { | |
| const dependencyValues = Object.values(dependencies); | |
| const dependencyNames = Object.keys(dependencies); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Tippy from "@tippyjs/react/headless"; | |
| import { FC, ReactElement, ReactNode } from "react"; | |
| import styled from "styled-components"; | |
| import { Spacer } from "../../../components/Spacer"; | |
| import { Txt } from "../../../components/Txt"; | |
| import { colors } from "../../../styles"; | |
| import { ColumnDisplayType } from "../../../util/column-display-config"; | |
| const TooltipContainer = styled.div` | |
| display: flex; |