nuxtseo-layer-devtools 0.4.4 → 0.4.5

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,8 +1,14 @@
1
1
  <script setup lang="ts">
2
2
  const {
3
3
  title,
4
+ closable = false,
5
+ icon,
6
+ padding = true,
4
7
  } = defineProps<{
5
8
  title?: string
9
+ closable?: boolean
10
+ icon?: string
11
+ padding?: boolean
6
12
  }>()
7
13
 
8
14
  defineEmits<{
@@ -14,18 +20,22 @@ defineEmits<{
14
20
  <div class="devtools-panel">
15
21
  <div v-if="title || $slots.header" class="devtools-panel-header">
16
22
  <slot name="header">
17
- <span class="devtools-panel-title">{{ title }}</span>
23
+ <div class="flex items-center gap-2">
24
+ <UIcon v-if="icon" :name="icon" class="text-sm text-[var(--color-text-muted)]" />
25
+ <span class="devtools-panel-title">{{ title }}</span>
26
+ </div>
18
27
  </slot>
19
- <div class="devtools-panel-actions">
28
+ <div v-if="closable || $slots.actions" class="devtools-panel-actions">
20
29
  <slot name="actions" />
21
30
  <UButton
31
+ v-if="closable"
22
32
  icon="carbon:close"
23
33
  aria-label="Close panel"
24
34
  @click="$emit('close')"
25
35
  />
26
36
  </div>
27
37
  </div>
28
- <div class="devtools-panel-content">
38
+ <div class="devtools-panel-content" :class="padding ? 'p-3' : ''">
29
39
  <slot />
30
40
  </div>
31
41
  </div>
package/error.vue CHANGED
@@ -5,11 +5,13 @@ const { error } = defineProps<{
5
5
  error: NuxtError
6
6
  }>()
7
7
 
8
+ const ANSI_RE = /\u001B\[[0-9;]*m/g
9
+
8
10
  const stack = computed(() => {
9
11
  if (!error.stack)
10
12
  return ''
11
13
  // Clean ANSI codes if present
12
- return error.stack.replace(/\u001B\[[0-9;]*m/g, '')
14
+ return error.stack.replace(ANSI_RE, '')
13
15
  })
14
16
 
15
17
  function handleClear() {
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",
4
+ "version": "0.4.5",
5
5
  "description": "Shared Nuxt layer for Nuxt SEO devtools clients.",
6
6
  "author": {
7
7
  "name": "Harlan Wilton",