@feathersdev/websites 0.0.1 → 0.0.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.
@@ -1,6 +1,4 @@
1
1
  <script setup lang="ts">
2
- import { ref, onMounted, onUnmounted } from 'vue'
3
-
4
2
  const props = defineProps<{
5
3
  /** Array of Nuxt Content collection names to search. If not provided, auto-detects from route. */
6
4
  collections?: string[]
@@ -10,32 +8,12 @@ const props = defineProps<{
10
8
  popularPaths?: string[]
11
9
  }>()
12
10
 
13
- const isModalOpen = ref(false)
14
- const isMac = ref(false)
15
-
16
- onMounted(() => {
17
- // Detect platform for keyboard shortcut display
18
- isMac.value = navigator.platform.toLowerCase().includes('mac')
19
-
20
- // Register global keyboard shortcut
21
- const handleGlobalKeydown = (event: KeyboardEvent) => {
22
- // Cmd+K on Mac, Ctrl+K on Windows/Linux
23
- if ((event.metaKey || event.ctrlKey) && event.key === 'k') {
24
- event.preventDefault()
25
- isModalOpen.value = true
26
- }
27
- }
11
+ const { isSearchOpen, openSearch } = useGlobalSearch()
28
12
 
29
- document.addEventListener('keydown', handleGlobalKeydown)
30
-
31
- onUnmounted(() => {
32
- document.removeEventListener('keydown', handleGlobalKeydown)
33
- })
13
+ const isMac = computed(() => {
14
+ if (import.meta.server) return false
15
+ return navigator.platform.toLowerCase().includes('mac')
34
16
  })
35
-
36
- function openModal() {
37
- isModalOpen.value = true
38
- }
39
17
  </script>
40
18
 
41
19
  <template>
@@ -44,7 +22,7 @@ function openModal() {
44
22
  <Button
45
23
  ghost
46
24
  class="bg-base-100 border border-base-300 w-full justify-start gap-2 font-normal text-base-content/60 hover:text-base-content hover:bg-base-100 hover:border-base-content/20 whitespace-nowrap"
47
- @click="openModal"
25
+ @click="openSearch"
48
26
  >
49
27
  <Icon name="heroicons:magnifying-glass" class="w-4 h-4" />
50
28
  <Text class="grow text-left">Search docs...</Text>
@@ -53,7 +31,7 @@ function openModal() {
53
31
 
54
32
  <!-- Search Modal -->
55
33
  <DocsSearchModal
56
- v-model="isModalOpen"
34
+ v-model="isSearchOpen"
57
35
  :collections="props.collections"
58
36
  :search-label="props.searchLabel"
59
37
  :popular-paths="props.popularPaths"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feathersdev/websites",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "type": "module",
5
5
  "description": "Shared Nuxt layer for Feathers websites",
6
6
  "publishConfig": {
@@ -11,23 +11,23 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "@formkit/auto-animate": "^0.9.0",
14
- "better-sqlite3": "^12.6.0",
15
- "zod": "^4.3.5"
14
+ "better-sqlite3": "^12.6.2",
15
+ "zod": "^4.3.6"
16
16
  },
17
17
  "peerDependencies": {
18
- "@nuxt/content": "^3.10.0",
19
- "@nuxt/eslint": "^1.12.1",
20
- "@nuxt/fonts": "^0.12.1",
21
- "@nuxt/icon": "^2.2.0",
18
+ "@nuxt/content": "^3.11.0",
19
+ "@nuxt/eslint": "^1.13.0",
20
+ "@nuxt/fonts": "^0.13.0",
21
+ "@nuxt/icon": "^2.2.1",
22
22
  "@nuxt/image": "^2.0.0",
23
23
  "@nuxt/scripts": "^0.13.2",
24
24
  "@nuxt/test-utils": "^3.23.0",
25
25
  "@tailwindcss/typography": "^0.5.19",
26
26
  "@tailwindcss/vite": "^4.1.18",
27
- "daisy-ui-kit": "5.0.2",
27
+ "daisy-ui-kit": "5.0.9",
28
28
  "daisyui": "^5.5.14",
29
- "nuxt": "^4.2.2",
29
+ "nuxt": "^4.3.0",
30
30
  "tailwindcss": "^4.1.18",
31
- "zod": "^4.3.5"
31
+ "zod": "^4.3.6"
32
32
  }
33
- }
33
+ }