Skip to content

Commit 0252970

Browse files
ryan-williamsclaude
andcommitted
Remove @rdub/base dependency, destructure Math directly
Replace `import { abs, max, min, ... } from '@rdub/base'` with `const { abs, max, min, ... } = Math` across 12 files. The library was only used for `Math.*` re-exports. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ab23975 commit 0252970

14 files changed

+12
-75
lines changed

www/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
"@floating-ui/react": "^0.27.13",
2727
"@fortawesome/fontawesome-free": "^6.7.2",
2828
"@observablehq/plot": "^0.6.17",
29-
"@rdub/base": "https://gitlab.com/runsascoded/js/base/-/archive/d25db27a5640bdbb1e451955194694b62d5bcf39/base-d25db27a5640bdbb1e451955194694b62d5bcf39.tar.gz",
3029
"@tanstack/react-query": "^5.83.0",
3130
"d3": "^7.9.0",
3231
"hyparquet": "github:runsascoded/hyparquet#6d0c51c423776ef04b21fab9f469fdc05a5dc4dd",

www/pnpm-lock.yaml

Lines changed: 0 additions & 62 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

www/src/components/AggregationControl.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ceil, round } from "@rdub/base"
1+
const { ceil, round } = Math
22
import { KbdModal } from 'use-kbd'
33
import { Tooltip } from './Tooltip'
44
import type { TimeWindow } from '../hooks/useDataAggregation'

www/src/components/AwairChart.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { abs, ceil, max } from "@rdub/base"
1+
const { abs, ceil, max } = Math
22
import { generateDateTicks, Plot, usePlotlyHoverDismiss, useTheme as usePlotTheme } from 'pltly'
33
import { useState, useMemo, useCallback, useEffect, useRef, memo } from 'react'
44
import { useAction, useActions } from 'use-kbd'

www/src/components/DataTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { abs, max, min, round } from '@rdub/base'
1+
const { abs, max, min, round } = Math
22
import { useCallback, useEffect, useMemo, useState } from 'react'
33
import { useAction } from 'use-kbd'
44
import { Tooltip } from './Tooltip'

www/src/components/IntervalSelect.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { floor } from '@rdub/base'
1+
const { floor } = Math
22

33
interface IntervalOption {
44
label: string

www/src/hooks/useDataAggregation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { floor, max, min } from '@rdub/base'
1+
const { floor, max, min } = Math
22
import {
33
aggregate,
44
flattenDateAll,

www/src/hooks/useLatestMode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { abs } from '@rdub/base'
1+
const { abs } = Math
22
import { useRef, useCallback, useMemo } from 'react'
33
import { formatForPlotly } from "../utils/dateFormat"
44
import type { AwairRecord } from '../types/awair'

www/src/hooks/useSmartPolling.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { min } from '@rdub/base'
1+
const { min } = Math
22
import { useCallback, useEffect, useRef, useState } from 'react'
33

44
/**

www/src/hooks/useTimeRangeParam.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { abs, floor, round } from '@rdub/base'
1+
const { abs, floor, round } = Math
22
import { useCallback, useState, useRef, useEffect } from 'react'
33
import { formatForPlotly } from "../utils/dateFormat"
44
import type { AwairRecord } from '../types/awair'

0 commit comments

Comments
 (0)