nuxtseo-layer-devtools 0.1.0 → 0.1.2

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/app.config.ts CHANGED
@@ -1,4 +1,4 @@
1
- export default defineAppConfig({
1
+ export default {
2
2
  ui: {
3
3
  colors: {
4
4
  primary: 'green',
@@ -24,4 +24,4 @@ export default defineAppConfig({
24
24
  },
25
25
  },
26
26
  },
27
- })
27
+ }
@@ -234,6 +234,12 @@ h1, h2, h3, h4, h5, h6 {
234
234
  background: transparent !important;
235
235
  }
236
236
 
237
+ .shiki,
238
+ .shiki span {
239
+ color: var(--shiki-light) !important;
240
+ background-color: transparent !important;
241
+ }
242
+
237
243
  .dark .shiki,
238
244
  .dark .shiki span {
239
245
  color: var(--shiki-dark) !important;
@@ -211,7 +211,9 @@ const isRouteNav = computed(() => navItems.some(item => item.to))
211
211
  <div class="devtools-main">
212
212
  <main class="mx-auto flex flex-col w-full max-w-7xl">
213
213
  <DevtoolsLoading v-if="loading" />
214
- <slot v-else />
214
+ <div v-show="!loading">
215
+ <slot />
216
+ </div>
215
217
  </main>
216
218
  </div>
217
219
  </div>
@@ -1,6 +1,6 @@
1
1
  import { useClipboard } from '@vueuse/core'
2
2
 
3
- export function useCopy(timeout = 2000) {
3
+ export function useCopy(timeout = 2000): { copy: (text: string) => Promise<void>, copied: import('vue').Ref<boolean> } {
4
4
  const { copy, copied } = useClipboard({ legacy: true, copiedDuring: timeout })
5
5
  return { copy, copied }
6
6
  }
@@ -3,7 +3,6 @@ import type { ComputedRef, MaybeRef, Ref } from 'vue'
3
3
  import { createHighlighterCore } from 'shiki/core'
4
4
  import { createJavaScriptRegexEngine } from 'shiki/engine/javascript'
5
5
  import { computed, ref, toValue } from 'vue'
6
- import { colorMode } from './rpc'
7
6
 
8
7
  export const shiki: Ref<HighlighterCore | undefined> = ref()
9
8
 
@@ -40,10 +39,12 @@ export function useRenderCodeHighlight(code: MaybeRef<string>, lang: string): Co
40
39
  return computed(() => {
41
40
  if (!shiki.value)
42
41
  return ''
43
- const theme = colorMode.value === 'dark' ? 'vitesse-dark' : 'vitesse-light'
44
42
  return shiki.value.codeToHtml(toValue(code) || '', {
45
43
  lang,
46
- theme,
44
+ themes: {
45
+ light: 'vitesse-light',
46
+ dark: 'vitesse-dark',
47
+ },
47
48
  }) || ''
48
49
  })
49
50
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxtseo-layer-devtools",
3
3
  "type": "module",
4
- "version": "0.1.0",
4
+ "version": "0.1.2",
5
5
  "description": "Shared Nuxt layer for Nuxt SEO devtools clients.",
6
6
  "author": {
7
7
  "name": "Harlan Wilton",