@nuxt/devtools-ui-kit 1.0.0-beta.1 → 1.0.0-beta.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.
@@ -16,8 +16,9 @@ function update(event: any) {
16
16
  <template>
17
17
  <div flex="~ col gap2" border="b base" flex-1 n-navbar-glass :class="[{ p4: !noPadding }]">
18
18
  <div flex="~ gap4" items-center>
19
- <slot v-if="search !== undefined" name="search">
19
+ <slot name="search">
20
20
  <NTextInput
21
+ v-if="search !== undefined"
21
22
  placeholder="Search..."
22
23
  icon="carbon-search"
23
24
  n="primary" flex-auto
@@ -0,0 +1,48 @@
1
+ <script setup lang='ts'>
2
+ import { ref } from 'vue'
3
+
4
+ import type { DevtoolsUiShowNotificationPosition } from '../composables/notification'
5
+ import { devtoolsUiProvideNotificationFn } from '../composables/notification'
6
+
7
+ const show = ref(false)
8
+ const icon = ref<string>()
9
+ const text = ref<string>()
10
+ const classes = ref<string>()
11
+ const position = ref<DevtoolsUiShowNotificationPosition>('top-center')
12
+
13
+ devtoolsUiProvideNotificationFn((data) => {
14
+ text.value = data.message
15
+ icon.value = data.icon
16
+ classes.value = data.classes ?? 'text-primary border-primary'
17
+ icon.value = data.icon
18
+ show.value = true
19
+ position.value = data.position ?? 'top-center'
20
+ setTimeout(() => {
21
+ show.value = false
22
+ }, data.duration ?? 1500)
23
+ })
24
+ </script>
25
+
26
+ <template>
27
+ <div
28
+ fixed left-0 right-0 z-999 text-center
29
+ :class="[
30
+ { 'pointer-events-none overflow-hidden': !show },
31
+ { 'top-0': position.startsWith('top') },
32
+ { 'bottom-0': position.startsWith('bottom') },
33
+ ]"
34
+ >
35
+ <div flex :style="{ justifyContent: position.includes('right') ? 'right' : position.includes('left') ? 'left' : 'center' }">
36
+ <div
37
+ border="~ base"
38
+ flex="~ inline gap2"
39
+ m-3 inline-block items-center rounded px-4 py-1 transition-all duration-300 bg-base
40
+ :style="show ? {} : { transform: `translateY(${position.startsWith('top') ? '-' : ''}300%)` }"
41
+ :class="[show ? 'shadow' : 'shadow-none', classes]"
42
+ >
43
+ <div v-if="icon" :class="icon" />
44
+ <div>{{ text }}</div>
45
+ </div>
46
+ </div>
47
+ </div>
48
+ </template>
@@ -16,6 +16,7 @@ const props = withDefaults(
16
16
  type: 'text',
17
17
  },
18
18
  )
19
+
19
20
  const emit = defineEmits<{ (...args: any): void }>()
20
21
  const input = useVModel(props, 'modelValue', emit, { passive: true })
21
22
  </script>
package/dist/module.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "devtools-ui-kit",
3
3
  "configKey": "devtoolsUIKit",
4
- "version": "1.0.0-beta.1"
4
+ "version": "1.0.0-beta.2"
5
5
  }
package/dist/module.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { fileURLToPath } from 'node:url';
2
- import { defineNuxtModule, addComponentsDir, createResolver, installModule } from '@nuxt/kit';
2
+ import { defineNuxtModule, addImportsDir, addComponentsDir, createResolver, installModule } from '@nuxt/kit';
3
3
  import defu from 'defu';
4
4
  import { extendUnocssOptions } from './unocss.mjs';
5
5
  export { unocssPreset } from './unocss.mjs';
@@ -21,6 +21,7 @@ const module = defineNuxtModule({
21
21
  dev: false
22
22
  },
23
23
  async setup(options, nuxt) {
24
+ addImportsDir(rPath("./composables"));
24
25
  addComponentsDir({ path: rPath("./components") });
25
26
  nuxt.options.css.unshift(rPath("assets/styles.css"));
26
27
  if (!options.dev)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nuxt/devtools-ui-kit",
3
3
  "type": "module",
4
- "version": "1.0.0-beta.1",
4
+ "version": "1.0.0-beta.2",
5
5
  "license": "MIT",
6
6
  "repository": "nuxt/devtools",
7
7
  "exports": {
@@ -23,13 +23,13 @@
23
23
  "dist"
24
24
  ],
25
25
  "peerDependencies": {
26
- "@nuxt/devtools": "1.0.0-beta.1"
26
+ "@nuxt/devtools": "1.0.0-beta.2"
27
27
  },
28
28
  "dependencies": {
29
29
  "@iconify-json/carbon": "^1.1.21",
30
30
  "@iconify-json/logos": "^1.1.37",
31
31
  "@iconify-json/ri": "^1.1.12",
32
- "@iconify-json/tabler": "^1.1.94",
32
+ "@iconify-json/tabler": "^1.1.95",
33
33
  "@nuxt/kit": "^3.7.4",
34
34
  "@nuxtjs/color-mode": "^3.3.0",
35
35
  "@unocss/core": "^0.56.5",
@@ -46,11 +46,11 @@
46
46
  "splitpanes": "^3.1.5",
47
47
  "unocss": "^0.56.5",
48
48
  "v-lazy-show": "^0.2.3",
49
- "@nuxt/devtools-kit": "1.0.0-beta.1"
49
+ "@nuxt/devtools-kit": "1.0.0-beta.2"
50
50
  },
51
51
  "devDependencies": {
52
52
  "nuxt": "^3.7.4",
53
- "@nuxt/devtools": "1.0.0-beta.1"
53
+ "@nuxt/devtools": "1.0.0-beta.2"
54
54
  },
55
55
  "publishConfig": {
56
56
  "access": "public"