Skip to content

Commit 49d267a

Browse files
authored
Merge pull request #22 from macalinao/igm/fix
Fix packaging and peer dependency issues
2 parents 6c1650e + 92b00ec commit 49d267a

File tree

22 files changed

+308
-182
lines changed

22 files changed

+308
-182
lines changed

.changeset/all-rules-tie.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@macalinao/grill": patch
3+
---
4+
5+
Fix src/ directory not being included in Grill

.changeset/silver-insects-lay.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
"@macalinao/codama-instruction-accounts-dedupe-visitor": patch
3+
"@macalinao/solana-batch-accounts-loader": patch
4+
"@macalinao/codama-renderers-js-esm": patch
5+
"@macalinao/token-metadata-client": patch
6+
"@macalinao/wallet-adapter-compat": patch
7+
"@macalinao/dataloader-es": patch
8+
"@macalinao/zod-solana": patch
9+
"@macalinao/grill-cli": patch
10+
"example-dapp": patch
11+
"@macalinao/grill": patch
12+
---
13+
14+
Clean up dependencies and peer dependencies

.changeset/some-animals-refuse.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
"@macalinao/codama-instruction-accounts-dedupe-visitor": patch
3+
"@macalinao/solana-batch-accounts-loader": patch
4+
"@macalinao/codama-renderers-js-esm": patch
5+
"@macalinao/token-metadata-client": patch
6+
"@macalinao/wallet-adapter-compat": patch
7+
"@macalinao/dataloader-es": patch
8+
"@macalinao/token-utils": patch
9+
"@macalinao/zod-solana": patch
10+
"@macalinao/grill-cli": patch
11+
"example-dapp": patch
12+
"@macalinao/grill": patch
13+
---
14+
15+
Move @types/bun into catalog

.vscode/settings.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@
2020
},
2121
"editor.formatOnSave": true,
2222
"editor.codeActionsOnSave": {
23-
"quickfix.biome": "explicit",
2423
"source.fixAll.eslint": "explicit",
2524
"source.fixAll.biome": "explicit",
26-
"source.organizeImports.biome": "explicit"
25+
"source.action.organizeImports.biome": "explicit"
2726
}
2827
}

apps/example-dapp/package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
"@hookform/resolvers": "^5.2.1",
2222
"@macalinao/grill": "workspace:*",
2323
"@macalinao/wallet-adapter-compat": "workspace:*",
24-
"@radix-ui/react-dialog": "^1.1.14",
25-
"@radix-ui/react-navigation-menu": "^1.2.13",
24+
"@radix-ui/react-dialog": "^1.1.15",
25+
"@radix-ui/react-navigation-menu": "^1.2.14",
2626
"@radix-ui/react-separator": "^1.1.7",
2727
"@radix-ui/react-slot": "^1.2.3",
28-
"@radix-ui/react-tooltip": "^1.2.7",
28+
"@radix-ui/react-tooltip": "^1.2.8",
2929
"@solana-program/system": "^0.7.0",
3030
"@solana-program/token": "^0.5.1",
3131
"@solana-program/token-2022": "^0.4.2",
@@ -34,9 +34,9 @@
3434
"@solana/wallet-adapter-react": "catalog:",
3535
"@solana/wallet-adapter-react-ui": "^0.9.39",
3636
"@solana/wallet-adapter-wallets": "^0.19.37",
37-
"@tailwindcss/vite": "^4.1.11",
37+
"@tailwindcss/vite": "^4.1.12",
3838
"@tanstack/react-query": "catalog:",
39-
"@tanstack/react-router": "^1.131.2",
39+
"@tanstack/react-router": "^1.131.10",
4040
"class-variance-authority": "^0.7.1",
4141
"clsx": "^2.1.1",
4242
"gill": "catalog:",
@@ -53,21 +53,21 @@
5353
"@eslint/js": "^9.33.0",
5454
"@macalinao/eslint-config": "catalog:",
5555
"@macalinao/tsconfig": "catalog:",
56-
"@tanstack/react-query-devtools": "^5.84.2",
57-
"@tanstack/react-router-devtools": "^1.131.2",
58-
"@tanstack/router-plugin": "^1.131.2",
59-
"@types/react": "^19.1.9",
60-
"@types/react-dom": "^19.1.7",
56+
"@tanstack/react-query-devtools": "^5.85.3",
57+
"@tanstack/react-router-devtools": "^1.131.10",
58+
"@tanstack/router-plugin": "^1.131.11",
59+
"@types/react": "catalog:",
60+
"@types/react-dom": "catalog:",
6161
"@vitejs/plugin-react": "^5.0.0",
6262
"eslint": "catalog:",
6363
"eslint-plugin-react-hooks": "^5.2.0",
6464
"eslint-plugin-react-refresh": "^0.4.20",
6565
"globals": "^16.3.0",
66-
"tailwindcss": "^4.1.11",
66+
"tailwindcss": "^4.1.12",
6767
"tw-animate-css": "^1.3.6",
6868
"typescript": "catalog:",
69-
"typescript-eslint": "^8.39.0",
70-
"vite": "^7.1.1",
69+
"typescript-eslint": "^8.39.1",
70+
"vite": "^7.1.2",
7171
"vite-plugin-node-polyfills": "^0.24.0",
7272
"vite-tsconfig-paths": "^5.1.4"
7373
},

