diff --git a/apps/desktop2/src/app.css b/apps/desktop2/src/app.css index 4511c0a5..821c7fab 100644 --- a/apps/desktop2/src/app.css +++ b/apps/desktop2/src/app.css @@ -24,7 +24,7 @@ input::-ms-clear { } media-controller { - @apply w-full; + @apply w-full overflow-hidden rounded-xl; } @layer utilities { diff --git a/apps/desktop2/src/app.tsx b/apps/desktop2/src/app.tsx index 07b62724..e288989d 100644 --- a/apps/desktop2/src/app.tsx +++ b/apps/desktop2/src/app.tsx @@ -12,6 +12,7 @@ import { locale, platform } from "@tauri-apps/plugin-os"; import { PersistQueryClientProvider } from "@tanstack/react-query-persist-client"; import { createSyncStoragePersister } from "@tanstack/query-sync-storage-persister"; import { routeTree } from "./router.gen"; // auto generated file +import { CancelCircleIcon, CheckCircleIcon, InfoCircleIcon } from "@lume/icons"; const queryClient = new QueryClient({ defaultOptions: { @@ -72,7 +73,16 @@ if (!rootElement.innerHTML) { persistOptions={{ persister }} > - + , + info: , + error: , + }} + closeButton + theme="system" + /> diff --git a/apps/desktop2/src/components/accounts.tsx b/apps/desktop2/src/components/accounts.tsx index de125ef6..34cea162 100644 --- a/apps/desktop2/src/components/accounts.tsx +++ b/apps/desktop2/src/components/accounts.tsx @@ -45,7 +45,8 @@ function Inactive({ pubkey }: { pubkey: string }) { const changeAccount = async (npub: string) => { const select = await ark.load_selected_account(npub); - if (select) navigate({ to: "/$account/home", params: { account: npub } }); + if (select) + navigate({ to: "/$account/home/local", params: { account: npub } }); }; return ( diff --git a/apps/desktop2/src/components/backup.tsx b/apps/desktop2/src/components/backup.tsx index 24f68e55..1f2fa91c 100644 --- a/apps/desktop2/src/components/backup.tsx +++ b/apps/desktop2/src/components/backup.tsx @@ -104,7 +104,7 @@ export function BackupDialog() { ) : ( - + {({ isActive }) => (
{ - const events = await ark.get_events( - "local", - FETCH_LIMIT, - pageParam, - true, - ); - return events; - }, - getNextPageParam: (lastPage) => { - const lastEvent = lastPage?.at(-1); - if (!lastEvent) return; - return lastEvent.created_at - 1; - }, - select: (data) => data?.pages.flatMap((page) => page), - refetchOnWindowFocus: false, - }); - - const renderItem = (event: Event) => { - if (!event) return; - switch (event.kind) { - case Kind.Repost: - return ; - default: - return ; - } - }; - - return ( -
-
-

- {currentDate} -

-
- -
-
-
-
- {isLoading || isRefetching ? ( -
- -
- ) : !data.length ? ( -
-
- -

- Empty newsfeed. Or you can go to{" "} - - Discover - -

-
- -
- ) : ( - - {data.map((item) => renderItem(item))} - - )} -
- {hasNextPage ? ( - - ) : null} -
-
-
-
- ); -} diff --git a/apps/desktop2/src/routes/$account/home.tsx b/apps/desktop2/src/routes/$account/home.tsx new file mode 100644 index 00000000..fd13d9e5 --- /dev/null +++ b/apps/desktop2/src/routes/$account/home.tsx @@ -0,0 +1,68 @@ +import { GlobalIcon, LocalIcon, RefreshIcon } from "@lume/icons"; +import { cn } from "@lume/utils"; +import { useQueryClient } from "@tanstack/react-query"; +import { Link } from "@tanstack/react-router"; +import { Outlet, createFileRoute } from "@tanstack/react-router"; + +export const Route = createFileRoute("/$account/home")({ + component: Screen, +}); + +function Screen() { + const queryClient = useQueryClient(); + const { account } = Route.useParams(); + + const refresh = async () => { + const queryKey = `${window.location.pathname.split("/").at(-1)}_newsfeed`; + await queryClient.refetchQueries({ queryKey: [queryKey, account] }); + }; + + return ( +
+
+
+ + {({ isActive }) => ( +
+ + Local +
+ )} + + + {({ isActive }) => ( +
+ + Global +
+ )} + +
+
+ +
+
+ +
+ ); +} diff --git a/apps/desktop2/src/routes/$account/home/global.lazy.tsx b/apps/desktop2/src/routes/$account/home/global.lazy.tsx new file mode 100644 index 00000000..bd8c6772 --- /dev/null +++ b/apps/desktop2/src/routes/$account/home/global.lazy.tsx @@ -0,0 +1,91 @@ +import { RepostNote } from "@/components/repost"; +import { Suggest } from "@/components/suggest"; +import { TextNote } from "@/components/text"; +import { useArk } from "@lume/ark"; +import { LoaderIcon, ArrowRightCircleIcon, InfoIcon } from "@lume/icons"; +import { Event, Kind } from "@lume/types"; +import { FETCH_LIMIT } from "@lume/utils"; +import { useInfiniteQuery } from "@tanstack/react-query"; +import { createLazyFileRoute } from "@tanstack/react-router"; +import { Virtualizer } from "virtua"; + +export const Route = createLazyFileRoute("/$account/home/global")({ + component: Screen, +}); + +function Screen() { + const ark = useArk(); + const { account } = Route.useParams(); + const { + data, + hasNextPage, + isLoading, + isRefetching, + isFetchingNextPage, + fetchNextPage, + } = useInfiniteQuery({ + queryKey: ["global_newsfeed", account], + initialPageParam: 0, + queryFn: async ({ pageParam }: { pageParam: number }) => { + const events = await ark.get_events( + "global", + FETCH_LIMIT, + pageParam, + true, + ); + return events; + }, + getNextPageParam: (lastPage) => { + const lastEvent = lastPage?.at(-1); + if (!lastEvent) return; + return lastEvent.created_at - 1; + }, + select: (data) => data?.pages.flatMap((page) => page), + refetchOnWindowFocus: false, + }); + + const renderItem = (event: Event) => { + if (!event) return; + switch (event.kind) { + case Kind.Repost: + return ; + default: + return ; + } + }; + + return ( +
+
+ {isLoading || isRefetching ? ( +
+ +
+ ) : ( + + {data.map((item) => renderItem(item))} + + )} +
+ {hasNextPage ? ( + + ) : null} +
+
+
+ ); +} diff --git a/apps/desktop2/src/routes/$account/home/local.lazy.tsx b/apps/desktop2/src/routes/$account/home/local.lazy.tsx new file mode 100644 index 00000000..b815cf3c --- /dev/null +++ b/apps/desktop2/src/routes/$account/home/local.lazy.tsx @@ -0,0 +1,108 @@ +import { RepostNote } from "@/components/repost"; +import { Suggest } from "@/components/suggest"; +import { TextNote } from "@/components/text"; +import { useArk } from "@lume/ark"; +import { LoaderIcon, ArrowRightCircleIcon, InfoIcon } from "@lume/icons"; +import { Event, Kind } from "@lume/types"; +import { FETCH_LIMIT } from "@lume/utils"; +import { useInfiniteQuery } from "@tanstack/react-query"; +import { Link } from "@tanstack/react-router"; +import { createLazyFileRoute } from "@tanstack/react-router"; +import { Virtualizer } from "virtua"; + +export const Route = createLazyFileRoute("/$account/home/local")({ + component: Screen, +}); + +function Screen() { + const ark = useArk(); + const { account } = Route.useParams(); + const { + data, + hasNextPage, + isLoading, + isRefetching, + isFetchingNextPage, + fetchNextPage, + } = useInfiniteQuery({ + queryKey: ["local_newsfeed", account], + initialPageParam: 0, + queryFn: async ({ pageParam }: { pageParam: number }) => { + const events = await ark.get_events( + "local", + FETCH_LIMIT, + pageParam, + true, + ); + return events; + }, + getNextPageParam: (lastPage) => { + const lastEvent = lastPage?.at(-1); + if (!lastEvent) return; + return lastEvent.created_at - 1; + }, + select: (data) => data?.pages.flatMap((page) => page), + refetchOnWindowFocus: false, + }); + + const renderItem = (event: Event) => { + if (!event) return; + switch (event.kind) { + case Kind.Repost: + return ; + default: + return ; + } + }; + + return ( +
+
+ {isLoading || isRefetching ? ( +
+ +
+ ) : !data.length ? ( +
+
+ +

+ Empty newsfeed. Or you view the{" "} + + Global Newsfeed + +

+
+ +
+ ) : ( + + {data.map((item) => renderItem(item))} + + )} +
+ {hasNextPage ? ( + + ) : null} +
+
+
+ ); +} diff --git a/apps/desktop2/src/routes/auth/create/self.lazy.tsx b/apps/desktop2/src/routes/auth/create/self.lazy.tsx index 8549ed6a..547045f1 100644 --- a/apps/desktop2/src/routes/auth/create/self.lazy.tsx +++ b/apps/desktop2/src/routes/auth/create/self.lazy.tsx @@ -26,7 +26,7 @@ function Create() { try { await ark.save_account(keys); navigate({ - to: "/$account/home", + to: "/$account/home/local", params: { account: keys.npub }, search: { onboarding: true }, replace: true, diff --git a/apps/desktop2/src/routes/auth/import.lazy.tsx b/apps/desktop2/src/routes/auth/import.lazy.tsx index 08f361e5..3de95d31 100644 --- a/apps/desktop2/src/routes/auth/import.lazy.tsx +++ b/apps/desktop2/src/routes/auth/import.lazy.tsx @@ -32,7 +32,7 @@ function Import() { nsec: key, }); navigate({ - to: "/$account/home", + to: "/$account/home/local", params: { account: npub }, search: { onboarding: true }, replace: true, diff --git a/apps/desktop2/src/routes/index.tsx b/apps/desktop2/src/routes/index.tsx index 98d6fa86..49d14601 100644 --- a/apps/desktop2/src/routes/index.tsx +++ b/apps/desktop2/src/routes/index.tsx @@ -15,7 +15,7 @@ export const Route = createFileRoute("/")({ case 0: const guest = await ark.create_guest_account(); throw redirect({ - to: "/$account/home", + to: "/$account/home/local", params: { account: guest }, search: { guest: true }, replace: true, @@ -26,7 +26,7 @@ export const Route = createFileRoute("/")({ const loadAccount = await ark.load_selected_account(account); if (loadAccount) { throw redirect({ - to: "/$account/home", + to: "/$account/home/local", params: { account }, replace: true, }); @@ -50,7 +50,7 @@ function Screen() { const loadAccount = await ark.load_selected_account(npub); if (loadAccount) { navigate({ - to: "/$account/home", + to: "/$account/home/local", params: { account: npub }, replace: true, }); diff --git a/apps/desktop2/src/routes/users/-components/eventList.tsx b/apps/desktop2/src/routes/users/-components/eventList.tsx index eabaada2..d07953e4 100644 --- a/apps/desktop2/src/routes/users/-components/eventList.tsx +++ b/apps/desktop2/src/routes/users/-components/eventList.tsx @@ -1,9 +1,8 @@ import { TextNote } from "@/components/text"; import { RepostNote } from "@/components/repost"; import { useArk } from "@lume/ark"; -import { ArrowRightCircleIcon, LoaderIcon } from "@lume/icons"; +import { ArrowRightCircleIcon, InfoIcon, LoaderIcon } from "@lume/icons"; import { Event, Kind } from "@lume/types"; -import { EmptyFeed } from "@lume/ui"; import { FETCH_LIMIT } from "@lume/utils"; import { useInfiniteQuery } from "@tanstack/react-query"; @@ -43,7 +42,10 @@ export function EventList({ id }: { id: string }) {
) : !data.length ? ( - +
+ +

Empty newsfeed.

+
) : ( data.map((item) => renderItem(item)) )} diff --git a/packages/icons/index.ts b/packages/icons/index.ts index 19a36255..c8c62141 100644 --- a/packages/icons/index.ts +++ b/packages/icons/index.ts @@ -116,3 +116,7 @@ export * from "./src/arrowUp"; export * from "./src/arrowUpSquare"; export * from "./src/arrowDown"; export * from "./src/link"; +export * from "./src/local"; +export * from "./src/global"; +export * from "./src/infoCircle"; +export * from "./src/cancelCircle"; diff --git a/packages/icons/src/cancelCircle.tsx b/packages/icons/src/cancelCircle.tsx new file mode 100644 index 00000000..6b80a906 --- /dev/null +++ b/packages/icons/src/cancelCircle.tsx @@ -0,0 +1,12 @@ +export function CancelCircleIcon(props: JSX.IntrinsicElements["svg"]) { + return ( + + + + ); +} diff --git a/packages/icons/src/checkCircle.tsx b/packages/icons/src/checkCircle.tsx index 62d5b59f..0cf81789 100644 --- a/packages/icons/src/checkCircle.tsx +++ b/packages/icons/src/checkCircle.tsx @@ -1,22 +1,15 @@ -import { SVGProps } from 'react'; +import { SVGProps } from "react"; export function CheckCircleIcon( - props: JSX.IntrinsicAttributes & SVGProps + props: JSX.IntrinsicAttributes & SVGProps, ) { return ( - + ); diff --git a/packages/icons/src/global.tsx b/packages/icons/src/global.tsx new file mode 100644 index 00000000..d224cb9f --- /dev/null +++ b/packages/icons/src/global.tsx @@ -0,0 +1,14 @@ +export function GlobalIcon(props: JSX.IntrinsicElements["svg"]) { + return ( + + + + + ); +} diff --git a/packages/icons/src/infoCircle.tsx b/packages/icons/src/infoCircle.tsx new file mode 100644 index 00000000..4a51fbc6 --- /dev/null +++ b/packages/icons/src/infoCircle.tsx @@ -0,0 +1,16 @@ +import { SVGProps } from "react"; + +export function InfoCircleIcon( + props: JSX.IntrinsicAttributes & SVGProps, +) { + return ( + + + + ); +} diff --git a/packages/icons/src/local.tsx b/packages/icons/src/local.tsx new file mode 100644 index 00000000..25ff30ee --- /dev/null +++ b/packages/icons/src/local.tsx @@ -0,0 +1,14 @@ +export function LocalIcon(props: JSX.IntrinsicElements["svg"]) { + return ( + + + + + ); +} diff --git a/packages/ui/src/box.tsx b/packages/ui/src/box.tsx index 6681deac..5b4b4467 100644 --- a/packages/ui/src/box.tsx +++ b/packages/ui/src/box.tsx @@ -13,7 +13,7 @@ export function Box({
diff --git a/packages/ui/src/emptyFeed.tsx b/packages/ui/src/emptyFeed.tsx deleted file mode 100644 index 60479726..00000000 --- a/packages/ui/src/emptyFeed.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import { InfoIcon } from "@lume/icons"; -import { cn } from "@lume/utils"; -import { useTranslation } from "react-i18next"; - -export function EmptyFeed({ - text, - subtext, - className, -}: { - text?: string; - subtext?: string; - className?: string; -}) { - const { t } = useTranslation(); - - return ( -
- -
-

- {text ? text : t("global.emptyFeedTitle")} -

-

- {subtext ? subtext : t("global.emptyFeedSubtitle")} -

-
-
- ); -} diff --git a/packages/ui/src/index.ts b/packages/ui/src/index.ts index 8c409699..566e7dcb 100644 --- a/packages/ui/src/index.ts +++ b/packages/ui/src/index.ts @@ -1,7 +1,6 @@ export * from "./user"; export * from "./note"; export * from "./column"; -export * from "./emptyFeed"; // UI export * from "./container"; diff --git a/packages/ui/src/note/content.tsx b/packages/ui/src/note/content.tsx index 8cdd3375..21d87b88 100644 --- a/packages/ui/src/note/content.tsx +++ b/packages/ui/src/note/content.tsx @@ -5,7 +5,6 @@ import { NOSTR_EVENTS, NOSTR_MENTIONS, VIDEOS, - canPreview, cn, } from "@lume/utils"; import { NIP89 } from "./nip89"; @@ -18,7 +17,6 @@ import { MentionNote } from "./mentions/note"; import { Hashtag } from "./mentions/hashtag"; import { VideoPreview } from "./preview/video"; import { stripHtml } from "string-strip-html"; -import getUrl from "get-urls"; import { ImagePreview } from "./preview/image"; export function NoteContent({ className }: { className?: string }) { @@ -26,7 +24,6 @@ export function NoteContent({ className }: { className?: string }) { const content = useMemo(() => { const text = stripHtml(event.content.trim()).result; const words = text.split(/( |\n)/); - const urls = [...getUrl(text)]; // @ts-ignore, kaboom !!! let parsedContent: ReactNode[] = text; diff --git a/packages/ui/src/note/menu.tsx b/packages/ui/src/note/menu.tsx index bc0e8d90..4f36250a 100644 --- a/packages/ui/src/note/menu.tsx +++ b/packages/ui/src/note/menu.tsx @@ -4,6 +4,7 @@ import { writeText } from "@tauri-apps/plugin-clipboard-manager"; import { useTranslation } from "react-i18next"; import { useNoteContext } from "./provider"; import { useArk } from "@lume/ark"; +import { toast } from "sonner"; export function NoteMenu() { const ark = useArk(); @@ -13,20 +14,24 @@ export function NoteMenu() { const copyID = async () => { await writeText(await ark.event_to_bech32(event.id, [""])); + toast.success("Copied"); }; const copyRaw = async () => { await writeText(JSON.stringify(event)); + toast.success("Copied"); }; const copyNpub = async () => { await writeText(await ark.user_to_bech32(event.pubkey, [""])); + toast.success("Copied"); }; const copyLink = async () => { await writeText( `https://njump.me/${await ark.event_to_bech32(event.id, [""])}`, ); + toast.success("Copied"); }; return ( diff --git a/packages/ui/src/note/preview/image.tsx b/packages/ui/src/note/preview/image.tsx index 139b9ee4..e3668be9 100644 --- a/packages/ui/src/note/preview/image.tsx +++ b/packages/ui/src/note/preview/image.tsx @@ -37,7 +37,7 @@ export function ImagePreview({ url }: { url: string }) { // biome-ignore lint/a11y/useKeyWithClickEvents:
- + diff --git a/packages/ui/src/note/root.tsx b/packages/ui/src/note/root.tsx index c7aeb70e..7d06469f 100644 --- a/packages/ui/src/note/root.tsx +++ b/packages/ui/src/note/root.tsx @@ -2,18 +2,15 @@ import { cn } from "@lume/utils"; import { ReactNode } from "react"; export function NoteRoot({ - children, - className, + children, + className, }: { - children: ReactNode; - className?: string; + children: ReactNode; + className?: string; }) { - return ( -
- {children} -
- ); + return ( +
+ {children} +
+ ); } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 57a975da..9993e337 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -874,19 +874,19 @@ importers: version: 1.0.4(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) '@radix-ui/react-collapsible': specifier: ^1.0.3 - version: 1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + version: 1.0.3(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) '@radix-ui/react-dialog': specifier: ^1.0.5 - version: 1.0.5(@types/react-dom@18.2.19)(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + version: 1.0.5(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) '@radix-ui/react-dropdown-menu': specifier: ^2.0.6 - version: 2.0.6(@types/react-dom@18.2.19)(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + version: 2.0.6(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) '@radix-ui/react-hover-card': specifier: ^1.0.7 version: 1.0.7(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) '@radix-ui/react-popover': specifier: ^1.0.7 - version: 1.0.7(@types/react-dom@18.2.19)(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + version: 1.0.7(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) '@radix-ui/react-tooltip': specifier: ^1.0.7 version: 1.0.7(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) @@ -1885,13 +1885,13 @@ packages: dependencies: '@babel/runtime': 7.24.0 '@radix-ui/primitive': 1.0.1 - '@radix-ui/react-collapsible': 1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-collection': 1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-collapsible': 1.0.3(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-collection': 1.0.3(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.61)(react@18.2.0) '@radix-ui/react-context': 1.0.1(@types/react@18.2.61)(react@18.2.0) '@radix-ui/react-direction': 1.0.1(@types/react@18.2.61)(react@18.2.0) '@radix-ui/react-id': 1.0.1(@types/react@18.2.61)(react@18.2.0) - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.2.61)(react@18.2.0) '@types/react': 18.2.61 react: 18.2.0 @@ -1915,8 +1915,8 @@ packages: '@radix-ui/primitive': 1.0.1 '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.61)(react@18.2.0) '@radix-ui/react-context': 1.0.1(@types/react@18.2.61)(react@18.2.0) - '@radix-ui/react-dialog': 1.0.5(@types/react-dom@18.2.19)(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-dialog': 1.0.5(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) '@radix-ui/react-slot': 1.0.2(@types/react@18.2.61)(react@18.2.0) '@types/react': 18.2.61 react: 18.2.0 @@ -1944,6 +1944,26 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: false + /@radix-ui/react-arrow@1.0.3(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-wSP+pHsB/jQRaL6voubsQ/ZlrGBHHrOjmBnr19hxYgtS0WvAFwZhK2WP/YY5yF9uKECCEEDGxuLxq1NBK51wFA==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + dependencies: + '@babel/runtime': 7.24.0 + '@radix-ui/react-primitive': 1.0.3(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@types/react': 18.2.61 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: false + /@radix-ui/react-avatar@1.0.4(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-kVK2K7ZD3wwj3qhle0ElXhOjbezIgyl2hVvgwfIdexL3rN6zJmy5AqqIf+D31lxVppdzV8CjAfZ6PklkmInZLw==} peerDependencies: @@ -1959,7 +1979,7 @@ packages: dependencies: '@babel/runtime': 7.24.0 '@radix-ui/react-context': 1.0.1(@types/react@18.2.61)(react@18.2.0) - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.61)(react@18.2.0) '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.2.61)(react@18.2.0) '@types/react': 18.2.61 @@ -2023,6 +2043,33 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: false + /@radix-ui/react-collapsible@1.0.3(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-UBmVDkmR6IvDsloHVN+3rtx4Mi5TFvylYXpluuv0f37dtaz3H99bp8No0LGXRigVpl3UAT4l9j6bIchh42S/Gg==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + dependencies: + '@babel/runtime': 7.24.0 + '@radix-ui/primitive': 1.0.1 + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-context': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-id': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-presence': 1.0.1(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@types/react': 18.2.61 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: false + /@radix-ui/react-collection@1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-3SzW+0PW7yBBoQlT8wNcGtaxaD0XSu0uLUFgrtHY08Acx05TaHaOmVLR73c0j/cqpDy53KBMO7s0dx2wmOIDIA==} peerDependencies: @@ -2047,6 +2094,29 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: false + /@radix-ui/react-collection@1.0.3(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-3SzW+0PW7yBBoQlT8wNcGtaxaD0XSu0uLUFgrtHY08Acx05TaHaOmVLR73c0j/cqpDy53KBMO7s0dx2wmOIDIA==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + dependencies: + '@babel/runtime': 7.24.0 + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-context': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-slot': 1.0.2(@types/react@18.2.61)(react@18.2.0) + '@types/react': 18.2.61 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: false + /@radix-ui/react-compose-refs@1.0.1(@types/react@18.2.61)(react@18.2.0): resolution: {integrity: sha512-fDSBgd44FKHa1FRMU59qBMPFcl2PZE+2nmqunj+BWFyYYjnhIDWL2ItDs3rrbJDQOtzt5nIebLCQc4QRfz6LJw==} peerDependencies: @@ -2109,6 +2179,39 @@ packages: react-remove-scroll: 2.5.5(@types/react@18.2.61)(react@18.2.0) dev: false + /@radix-ui/react-dialog@1.0.5(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-GjWJX/AUpB703eEBanuBnIWdIXg6NvJFCXcNlSZk4xdszCdhrJgBoUd1cGk67vFO+WdA2pfI/plOpqz/5GUP6Q==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + dependencies: + '@babel/runtime': 7.24.0 + '@radix-ui/primitive': 1.0.1 + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-context': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-dismissable-layer': 1.0.5(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-focus-guards': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-focus-scope': 1.0.4(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-id': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-portal': 1.0.4(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-presence': 1.0.1(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-slot': 1.0.2(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@types/react': 18.2.61 + aria-hidden: 1.2.3 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + react-remove-scroll: 2.5.5(@types/react@18.2.61)(react@18.2.0) + dev: false + /@radix-ui/react-direction@1.0.1(@types/react@18.2.61)(react@18.2.0): resolution: {integrity: sha512-RXcvnXgyvYvBEOhCBuddKecVkoMiI10Jcm5cTI7abJRAHYfFxeu+FBQs/DvdxSYucxR5mna0dNsL6QFlds5TMA==} peerDependencies: @@ -2148,6 +2251,30 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: false + /@radix-ui/react-dismissable-layer@1.0.5(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-aJeDjQhywg9LBu2t/At58hCvr7pEm0o2Ke1x33B+MhjNmmZ17sy4KImo0KPLgsnc/zN7GPdce8Cnn0SWvwZO7g==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + dependencies: + '@babel/runtime': 7.24.0 + '@radix-ui/primitive': 1.0.1 + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-use-escape-keydown': 1.0.3(@types/react@18.2.61)(react@18.2.0) + '@types/react': 18.2.61 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: false + /@radix-ui/react-dropdown-menu@2.0.6(@types/react-dom@18.2.19)(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-i6TuFOoWmLWq+M/eCLGd/bQ2HfAX1RJgvrBQ6AQLmzfvsLdefxbWu8G9zczcPFfcSPehz9GcpF6K9QYreFV8hA==} peerDependencies: @@ -2175,6 +2302,32 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: false + /@radix-ui/react-dropdown-menu@2.0.6(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-i6TuFOoWmLWq+M/eCLGd/bQ2HfAX1RJgvrBQ6AQLmzfvsLdefxbWu8G9zczcPFfcSPehz9GcpF6K9QYreFV8hA==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + dependencies: + '@babel/runtime': 7.24.0 + '@radix-ui/primitive': 1.0.1 + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-context': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-id': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-menu': 2.0.6(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@types/react': 18.2.61 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: false + /@radix-ui/react-focus-guards@1.0.1(@types/react@18.2.61)(react@18.2.0): resolution: {integrity: sha512-Rect2dWbQ8waGzhMavsIbmSVCgYxkXLxxR3ZvCX79JOglzdEy4JXMb98lq4hPxUbLr77nP0UOGf4rcMU+s1pUA==} peerDependencies: @@ -2212,6 +2365,28 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: false + /@radix-ui/react-focus-scope@1.0.4(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-sL04Mgvf+FmyvZeYfNu1EPAaaxD+aw7cYeIB9L9Fvq8+urhltTRaEo5ysKOpHuKPclsZcSUMKlN05x4u+CINpA==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + dependencies: + '@babel/runtime': 7.24.0 + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@types/react': 18.2.61 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: false + /@radix-ui/react-hover-card@1.0.7(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-OcUN2FU0YpmajD/qkph3XzMcK/NmSk9hGWnjV68p6QiZMgILugusgQwnLSDs3oFSJYGKf3Y49zgFedhGh04k9A==} peerDependencies: @@ -2229,11 +2404,11 @@ packages: '@radix-ui/primitive': 1.0.1 '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.61)(react@18.2.0) '@radix-ui/react-context': 1.0.1(@types/react@18.2.61)(react@18.2.0) - '@radix-ui/react-dismissable-layer': 1.0.5(@types/react-dom@18.2.19)(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-popper': 1.1.3(@types/react-dom@18.2.19)(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-portal': 1.0.4(@types/react-dom@18.2.19)(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-presence': 1.0.1(@types/react-dom@18.2.19)(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-dismissable-layer': 1.0.5(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-popper': 1.1.3(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-portal': 1.0.4(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-presence': 1.0.1(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.2.61)(react@18.2.0) '@types/react': 18.2.61 react: 18.2.0 @@ -2293,6 +2468,43 @@ packages: react-remove-scroll: 2.5.5(@types/react@18.2.61)(react@18.2.0) dev: false + /@radix-ui/react-menu@2.0.6(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-BVkFLS+bUC8HcImkRKPSiVumA1VPOOEC5WBMiT+QAVsPzW1FJzI9KnqgGxVDPBcql5xXrHkD3JOVoXWEXD8SYA==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + dependencies: + '@babel/runtime': 7.24.0 + '@radix-ui/primitive': 1.0.1 + '@radix-ui/react-collection': 1.0.3(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-context': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-direction': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-dismissable-layer': 1.0.5(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-focus-guards': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-focus-scope': 1.0.4(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-id': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-popper': 1.1.3(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-portal': 1.0.4(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-presence': 1.0.1(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-roving-focus': 1.0.4(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-slot': 1.0.2(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@types/react': 18.2.61 + aria-hidden: 1.2.3 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + react-remove-scroll: 2.5.5(@types/react@18.2.61)(react@18.2.0) + dev: false + /@radix-ui/react-popover@1.0.7(@types/react-dom@18.2.19)(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-shtvVnlsxT6faMnK/a7n0wptwBD23xc1Z5mdrtKLwVEfsEMXodS0r5s0/g5P0hX//EKYZS2sxUjqfzlg52ZSnQ==} peerDependencies: @@ -2328,6 +2540,40 @@ packages: react-remove-scroll: 2.5.5(@types/react@18.2.61)(react@18.2.0) dev: false + /@radix-ui/react-popover@1.0.7(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-shtvVnlsxT6faMnK/a7n0wptwBD23xc1Z5mdrtKLwVEfsEMXodS0r5s0/g5P0hX//EKYZS2sxUjqfzlg52ZSnQ==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + dependencies: + '@babel/runtime': 7.24.0 + '@radix-ui/primitive': 1.0.1 + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-context': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-dismissable-layer': 1.0.5(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-focus-guards': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-focus-scope': 1.0.4(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-id': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-popper': 1.1.3(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-portal': 1.0.4(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-presence': 1.0.1(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-slot': 1.0.2(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@types/react': 18.2.61 + aria-hidden: 1.2.3 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + react-remove-scroll: 2.5.5(@types/react@18.2.61)(react@18.2.0) + dev: false + /@radix-ui/react-popper@1.1.3(@types/react-dom@18.2.19)(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-cKpopj/5RHZWjrbF2846jBNacjQVwkP068DfmgrNJXpvVWrOvlAmE9xSiy5OqeE+Gi8D9fP+oDhUnPqNMY8/5w==} peerDependencies: @@ -2358,6 +2604,35 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: false + /@radix-ui/react-popper@1.1.3(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-cKpopj/5RHZWjrbF2846jBNacjQVwkP068DfmgrNJXpvVWrOvlAmE9xSiy5OqeE+Gi8D9fP+oDhUnPqNMY8/5w==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + dependencies: + '@babel/runtime': 7.24.0 + '@floating-ui/react-dom': 2.0.8(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-arrow': 1.0.3(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-context': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-use-rect': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-use-size': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/rect': 1.0.1 + '@types/react': 18.2.61 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: false + /@radix-ui/react-portal@1.0.4(@types/react-dom@18.2.19)(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-Qki+C/EuGUVCQTOTD5vzJzJuMUlewbzuKyUy+/iHM2uwGiru9gZeBJtHAPKAEkB5KWGi9mP/CHKcY0wt1aW45Q==} peerDependencies: @@ -2379,6 +2654,26 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: false + /@radix-ui/react-portal@1.0.4(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-Qki+C/EuGUVCQTOTD5vzJzJuMUlewbzuKyUy+/iHM2uwGiru9gZeBJtHAPKAEkB5KWGi9mP/CHKcY0wt1aW45Q==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + dependencies: + '@babel/runtime': 7.24.0 + '@radix-ui/react-primitive': 1.0.3(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@types/react': 18.2.61 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: false + /@radix-ui/react-presence@1.0.1(@types/react-dom@18.2.19)(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-UXLW4UAbIY5ZjcvzjfRFo5gxva8QirC9hF7wRE4U5gz+TP0DbRk+//qyuAQ1McDxBt1xNMBTaciFGvEmJvAZCg==} peerDependencies: @@ -2401,6 +2696,27 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: false + /@radix-ui/react-presence@1.0.1(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-UXLW4UAbIY5ZjcvzjfRFo5gxva8QirC9hF7wRE4U5gz+TP0DbRk+//qyuAQ1McDxBt1xNMBTaciFGvEmJvAZCg==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + dependencies: + '@babel/runtime': 7.24.0 + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@types/react': 18.2.61 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: false + /@radix-ui/react-primitive@1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-yi58uVyoAcK/Nq1inRY56ZSjKypBNKTa/1mcL8qdl6oJeEaDbOldlzrGn7P6Q3Id5d+SYNGc5AJgc4vGhjs5+g==} peerDependencies: @@ -2422,6 +2738,26 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: false + /@radix-ui/react-primitive@1.0.3(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-yi58uVyoAcK/Nq1inRY56ZSjKypBNKTa/1mcL8qdl6oJeEaDbOldlzrGn7P6Q3Id5d+SYNGc5AJgc4vGhjs5+g==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + dependencies: + '@babel/runtime': 7.24.0 + '@radix-ui/react-slot': 1.0.2(@types/react@18.2.61)(react@18.2.0) + '@types/react': 18.2.61 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: false + /@radix-ui/react-roving-focus@1.0.4(@types/react-dom@18.2.19)(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-2mUg5Mgcu001VkGy+FfzZyzbmuUWzgWkj3rvv4yu+mLw03+mTzbxZHvfcGyFp2b8EkQeMkpRQ5FiA2Vr2O6TeQ==} peerDependencies: @@ -2451,6 +2787,34 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: false + /@radix-ui/react-roving-focus@1.0.4(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-2mUg5Mgcu001VkGy+FfzZyzbmuUWzgWkj3rvv4yu+mLw03+mTzbxZHvfcGyFp2b8EkQeMkpRQ5FiA2Vr2O6TeQ==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + dependencies: + '@babel/runtime': 7.24.0 + '@radix-ui/primitive': 1.0.1 + '@radix-ui/react-collection': 1.0.3(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-context': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-direction': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-id': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.2.61)(react@18.2.0) + '@types/react': 18.2.61 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: false + /@radix-ui/react-slot@1.0.2(@types/react@18.2.61)(react@18.2.0): resolution: {integrity: sha512-YeTpuq4deV+6DusvVUW4ivBgnkHwECUu0BiN43L5UCDFgdhsRUWAghhTF5MbvNTPzmiFOx90asDSUjWuCNapwg==} peerDependencies: @@ -2483,12 +2847,12 @@ packages: '@radix-ui/primitive': 1.0.1 '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.61)(react@18.2.0) '@radix-ui/react-context': 1.0.1(@types/react@18.2.61)(react@18.2.0) - '@radix-ui/react-dismissable-layer': 1.0.5(@types/react-dom@18.2.19)(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-dismissable-layer': 1.0.5(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) '@radix-ui/react-id': 1.0.1(@types/react@18.2.61)(react@18.2.0) - '@radix-ui/react-popper': 1.1.3(@types/react-dom@18.2.19)(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-portal': 1.0.4(@types/react-dom@18.2.19)(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-presence': 1.0.1(@types/react-dom@18.2.19)(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-popper': 1.1.3(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-portal': 1.0.4(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-presence': 1.0.1(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) '@radix-ui/react-slot': 1.0.2(@types/react@18.2.61)(react@18.2.0) '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.2.61)(react@18.2.0) '@radix-ui/react-visually-hidden': 1.0.3(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) @@ -2613,7 +2977,7 @@ packages: optional: true dependencies: '@babel/runtime': 7.24.0 - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.19)(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0) '@types/react': 18.2.61 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 752ea184..91b54505 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -22,7 +22,6 @@ fn main() { .setup(|app| { let _tray = tray::create_tray(app.handle()).unwrap(); let handle = app.handle().clone(); - let resource_dir = handle.path().resource_dir().unwrap(); let home_dir = handle.path().home_dir().unwrap(); // create data folder if not exist @@ -30,12 +29,13 @@ fn main() { tauri::async_runtime::spawn(async move { // Create nostr database connection - let nostr_db = SQLiteDatabase::open(resource_dir.join("lume.db")) - .await - .expect("Open database failed."); + let sqlite = SQLiteDatabase::open(home_dir.join("Lume/lume.db")).await; // Create nostr connection - let client = ClientBuilder::default().database(nostr_db).build(); + let client = match sqlite { + Ok(db) => ClientBuilder::default().database(db).build(), + Err(_) => ClientBuilder::default().build(), + }; // Add some bootstrap relays // #TODO: Pull bootstrap relays from user's settings