Skip to content
This repository has been archived by the owner on Jan 2, 2025. It is now read-only.

Commit

Permalink
frontend(build): update connectrpc package
Browse files Browse the repository at this point in the history
  • Loading branch information
horacioh committed Oct 17, 2023
1 parent 7d3176d commit 24ae8f2
Show file tree
Hide file tree
Showing 17 changed files with 278 additions and 273 deletions.
2 changes: 1 addition & 1 deletion frontend/apps/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"publish": "electron-forge publish"
},
"dependencies": {
"@bufbuild/connect-web": "0.13.0",
"@connectrpc/connect-web": "^1.1.2",
"@mintter/app": "*",
"@mintter/prettier": "*",
"@mintter/shared": "*",
Expand Down
2 changes: 1 addition & 1 deletion frontend/apps/desktop/src/root.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import '@tamagui/core/reset.css'
import '@tamagui/font-inter/css/400.css'
import '@tamagui/font-inter/css/700.css'
import {createGrpcWebTransport} from '@bufbuild/connect-web'
import {createGrpcWebTransport} from '@connectrpc/connect-web'
import {AppContextProvider, StyleProvider} from '@mintter/app/app-context'
import {AppIPC} from '@mintter/app/app-ipc'
import {AppError, AppErrorPage} from '@mintter/app/components/app-error'
Expand Down
2 changes: 1 addition & 1 deletion frontend/apps/desktop/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"noEmit": true,
"esModuleInterop": true,
"paths": {
"react-native": ["../../../node_modules/react-native-web"],
"react-native": ["../../../node_modules/react-native-web"]
},
"moduleResolution": "node",
"resolveJsonModule": true,
Expand Down
2 changes: 1 addition & 1 deletion frontend/apps/site/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if (!global.setImmediate || !globalThis['setImmediate']) {
globalThis['setImmediate'] = setTimeout
}

import {createGrpcWebTransport, Interceptor} from '@bufbuild/connect-web'
import {createGrpcWebTransport, Interceptor} from '@connectrpc/connect-web'
import {createGRPCClient} from '@mintter/shared'

const loggingInterceptor: Interceptor = (next) => async (req) => {
Expand Down
6 changes: 3 additions & 3 deletions frontend/apps/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"with-env": "TAMAGUI_TARGET=web"
},
"dependencies": {
"@bufbuild/connect": "0.13.0",
"@bufbuild/connect-node": "0.13.0",
"@bufbuild/connect-web": "0.13.0",
"@bufbuild/protobuf": "1.3.3",
"@connectrpc/connect": "^1.1.2",
"@connectrpc/connect-node": "^1.1.2",
"@connectrpc/connect-web": "^1.1.2",
"@mintter/shared": "*",
"@mintter/ui": "*",
"@sentry/nextjs": "latest",
Expand Down
88 changes: 44 additions & 44 deletions frontend/packages/app/components/titlebar/windows.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -214,50 +214,6 @@ function SystemMenu() {
)

return (
<XStack className="no-window-drag">
{menuItems.map((item) => (
<Popover key={item.id} placement="bottom-start">
<Popover.Trigger asChild>
<Button
size="$1.5"
backgroundColor="transparent"
borderRadius={0}
paddingHorizontal="$2"
>
{item.title}
</Button>
</Popover.Trigger>
<Popover.Content
padding={0}
elevation="$2"
enterStyle={{y: -10, opacity: 0}}
exitStyle={{y: -10, opacity: 0}}
elevate
animation={[
'quick',
{
opacity: {
overshootClamping: true,
},
},
]}
>
<YGroup separator={<Separator />}>
{item.children.map((p) => (
<YGroup.Item key={p.id}>
<MenuItem
disabled={p.disabled}
key={p.id}
{...p}
onSelect={p.onSelect}
/>
</YGroup.Item>
))}
</YGroup>
</Popover.Content>
</Popover>
))}
</XStack>
// <NavigationMenu.Root asChild className="no-window-drag">
// <XStack
// position="relative"
Expand Down Expand Up @@ -302,6 +258,50 @@ function SystemMenu() {
// </XStack>
// </XStack>
// </NavigationMenu.Root>
<XStack className="no-window-drag">
{menuItems.map((item) => (
<Popover key={item.id} placement="bottom-start">
<Popover.Trigger asChild>
<Button
size="$1.5"
backgroundColor="transparent"
borderRadius={0}
paddingHorizontal="$2"
>
{item.title}
</Button>
</Popover.Trigger>
<Popover.Content
padding={0}
elevation="$2"
enterStyle={{y: -10, opacity: 0}}
exitStyle={{y: -10, opacity: 0}}
elevate
animation={[
'quick',
{
opacity: {
overshootClamping: true,
},
},
]}
>
<YGroup separator={<Separator />}>
{item.children.map((p) => (
<YGroup.Item key={p.id}>
<MenuItem
disabled={p.disabled}
key={p.id}
{...p}
onSelect={p.onSelect}
/>
</YGroup.Item>
))}
</YGroup>
</Popover.Content>
</Popover>
))}
</XStack>
)
}

Expand Down
2 changes: 1 addition & 1 deletion frontend/packages/app/models/accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {useConnectedPeers} from './networking'
import {useDaemonReady} from '@mintter/app/node-status-context'
import {useDaemonInfo} from '@mintter/app/models/daemon'
import appError from '@mintter/app/errors'
import {ConnectError} from '@bufbuild/connect'
import {ConnectError} from '@connectrpc/connect'
import {useGRPCClient, useQueryInvalidator} from '@mintter/app/app-context'

export function useAccount(accountId?: string) {
Expand Down
2 changes: 1 addition & 1 deletion frontend/packages/app/models/networking.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {ConnectError} from '@bufbuild/connect'
import {ConnectError} from '@connectrpc/connect'
import {useDaemonReady} from '@mintter/app/node-status-context'
import appError from '@mintter/app/errors'
import {ConnectionStatus, GRPCClient, PeerInfo} from '@mintter/shared'
Expand Down
2 changes: 1 addition & 1 deletion frontend/packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@bufbuild/connect-web": "0.13.0",
"@bufbuild/protobuf": "1.3.3",
"@connectrpc/connect-web": "^1.1.2",
"@hookform/resolvers": "3.3.1",
"@juggle/resize-observer": "3.4.0",
"@mintter/shared": "*",
Expand Down
2 changes: 1 addition & 1 deletion frontend/packages/app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"paths": {
"@mintter/app/*": ["*", "frontend/packages/app/src/*"],
"@mintter/shared": ["*", "frontend/packages/shared/src/index.ts"],
"react-native": ["node_modules/react-native-web"],
"react-native": ["node_modules/react-native-web"]
}
},
"references": []
Expand Down
2 changes: 0 additions & 2 deletions frontend/packages/editor/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


{
"extends": "../../../tsconfig.base",
"include": ["src"],
Expand Down
4 changes: 2 additions & 2 deletions frontend/packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"vitest": "0.34.2"
},
"dependencies": {
"@bufbuild/connect-web": "0.13.0",
"@bufbuild/protobuf": "1.3.3"
"@bufbuild/protobuf": "1.3.3",
"@connectrpc/connect-web": "^1.1.2"
}
}
2 changes: 1 addition & 1 deletion frontend/packages/shared/src/grpc-client.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {createPromiseClient, PromiseClient} from '@bufbuild/connect'
import {createPromiseClient, PromiseClient} from '@connectrpc/connect'
import {
Accounts,
Changes,
Expand Down
27 changes: 13 additions & 14 deletions frontend/packages/shared/src/static/static-renderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -488,20 +488,7 @@ function InlineContentView({

const isExternal = isHypermediaScheme(content.href)
return (
href && (
<a
href={href}
key={index}
className={isExternal ? 'hm-link' : 'link'}
style={{
cursor: 'pointer',
display: 'inline',
}}
>
<InlineContentView inline={content.content} />
{isExternal ? <ExternalLink size={10} /> : null}
</a>
// <Tooltip content={href}>
href && ( // <Tooltip content={href}>
// <SizableText
// key={index}
// display="inline"
Expand All @@ -522,6 +509,18 @@ function InlineContentView({
// </a>
// </SizableText>
// </Tooltip>
<a
href={href}
key={index}
className={isExternal ? 'hm-link' : 'link'}
style={{
cursor: 'pointer',
display: 'inline',
}}
>
<InlineContentView inline={content.content} />
{isExternal ? <ExternalLink size={10} /> : null}
</a>
)
)
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/packages/ui/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"composite": true,
"jsx": "react-jsx",
"paths": {
"react-native": ["node_modules/react-native-web"],
"react-native": ["node_modules/react-native-web"]
}
},
"references": []
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
],
"dependencies": {
"@babel/runtime": "^7.18.9",
"@bufbuild/protoc-gen-connect-es": "0.13.0",
"@bufbuild/protoc-gen-es": "1.3.1",
"@connectrpc/protoc-gen-connect-es": "^1.1.2",
"@manypkg/cli": "0.19.2",
"@nderscore/tamagui-typescript-plugin": "0.5.4",
"@tamagui/cli": "1.74.15",
Expand Down
Loading

0 comments on commit 24ae8f2

Please sign in to comment.