Skip to content

Commit

Permalink
upgrade verdant
Browse files Browse the repository at this point in the history
  • Loading branch information
a-type committed Mar 23, 2024
1 parent c149538 commit 0232ef8
Show file tree
Hide file tree
Showing 15 changed files with 2,628 additions and 1,199 deletions.
6 changes: 3 additions & 3 deletions apps/gnocchi/verdant/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
"@0no-co/graphqlsp": "^1.3.4",
"@biscuits/client": "workspace:*",
"@verdant-web/cli": "^4.3.2",
"@verdant-web/common": "2.2.0",
"@verdant-web/react": "28.0.1",
"@verdant-web/store": "3.3.0",
"@verdant-web/common": "2.3.0",
"@verdant-web/react": "29.0.0",
"@verdant-web/store": "3.4.0",
"cuid": "^2.1.8",
"stopword": "^2.0.8"
},
Expand Down
4 changes: 0 additions & 4 deletions apps/gnocchi/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,7 @@
"@tiptap/starter-kit": "^2.2.4",
"@use-gesture/react": "^10.2.24",
"@vercel/analytics": "^0.1.6",
"@verdant-web/cli": "^4.3.1",
"@verdant-web/common": "2.2.0",
"@verdant-web/react": "28.0.1",
"@verdant-web/react-router": "^0.6.1",
"@verdant-web/store": "3.3.0",
"@zip.js/zip.js": "^2.7.6",
"classnames": "^2.3.2",
"convert-units": "^3.0.0-beta.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { useListId } from '@/contexts/ListContext.jsx';
import useMergedRef from '@/hooks/useMergedRef.js';
import { useIsFirstRender, usePrevious } from '@/hooks/usePrevious.js';
import { categorizeOnboarding } from '@/onboarding/categorizeOnboarding.js';
import { Presence, Profile, hooks } from '@/stores/groceries/index.js';
import { Person, Presence, Profile, hooks } from '@/stores/groceries/index.js';
import { Button } from '@a-type/ui/components/button';
import {
CheckboxIndicator,
Expand Down Expand Up @@ -48,7 +48,6 @@ import {
Pencil1Icon,
TrashIcon,
} from '@radix-ui/react-icons';
import { UserInfo } from '@verdant-web/store';
import classNames from 'classnames';
import {
CSSProperties,
Expand Down Expand Up @@ -355,7 +354,7 @@ function RecentPeople({ item }: { item: Item }) {

function usePeopleWhoLastEditedThis(itemId: string) {
const groceries = hooks.useClient();
const [people, setPeople] = useState<UserInfo<Profile, Presence>[]>(() => {
const [people, setPeople] = useState<Person[]>(() => {
return Object.values(groceries.sync.presence.peers).filter(
(p) => p.presence.lastInteractedItem === itemId,
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { makeRecipeLink } from '@/components/recipes/makeRecipeLink.js';
import { Presence, Profile, hooks } from '@/stores/groceries/index.js';
import { Person, Presence, Profile, hooks } from '@/stores/groceries/index.js';
import { Button } from '@a-type/ui/components/button';
import { PageNowPlaying } from '@a-type/ui/components/layouts';
import { UserInfo } from '@verdant-web/common';
import { Cross2Icon } from '@radix-ui/react-icons';
import { Suspense, useState } from 'react';
import { PersonAvatar } from '../people/PersonAvatar.jsx';
Expand Down Expand Up @@ -55,7 +54,7 @@ function RecipePresenceLink({
onDismiss,
}: {
recipeId: string;
person: UserInfo<Profile, Presence>;
person: Person;
onDismiss: () => void;
}) {
const recipe = hooks.useRecipe(recipeId);
Expand Down
19 changes: 13 additions & 6 deletions apps/gnocchi/web/src/pages/groceries/GroceriesPage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ListEdit } from '@/components/groceries/lists/ListEdit.jsx';
import { ListSelect } from '@/components/groceries/lists/ListSelect.jsx';
import { Icon } from '@/components/icons/Icon.jsx';
import { RecipeSavePrompt } from '@/components/recipes/savePrompt/RecipeSavePrompt.jsx';
import { OfflineIndicator } from '@/components/sync/OfflineIndicator.jsx';
import { RecipePresenceNotification } from '@/components/sync/collaborationMenu/RecipePresenceNotification.jsx';
Expand Down Expand Up @@ -64,13 +65,19 @@ export function GroceriesPage() {
<Suspense>
<ChangelogDisplay className="sm:hidden" hideOnSeen />
</Suspense>
<Suspense>
<OfflineIndicator />
</Suspense>
<InstallButton />
<UserMenu>
<Suspense>
<PresencePeople />
</Suspense>
</UserMenu>
<OfflineIndicator />
<Suspense>
<UserMenu>
<Suspense
fallback={<Icon className="w-32px h-32px" name="profile" />}
>
<PresencePeople />
</Suspense>
</UserMenu>
</Suspense>
</div>
</TopControls>
<AddBar />
Expand Down
8 changes: 4 additions & 4 deletions apps/trip-tick/verdant/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"react": "^18.2.0"
},
"dependencies": {
"@verdant-web/cli": "^4.1.0",
"@verdant-web/common": "^1.16.1",
"@verdant-web/react": "^24.0.1",
"@verdant-web/store": "^2.8.4",
"@verdant-web/cli": "^4.3.2",
"@verdant-web/common": "2.3.0",
"@verdant-web/react": "29.0.0",
"@verdant-web/store": "3.4.0",
"cuid": "^2.1.8"
}
}
8 changes: 4 additions & 4 deletions apps/trip-tick/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
"@a-type/ui": "^0.6.17",
"@a-type/utils": "^1.0.6",
"@biscuits/client": "workspace:*",
"@trip-tick.biscuits/verdant": "workspace:*",
"@radix-ui/react-progress": "^1.0.3",
"@radix-ui/react-toggle-group": "^1.0.4",
"@react-spring/web": "^9.7.3",
"@tanstack/react-query": "^4.24.10",
"@trip-tick.biscuits/verdant": "workspace:*",
"@unocss/transformer-variant-group": "^0.54.1",
"@verdant-web/react": "^24.0.1",
"@verdant-web/react-router": "^0.5.4",
"@verdant-web/store": "^2.8.4",
"@verdant-web/react": "^29.0.0",
"@verdant-web/react-router": "^0.6.1",
"@verdant-web/store": "^3.4.0",
"classnames": "^2.3.2",
"date-fns": "^2.30.0",
"react": "^18.2.0",
Expand Down
10 changes: 5 additions & 5 deletions packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
"type": "module",
"dependencies": {
"@0no-co/graphqlsp": "^1.3.4",
"@biscuits/apps": "workspace:*",
"@biscuits/error": "workspace:*",
"@biscuits/libraries": "workspace:*",
"@biscuits/apps": "workspace:*",
"@urql/exchange-refocus": "^1.0.2",
"@urql/exchange-retry": "^1.2.1",
"clsx": "2.1.0",
"gql.tada": "^1.2.1",
"urql": "^4.0.6",
"clsx": "2.1.0"
"urql": "^4.0.6"
},
"peerDependencies": {
"@a-type/ui": "^0.6.17",
Expand All @@ -41,9 +41,9 @@
"vite-plugin-pwa": "0.19.2"
},
"devDependencies": {
"@types/react": "18.0.14",
"@a-type/ui": "^0.6.17",
"@verdant-web/store": "^3.2.2",
"@types/react": "18.0.14",
"@verdant-web/store": "^3.4.0",
"react": "^18.2.0",
"vite-plugin-pwa": "0.19.2"
}
Expand Down
8 changes: 6 additions & 2 deletions packages/client/src/components/PresencePeople.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { AvatarList, AvatarListItem } from '@a-type/ui/components/avatar';
import {
Avatar,
AvatarList,
AvatarListItem,
} from '@a-type/ui/components/avatar';
import { ErrorBoundary } from '@a-type/ui/components/errorBoundary';
import { useContext, useSyncExternalStore } from 'react';
import { VerdantContext, VerdantProfile } from '../index.js';
Expand Down Expand Up @@ -33,7 +37,7 @@ export function PresencePeople({
);

if (!syncing || (hideIfAlone && peers.length === 0)) {
return null;
return <Avatar />;
}

return (
Expand Down
4 changes: 2 additions & 2 deletions packages/db/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"@paralleldrive/cuid2": "^2.2.2",
"bcrypt": "^5.1.1",
"better-sqlite3": "^9.1.1",
"kysely": "^0.26.3",
"kysely-plugin-serialize": "^0.5.3"
"kysely": "^0.27.3",
"kysely-plugin-serialize": "^0.5.7"
},
"devDependencies": {
"@types/bcrypt": "^5.0.2",
Expand Down
Loading

0 comments on commit 0232ef8

Please sign in to comment.