@owdproject/nuxt-theme-ui 0.0.0-stage → 4.0.0-alpha.4

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.
Files changed (85) hide show
  1. package/dist/i18n/locales/en.d.ts +2 -0
  2. package/dist/i18n/locales/en.js +1 -0
  3. package/dist/module.d.mts +7 -0
  4. package/dist/module.json +9 -0
  5. package/dist/module.mjs +50 -0
  6. package/dist/runtime/apps/calculator/app.config.d.ts +34 -0
  7. package/dist/runtime/apps/calculator/app.config.js +35 -0
  8. package/dist/runtime/apps/calculator/components/Window/WindowCalculator.d.vue.ts +6 -0
  9. package/dist/runtime/apps/calculator/components/Window/WindowCalculator.vue +94 -0
  10. package/dist/runtime/apps/calculator/components/Window/WindowCalculator.vue.d.ts +6 -0
  11. package/dist/runtime/apps/calculator/plugin.d.ts +2 -0
  12. package/dist/runtime/apps/calculator/plugin.js +11 -0
  13. package/dist/runtime/apps/explorer/app.config.d.ts +36 -0
  14. package/dist/runtime/apps/explorer/app.config.js +39 -0
  15. package/dist/runtime/apps/explorer/components/Window/WindowExplorer.d.vue.ts +6 -0
  16. package/dist/runtime/apps/explorer/components/Window/WindowExplorer.vue +30 -0
  17. package/dist/runtime/apps/explorer/components/Window/WindowExplorer.vue.d.ts +6 -0
  18. package/dist/runtime/apps/explorer/plugin.d.ts +2 -0
  19. package/dist/runtime/apps/explorer/plugin.js +11 -0
  20. package/dist/runtime/apps/installBuiltInApps.d.ts +3 -0
  21. package/dist/runtime/apps/installBuiltInApps.js +28 -0
  22. package/dist/runtime/apps/notepad/app.config.d.ts +34 -0
  23. package/dist/runtime/apps/notepad/app.config.js +35 -0
  24. package/dist/runtime/apps/notepad/components/Window/WindowNotepad.d.vue.ts +6 -0
  25. package/dist/runtime/apps/notepad/components/Window/WindowNotepad.vue +47 -0
  26. package/dist/runtime/apps/notepad/components/Window/WindowNotepad.vue.d.ts +6 -0
  27. package/dist/runtime/apps/notepad/plugin.d.ts +2 -0
  28. package/dist/runtime/apps/notepad/plugin.js +11 -0
  29. package/dist/runtime/apps/registry.d.ts +8 -0
  30. package/dist/runtime/apps/registry.js +10 -0
  31. package/dist/runtime/components/Background/DesktopBackground.d.vue.ts +3 -0
  32. package/dist/runtime/components/Background/DesktopBackground.vue +3 -0
  33. package/dist/runtime/components/Background/DesktopBackground.vue.d.ts +3 -0
  34. package/dist/runtime/components/Desktop/DesktopContent.d.vue.ts +13 -0
  35. package/dist/runtime/components/Desktop/DesktopContent.vue +23 -0
  36. package/dist/runtime/components/Desktop/DesktopContent.vue.d.ts +13 -0
  37. package/dist/runtime/components/Desktop.client.d.vue.ts +23 -0
  38. package/dist/runtime/components/Desktop.client.vue +52 -0
  39. package/dist/runtime/components/Desktop.client.vue.d.ts +23 -0
  40. package/dist/runtime/components/NuxtLauncherOverlay.d.vue.ts +3 -0
  41. package/dist/runtime/components/NuxtLauncherOverlay.vue +110 -0
  42. package/dist/runtime/components/NuxtLauncherOverlay.vue.d.ts +3 -0
  43. package/dist/runtime/components/NuxtTopBar.d.vue.ts +3 -0
  44. package/dist/runtime/components/NuxtTopBar.vue +63 -0
  45. package/dist/runtime/components/NuxtTopBar.vue.d.ts +3 -0
  46. package/dist/runtime/components/Window/DesktopWindow.d.vue.ts +43 -0
  47. package/dist/runtime/components/Window/DesktopWindow.vue +40 -0
  48. package/dist/runtime/components/Window/DesktopWindow.vue.d.ts +43 -0
  49. package/dist/runtime/components/Window/DesktopWindowContent.d.vue.ts +13 -0
  50. package/dist/runtime/components/Window/DesktopWindowContent.vue +5 -0
  51. package/dist/runtime/components/Window/DesktopWindowContent.vue.d.ts +13 -0
  52. package/dist/runtime/components/Window/DesktopWindowIframe.d.vue.ts +29 -0
  53. package/dist/runtime/components/Window/DesktopWindowIframe.vue +13 -0
  54. package/dist/runtime/components/Window/DesktopWindowIframe.vue.d.ts +29 -0
  55. package/dist/runtime/components/Window/DesktopWindowNav.d.vue.ts +3 -0
  56. package/dist/runtime/components/Window/DesktopWindowNav.vue +105 -0
  57. package/dist/runtime/components/Window/DesktopWindowNav.vue.d.ts +3 -0
  58. package/dist/runtime/composables/useNuxtStartMenu.d.ts +9 -0
  59. package/dist/runtime/composables/useNuxtStartMenu.js +57 -0
  60. package/dist/types.d.mts +7 -0
  61. package/package.json +70 -4
  62. package/src/i18n/locales/en.ts +1 -0
  63. package/src/module.ts +69 -0
  64. package/src/runtime/apps/calculator/app.config.ts +35 -0
  65. package/src/runtime/apps/calculator/components/Window/WindowCalculator.vue +104 -0
  66. package/src/runtime/apps/calculator/plugin.ts +12 -0
  67. package/src/runtime/apps/explorer/app.config.ts +39 -0
  68. package/src/runtime/apps/explorer/components/Window/WindowExplorer.vue +34 -0
  69. package/src/runtime/apps/explorer/plugin.ts +12 -0
  70. package/src/runtime/apps/installBuiltInApps.ts +36 -0
  71. package/src/runtime/apps/notepad/app.config.ts +35 -0
  72. package/src/runtime/apps/notepad/components/Window/WindowNotepad.vue +50 -0
  73. package/src/runtime/apps/notepad/plugin.ts +12 -0
  74. package/src/runtime/apps/registry.ts +21 -0
  75. package/src/runtime/components/Background/DesktopBackground.vue +3 -0
  76. package/src/runtime/components/Desktop/DesktopContent.vue +37 -0
  77. package/src/runtime/components/Desktop.client.vue +136 -0
  78. package/src/runtime/components/NuxtLauncherOverlay.vue +117 -0
  79. package/src/runtime/components/NuxtTopBar.vue +68 -0
  80. package/src/runtime/components/Window/DesktopWindow.vue +44 -0
  81. package/src/runtime/components/Window/DesktopWindowContent.vue +5 -0
  82. package/src/runtime/components/Window/DesktopWindowIframe.vue +13 -0
  83. package/src/runtime/components/Window/DesktopWindowNav.vue +110 -0
  84. package/src/runtime/composables/useNuxtStartMenu.ts +72 -0
  85. package/README.md +0 -3
