nuxtseo-layer-devtools 0.4.1 → 0.4.3
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.
- package/assets/css/global.css +16 -0
- package/error.vue +114 -0
- package/nuxt.config.ts +0 -12
- package/package.json +3 -2
- package/public/fonts/fira-code.woff2 +0 -0
- package/public/fonts/hubot-sans.woff2 +0 -0
package/assets/css/global.css
CHANGED
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
@import "tailwindcss";
|
|
2
2
|
@import "@nuxt/ui";
|
|
3
3
|
|
|
4
|
+
@font-face {
|
|
5
|
+
font-family: 'Hubot Sans';
|
|
6
|
+
src: url('/fonts/hubot-sans.woff2') format('woff2');
|
|
7
|
+
font-weight: 100 900;
|
|
8
|
+
font-display: swap;
|
|
9
|
+
font-style: normal;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@font-face {
|
|
13
|
+
font-family: 'Fira Code';
|
|
14
|
+
src: url('/fonts/fira-code.woff2') format('woff2');
|
|
15
|
+
font-weight: 100 900;
|
|
16
|
+
font-display: swap;
|
|
17
|
+
font-style: normal;
|
|
18
|
+
}
|
|
19
|
+
|
|
4
20
|
@theme {
|
|
5
21
|
--font-sans: 'Hubot Sans', ui-sans-serif, system-ui, sans-serif;
|
|
6
22
|
--font-mono: 'Fira Code', ui-monospace, monospace;
|
package/error.vue
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { NuxtError } from '#app'
|
|
3
|
+
|
|
4
|
+
const { error } = defineProps<{
|
|
5
|
+
error: NuxtError
|
|
6
|
+
}>()
|
|
7
|
+
|
|
8
|
+
const stack = computed(() => {
|
|
9
|
+
if (!error.stack)
|
|
10
|
+
return ''
|
|
11
|
+
// Clean ANSI codes if present
|
|
12
|
+
return error.stack.replace(/\u001B\[[0-9;]*m/g, '')
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
function handleClear() {
|
|
16
|
+
clearError({ redirect: '/' })
|
|
17
|
+
}
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<div class="error-page">
|
|
22
|
+
<div class="error-container">
|
|
23
|
+
<div class="error-icon-wrap">
|
|
24
|
+
<UIcon name="carbon:warning" class="error-icon" />
|
|
25
|
+
</div>
|
|
26
|
+
<h1 class="error-title">
|
|
27
|
+
{{ error.statusCode || 'Error' }}: {{ error.message || 'Something went wrong' }}
|
|
28
|
+
</h1>
|
|
29
|
+
<pre v-if="stack" class="error-stack">{{ stack }}</pre>
|
|
30
|
+
<div class="error-actions">
|
|
31
|
+
<UButton size="sm" @click="handleClear">
|
|
32
|
+
Clear Error
|
|
33
|
+
</UButton>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
</template>
|
|
38
|
+
|
|
39
|
+
<style scoped>
|
|
40
|
+
.error-page {
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
justify-content: center;
|
|
44
|
+
min-height: 100vh;
|
|
45
|
+
padding: 1.5rem;
|
|
46
|
+
background: var(--color-surface, #fff);
|
|
47
|
+
color: var(--color-text, #1a1a1a);
|
|
48
|
+
font-family: var(--font-sans, system-ui, sans-serif);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@media (prefers-color-scheme: dark) {
|
|
52
|
+
.error-page {
|
|
53
|
+
background: #111;
|
|
54
|
+
color: #e5e5e5;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.error-container {
|
|
59
|
+
display: flex;
|
|
60
|
+
flex-direction: column;
|
|
61
|
+
align-items: center;
|
|
62
|
+
gap: 0.75rem;
|
|
63
|
+
max-width: 48rem;
|
|
64
|
+
width: 100%;
|
|
65
|
+
text-align: center;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.error-icon-wrap {
|
|
69
|
+
display: flex;
|
|
70
|
+
align-items: center;
|
|
71
|
+
justify-content: center;
|
|
72
|
+
width: 3rem;
|
|
73
|
+
height: 3rem;
|
|
74
|
+
border-radius: 0.75rem;
|
|
75
|
+
background: oklch(65% 0.15 25 / 0.1);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.error-icon {
|
|
79
|
+
font-size: 1.5rem;
|
|
80
|
+
color: oklch(60% 0.18 25);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.error-title {
|
|
84
|
+
font-size: 0.875rem;
|
|
85
|
+
font-weight: 600;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.error-stack {
|
|
89
|
+
width: 100%;
|
|
90
|
+
max-height: 60vh;
|
|
91
|
+
overflow: auto;
|
|
92
|
+
padding: 1rem;
|
|
93
|
+
border-radius: 0.5rem;
|
|
94
|
+
background: oklch(0% 0 0 / 0.05);
|
|
95
|
+
border: 1px solid oklch(0% 0 0 / 0.1);
|
|
96
|
+
font-family: var(--font-mono, ui-monospace, monospace);
|
|
97
|
+
font-size: 0.6875rem;
|
|
98
|
+
line-height: 1.6;
|
|
99
|
+
text-align: left;
|
|
100
|
+
white-space: pre-wrap;
|
|
101
|
+
word-break: break-word;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
@media (prefers-color-scheme: dark) {
|
|
105
|
+
.error-stack {
|
|
106
|
+
background: oklch(100% 0 0 / 0.05);
|
|
107
|
+
border-color: oklch(100% 0 0 / 0.1);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.error-actions {
|
|
112
|
+
margin-top: 0.5rem;
|
|
113
|
+
}
|
|
114
|
+
</style>
|
package/nuxt.config.ts
CHANGED
|
@@ -6,7 +6,6 @@ export default defineNuxtConfig({
|
|
|
6
6
|
ssr: false,
|
|
7
7
|
|
|
8
8
|
modules: [
|
|
9
|
-
'@nuxt/fonts',
|
|
10
9
|
'@nuxt/ui',
|
|
11
10
|
'@vueuse/nuxt',
|
|
12
11
|
],
|
|
@@ -17,17 +16,6 @@ export default defineNuxtConfig({
|
|
|
17
16
|
content: false,
|
|
18
17
|
sitemap: false,
|
|
19
18
|
|
|
20
|
-
fonts: {
|
|
21
|
-
provider: 'local',
|
|
22
|
-
defaults: {
|
|
23
|
-
weights: ['100 900'],
|
|
24
|
-
},
|
|
25
|
-
families: [
|
|
26
|
-
{ name: 'Hubot Sans' },
|
|
27
|
-
{ name: 'Fira Code' },
|
|
28
|
-
],
|
|
29
|
-
},
|
|
30
|
-
|
|
31
19
|
vite: {
|
|
32
20
|
optimizeDeps: {
|
|
33
21
|
include: [
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxtseo-layer-devtools",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.3",
|
|
5
5
|
"description": "Shared Nuxt layer for Nuxt SEO devtools clients.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Harlan Wilton",
|
|
@@ -21,13 +21,14 @@
|
|
|
21
21
|
"assets",
|
|
22
22
|
"components",
|
|
23
23
|
"composables",
|
|
24
|
+
"error.vue",
|
|
24
25
|
"nuxt.config.ts",
|
|
25
26
|
"plugins",
|
|
27
|
+
"public",
|
|
26
28
|
"skills"
|
|
27
29
|
],
|
|
28
30
|
"dependencies": {
|
|
29
31
|
"@nuxt/devtools-kit": "4.0.0-alpha.3",
|
|
30
|
-
"@nuxt/fonts": "^0.14.0",
|
|
31
32
|
"@nuxt/kit": "^4.4.2",
|
|
32
33
|
"@nuxt/ui": "^4.6.0",
|
|
33
34
|
"@shikijs/langs": "^4.0.2",
|
|
Binary file
|
|
Binary file
|