@owdproject/core 3.0.0-alpha.3 → 3.0.0-alpha.5

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/LICENSE CHANGED
@@ -631,8 +631,8 @@ to attach them to the start of each source file to most effectively
631
631
  state the exclusion of warranty; and each file should have at least
632
632
  the "copyright" line and a pointer to where the full notice is found.
633
633
 
634
- Open Web Desktop - A framework for building web-based desktop experiences.
635
- Copyright (C) 2025 Open Web Desktop Team ~ github.com/owdproject
634
+ Open Web Desktop - Build Your Web OS
635
+ Copyright (C) 2025 github.com/owdproject
636
636
 
637
637
  This program is free software: you can redistribute it and/or modify
638
638
  it under the terms of the GNU General Public License as published by
@@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail.
652
652
  If the program does terminal interaction, make it output a short
653
653
  notice like this when it starts in an interactive mode:
654
654
 
655
- Open Web Desktop Copyright (C) 2025 Open Web Desktop Team
655
+ Open Web Desktop ~ Copyright (C) 2025 ~ Open Web Desktop Team
656
656
  This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657
657
  This is free software, and you are welcome to redistribute it
658
658
  under certain conditions; type `show c' for details.
package/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  <p align="center">
2
- <img width="160" height="160" alt="Motion logo" src="https://avatars.githubusercontent.com/u/65117737?s=160&v=4" />
2
+ <img width="160" height="160" alt="Open Web Desktop logo" src="https://avatars.githubusercontent.com/u/65117737?s=160&v=4" />
3
3
  </p>
4
4
  <h1 align="center">Open Web Desktop</h1>
5
5
  <h3 align="center">
6
- A framework for building web-based desktop experiences.
6
+ A framework for building web-based desktop experiences
7
7
  </h3>
8
8
 
9
9
  ## Overview
@@ -106,8 +106,7 @@ If you'd like to contribute, here's how to set up your local development environ
106
106
 
107
107
  **Cloning the Repository:**
108
108
 
109
- To contribute, start by forking the Open Web Desktop client repository on GitHub.
110
-
109
+ To contribute, start by forking the Open Web Desktop client repository on GitHub.
111
110
  Then, clone your fork using HTTPS or SSH:
112
111
 
113
112
  ```bash
@@ -137,4 +136,4 @@ Open Web Desktop is a vast project. The code has been totally rewritten and is n
137
136
 
138
137
  ### License
139
138
 
140
- Open Web Desktop is licensed under the [GNU General Public License v3](LICENSE).
139
+ Open Web Desktop is released under the [GNU General Public License v3](LICENSE).
package/index.ts CHANGED
@@ -1,12 +1,16 @@
1
- import {defineNuxtModule, createResolver, addComponentsDir, addImportsDir, installModule} from '@nuxt/kit'
2
- import pkg from '../package.json'
1
+ import {defineNuxtModule, createResolver, addComponentsDir, addImportsDir, installModule, addPlugin} from '@nuxt/kit'
2
+ import {useDesktopManager} from './runtime/composables/useDesktopManager'
3
+ import pkg from './package.json'
3
4
 
