diff --git a/src/pages/background/util/openNewTab.ts b/src/pages/background/util/openNewTab.ts index 904e375e..f2b6bc99 100644 --- a/src/pages/background/util/openNewTab.ts +++ b/src/pages/background/util/openNewTab.ts @@ -1,3 +1,6 @@ +/** + * Represents a tab with an additional `id` property + */ export type TabWithId = Omit & { id: number }; /** diff --git a/src/shared/types/MIMEType.ts b/src/shared/types/MIMEType.ts index 358243f2..09c1bcb7 100644 --- a/src/shared/types/MIMEType.ts +++ b/src/shared/types/MIMEType.ts @@ -12,6 +12,9 @@ const MIMEType = { ANY: '*/*', } as const satisfies Record; +/** + * Represents a key of the MIMEType object + */ export type MIMETypeKey = keyof typeof MIMEType; export default MIMEType; diff --git a/src/shared/types/ThemeColors.ts b/src/shared/types/ThemeColors.ts index 441b68d9..b2cee7fa 100644 --- a/src/shared/types/ThemeColors.ts +++ b/src/shared/types/ThemeColors.ts @@ -52,11 +52,15 @@ type NestedKeys = { export type ThemeColor = NestedKeys; /** - * Represents a Tailwind colorway: a colorway is a key in the theme.colors object that has an object as its value. + * Represents a Tailwind colorway: a colorway is a key in the theme.colors object that has an object as its value */ export type TWColorway = { [K in keyof typeof theme.colors]: (typeof theme.colors)[K] extends Record ? K : never; }[keyof typeof theme.colors]; + +/** + * Represents the index type for accessing the theme colors based on the specified TWColorway + */ export type TWIndex = keyof (typeof theme.colors)[TWColorway]; /** diff --git a/src/shared/util/colors.ts b/src/shared/util/colors.ts index 5441a7d3..f0f8fb90 100644 --- a/src/shared/util/colors.ts +++ b/src/shared/util/colors.ts @@ -207,9 +207,9 @@ export function getUnusedColor( } // OKLab helper functions (https://github.com/bottosson/bottosson.github.io/blob/master/misc/colorpicker/colorconversion.js) -function srgbTransferFunction(a: number): number { - return a <= 0.0031308 ? 12.92 * a : 1.055 * a ** 0.4166666666666667 - 0.055; -} +// function srgbTransferFunction(a: number): number { +// return a <= 0.0031308 ? 12.92 * a : 1.055 * a ** 0.4166666666666667 - 0.055; +// } function srgbTransferFunctionInv(a: number): number { return a > 0.04045 ? ((a + 0.055) / 1.055) ** 2.4 : a / 12.92; diff --git a/src/views/components/common/Chip.tsx b/src/views/components/common/Chip.tsx index 10d27e7a..0c4e345f 100644 --- a/src/views/components/common/Chip.tsx +++ b/src/views/components/common/Chip.tsx @@ -2,7 +2,7 @@ import Text from '@views/components/common/Text/Text'; import React from 'react'; /** - * A type that represents the flags that a course can have. + * A type that represents the flags that a course can have */ export type Flag = 'WR' | 'QR' | 'GC' | 'CD' | 'E' | 'II'; export const flagMap = { diff --git a/src/views/components/common/Dialog.tsx b/src/views/components/common/Dialog.tsx index a1e08f62..c61225ab 100644 --- a/src/views/components/common/Dialog.tsx +++ b/src/views/components/common/Dialog.tsx @@ -13,6 +13,9 @@ import React, { Fragment } from 'react'; import ExtensionRoot from './ExtensionRoot/ExtensionRoot'; +/** + * Represents the props for the _Dialog component + */ export interface _DialogProps { className?: string; title?: JSX.Element; diff --git a/src/views/components/common/DialogProvider/DialogProvider.tsx b/src/views/components/common/DialogProvider/DialogProvider.tsx index 0f027438..078e5cc8 100644 --- a/src/views/components/common/DialogProvider/DialogProvider.tsx +++ b/src/views/components/common/DialogProvider/DialogProvider.tsx @@ -7,6 +7,10 @@ import Dialog from '../Dialog'; import Text from '../Text/Text'; type DialogElement = (show: boolean) => ReactNode; + +/** + * Represents information for a prompt dialog + */ export interface PromptInfo extends Omit { title: JSX.Element | string; description: JSX.Element | string;