apps/example-dapp/src/components/layout/examples/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export const ExamplesLayout: React.FC<ExamplesLayoutProps> = ({
5858
return (
5959
<SidebarProvider defaultOpen={true}>
6060
<div className={cn("flex h-full w-full", className)}>
61-
<Sidebar variant="sidebar" collapsible="icon" topOffset={64}>
61+
<Sidebar variant="sidebar" collapsible="icon" className="top-16">
6262
<SidebarHeader>
6363
<div className="px-3 py-2">
6464
<h2 className="text-lg font-semibold">Examples</h2>

apps/example-dapp/src/components/ui/separator.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import * as SeparatorPrimitive from "@radix-ui/react-separator";
24
import type * as React from "react";
35

apps/example-dapp/src/components/ui/sidebar.tsx

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import { useIsMobile } from "@/hooks/use-mobile";
2323
import { cn } from "@/lib/utils";
2424

2525
const SIDEBAR_COOKIE_NAME = "sidebar_state";
26+
const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
2627
const SIDEBAR_WIDTH = "16rem";
2728
const SIDEBAR_WIDTH_MOBILE = "18rem";
2829
const SIDEBAR_WIDTH_ICON = "3rem";
@@ -67,14 +68,7 @@ function SidebarProvider({
6768

6869
// This is the internal state of the sidebar.
6970
// We use openProp and setOpenProp for control from outside the component.
70-
const [_open, _setOpen] = React.useState(() => {
71-
try {
72-
const stored = localStorage.getItem(SIDEBAR_COOKIE_NAME);
73-
return stored !== null ? stored === "true" : defaultOpen;
74-
} catch {
75-
return defaultOpen;
76-
}
77-
});
71+
const [_open, _setOpen] = React.useState(defaultOpen);
7872
const open = openProp ?? _open;
7973
const setOpen = React.useCallback(
8074
(value: boolean | ((value: boolean) => boolean)) => {
@@ -85,12 +79,9 @@ function SidebarProvider({
8579
_setOpen(openState);
8680
}
8781

88-
// Store the sidebar state in localStorage for persistence
89-
try {
90-
localStorage.setItem(SIDEBAR_COOKIE_NAME, String(openState));
91-
} catch {
92-
// Ignore localStorage errors (e.g., in private browsing mode)
93-
}
82+
// This sets the cookie to keep the sidebar state.
83+
// biome-ignore lint/suspicious/noDocumentCookie: shadcn
84+
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState.toString()}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE.toString()}`;
9485
},
9586
[setOpenProp, open],
9687
);
@@ -168,15 +159,13 @@ function Sidebar({
168159
side = "left",
169160
variant = "sidebar",
170161
collapsible = "offcanvas",
171-
topOffset = 0,
172162
className,
173163
children,
174164
...props
175165
}: React.ComponentProps<"div"> & {
176166
side?: "left" | "right";
177167
variant?: "sidebar" | "floating" | "inset";
178168
collapsible?: "offcanvas" | "icon" | "none";
179-
topOffset?: number;
180169
}) {
181170
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
182171

@@ -244,7 +233,7 @@ function Sidebar({
244233
<div
245234
data-slot="sidebar-container"
246235
className={cn(
247-
"fixed z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",
236+
"fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",
248237
side === "left"
249238
? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]"
250239
: "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
@@ -254,10 +243,6 @@ function Sidebar({
254243
: "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",
255244
className,
256245
)}
257-
style={{
258-
top: `${topOffset.toString()}px`,
259-
height: `calc(100vh - ${topOffset.toString()}px)`,
260-
}}
261246
{...props}
262247
>
263248
<div
@@ -627,7 +612,7 @@ function SidebarMenuSkeleton({
627612
}) {
628613
// Random width between 50 to 90%.
629614
const width = React.useMemo(() => {
630-
return `${String(Math.floor(Math.random() * 40) + 50)}%`;
615+
return `${(Math.floor(Math.random() * 40) + 50).toString()}%`;
631616
}, []);
632617

633618
return (
@@ -741,4 +726,6 @@ export {
741726
SidebarRail,
742727
SidebarSeparator,
743728
SidebarTrigger,
729+
// eslint-disable-next-line react-refresh/only-export-components
730+
useSidebar,
744731
};
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
import { useEffect, useState } from "react";
1+
import * as React from "react";
22

33
const MOBILE_BREAKPOINT = 768;
44

5-
export const useIsMobile = (): boolean => {
6-
const [isMobile, setIsMobile] = useState<boolean>(false);
5+
export function useIsMobile() {
6+
const [isMobile, setIsMobile] = React.useState<boolean | undefined>(
7+
undefined,
8+
);
79

8-
useEffect(() => {
10+
React.useEffect(() => {
911
const mql = window.matchMedia(
10-
`(max-width: ${String(MOBILE_BREAKPOINT - 1)}px)`,
12+
`(max-width: ${(MOBILE_BREAKPOINT - 1).toString()}px)`,
1113
);
1214
const onChange = () => {
1315
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
1416
};
15-
1617
mql.addEventListener("change", onChange);
1718
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
18-
1919
return () => {
2020
mql.removeEventListener("change", onChange);
2121
};
2222
}, []);
2323

24-
return isMobile;
25-
};
24+
return !!isMobile;
25+
}

biome.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/2.1.4/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/2.2.0/schema.json",
33
"vcs": {
44
"enabled": true,
55
"clientKind": "git",
@@ -39,6 +39,7 @@
3939
"useSimplifiedLogicExpression": "error"
4040
},
4141
"suspicious": {
42+
"noUnknownAtRules": "off",
4243
"noDoubleEquals": "error"
4344
},
4445
"style": {

0 commit comments

Comments
 (0)