Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,4 @@ FULLAUTO_CONTEXT.md

.claude/settings.local.json
.omx/
.agents/skills
13 changes: 13 additions & 0 deletions app/analysis/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { generateMetadata } from '@/utils/generateMetadata';
import AnalysisView from '@/features/analysis/analysis-view';

export const metadata = generateMetadata({
title: 'Analysis | Monarch',
description: 'Global Morpho market risk, oracle, peg, and asset exposure analysis',
images: 'themes.png',
pathname: '/analysis',
});

export default function AnalysisPage() {
return <AnalysisView />;
}
10 changes: 1 addition & 9 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,7 @@ const nextConfig = {
remotePatterns: [
{
protocol: 'https',
hostname: 'ipfs.io',
},
{
protocol: 'https',
hostname: 'effigy.im',
},
{
protocol: 'https',
hostname: 'api.dicebear.com',
hostname: '**',
},
],
},
Expand Down
90 changes: 90 additions & 0 deletions skills-lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"version": 1,
"skills": {
"adapt": {
"source": "pbakaus/impeccable",
"sourceType": "github",
"computedHash": "65085998d643c3b64ff323ca74d76496b47484046b030730c00c03a0208bf410"
},
"animate": {
"source": "pbakaus/impeccable",
"sourceType": "github",
"computedHash": "354414a934957f9d54a71468abe81888304d35b47a4fe8e27fff08f60b457d53"
},
"audit": {
"source": "pbakaus/impeccable",
"sourceType": "github",
"computedHash": "115a00d21d91d52123115af789948cb22bd604de0084837b5533f5e4af3c4055"
},
"bolder": {
"source": "pbakaus/impeccable",
"sourceType": "github",
"computedHash": "1787478962577c9d5bde26e89e47c1654aa9c8f3c47c316a026731db0000a92e"
},
"clarify": {
"source": "pbakaus/impeccable",
"sourceType": "github",
"computedHash": "42877142fcc51dcc6be696349aa7df8887eb29510e2a5868beac913f5f84de31"
},
"colorize": {
"source": "pbakaus/impeccable",
"sourceType": "github",
"computedHash": "4793ac377b2bc1a5831d9634ce882373350cc5d097fd631d192155266204ceb8"
},
"critique": {
"source": "pbakaus/impeccable",
"sourceType": "github",
"computedHash": "977f6fc3aa1002ec095f649e1b7c4fa52ee08a447f19229062810a9323c5c342"
},
"delight": {
"source": "pbakaus/impeccable",
"sourceType": "github",
"computedHash": "1f6f4adee0b964e8344c0baef46b4e303ab3ba20932907bcbb1444ba7b3273b2"
},
"distill": {
"source": "pbakaus/impeccable",
"sourceType": "github",
"computedHash": "669a671f855be8773e4c2936e54d4243fbd1d273f87633158544efe3dbc4d825"
},
"impeccable": {
"source": "pbakaus/impeccable",
"sourceType": "github",
"computedHash": "a26b3dd377c4572b1c34c68f82ab9a1cb806f21c7157060327fe60e9b6d2e277"
},
"layout": {
"source": "pbakaus/impeccable",
"sourceType": "github",
"computedHash": "6b5fd49587616ca1e594e9c6b11bc1cef5eb0b2d137c307de54a8a650770f4ce"
},
"optimize": {
"source": "pbakaus/impeccable",
"sourceType": "github",
"computedHash": "979ffc76a4345c081fdf89078b7107c216d70696e027b23e8e24972dd4e457b2"
},
"overdrive": {
"source": "pbakaus/impeccable",
"sourceType": "github",
"computedHash": "30e2909c14b9e860b580e63f9bbe10cc1dee8de0be9b03013218c3ef8d9ede78"
},
"polish": {
"source": "pbakaus/impeccable",
"sourceType": "github",
"computedHash": "c294f2570dcc5b8865d17f0dc5ef339a700c868f1b20fa9994297f64ace2d4de"
},
"quieter": {
"source": "pbakaus/impeccable",
"sourceType": "github",
"computedHash": "2c20b12bb4ece445d45fc63bda020aecf78b3cdf6d593beb59c273f658293130"
},
"shape": {
"source": "pbakaus/impeccable",
"sourceType": "github",
"computedHash": "8edad33758f2461f51afdb51741bfcc4cc57d84ea42e2751a84be2c6a2d48f69"
},
"typeset": {
"source": "pbakaus/impeccable",
"sourceType": "github",
"computedHash": "1cd76e560d1ba25b0bd5f7adfa2957a9f653a3ad0b031d467221154fcd1e0423"
}
}
}
2 changes: 1 addition & 1 deletion src/components/DataPrefetcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function DataPrefetcherContent() {
export function DataPrefetcher() {
const pathname = usePathname();

if (pathname?.startsWith('/ui-lab')) {
if (pathname?.startsWith('/ui-lab') || pathname?.startsWith('/analysis')) {
return null;
}

Expand Down
11 changes: 9 additions & 2 deletions src/components/layout/header/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import { ChevronDownIcon } from '@radix-ui/react-icons';
import { clsx } from 'clsx';
import Image from 'next/image';
import Link from 'next/link';
import { usePathname } from 'next/navigation';
import { usePathname, useRouter } from 'next/navigation';
import { useTheme } from 'next-themes';
import { FaRegMoon } from 'react-icons/fa';
import { GearIcon } from '@radix-ui/react-icons';
import { LuSunMedium } from 'react-icons/lu';
import { RiBookLine, RiDiscordFill, RiGithubFill } from 'react-icons/ri';
import { RiBookLine, RiDiscordFill, RiGithubFill, RiPieChart2Line } from 'react-icons/ri';
import { useConnection } from 'wagmi';
import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem } from '@/components/ui/dropdown-menu';
import { useModal } from '@/hooks/useModal';
Expand Down Expand Up @@ -77,6 +77,7 @@ export function NavbarTitle() {
export function Navbar() {
const { theme, setTheme } = useTheme();
const { address } = useConnection();
const router = useRouter();
const { open: openModal } = useModal();
const [mounted, setMounted] = useState(false);
const [isMoreOpen, setIsMoreOpen] = useState(false);
Expand Down Expand Up @@ -167,6 +168,12 @@ export function Navbar() {
align="end"
className="min-w-[180px]"
>
<DropdownMenuItem
endContent={<RiPieChart2Line className="h-4 w-4" />}
onClick={() => router.push('/analysis')}
>
Analysis
</DropdownMenuItem>
<DropdownMenuItem
endContent={<RiBookLine className="h-4 w-4" />}
onClick={() => window.open(EXTERNAL_LINKS.docs, '_blank')}
Expand Down
9 changes: 8 additions & 1 deletion src/components/layout/header/NavbarMobile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { useRouter } from 'next/navigation';
import { useTheme } from 'next-themes';
import { FaRegMoon } from 'react-icons/fa';
import { LuSunMedium } from 'react-icons/lu';
import { RiBookLine, RiDiscordFill, RiGithubFill, RiLineChartLine, RiBriefcaseLine, RiGiftLine } from 'react-icons/ri';
import { RiBookLine, RiDiscordFill, RiGithubFill, RiLineChartLine, RiBriefcaseLine, RiGiftLine, RiPieChart2Line } from 'react-icons/ri';
import { useConnection } from 'wagmi';
import {
DropdownMenu,
Expand Down Expand Up @@ -99,6 +99,13 @@ export default function NavbarMobile() {
>
<span className="font-medium">Markets</span>
</DropdownMenuItem>
<DropdownMenuItem
startContent={<RiPieChart2Line className="h-5 w-5" />}
onClick={() => handleNavigation('/analysis')}
className="py-3"
>
<span className="font-medium">Analysis</span>
</DropdownMenuItem>
<DropdownMenuItem
startContent={<RiBriefcaseLine className="h-5 w-5" />}
onClick={() => handleNavigation(mounted && address ? `/positions/${address}` : '/positions')}
Expand Down
19 changes: 14 additions & 5 deletions src/components/ui/button-group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type ButtonGroupProps = {
value: string;
onChange: (value: ButtonOption['value']) => void;
size?: 'sm' | 'md' | 'lg';
variant?: 'default' | 'primary';
variant?: 'default' | 'primary' | 'compact';
equalWidth?: boolean;
};

Expand All @@ -40,12 +40,21 @@ const variantStyles = {
? 'before:bg-gradient-to-b before:from-white/10 before:to-transparent'
: 'before:bg-gradient-to-b before:from-transparent before:to-black/5',
],
compact: (isSelected: boolean) => [
isSelected ? 'bg-hovered text-primary' : 'bg-transparent text-primary hover:bg-hovered/70',
'border-0 shadow-none',
],
};

export default function ButtonGroup({ options, value, onChange, size = 'md', variant = 'default', equalWidth = false }: ButtonGroupProps) {
const isCompact = variant === 'compact';

return (
<div
className="inline-flex rounded shadow-sm"
className={clsx(
'inline-flex',
isCompact ? 'h-10 overflow-hidden rounded-sm bg-surface shadow-sm' : 'rounded shadow-sm',
)}
role="group"
aria-label="Button group"
>
Expand All @@ -66,11 +75,11 @@ export default function ButtonGroup({ options, value, onChange, size = 'md', var
equalWidth && 'min-w-[3rem] text-center',

// Position-based styles
isFirst ? 'rounded-l' : '-ml-px rounded-none',
isLast ? 'rounded-r' : 'rounded-none',
isCompact ? 'rounded-none' : isFirst ? 'rounded-l' : '-ml-px rounded-none',
!isCompact && (isLast ? 'rounded-r' : 'rounded-none'),

// Variant & State styles
variant === 'default' ? variantStyles.default(isSelected) : variantStyles.primary(isSelected),
variantStyles[variant](isSelected),

// Hover & Focus styles
'hover:relative hover:z-20',
Expand Down
Loading