@helloleo/plugins 0.2.16 → 0.2.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,9 @@
1
1
  import { useState } from 'react'
2
2
  import { useRouterState } from '@tanstack/react-router'
3
- import { Button } from '@/components/ui/button'
4
- import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
5
3
 
6
4
  // Rendered by the router's defaultErrorComponent for any uncaught render or
7
5
  // loader error. Per-route `errorComponent` options override it. Keep this
8
- // component free of app dependencies (toasts, auth, etc.) -- it must still
9
- // render when the rest of the app is broken.
6
+ // component free of app dependencies (toasts, auth, ui components, etc).
10
7
  export function DefaultErrorComponent({ error }: { error: Error }) {
11
8
  const pathname = useRouterState({ select: (s) => s.location.pathname })
12
9
  const [copied, setCopied] = useState(false)
@@ -27,21 +24,27 @@ export function DefaultErrorComponent({ error }: { error: Error }) {
27
24
  }
28
25
 
29
26
  return (
30
- <div className="min-h-screen flex items-center justify-center bg-background p-4">
31
- <Card className="w-full max-w-lg">
32
- <CardHeader>
33
- <CardTitle>Something went wrong</CardTitle>
34
- </CardHeader>
35
- <CardContent className="space-y-4">
36
- <pre className="text-sm text-destructive whitespace-pre-wrap break-words rounded-md bg-muted p-3">
27
+ <div className="min-h-screen flex items-center justify-center bg-white p-4">
28
+ <div className="w-full max-w-lg rounded-xl border border-neutral-200 bg-white p-6 shadow-sm">
29
+ <h2 className="text-base font-semibold text-neutral-900">
30
+ Something went wrong
31
+ </h2>
32
+ <div className="mt-4 space-y-4">
33
+ <pre className="text-sm text-red-600 whitespace-pre-wrap break-words rounded-md bg-neutral-100 p-3">
37
34
  {error.message}
38
35
  </pre>
39
- <Button onClick={copyForLeo}>{copied ? 'Copied!' : 'Copy error'}</Button>
40
- <p className="text-sm text-muted-foreground">
36
+ <button
37
+ type="button"
38
+ onClick={copyForLeo}
39
+ className="inline-flex items-center rounded-md bg-neutral-900 px-4 py-2 text-sm font-medium text-neutral-50"
40
+ >
41
+ {copied ? 'Copied!' : 'Copy error'}
42
+ </button>
43
+ <p className="text-sm text-neutral-500">
41
44
  Paste the copied error to Leo and it will help you fix it.
42
45
  </p>
43
- </CardContent>
44
- </Card>
46
+ </div>
47
+ </div>
45
48
  </div>
46
49
  )
47
50
  }
@@ -1,12 +1,9 @@
1
1
  import { useState } from 'react'
2
2
  import { useRouterState } from '@tanstack/react-router'
3
- import { Button } from '@/components/ui/button'
4
- import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
5
3
 
6
4
  // Rendered by the router's defaultErrorComponent for any uncaught render or
7
5
  // loader error. Per-route `errorComponent` options override it. Keep this
