Skip to content

Commit 19a86d6

Browse files
Miriadupgrade
andcommitted
feat(phase0): merge all Phase 0 branches — complete stack update
Merges 6 Phase 0 branches into a single complete branch: - phase0/prep-cleanup: .env.example, dedup @types, fix biome, remove autoprefixer - phase0/safe-upgrades: 21 safe dep upgrades (Tailwind, Radix, utilities) - phase0/supabase-e2e-ci: Supabase init, Playwright, GitHub Actions CI - phase0/dashboard-restructure: Remove legacy dashboard, scaffold Content Ops - phase0/sanity-v5-react-19: React 19.2, Sanity v5, next-sanity v12 - phase0/nextjs-16: Next.js 16, remove ESLint, consolidate on Biome Post-merge fixes: - react-resizable-panels v4: Updated resizable.tsx wrapper with compat layer (direction→orientation, onLayout→onLayoutChange) - @sanity/image-url v2: Switch to named createImageUrlBuilder import - recharts v3: Fix ChartTooltipContent and ChartLegendContent types - Regenerated pnpm-lock.yaml Build status: TypeScript compilation passes (webpack mode). Note: Turbopack has a known panic bug in Next.js 16.1.6. Note: Full build requires PRIVATE_ALGOLIA_ADMIN_API_KEY env var. Co-authored-by: upgrade <upgrade@miriad.systems>
1 parent fe501a2 commit 19a86d6

File tree

5 files changed

+14755
-34
lines changed

5 files changed

+14755
-34
lines changed

components/ui/chart.tsx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ ${colorConfig
102102

103103
const ChartTooltip = RechartsPrimitive.Tooltip
104104

105+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
106+
type ChartPayloadItem = Record<string, any>
107+
105108
const ChartTooltipContent = React.forwardRef<
106109
HTMLDivElement,
107110
React.ComponentProps<typeof RechartsPrimitive.Tooltip> &
@@ -111,6 +114,12 @@ const ChartTooltipContent = React.forwardRef<
111114
indicator?: "line" | "dot" | "dashed"
112115
nameKey?: string
113116
labelKey?: string
117+
payload?: ChartPayloadItem[]
118+
active?: boolean
119+
label?: string
120+
labelFormatter?: (value: unknown, payload: ChartPayloadItem[]) => React.ReactNode
121+
labelClassName?: string
122+
formatter?: (value: unknown, name: string, item: ChartPayloadItem, index: number, payload: ChartPayloadItem[]) => React.ReactNode
114123
}
115124
>(
116125
(
@@ -188,7 +197,7 @@ const ChartTooltipContent = React.forwardRef<
188197
{payload.map((item, index) => {
189198
const key = `${nameKey || item.name || item.dataKey || "value"}`
190199
const itemConfig = getPayloadConfigFromPayload(config, item, key)
191-
const indicatorColor = color || item.payload.fill || item.color
200+
const indicatorColor = color || item.payload?.fill || item.color
192201

193202
return (
194203
<div
@@ -260,10 +269,11 @@ const ChartLegend = RechartsPrimitive.Legend
260269

261270
const ChartLegendContent = React.forwardRef<
262271
HTMLDivElement,
263-
React.ComponentProps<"div"> &
264-
Pick<RechartsPrimitive.LegendProps, "payload" | "verticalAlign"> & {
272+
React.ComponentProps<"div"> & {
265273
hideIcon?: boolean
266274
nameKey?: string
275+
payload?: Array<{ value?: string; dataKey?: string; color?: string }>
276+
verticalAlign?: "top" | "bottom" | "middle"
267277
}
268278
>(
269279
(

components/ui/resizable.tsx

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,35 @@ import * as ResizablePrimitive from "react-resizable-panels"
55

66
import { cn } from "@/lib/utils"
77

8+
// Compatibility wrapper: maps old `direction` + `onLayout` props to v4 `orientation` + `onLayoutChange`
9+
type ResizablePanelGroupProps = Omit<
10+
React.ComponentProps<typeof ResizablePrimitive.Group>,
11+
"orientation" | "onLayoutChange"
12+
> & {
13+
direction?: "horizontal" | "vertical"
14+
onLayout?: (sizes: number[]) => void
15+
orientation?: "horizontal" | "vertical"
16+
onLayoutChange?: (layout: Record<string, number>) => void
17+
}
18+
819
const ResizablePanelGroup = ({
920
className,
21+
direction,
22+
orientation,
23+
onLayout,
24+
onLayoutChange,
1025
...props
11-
}: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => (
12-
<ResizablePrimitive.PanelGroup
26+
}: ResizablePanelGroupProps) => (
27+
<ResizablePrimitive.Group
28+
orientation={orientation ?? direction ?? "horizontal"}
29+
onLayoutChange={
30+
onLayoutChange ??
31+
(onLayout
32+
? (layout: Record<string, number>) => {
33+
onLayout(Object.values(layout))
34+
}
35+
: undefined)
36+
}
1337
className={cn(
1438
"flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
1539
className
@@ -24,10 +48,10 @@ const ResizableHandle = ({
2448
withHandle,
2549
className,
2650
...props
27-
}: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
51+
}: React.ComponentProps<typeof ResizablePrimitive.Separator> & {
2852
withHandle?: boolean
2953
}) => (
30-
<ResizablePrimitive.PanelResizeHandle
54+
<ResizablePrimitive.Separator
3155
className={cn(
3256
"relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",
3357
className
@@ -39,7 +63,7 @@ const ResizableHandle = ({
3963
<GripVertical className="h-2.5 w-2.5" />
4064
</div>
4165
)}
42-
</ResizablePrimitive.PanelResizeHandle>
66+
</ResizablePrimitive.Separator>
4367
)
4468

4569
export { ResizablePanelGroup, ResizablePanel, ResizableHandle }

0 commit comments

Comments
 (0)