feat: some more type prefixes

This commit is contained in:
TrèsAbhi committed 2025-10-13 23:20:26 -05:00
1 parent 0d8cb5c1ae
commit 26304fc281
71 files changed
+411 -409

No files matched your search

@@ -1,4 +1,4 @@
import { ReactNode } from 'react';
import { type ReactNode } from "react";
interface RootProps {
children: ReactNode;
@@ -8,7 +8,7 @@ export function Root({ children }: RootProps) {
return (
<div
className="session-tracker-root"
style={{ display: 'flex', flexDirection: 'column', gap: 8 }}
style={{ display: "flex", flexDirection: "column", gap: 8 }}
>
{children}
</div>
@@ -6,8 +6,8 @@ import {
} from '@blitzkit/core';
import { createColors } from 'bepaint';
import {
AccentColor,
GrayColor,
type AccentColor,
type GrayColor,
PALETTES,
} from '../../../core/radix/radixColors';
import { RowStat } from './RowStat';
@@ -1,11 +1,11 @@
import { Percentile } from '@blitzkit/core';
import { createColors } from 'bepaint';
import { Percentile } from "@blitzkit/core";
import { createColors } from "bepaint";
import {
AccentColor,
GrayColor,
type AccentColor,
type GrayColor,
PALETTES,
} from '../../../core/radix/radixColors';
import { PercentileIndicator } from '../../PercentileIndicator';
} from "../../../core/radix/radixColors";
import { PercentileIndicator } from "../../PercentileIndicator";
interface RowStatProps {
name: string;
@@ -22,7 +22,7 @@ export function RowStat({
delta,
percentile,
minimized = false,
color = 'slate',
color = "slate",
}: RowStatProps) {
const theme = createColors(PALETTES[`${color}Dark`]);
@@ -30,29 +30,29 @@ export function RowStat({
<div
className="session-tracker-row-stat"
style={{
display: 'flex',
flexDirection: 'column',
display: "flex",
flexDirection: "column",
gap: 4,
alignItems: 'center',
justifyContent: 'center',
alignItems: "center",
justifyContent: "center",
flex: 1,
}}
>
<div
style={{
display: 'flex',
display: "flex",
gap: 4,
alignItems: 'center',
justifyContent: 'center',
alignItems: "center",
justifyContent: "center",
}}
>
{percentile === undefined && delta !== undefined && delta !== 0 && (
<img
alt={delta > 0 ? 'Increase' : 'Decrease'}
alt={delta > 0 ? "Increase" : "Decrease"}
src={
(delta ?? 0) > 0
? 'https://i.imgur.com/qbjiXa1.png'
: 'https://i.imgur.com/3uyNhun.png'
? "https://i.imgur.com/qbjiXa1.png"
: "https://i.imgur.com/3uyNhun.png"
}
style={{ width: 12, height: 12 }}
/>
@@ -66,7 +66,7 @@ export function RowStat({
color: theme.textHighContrast,
fontWeight: 700,
fontSize: 16,
textAlign: 'center',
textAlign: "center",
}}
>
{value}
@@ -77,7 +77,7 @@ export function RowStat({
<span
style={{
color: theme.textLowContrast,
textAlign: 'center',
textAlign: "center",
fontSize: 12,
}}
>
@@ -1,5 +1,5 @@
import { GenericStat } from '..';
import { GenericStatsRow } from './GenericStatsRow';
import { type GenericStat } from "..";
import { GenericStatsRow } from "./GenericStatsRow";
interface GenericStatsColumnProps {
stats: GenericStat[];
@@ -7,7 +7,7 @@ interface GenericStatsColumnProps {
export function GenericStatsColumn({ stats }: GenericStatsColumnProps) {
return (
<div style={{ flex: 1, display: 'flex', flexDirection: 'column', gap: 8 }}>
<div style={{ flex: 1, display: "flex", flexDirection: "column", gap: 8 }}>
{stats.map((stat) => (
<GenericStatsRow key={stat[0]} stat={stat} />
))}
@@ -1,6 +1,6 @@
import { GenericStat } from '..';
import { theme } from '../../../stitches.config';
import { PercentileIndicator } from '../../PercentileIndicator';
import { type GenericStat } from "..";
import { theme } from "../../../stitches.config";
import { PercentileIndicator } from "../../PercentileIndicator";
interface GenericStatsRowProps {
stat: GenericStat;
@@ -10,18 +10,18 @@ export function GenericStatsRow({ stat }: GenericStatsRowProps) {
return (
<div
style={{
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
display: "flex",
justifyContent: "space-between",
alignItems: "center",
}}
>
<span
style={{
color: theme.colors.textLowContrast,
fontSize: 16,
whiteSpace: 'nowrap',
whiteSpace: "nowrap",
maxWidth: 128,
overflow: 'hidden',
overflow: "hidden",
}}
>
{stat[0]}
@@ -32,9 +32,9 @@ export function GenericStatsRow({ stat }: GenericStatsRowProps) {
color: theme.colors.textHighContrast,
fontWeight: 700,
fontSize: 16,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
display: "flex",
alignItems: "center",
justifyContent: "center",
gap: 4,
}}
>
@@ -1,9 +1,9 @@
import { times } from 'lodash-es';
import { ReactNode } from 'react';
import { theme } from '../../../../stitches.config';
import { Margin } from '../Margin';
import { MarginOrientation } from '../Margin/constants';
import { GRAPH_HEIGHT, GRAPH_WIDTH } from './constants';
import { times } from "lodash-es";
import { type ReactNode } from "react";
import { theme } from "../../../../stitches.config";
import { Margin } from "../Margin";
import { MarginOrientation } from "../Margin/constants";
import { GRAPH_HEIGHT, GRAPH_WIDTH } from "./constants";
export interface MarginInputProps {
min: number;
@@ -32,12 +32,12 @@ export function Root({
xTitle,
}: RootProps) {
return (
<div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
<div style={{ display: "flex", flexDirection: "column", gap: 16 }}>
<div
style={{
paddingLeft: 64,
display: 'flex',
justifyContent: 'space-between',
display: "flex",
justifyContent: "space-between",
}}
>
<span style={{ fontSize: 16, color: theme.colors.textHighContrast }}>
@@ -48,7 +48,7 @@ export function Root({
</span>
</div>
<div style={{ display: 'flex', gap: 16 }}>
<div style={{ display: "flex", gap: 16 }}>
{verticalMargin && (
<Margin {...verticalMargin} verticalSeparations={separations} />
)}
@@ -94,9 +94,9 @@ export function Root({
<div
style={{
paddingLeft: 64,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
display: "flex",
alignItems: "center",
justifyContent: "center",
}}
>
<span style={{ fontSize: 16, color: theme.colors.textLowContrast }}>
@@ -1,4 +1,4 @@
import { ReactNode } from 'react';
import { type ReactNode } from 'react';
interface RootProps {
children: ReactNode;