@@ -0,0 +1,72 @@
1
+ import { ref, computed } from 'vue'
2
+ import { useScrollLock } from '@vueuse/core'
3
+ import { useApplicationManager } from '@owdproject/nuxt/runtime/composables/useApplicationManager'
4
+ import { useApplicationEntries } from '@owdproject/nuxt/runtime/composables/useApplicationEntries'
5
+
6
+ const open = ref(false)
7
+ const searchQuery = ref('')
8
+
9
+ function isValidEntry(
10
+ entry: any
11
+ ): entry is any {
12
+ return Boolean(entry?.application?.id && entry.command)
13
+ }
14
+
15
+ export function useNuxtStartMenu() {
16
+ const applicationManager = useApplicationManager()
17
+ const applicationEntries = useApplicationEntries()
18
+
19
+ const bodyScrollLock = useScrollLock(
20
+ typeof document !== 'undefined' ? document.body : null,
21
+ )
22
+
23
+ const allEntries = computed(() => {
24
+ return (applicationEntries as any)
25
+ .sortedAppEntries('title', 'primary')
26
+ .value.filter(isValidEntry)
27
+ })
28
+
29
+ const filteredEntries = computed(() => {
30
+ const q = searchQuery.value.trim().toLowerCase()
31
+ const entries = allEntries.value
32
+ if (!q) return entries
33
+ return entries.filter((entry: any) =>
34
+ (entry.title ?? '').toLowerCase().includes(q),
35
+ )
36
+ })
37
+
38
+ function syncScrollLock() {
39
+ bodyScrollLock.value = open.value
40
+ }
41
+
42
+ function toggle() {
43
+ open.value = !open.value
44
+ searchQuery.value = ''
45
+ syncScrollLock()
46
+ }
47
+
48
+ function close() {
49
+ open.value = false
50
+ searchQuery.value = ''
51
+ bodyScrollLock.value = false
52
+ }
53
+
54
+ async function launchEntry(entry: any) {
55
+ if (!isValidEntry(entry)) return
56
+ await applicationManager.execAppCommand(
57
+ entry.application.id,
58
+ entry.command,
59
+ )
60
+ close()
61
+ }
62
+
63
+ return {
64
+ open,
65
+ searchQuery,
66
+ allEntries,
67
+ filteredEntries,
68
+ toggle,
69
+ close,
70
+ launchEntry,
71
+ }
72
+ }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.