@owdproject/core 3.1.2 → 3.1.4-beta.0
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/CHANGELOG.md +25 -0
- package/README.md +9 -10
- package/bin/owd.js +14 -14
- package/index.ts +5 -2
- package/module.ts +64 -55
- package/package.json +19 -17
- package/project.json +4 -0
- package/runtime/components/Core/Application/CoreApplicationRender.vue +6 -5
- package/runtime/components/Core/Application/CoreApplicationWindowsRender.vue +8 -8
- package/runtime/components/Core/Background/CoreBackground.vue +1 -1
- package/runtime/components/Core/Desktop/CoreDesktop.vue +23 -20
- package/runtime/components/Core/Explorer/CoreExplorerFile.vue +47 -38
- package/runtime/components/Core/Explorer/CoreExplorerFolder.vue +0 -1
- package/runtime/components/Core/Time/CoreTime.vue +10 -7
- package/runtime/components/Core/Window/CoreWindow.vue +46 -34
- package/runtime/components/Core/Window/CoreWindowContent.vue +3 -5
- package/runtime/components/Core/Window/CoreWindowNav.vue +12 -7
- package/runtime/composables/useApplicationEntries.ts +51 -0
- package/runtime/composables/useApplicationManager.ts +3 -3
- package/runtime/composables/useClipboardFs.ts +11 -11
- package/runtime/composables/useDesktopManager.ts +2 -2
- package/runtime/composables/useTerminalManager.ts +3 -3
- package/runtime/core/controllers/ApplicationController.ts +211 -200
- package/runtime/core/controllers/WindowController.ts +349 -312
- package/runtime/core/managers/ApplicationManager.ts +240 -196
- package/runtime/core/managers/DesktopManager.ts +35 -25
- package/runtime/core/managers/TerminalManager.ts +36 -32
- package/runtime/plugins/resize.client.ts +4 -4
- package/runtime/stores/storeApplication.ts +235 -0
- package/runtime/stores/storeApplicationMeta.ts +12 -8
- package/runtime/stores/storeApplicationWindows.ts +16 -12
- package/runtime/stores/storeDesktop.ts +33 -29
- package/runtime/stores/storeDesktopVolume.ts +12 -12
- package/runtime/stores/storeDesktopWindow.ts +13 -13
- package/runtime/stores/storeDesktopWorkspace.ts +35 -31
- package/runtime/utils/utilApp.ts +27 -22
- package/runtime/utils/utilCommon.ts +43 -43
- package/runtime/utils/utilDebug.ts +17 -17
- package/runtime/utils/utilDesktop.ts +4 -4
- package/runtime/utils/utilTerminal.ts +6 -5
- package/runtime/utils/utilWindow.ts +11 -11
- package/test/fixtures/basic/app.vue +1 -2
- package/test/fixtures/basic/nuxt.config.ts +1 -3
- package/tsconfig.app.json +1 -1
- package/tsconfig.json +1 -1
- package/types/index.d.ts +235 -207
- package/vitest.config.ts +3 -3
- package/.editorconfig +0 -12
- package/eslint.config.mjs +0 -30
- package/runtime/composables/useAppEntries.ts +0 -36
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import {useApplicationManager} from './useApplicationManager'
|
|
2
|
-
import {computed} from "@vue/reactivity"
|
|
3
|
-
|
|
4
|
-
type SortBy = 'title' | 'category' | ((a: ApplicationEntryWithInherited, b: ApplicationEntryWithInherited) => number)
|
|
5
|
-
type Visibility = 'primary' | 'all' | ((entry: ApplicationEntryWithInherited) => boolean)
|
|
6
|
-
|
|
7
|
-
export function useAppEntries() {
|
|
8
|
-
const applicationManager = useApplicationManager()
|
|
9
|
-
|
|
10
|
-
const sortedAppEntries = function(
|
|
11
|
-
sortBy: SortBy = 'title',
|
|
12
|
-
visibility: Visibility = 'primary'
|
|
13
|
-
): Ref<ApplicationEntryWithInherited[]> {
|
|
14
|
-
return computed(() => {
|
|
15
|
-
const currentEntries = [...applicationManager.appsEntries]
|
|
16
|
-
|
|
17
|
-
// filtering
|
|
18
|
-
const filtered = typeof visibility === 'function'
|
|
19
|
-
? currentEntries.filter(visibility)
|
|
20
|
-
: visibility === 'primary'
|
|
21
|
-
? currentEntries.filter(e => e.visibility !== 'secondary')
|
|
22
|
-
: currentEntries
|
|
23
|
-
|
|
24
|
-
// sorting
|
|
25
|
-
const sorted = typeof sortBy === 'function'
|
|
26
|
-
? filtered.sort(sortBy)
|
|
27
|
-
: sortBy === 'title'
|
|
28
|
-
? filtered.sort((a, b) => (a.title || '').localeCompare(b.title || ''))
|
|
29
|
-
: filtered.sort((a, b) => (a.category || '').localeCompare(b.category || ''))
|
|
30
|
-
|
|
31
|
-
return sorted
|
|
32
|
-
})
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
return { sortedAppEntries }
|
|
36
|
-
}
|