8
- // component free of app dependencies (toasts, auth, etc.) -- it must still
9
- // render when the rest of the app is broken.
6
+ // component free of app dependencies (toasts, auth, ui components, etc).
10
7
  export function DefaultErrorComponent({ error }: { error: Error }) {
11
8
  const pathname = useRouterState({ select: (s) => s.location.pathname })
12
9
  const [copied, setCopied] = useState(false)
@@ -27,21 +24,27 @@ export function DefaultErrorComponent({ error }: { error: Error }) {
27
24
  }
28
25
 
29
26
  return (
30
- <div className="min-h-screen flex items-center justify-center bg-background p-4">
31
- <Card className="w-full max-w-lg">
32
- <CardHeader>
33
- <CardTitle>Something went wrong</CardTitle>
34
- </CardHeader>
35
- <CardContent className="space-y-4">
36
- <pre className="text-sm text-destructive whitespace-pre-wrap break-words rounded-md bg-muted p-3">
27
+ <div className="min-h-screen flex items-center justify-center bg-white p-4">
28
+ <div className="w-full max-w-lg rounded-xl border border-neutral-200 bg-white p-6 shadow-sm">
29
+ <h2 className="text-base font-semibold text-neutral-900">
30
+ Something went wrong
31
+ </h2>
32
+ <div className="mt-4 space-y-4">
33
+ <pre className="text-sm text-red-600 whitespace-pre-wrap break-words rounded-md bg-neutral-100 p-3">
37
34
  {error.message}
38
35
  </pre>
39
- <Button onClick={copyForLeo}>{copied ? 'Copied!' : 'Copy error'}</Button>
40
- <p className="text-sm text-muted-foreground">
36
+ <button
37
+ type="button"
38
+ onClick={copyForLeo}
39
+ className="inline-flex items-center rounded-md bg-neutral-900 px-4 py-2 text-sm font-medium text-neutral-50"
40
+ >
41
+ {copied ? 'Copied!' : 'Copy error'}
42
+ </button>
43
+ <p className="text-sm text-neutral-500">
41
44
  Paste the copied error to Leo and it will help you fix it.
42
45
  </p>
43
- </CardContent>
44
- </Card>
46
+ </div>
47
+ </div>
45
48
  </div>
46
49
  )
47
50
  }
@@ -1,12 +1,9 @@
1
1
  import { useState } from 'react'
2
2
  import { useRouterState } from '@tanstack/react-router'
3
- import { Button } from '@/components/ui/button'
4
- import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
5
3
 
6
4
  // Rendered by the router's defaultErrorComponent for any uncaught render or
7
5
  // loader error. Per-route `errorComponent` options override it. Keep this
