@nuxt/devtools-ui-kit 0.7.0 → 0.7.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.
@@ -1,12 +1,13 @@
1
1
  <script setup lang="ts">
2
2
  // This components requires to run in DevTools to render correctly
3
3
  import { computed, nextTick } from 'vue'
4
+ import type { Lang } from 'shiki-es'
4
5
  import { devToolsClient } from '../runtime/client'
5
6
 
6
7
  const props = withDefaults(
7
8
  defineProps<{
8
9
  code: string
9
- lang?: string
10
+ lang?: Lang
10
11
  lines?: boolean
11
12
  transformRendered?: (code: string) => string
12
13
  }>(), {
@@ -17,7 +18,7 @@ const props = withDefaults(
17
18
  const emit = defineEmits(['loaded'])
18
19
 
19
20
  const rendered = computed(() => {
20
- const result = devToolsClient.value?.devtools.renderCodeHighlight(props.code, props.lang as string) || { code: props.code, supported: false }
21
+ const result = devToolsClient.value?.devtools.renderCodeHighlight(props.code, props.lang) || { code: props.code, supported: false }
21
22
  if (result.supported && props.transformRendered)
22
23
  result.code = props.transformRendered(result.code)
23
24
  if (result.supported)
@@ -1,16 +1,18 @@
1
1
  <script setup lang="ts">
2
2
  import { computed, nextTick, ref, watchEffect } from 'vue'
3
- import { useVModel } from '@vueuse/core'
3
+ import { onClickOutside, useVModel } from '@vueuse/core'
4
4
  import { useFocusTrap } from '@vueuse/integrations/useFocusTrap'
5
5
 
6
6
  const props = withDefaults(
7
7
  defineProps<{
8
8
  modelValue?: boolean
9
9
  dim?: boolean
10
+ autoClose?: boolean
10
11
  }>(),
11
12
  {
12
13
  modelValue: false,
13
14
  dim: true,
15
+ autoClose: true,
14
16
  },
15
17
  )
16
18
 
@@ -37,10 +39,14 @@ watchEffect(
37
39
  },
38
40
  )
39
41
 
40
- function close() {
41
- show.value = false
42
- emit('close')
43
- }
42
+ onClickOutside(card, () => {
43
+ if (props.modelValue && props.autoClose) {
44
+ show.value = false
45
+ emit('close')
46
+ }
47
+ }, {
48
+ ignore: ['a', 'button', 'summary'],
49
+ })
44
50
  </script>
45
51
 
46
52
  <script lang="ts">
@@ -54,6 +60,8 @@ export default {
54
60
  <div
55
61
  v-show="show"
56
62
  class="n-dialog fixed inset-0 z-100 flex items-center justify-center n-transition"
63
+ role="dialog"
64
+ aria-modal="true"
57
65
  :class="[
58
66
  show ? '' : 'op0 pointer-events-none visibility-none',
59
67
  ]"
@@ -61,9 +69,8 @@ export default {
61
69
  <div
62
70
  class="absolute inset-0 -z-1"
63
71
  :class="[
64
- dim ? 'bg-black/50' : '',
72
+ dim ? 'glass-effect' : '',
65
73
  ]"
66
- @click="close()"
67
74
  />
68
75
  <NCard v-bind="$attrs" ref="card" class="max-h-screen of-auto">
69
76
  <slot />
package/dist/module.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "devtools-ui-kit",
3
3
  "configKey": "devtoolsUIKit",
4
- "version": "0.7.0"
4
+ "version": "0.7.2"
5
5
  }
@@ -1 +1 @@
1
- export declare const devToolsClient: import("vue").Ref<import("@nuxt/devtools-kit/src/_types/client-api").NuxtDevtoolsIframeClient | undefined>;
1
+ export declare const devToolsClient: import("vue").Ref<import("@nuxt/devtools-kit/dist/types").NuxtDevtoolsIframeClient | undefined>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nuxt/devtools-ui-kit",
3
3
  "type": "module",
4
- "version": "0.7.0",
4
+ "version": "0.7.2",
5
5
  "license": "MIT",
6
6
  "repository": "nuxt/devtools",
7
7
  "exports": {
@@ -23,33 +23,33 @@
23
23
  "*.cjs"
24
24
  ],
25
25
  "peerDependencies": {
26
- "@nuxt/devtools": "0.7.0"
26
+ "@nuxt/devtools": "0.7.2"
27
27
  },
28
28
  "dependencies": {
29
29
  "@iconify-json/carbon": "^1.1.18",
30
30
  "@iconify-json/logos": "^1.1.33",
31
- "@iconify-json/ri": "^1.1.10",
32
- "@iconify-json/tabler": "^1.1.81",
33
- "@nuxt/kit": "^3.6.2",
31
+ "@iconify-json/ri": "^1.1.11",
32
+ "@iconify-json/tabler": "^1.1.86",
33
+ "@nuxt/kit": "^3.6.5",
34
34
  "@nuxtjs/color-mode": "^3.3.0",
35
- "@unocss/core": "^0.53.5",
36
- "@unocss/nuxt": "^0.53.5",
37
- "@unocss/preset-attributify": "^0.53.5",
38
- "@unocss/preset-icons": "^0.53.5",
39
- "@unocss/preset-mini": "^0.53.5",
40
- "@unocss/reset": "^0.53.5",
41
- "@vueuse/core": "^10.2.1",
42
- "@vueuse/integrations": "^10.2.1",
43
- "@vueuse/nuxt": "^10.2.1",
35
+ "@unocss/core": "^0.54.1",
36
+ "@unocss/nuxt": "^0.54.1",
37
+ "@unocss/preset-attributify": "^0.54.1",
38
+ "@unocss/preset-icons": "^0.54.1",
39
+ "@unocss/preset-mini": "^0.54.1",
40
+ "@unocss/reset": "^0.54.1",
41
+ "@vueuse/core": "^10.3.0",
42
+ "@vueuse/integrations": "^10.3.0",
43
+ "@vueuse/nuxt": "^10.3.0",
44
44
  "defu": "^6.1.2",
45
45
  "focus-trap": "^7.5.2",
46
- "unocss": "^0.53.5",
46
+ "unocss": "^0.54.1",
47
47
  "v-lazy-show": "^0.2.3",
48
- "@nuxt/devtools": "0.7.0",
49
- "@nuxt/devtools-kit": "0.7.0"
48
+ "@nuxt/devtools": "0.7.2",
49
+ "@nuxt/devtools-kit": "0.7.2"
50
50
  },
51
51
  "devDependencies": {
52
- "nuxt": "^3.6.2"
52
+ "nuxt": "^3.6.5"
53
53
  },
54
54
  "publishConfig": {
55
55
  "access": "public"