4
5
  export default defineNuxtModule({
5
6
  meta: {
6
7
  name: 'owd-core',
7
8
  },
8
9
  async setup(options, nuxt) {
9
- const {resolve} = createResolver(import.meta.url);
10
+ const {resolve} = createResolver(import.meta.url)
11
+ const desktopManager = useDesktopManager()
12
+
13
+ await import(nuxt.options.rootDir + '/owd.config.ts')
10
14
 
11
15
  // set core version to runtime variables
12
16
 
@@ -18,11 +22,22 @@ export default defineNuxtModule({
18
22
  nuxt.options.primevue.options = nuxt.options.primevue.options || {};
19
23
  nuxt.options.primevue.options.theme = nuxt.options.primevue.options.theme || {};
20
24
 
25
+ {
26
+
27
+ // install open web desktop apps
28
+
29
+ if (desktopManager.config.apps) {
30
+ for (const appPath of desktopManager.config.apps) {
31
+ await installModule(appPath)
32
+ }
33
+ }
34
+
35
+ }
36
+
21
37
  {
22
38
 
23
39
  // install tailwind
24
40
 
25
- nuxt.options.modules.push('@nuxtjs/tailwindcss')
26
41
  await installModule("@nuxtjs/tailwindcss", {
27
42
  viewer: false,
28
43
  })
@@ -112,7 +127,7 @@ export default defineNuxtModule({
112
127
 
113
128
  {
114
129
 
115
- // add runtime components
130
+ // add components
116
131
 
117
132
  addComponentsDir({
118
133
  path: resolve("./runtime/components"),
@@ -124,9 +139,11 @@ export default defineNuxtModule({
124
139
 
125
140
  {
126
141
 
127
- nuxt.options.plugins.push(
128
- resolve('./runtime/plugins/resize.client.ts'),
129
- )
142
+ // install plugins
143
+
144
+ addPlugin(resolve('./runtime/plugins/resize.client.ts'))
145
+
146
+ // add other files
130
147
 
131
148
  addImportsDir(resolve('./runtime/composables'))
132
149
  addImportsDir(resolve('./runtime/core'))
@@ -134,7 +151,6 @@ export default defineNuxtModule({
134
151
  addImportsDir(resolve('./runtime/utils'))
135
152
 
136
153
  }
137
-
138
154
  }
139
155
  })
140
156
 
@@ -152,4 +168,4 @@ export * from './runtime/utils/utilsWindow'
152
168
  export * from './runtime/stores/storeDesktop'
153
169
  export * from './runtime/stores/storeDesktopVolume'
154
170
  export * from './runtime/stores/storeDesktopWindow'
155
- export * from './runtime/stores/storeDesktopWorkspace'
171
+ export * from './runtime/stores/storeDesktopWorkspace'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owdproject/core",
3
- "version": "3.0.0-alpha.3",
3
+ "version": "3.0.0-alpha.5",
4
4
  "description": "Open Web Desktop core",
5
5
  "keywords": [
6
6
  "web",
@@ -34,15 +34,12 @@ if (desktopStore.$persistedState) {
34
34
  }
35
35
 
36
36
  // override desktop configurations
37
- desktopManager.overrideConfig({
37
+ desktopManager.setConfig({
38
38
  windows: toRaw(props.windows),
39
- systemBar: toRaw(props.systemBar),
39
+ systemBar: toRaw( props.systemBar),
40
40
  dockBar: toRaw(props.dockBar),
41
41
  })
42
42
 
43
- // define apps and restore statuses
44
- applicationManager.importApps()
45
-
46
43
  // desktop resize
47
44
  // todo move to composable
48
45
 
@@ -44,7 +44,7 @@ export class ApplicationController implements IApplicationController {
44
44
  this.config.entries[this.config.provides.entry] as ApplicationEntry
45
45
  )
46
46
 
47
- debugLog(`${this.config.title} has been set as predefined app for "${this.config.provides}"`)
47
+ debugLog(`${this.config.title} has been set as predefined app for "${this.config.provides.name}"`)
48
48
  }
49
49
  }
50
50
 
@@ -12,17 +12,6 @@ export class ApplicationManager implements IApplicationManager {
12
12
  constructor() {
13
13
  }
14
14
 
15
- /**
16
- * Import applications on nuxt start
17
- */
18
- public async importApps() {
19
- const {owdConfig} = await import(`~~/owd.config`)
20
-
21
- if (owdConfig && typeof owdConfig.loader === 'function') {
22
- await owdConfig.loader()
23
- }
24
- }
25
-
26
15
  /**
27
16
  * Define new application
28
17
  *
@@ -13,11 +13,6 @@ export class DesktopManager {
13
13
  }
14
14
 
15
15
  public setConfig(config: DesktopConfig) {
16
- this.config = config
17
- this.loadDefaultAppsFromConfig()
18
- }
19
-
20
- public overrideConfig(config: Partial<DesktopConfig>) {
21
16
  this.config = deepMerge(this.config, config) as DesktopConfig
22
17
  this.loadDefaultAppsFromConfig()
23
18
  }
@@ -9,4 +9,5 @@ export function defineDesktopApp(config: ApplicationConfig) {
9
9
  export function defineDesktopConfig(config: DesktopConfig) {
10
10
  const desktopManager = useDesktopManager()
11
11
  desktopManager.setConfig(config)
12
+ return true
12
13
  }
package/types/owd.d.ts CHANGED
@@ -1,8 +1,6 @@
1
1
  interface IApplicationManager {
2
2
  apps: Map<string, IApplicationController>
3
3
 
4
- importApps()
5
-
6
4
  get appsEntries(): Reactive<ApplicationEntry[]>
7
5
 
8
6
  get appsRunning(): Reactive<IApplicationController[]>
@@ -288,8 +286,9 @@ interface IDesktopManager {
288
286
  }
289
287
 
290
288
  interface DesktopConfig {
291
- name: string
292
- compatibility: string
289
+ name?: string
290
+ compatibility?: string
291
+ apps?: string[]
293
292
  defaultApps?: DefaultAppsConfig
294
293
  features?: string[]
295
294
  systemBar?: DesktopSystemBarConfig