8
- // component free of app dependencies (toasts, auth, etc.) -- it must still
9
- // render when the rest of the app is broken.
6
+ // component free of app dependencies (toasts, auth, ui components, etc).
10
7
  export function DefaultErrorComponent({ error }: { error: Error }) {
11
8
  const pathname = useRouterState({ select: (s) => s.location.pathname })
12
9
  const [copied, setCopied] = useState(false)
@@ -27,21 +24,27 @@ export function DefaultErrorComponent({ error }: { error: Error }) {
27
24
  }
28
25
 
29
26
  return (
30
- <div className="min-h-screen flex items-center justify-center bg-background p-4">
31
- <Card className="w-full max-w-lg">
32
- <CardHeader>
33
- <CardTitle>Something went wrong</CardTitle>
34
- </CardHeader>
35
- <CardContent className="space-y-4">
36
- <pre className="text-sm text-destructive whitespace-pre-wrap break-words rounded-md bg-muted p-3">
27
+ <div className="min-h-screen flex items-center justify-center bg-white p-4">
28
+ <div className="w-full max-w-lg rounded-xl border border-neutral-200 bg-white p-6 shadow-sm">
29
+ <h2 className="text-base font-semibold text-neutral-900">
30
+ Something went wrong
31
+ </h2>
32
+ <div className="mt-4 space-y-4">
33
+ <pre className="text-sm text-red-600 whitespace-pre-wrap break-words rounded-md bg-neutral-100 p-3">
37
34
  {error.message}
38
35
  </pre>
39
- <Button onClick={copyForLeo}>{copied ? 'Copied!' : 'Copy error'}</Button>
40
- <p className="text-sm text-muted-foreground">
36
+ <button
37
+ type="button"
38
+ onClick={copyForLeo}
39
+ className="inline-flex items-center rounded-md bg-neutral-900 px-4 py-2 text-sm font-medium text-neutral-50"
40
+ >
41
+ {copied ? 'Copied!' : 'Copy error'}
42
+ </button>
43
+ <p className="text-sm text-neutral-500">
41
44
  Paste the copied error to Leo and it will help you fix it.
42
45
  </p>
43
- </CardContent>
44
- </Card>
46
+ </div>
47
+ </div>
45
48
  </div>
46
49
  )
47
50
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@helloleo/plugins",
3
- "version": "0.2.16",
3
+ "version": "0.2.17",
4
4
  "description": "OpenCode plugins for HelloLeo",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -1,12 +1,9 @@
1
1
  import { useState } from 'react'
2
2
  import { useRouterState } from '@tanstack/react-router'
3
- import { Button } from '@/components/ui/button'
4
- import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
5
3
 
6
4
  // Rendered by the router's defaultErrorComponent for any uncaught render or
7
5
  // loader error. Per-route `errorComponent` options override it. Keep this
8
- // component free of app dependencies (toasts, auth, etc.) -- it must still
9
- // render when the rest of the app is broken.
6
+ // component free of app dependencies (toasts, auth, ui components, etc).
10
7
  export function DefaultErrorComponent({ error }: { error: Error }) {
11
8
  const pathname = useRouterState({ select: (s) => s.location.pathname })
12
9
  const [copied, setCopied] = useState(false)
@@ -27,21 +24,27 @@ export function DefaultErrorComponent({ error }: { error: Error }) {
27
24
  }
28
25
 
29
26
  return (
30
- <div className="min-h-screen flex items-center justify-center bg-background p-4">
31
- <Card className="w-full max-w-lg">
32
- <CardHeader>
33
- <CardTitle>Something went wrong</CardTitle>
34
- </CardHeader>
35
- <CardContent className="space-y-4">
36
- <pre className="text-sm text-destructive whitespace-pre-wrap break-words rounded-md bg-muted p-3">
27
+ <div className="min-h-screen flex items-center justify-center bg-white p-4">
28
+ <div className="w-full max-w-lg rounded-xl border border-neutral-200 bg-white p-6 shadow-sm">
29
+ <h2 className="text-base font-semibold text-neutral-900">
30
+ Something went wrong
31
+ </h2>
32
+ <div className="mt-4 space-y-4">
33
+ <pre className="text-sm text-red-600 whitespace-pre-wrap break-words rounded-md bg-neutral-100 p-3">
37
34
  {error.message}
38
35
  </pre>
39
- <Button onClick={copyForLeo}>{copied ? 'Copied!' : 'Copy error'}</Button>
40
- <p className="text-sm text-muted-foreground">
36
+ <button
37
+ type="button"
38
+ onClick={copyForLeo}
39
+ className="inline-flex items-center rounded-md bg-neutral-900 px-4 py-2 text-sm font-medium text-neutral-50"
40
+ >
41
+ {copied ? 'Copied!' : 'Copy error'}
42
+ </button>
43
+ <p className="text-sm text-neutral-500">
41
44
  Paste the copied error to Leo and it will help you fix it.
42
45
  </p>
43
- </CardContent>
44
- </Card>
46
+ </div>
47
+ </div>
45
48
  </div>
46
49
  )
47
50
  }
@@ -1,12 +1,9 @@
1
1
  import { useState } from 'react'
2
2
  import { useRouterState } from '@tanstack/react-router'
3
- import { Button } from '@/components/ui/button'
4
- import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
5
3
 
6
4
  // Rendered by the router's defaultErrorComponent for any uncaught render or
7
5
  // loader error. Per-route `errorComponent` options override it. Keep this
8
- // component free of app dependencies (toasts, auth, etc.) -- it must still
9
- // render when the rest of the app is broken.
6
+ // component free of app dependencies (toasts, auth, ui components, etc).
10
7
  export function DefaultErrorComponent({ error }: { error: Error }) {
11
8
  const pathname = useRouterState({ select: (s) => s.location.pathname })
12
9
  const [copied, setCopied] = useState(false)
@@ -27,21 +24,27 @@ export function DefaultErrorComponent({ error }: { error: Error }) {
27
24
  }
28
25
 
29
26
  return (
30
- <div className="min-h-screen flex items-center justify-center bg-background p-4">
31
- <Card className="w-full max-w-lg">
32
- <CardHeader>
33
- <CardTitle>Something went wrong</CardTitle>
34
- </CardHeader>
35
- <CardContent className="space-y-4">
36
- <pre className="text-sm text-destructive whitespace-pre-wrap break-words rounded-md bg-muted p-3">
27
+ <div className="min-h-screen flex items-center justify-center bg-white p-4">
28
+ <div className="w-full max-w-lg rounded-xl border border-neutral-200 bg-white p-6 shadow-sm">
29
+ <h2 className="text-base font-semibold text-neutral-900">
30
+ Something went wrong
31
+ </h2>
32
+ <div className="mt-4 space-y-4">
33
+ <pre className="text-sm text-red-600 whitespace-pre-wrap break-words rounded-md bg-neutral-100 p-3">
37
34
  {error.message}
38
35
  </pre>
39
- <Button onClick={copyForLeo}>{copied ? 'Copied!' : 'Copy error'}</Button>
40
- <p className="text-sm text-muted-foreground">
36
+ <button
37
+ type="button"
38
+ onClick={copyForLeo}
39
+ className="inline-flex items-center rounded-md bg-neutral-900 px-4 py-2 text-sm font-medium text-neutral-50"
40
+ >
41
+ {copied ? 'Copied!' : 'Copy error'}
42
+ </button>
43
+ <p className="text-sm text-neutral-500">
41
44
  Paste the copied error to Leo and it will help you fix it.
42
45
  </p>
43
- </CardContent>
44
- </Card>
46
+ </div>
47
+ </div>
45
48
  </div>
46
49
  )
47
50
  }
@@ -1,12 +1,9 @@
1
1
  import { useState } from 'react'
2
2
  import { useRouterState } from '@tanstack/react-router'
3
- import { Button } from '@/components/ui/button'
4
- import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
5
3
 
6
4
  // Rendered by the router's defaultErrorComponent for any uncaught render or
7
5
  // loader error. Per-route `errorComponent` options override it. Keep this
8
- // component free of app dependencies (toasts, auth, etc.) -- it must still
9
- // render when the rest of the app is broken.
6
+ // component free of app dependencies (toasts, auth, ui components, etc).
10
7
  export function DefaultErrorComponent({ error }: { error: Error }) {
11
8
  const pathname = useRouterState({ select: (s) => s.location.pathname })
12
9
  const [copied, setCopied] = useState(false)
@@ -27,21 +24,27 @@ export function DefaultErrorComponent({ error }: { error: Error }) {
27
24
  }
28
25
 
29
26
  return (
30
- <div className="min-h-screen flex items-center justify-center bg-background p-4">
31
- <Card className="w-full max-w-lg">
32
- <CardHeader>
33
- <CardTitle>Something went wrong</CardTitle>
34
- </CardHeader>
35
- <CardContent className="space-y-4">
36
- <pre className="text-sm text-destructive whitespace-pre-wrap break-words rounded-md bg-muted p-3">
27
+ <div className="min-h-screen flex items-center justify-center bg-white p-4">
28
+ <div className="w-full max-w-lg rounded-xl border border-neutral-200 bg-white p-6 shadow-sm">
29
+ <h2 className="text-base font-semibold text-neutral-900">
30
+ Something went wrong
31
+ </h2>
32
+ <div className="mt-4 space-y-4">
33
+ <pre className="text-sm text-red-600 whitespace-pre-wrap break-words rounded-md bg-neutral-100 p-3">
37
34
  {error.message}
38
35
  </pre>
39
- <Button onClick={copyForLeo}>{copied ? 'Copied!' : 'Copy error'}</Button>
40
- <p className="text-sm text-muted-foreground">
36
+ <button
37
+ type="button"
38
+ onClick={copyForLeo}
39
+ className="inline-flex items-center rounded-md bg-neutral-900 px-4 py-2 text-sm font-medium text-neutral-50"
40
+ >
41
+ {copied ? 'Copied!' : 'Copy error'}
42
+ </button>
43
+ <p className="text-sm text-neutral-500">
41
44
  Paste the copied error to Leo and it will help you fix it.
42
45
  </p>
43
- </CardContent>
44
- </Card>
46
+ </div>
47
+ </div>
45
48
  </div>
46
49
  )
47
50
  }