@owdproject/core 3.0.0-alpha.9 → 3.1.1
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/.editorconfig +12 -0
- package/LICENSE +20 -674
- package/README.md +62 -86
- package/eslint.config.mjs +30 -0
- package/index.ts +2 -192
- package/module.ts +181 -0
- package/package.json +21 -23
- package/runtime/components/Core/Desktop/CoreDesktop.vue +1 -1
- package/runtime/composables/useClipboardFs.ts +25 -0
- package/runtime/core/controllers/ApplicationController.ts +10 -1
- package/runtime/core/controllers/WindowController.ts +10 -5
- package/runtime/core/managers/DesktopManager.ts +2 -2
- package/runtime/core/managers/TerminalManager.ts +6 -4
- package/runtime/stores/storeApplicationWindows.ts +1 -1
- package/runtime/stores/storeDesktop.ts +3 -3
- package/runtime/stores/storeDesktopVolume.ts +3 -3
- package/runtime/stores/storeDesktopWindow.ts +3 -3
- package/runtime/stores/storeDesktopWorkspace.ts +3 -3
- package/runtime/utils/utilApp.ts +5 -6
- package/runtime/utils/utilCommon.ts +2 -2
- package/runtime/utils/utilDesktop.ts +1 -2
- package/test/basic.test.ts +15 -0
- package/test/fixtures/basic/app.vue +6 -0
- package/test/fixtures/basic/nuxt.config.ts +7 -0
- package/test/fixtures/basic/package.json +5 -0
- package/tsconfig.app.json +31 -0
- package/tsconfig.json +11 -2
- package/tsconfig.spec.json +37 -0
- package/types/{owd.d.ts → index.d.ts} +26 -3
- package/vitest.config.ts +24 -0
package/README.md
CHANGED
|
@@ -1,148 +1,124 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img width="160" height="160"
|
|
2
|
+
<img width="160" height="160" 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 modular framework for building web-based desktop experiences.
|
|
7
7
|
</h3>
|
|
8
8
|
|
|
9
9
|
## Overview
|
|
10
|
-
Open Web Desktop (OWD) is a framework designed to provide a simple environment for building web-based desktop experiences. It's built with TypeScript on top of the Nuxt.js framework.
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
Open Web Desktop (OWD) is a framework designed to provide a simple environment for building web-based desktop experiences. It's built with Vue.js & TypeScript, and it leverages the extensible Nuxt.js architecture.
|
|
12
|
+
|
|
13
|
+
[Demo](https://atproto-os.pages.dev/) · [Documentation](https://owdproject.org/)
|
|
13
14
|
|
|
14
15
|
## Features
|
|
16
|
+
|
|
15
17
|
- Open-source web desktop environment built with Nuxt.js
|
|
16
18
|
- Fully extendable through themes, apps, and modules
|
|
17
|
-
- Bundled with popular libraries like Pinia
|
|
19
|
+
- Bundled with popular Vue.js libraries like Pinia and VueUse
|
|
18
20
|
- Designed to make the most of the Nuxt.js ecosystem
|
|
19
21
|
- Styled with PrimeVue and Tailwind for a consistent UI
|
|
20
|
-
- Fully localizable with i18n support
|
|
22
|
+
- Fully localizable with nuxt-i18n support
|
|
21
23
|
|
|
22
24
|
## Getting started
|
|
23
|
-
Required software:
|
|
24
25
|
|
|
25
|
-
|
|
26
|
-
- [Node](https://nodejs.org)
|
|
26
|
+
Bootstrap a new project by running:
|
|
27
27
|
|
|
28
|
-
When you are ready, bootstrap a new project by running:
|
|
29
28
|
```bash
|
|
30
29
|
npm create owd
|
|
31
30
|
```
|
|
32
|
-
Once the process is complete, you can start to develop:
|
|
33
|
-
```bash
|
|
34
|
-
# Run the dev server with hot-reload
|
|
35
|
-
npm run dev
|
|
36
31
|
|
|
37
|
-
|
|
38
|
-
npm run generate
|
|
39
|
-
```
|
|
32
|
+
Once the process is done, you can start to develop:
|
|
40
33
|
|
|
41
|
-
|
|
42
|
-
|
|
34
|
+
```bash
|
|
35
|
+
cd owd-client
|
|
43
36
|
|
|
44
|
-
|
|
45
|
-
|
|
37
|
+
# Run the dev server with hot-reload
|
|
38
|
+
pnpm install
|
|
39
|
+
pnpm run dev
|
|
46
40
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
export default defineDesktopConfig({
|
|
50
|
-
apps: [
|
|
51
|
-
"@owdproject/app-about",
|
|
52
|
-
"@owdproject/app-todo",
|
|
53
|
-
]
|
|
54
|
-
})
|
|
41
|
+
# Build for production
|
|
42
|
+
pnpm run generate
|
|
55
43
|
```
|
|
56
44
|
|
|
57
|
-
##
|
|
58
|
-
Themes allow you to customize the look and feel of your Open Web Desktop instance.
|
|
59
|
-
You can explore available themes, ranging from popular OS designs to fully custom creations, at [topics/owd-themes](https://github.com/topics/owd-themes).
|
|
45
|
+
## Extend your desktop
|
|
60
46
|
|
|
61
|
-
|
|
62
|
-
You can install a new theme by defining it in the `owd.config.ts` configuration.
|
|
63
|
-
Themes can be loaded from a local path or directly from a GitHub repository.
|
|
47
|
+
Open Web Desktop can be extended with themes, modules and applications.
|
|
64
48
|
|
|
65
|
-
|
|
49
|
+
### Install an application
|
|
66
50
|
|
|
67
|
-
|
|
51
|
+
You can install a new [application](https://github.com/topics/owd-apps) with:
|
|
68
52
|
|
|
69
53
|
```bash
|
|
70
|
-
|
|
54
|
+
pnpm install @owdproject/app-todo
|
|
71
55
|
```
|
|
72
56
|
|
|
73
|
-
Then
|
|
57
|
+
Then, define it in the desktop configuration:
|
|
74
58
|
|
|
75
59
|
```typescript
|
|
76
|
-
// owd.config.ts
|
|
60
|
+
// desktop/owd.config.ts
|
|
77
61
|
export default defineDesktopConfig({
|
|
78
|
-
theme:
|
|
62
|
+
theme: "@owdproject/theme-win95",
|
|
79
63
|
apps: [
|
|
80
|
-
|
|
64
|
+
"@owdproject/app-about",
|
|
65
|
+
"@owdproject/app-todo", // define here the app you just installed
|
|
66
|
+
],
|
|
67
|
+
modules: []
|
|
68
|
+
})
|
|
81
69
|
```
|
|
82
70
|
|
|
83
|
-
|
|
71
|
+
### Install a module
|
|
84
72
|
|
|
85
|
-
|
|
73
|
+
You can install a new [module](https://github.com/topics/owd-modules) with:
|
|
86
74
|
|
|
87
75
|
```bash
|
|
88
|
-
|
|
76
|
+
pnpm install @owdproject/module-pinia-localforage
|
|
89
77
|
```
|
|
90
78
|
|
|
91
|
-
Then
|
|
79
|
+
Then, define it in the desktop configuration:
|
|
92
80
|
|
|
93
81
|
```typescript
|
|
94
|
-
// owd.config.ts
|
|
95
|
-
import {defineDesktopConfig} from "@owdproject/core/runtime/utils/utilDesktop"
|
|
96
|
-
|
|
82
|
+
// desktop/owd.config.ts
|
|
97
83
|
export default defineDesktopConfig({
|
|
98
|
-
theme:
|
|
84
|
+
theme: "@owdproject/theme-win95",
|
|
99
85
|
apps: [
|
|
100
|
-
|
|
86
|
+
"@owdproject/app-about",
|
|
87
|
+
"@owdproject/app-todo",
|
|
88
|
+
],
|
|
89
|
+
modules: [
|
|
90
|
+
"@owdproject/module-pinia-localforage", // define here the module you just installed
|
|
91
|
+
]
|
|
92
|
+
})
|
|
101
93
|
```
|
|
102
94
|
|
|
103
|
-
##
|
|
104
|
-
|
|
105
|
-
**Any contribution is welcome!** Open Web Desktop is built with Nuxt and follows a modular architecture, making it easy to contribute to the core codebase or create new modules.
|
|
106
|
-
|
|
107
|
-
### Local Development Setup
|
|
108
|
-
|
|
109
|
-
If you'd like to contribute, here's how to set up your local development environment:
|
|
110
|
-
|
|
111
|
-
**Prerequisites:**
|
|
112
|
-
|
|
113
|
-
- [Git](https://git-scm.com)
|
|
114
|
-
- [Node](https://nodejs.org)
|
|
115
|
-
|
|
116
|
-
**Cloning the Repository:**
|
|
117
|
-
|
|
118
|
-
To contribute, start by forking the Open Web Desktop client repository on GitHub.
|
|
119
|
-
Then, clone your fork using HTTPS or SSH:
|
|
95
|
+
## Themes
|
|
96
|
+
You can install a new [theme](https://github.com/topics/owd-themes) in the same way.
|
|
120
97
|
|
|
121
98
|
```bash
|
|
122
|
-
|
|
123
|
-
git clone https://github.com/<your-username>/client.git
|
|
124
|
-
|
|
125
|
-
# Clone using SSH
|
|
126
|
-
git clone git@github.com:<your-username>/client.git
|
|
99
|
+
pnpm install @owdproject/theme-gnome
|
|
127
100
|
```
|
|
128
101
|
|
|
129
|
-
|
|
130
|
-
Install the dependencies, then start the development server:
|
|
102
|
+
Define the theme in `owd.config.ts`:
|
|
131
103
|
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
104
|
+
```typescript
|
|
105
|
+
// desktop/owd.config.ts
|
|
106
|
+
export default defineDesktopConfig({
|
|
107
|
+
theme: "@owdproject/theme-gnome", // define here the theme you just installed
|
|
108
|
+
apps: [
|
|
109
|
+
"@owdproject/app-about",
|
|
110
|
+
"@owdproject/app-todo",
|
|
111
|
+
],
|
|
112
|
+
modules: [
|
|
113
|
+
"@owdproject/module-pinia-localforage"
|
|
114
|
+
]
|
|
115
|
+
})
|
|
137
116
|
```
|
|
138
117
|
|
|
139
|
-
|
|
140
|
-
The dev server will be available at http://localhost:3000.
|
|
141
|
-
|
|
142
|
-
## Sponsoring
|
|
118
|
+
## Sponsors
|
|
143
119
|
|
|
144
|
-
|
|
120
|
+
Make this project sustainable, your support is crucial to keep it moving forward.
|
|
145
121
|
|
|
146
122
|
## License
|
|
147
123
|
|
|
148
|
-
Open Web Desktop is released under the [
|
|
124
|
+
Open Web Desktop is released under the [MIT License](LICENSE).
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { FlatCompat } from '@eslint/eslintrc';
|
|
2
|
+
import { dirname } from 'path';
|
|
3
|
+
import { fileURLToPath } from 'url';
|
|
4
|
+
import js from '@eslint/js';
|
|
5
|
+
import baseConfig from '../../eslint.config.mjs';
|
|
6
|
+
const compat = new FlatCompat({
|
|
7
|
+
baseDirectory: dirname(fileURLToPath(import.meta.url)),
|
|
8
|
+
recommendedConfig: js.configs.recommended,
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export default [
|
|
12
|
+
...baseConfig,
|
|
13
|
+
{
|
|
14
|
+
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx', '**/*.vue'],
|
|
15
|
+
// Override or add rules here
|
|
16
|
+
rules: {},
|
|
17
|
+
},
|
|
18
|
+
//...compat.extends('@nuxt/eslint-config'),
|
|
19
|
+
{
|
|
20
|
+
files: ['**/*.vue'],
|
|
21
|
+
languageOptions: {
|
|
22
|
+
parserOptions: {
|
|
23
|
+
parser: await import('@typescript-eslint/parser'),
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
ignores: ['.nuxt/**', '.output/**', 'node_modules'],
|
|
29
|
+
},
|
|
30
|
+
];
|
package/index.ts
CHANGED
|
@@ -1,192 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import pkg from './package.json'
|
|
4
|
-
|
|
5
|
-
export default defineNuxtModule({
|
|
6
|
-
meta: {
|
|
7
|
-
name: 'owd-core',
|
|
8
|
-
priority: 9999,
|
|
9
|
-
},
|
|
10
|
-
async setup(options, nuxt) {
|
|
11
|
-
const {resolve} = createResolver(import.meta.url)
|
|
12
|
-
|
|
13
|
-
const desktopConfig = (await import(nuxt.options.rootDir + '/owd.config.ts')).default
|
|
14
|
-
|
|
15
|
-
// set core version to runtime config
|
|
16
|
-
|
|
17
|
-
nuxt.options.runtimeConfig.public.coreVersion = pkg.version
|
|
18
|
-
|
|
19
|
-
{
|
|
20
|
-
|
|
21
|
-
// install open web desktop theme
|
|
22
|
-
|
|
23
|
-
if (desktopConfig.theme) {
|
|
24
|
-
await installModule(desktopConfig.theme)
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// install open web desktop modules
|
|
28
|
-
|
|
29
|
-
if (desktopConfig.modules) {
|
|
30
|
-
for (const modulePath of desktopConfig.modules) {
|
|
31
|
-
await installModule(modulePath)
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// install open web desktop apps
|
|
36
|
-
|
|
37
|
-
if (desktopConfig.apps) {
|
|
38
|
-
for (const appPath of desktopConfig.apps) {
|
|
39
|
-
await installModule(appPath)
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// assign open web desktop config to runtime config
|
|
44
|
-
nuxt.options.runtimeConfig.public.desktop = deepMerge(
|
|
45
|
-
nuxt.options.runtimeConfig.public.desktop,
|
|
46
|
-
desktopConfig
|
|
47
|
-
)
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
{
|
|
52
|
-
|
|
53
|
-
// install primevue
|
|
54
|
-
|
|
55
|
-
nuxt.options.primevue = nuxt.options.primevue || {};
|
|
56
|
-
nuxt.options.primevue.options = nuxt.options.primevue.options || {};
|
|
57
|
-
nuxt.options.primevue.options.theme = nuxt.options.primevue.options.theme || {};
|
|
58
|
-
|
|
59
|
-
await installModule("@primevue/nuxt-module")
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
{
|
|
64
|
-
|
|
65
|
-
// install tailwind
|
|
66
|
-
|
|
67
|
-
const tailwindPaths = nuxt.options.runtimeConfig?.owd?.tailwindPaths || []
|
|
68
|
-
tailwindPaths.push('./runtime/components/**/*.{vue,mjs,ts}') // Aggiungi sempre questo al core
|
|
69
|
-
|
|
70
|
-
nuxt.options.tailwindcss = nuxt.options.tailwindcss || {}
|
|
71
|
-
nuxt.options.tailwindcss.config = nuxt.options.tailwindcss.config || {}
|
|
72
|
-
// @ts-ignore
|
|
73
|
-
nuxt.options.tailwindcss.config.content = tailwindPaths
|
|
74
|
-
|
|
75
|
-
await installModule('@nuxtjs/tailwindcss', {
|
|
76
|
-
viewer: false,
|
|
77
|
-
})
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
{
|
|
82
|
-
|
|
83
|
-
// install pinia
|
|
84
|
-
|
|
85
|
-
await installModule("@pinia/nuxt")
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
{
|
|
90
|
-
|
|
91
|
-
// install @nuxt/fonts
|
|
92
|
-
|
|
93
|
-
await installModule("@nuxt/fonts")
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
{
|
|
98
|
-
|
|
99
|
-
// install @nuxt/icon
|
|
100
|
-
|
|
101
|
-
await installModule("@nuxt/icon", {
|
|
102
|
-
clientBundle: {
|
|
103
|
-
scan: true,
|
|
104
|
-
sizeLimitKb: 256,
|
|
105
|
-
},
|
|
106
|
-
})
|
|
107
|
-
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
{
|
|
111
|
-
|
|
112
|
-
// install @vueuse/nuxt
|
|
113
|
-
|
|
114
|
-
await installModule("@vueuse/nuxt")
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
{
|
|
119
|
-
|
|
120
|
-
// install @nuxtjs/i18n
|
|
121
|
-
|
|
122
|
-
await installModule("@nuxtjs/i18n")
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
{
|
|
127
|
-
|
|
128
|
-
// configure scss for vite
|
|
129
|
-
|
|
130
|
-
nuxt.hook('vite:extendConfig', (viteConfig) => {
|
|
131
|
-
viteConfig.css = viteConfig.css || {}
|
|
132
|
-
viteConfig.css.preprocessorOptions = viteConfig.css.preprocessorOptions || {}
|
|
133
|
-
viteConfig.css.preprocessorOptions.scss = {
|
|
134
|
-
api: 'modern-compiler',
|
|
135
|
-
}
|
|
136
|
-
})
|
|
137
|
-
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
{
|
|
141
|
-
|
|
142
|
-
// add css
|
|
143
|
-
|
|
144
|
-
nuxt.options.css.push('sanitize.css')
|
|
145
|
-
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
{
|
|
149
|
-
|
|
150
|
-
// add components
|
|
151
|
-
|
|
152
|
-
addComponentsDir({
|
|
153
|
-
path: resolve("./runtime/components"),
|
|
154
|
-
prefix: "",
|
|
155
|
-
global: true,
|
|
156
|
-
})
|
|
157
|
-
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
{
|
|
161
|
-
|
|
162
|
-
// install plugins
|
|
163
|
-
|
|
164
|
-
addPlugin(resolve('./runtime/plugins/resize.client.ts'))
|
|
165
|
-
|
|
166
|
-
// add other files
|
|
167
|
-
|
|
168
|
-
addImportsDir(resolve('./runtime/composables'))
|
|
169
|
-
addImportsDir(resolve('./runtime/core'))
|
|
170
|
-
addImportsDir(resolve('./runtime/stores'))
|
|
171
|
-
addImportsDir(resolve('./runtime/utils'))
|
|
172
|
-
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
})
|
|
176
|
-
|
|
177
|
-
export * from './runtime/composables/useAppEntries'
|
|
178
|
-
export * from './runtime/composables/useApplicationManager'
|
|
179
|
-
export * from './runtime/composables/useDesktopManager'
|
|
180
|
-
export * from './runtime/composables/useTerminalManager'
|
|
181
|
-
export * from './runtime/utils/utilApp'
|
|
182
|
-
export * from './runtime/utils/utilCommon'
|
|
183
|
-
export * from './runtime/utils/utilDebug'
|
|
184
|
-
export * from './runtime/utils/utilDesktop'
|
|
185
|
-
export * from './runtime/utils/utilTerminal'
|
|
186
|
-
export * from './runtime/utils/utilWindow'
|
|
187
|
-
export * from './runtime/stores/storeApplicationMeta'
|
|
188
|
-
export * from './runtime/stores/storeApplicationWindows'
|
|
189
|
-
export * from './runtime/stores/storeDesktop'
|
|
190
|
-
export * from './runtime/stores/storeDesktopVolume'
|
|
191
|
-
export * from './runtime/stores/storeDesktopWindow'
|
|
192
|
-
export * from './runtime/stores/storeDesktopWorkspace'
|
|
1
|
+
export { defineDesktopApp, defineDesktopConfig } from "./runtime/utils/utilDesktop"
|
|
2
|
+
export { registerTailwindPath } from "./runtime/utils/utilApp"
|
package/module.ts
ADDED
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import {defineNuxtModule, createResolver, addComponentsDir, addImportsDir, installModule, addPlugin} from '@nuxt/kit'
|
|
2
|
+
import {deepMerge} from './runtime/utils/utilCommon'
|
|
3
|
+
import pkg from './package.json'
|
|
4
|
+
|
|
5
|
+
export default defineNuxtModule({
|
|
6
|
+
meta: {
|
|
7
|
+
name: 'owd-core',
|
|
8
|
+
},
|
|
9
|
+
async setup(_options, _nuxt) {
|
|
10
|
+
const {resolve} = createResolver(import.meta.url)
|
|
11
|
+
|
|
12
|
+
// get open web desktop config
|
|
13
|
+
|
|
14
|
+
const desktopConfig = (await import(_nuxt.options.rootDir + '/owd.config.ts')).default
|
|
15
|
+
|
|
16
|
+
// extend nuxt.config.ts with owd.config.ts
|
|
17
|
+
|
|
18
|
+
_nuxt.options = {
|
|
19
|
+
..._nuxt.options,
|
|
20
|
+
...desktopConfig,
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// set core version to runtime config
|
|
24
|
+
|
|
25
|
+
_nuxt.options.runtimeConfig.public.coreVersion = pkg.version
|
|
26
|
+
|
|
27
|
+
{
|
|
28
|
+
|
|
29
|
+
// install open web desktop theme
|
|
30
|
+
|
|
31
|
+
if (desktopConfig.theme) {
|
|
32
|
+
await installModule(desktopConfig.theme)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// install open web desktop modules
|
|
36
|
+
|
|
37
|
+
if (desktopConfig.modules) {
|
|
38
|
+
for (const modulePath of desktopConfig.modules) {
|
|
39
|
+
await installModule(modulePath)
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// install open web desktop apps
|
|
44
|
+
|
|
45
|
+
if (desktopConfig.apps) {
|
|
46
|
+
for (const appPath of desktopConfig.apps) {
|
|
47
|
+
await installModule(appPath)
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// assign open web desktop config to runtime config
|
|
52
|
+
_nuxt.options.runtimeConfig.public.desktop = deepMerge(
|
|
53
|
+
_nuxt.options.runtimeConfig.public.desktop,
|
|
54
|
+
desktopConfig
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
{
|
|
60
|
+
|
|
61
|
+
// install primevue
|
|
62
|
+
|
|
63
|
+
_nuxt.options.primevue = _nuxt.options.primevue || {};
|
|
64
|
+
_nuxt.options.primevue.options = _nuxt.options.primevue.options || {};
|
|
65
|
+
_nuxt.options.primevue.options.theme = _nuxt.options.primevue.options.theme || {};
|
|
66
|
+
|
|
67
|
+
await installModule("@primevue/nuxt-module")
|
|
68
|
+
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
{
|
|
72
|
+
|
|
73
|
+
// install tailwind
|
|
74
|
+
|
|
75
|
+
const tailwindPaths = _nuxt.options.runtimeConfig.app.owd?.tailwindPaths || []
|
|
76
|
+
tailwindPaths.push('./runtime/components/**/*.{vue,mjs,ts}') // Aggiungi sempre questo al core
|
|
77
|
+
|
|
78
|
+
_nuxt.options.tailwindcss = _nuxt.options.tailwindcss || {}
|
|
79
|
+
_nuxt.options.tailwindcss.config = _nuxt.options.tailwindcss.config || {}
|
|
80
|
+
// @ts-ignore
|
|
81
|
+
_nuxt.options.tailwindcss.config.content = tailwindPaths
|
|
82
|
+
|
|
83
|
+
await installModule('@nuxtjs/tailwindcss', {
|
|
84
|
+
viewer: false,
|
|
85
|
+
})
|
|
86
|
+
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
{
|
|
90
|
+
|
|
91
|
+
// install pinia
|
|
92
|
+
|
|
93
|
+
await installModule("@pinia/nuxt")
|
|
94
|
+
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
{
|
|
98
|
+
|
|
99
|
+
// install @nuxt/fonts
|
|
100
|
+
|
|
101
|
+
await installModule("@nuxt/fonts")
|
|
102
|
+
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
{
|
|
106
|
+
|
|
107
|
+
// install @nuxt/icon
|
|
108
|
+
|
|
109
|
+
await installModule("@nuxt/icon", {
|
|
110
|
+
clientBundle: {
|
|
111
|
+
scan: true,
|
|
112
|
+
sizeLimitKb: 256,
|
|
113
|
+
},
|
|
114
|
+
})
|
|
115
|
+
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
{
|
|
119
|
+
|
|
120
|
+
// install @vueuse/nuxt
|
|
121
|
+
|
|
122
|
+
await installModule("@vueuse/nuxt")
|
|
123
|
+
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
{
|
|
127
|
+
|
|
128
|
+
// install @nuxtjs/i18n
|
|
129
|
+
|
|
130
|
+
await installModule("@nuxtjs/i18n")
|
|
131
|
+
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
{
|
|
135
|
+
|
|
136
|
+
// configure scss for vite
|
|
137
|
+
|
|
138
|
+
_nuxt.hook('vite:extendConfig', (viteConfig) => {
|
|
139
|
+
viteConfig.css = viteConfig.css || {}
|
|
140
|
+
viteConfig.css.preprocessorOptions = viteConfig.css.preprocessorOptions || {}
|
|
141
|
+
viteConfig.css.preprocessorOptions.scss = {
|
|
142
|
+
api: 'modern-compiler',
|
|
143
|
+
}
|
|
144
|
+
})
|
|
145
|
+
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
{
|
|
149
|
+
|
|
150
|
+
// add css
|
|
151
|
+
|
|
152
|
+
_nuxt.options.css.push('sanitize.css')
|
|
153
|
+
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
{
|
|
157
|
+
|
|
158
|
+
// add components
|
|
159
|
+
|
|
160
|
+
addComponentsDir({
|
|
161
|
+
path: resolve("./runtime/components"),
|
|
162
|
+
prefix: "",
|
|
163
|
+
global: true,
|
|
164
|
+
})
|
|
165
|
+
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
{
|
|
169
|
+
|
|
170
|
+
addPlugin(resolve('./runtime/plugins/resize.client.ts'))
|
|
171
|
+
|
|
172
|
+
// add other files
|
|
173
|
+
|
|
174
|
+
addImportsDir(resolve('./runtime/composables'))
|
|
175
|
+
addImportsDir(resolve('./runtime/core'))
|
|
176
|
+
addImportsDir(resolve('./runtime/stores'))
|
|
177
|
+
addImportsDir(resolve('./runtime/utils'))
|
|
178
|
+
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
})
|
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@owdproject/core",
|
|
3
|
-
"version": "3.
|
|
4
|
-
"description": "Open Web Desktop core",
|
|
3
|
+
"version": "3.1.1",
|
|
5
4
|
"keywords": [
|
|
6
5
|
"web",
|
|
7
6
|
"desktop",
|
|
@@ -18,33 +17,32 @@
|
|
|
18
17
|
"type": "git",
|
|
19
18
|
"url": "git+https://github.com/owdproject/client.git"
|
|
20
19
|
},
|
|
21
|
-
"license": "
|
|
20
|
+
"license": "MIT",
|
|
22
21
|
"author": {
|
|
23
|
-
"name": "
|
|
24
|
-
"url": "https://github.com/
|
|
22
|
+
"name": "Open Web Desktop Team",
|
|
23
|
+
"url": "https://github.com/owdproject"
|
|
25
24
|
},
|
|
25
|
+
"type": "module",
|
|
26
|
+
"types": "types/index.d.ts",
|
|
26
27
|
"dependencies": {
|
|
27
|
-
"@nuxt/
|
|
28
|
-
"@nuxt/
|
|
29
|
-
"@
|
|
30
|
-
"@nuxtjs/
|
|
31
|
-
"@
|
|
32
|
-
"@
|
|
33
|
-
"@
|
|
34
|
-
"@primevue/
|
|
35
|
-
"@
|
|
36
|
-
"@vueuse/
|
|
37
|
-
"@vueuse/
|
|
38
|
-
"
|
|
28
|
+
"@nuxt/kit": "^3.17.2",
|
|
29
|
+
"@nuxt/fonts": "^0.11.3",
|
|
30
|
+
"@nuxt/icon": "^1.12.0",
|
|
31
|
+
"@nuxtjs/i18n": "^9.5.4",
|
|
32
|
+
"@nuxtjs/tailwindcss": "^6.14.0",
|
|
33
|
+
"@pinia/nuxt": "^0.11.0",
|
|
34
|
+
"@primeuix/themes": "^1.1.1",
|
|
35
|
+
"@primevue/forms": "^4.3.4",
|
|
36
|
+
"@primevue/nuxt-module": "^4.3.4",
|
|
37
|
+
"@vueuse/components": "^13.1.0",
|
|
38
|
+
"@vueuse/core": "^13.1.0",
|
|
39
|
+
"@vueuse/nuxt": "^13.1.0",
|
|
39
40
|
"mitt": "^3.0.1",
|
|
40
41
|
"nanoid": "^5.1.5",
|
|
41
|
-
"nuxt": "^3.
|
|
42
|
-
"pinia": "^3.0.
|
|
42
|
+
"nuxt": "^3.17.2",
|
|
43
|
+
"pinia": "^3.0.2",
|
|
43
44
|
"sanitize.css": "^13.0.0",
|
|
44
|
-
"sass": "^1.
|
|
45
|
+
"sass": "^1.88.0",
|
|
45
46
|
"vue-resizable": "^2.1.7"
|
|
46
|
-
},
|
|
47
|
-
"resolutions": {
|
|
48
|
-
"vite": "^6.3.2"
|
|
49
47
|
}
|
|
50
48
|
}
|