@owdproject/core 3.3.0 → 3.3.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/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "desktop",
3
3
  "configKey": "owd",
4
- "version": "3.3.0",
4
+ "version": "3.3.1",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
package/dist/module.mjs CHANGED
@@ -118,10 +118,27 @@ function splitDesktopUserConfig(config, configFile = "desktop.config.ts") {
118
118
  return { theme, apps, modules, desktopRuntime };
119
119
  }
120
120
 
121
- const version = "3.3.0";
121
+ const version = "3.3.1";
122
122
  const pkg = {
123
123
  version: version};
124
124
 
125
+ function primevueModuleDependency(nuxt) {
126
+ const existing = nuxt.options.primevue ?? {};
127
+ const components = { ...existing.components ?? {} };
128
+ const include = components.include;
129
+ if (include && include !== "*" && Array.isArray(include) && !include.includes("ConfirmDialog")) {
130
+ components.include = [...include, "ConfirmDialog"];
131
+ }
132
+ return {
133
+ defaults: defu(
134
+ {
135
+ options: { theme: {} },
136
+ components
137
+ },
138
+ existing
139
+ )
140
+ };
141
+ }
125
142
  const module$1 = defineNuxtModule({
126
143
  meta: {
127
144
  name: "desktop",
@@ -132,6 +149,21 @@ const module$1 = defineNuxtModule({
132
149
  apps: [],
133
150
  modules: []
134
151
  },
152
+ moduleDependencies: (nuxt) => ({
153
+ "@pinia/nuxt": {},
154
+ "@primevue/nuxt-module": primevueModuleDependency(nuxt),
155
+ "@nuxt/fonts": {},
156
+ "@nuxt/icon": {
157
+ defaults: {
158
+ clientBundle: {
159
+ scan: true,
160
+ sizeLimitKb: 256
161
+ }
162
+ }
163
+ },
164
+ "@vueuse/nuxt": {},
165
+ "@nuxtjs/i18n": {}
166
+ }),
135
167
  async setup(_options, _nuxt) {
136
168
  const { resolve } = createResolver(import.meta.url);
137
169
  _nuxt.options.experimental = {
@@ -175,7 +207,6 @@ const module$1 = defineNuxtModule({
175
207
  desktopRuntime,
176
208
  { coreVersion: pkg.version }
177
209
  );
178
- await installModule("@pinia/nuxt");
179
210
  {
180
211
  if (clientConfig.theme) {
181
212
  await installModule(clientConfig.theme);
@@ -192,19 +223,6 @@ const module$1 = defineNuxtModule({
192
223
  }
193
224
  }
194
225
  _nuxt.options.appConfig.desktop = _nuxt.options.runtimeConfig.public.desktop;
195
- {
196
- _nuxt.options.primevue = _nuxt.options.primevue || {};
197
- _nuxt.options.primevue.options = _nuxt.options.primevue.options || {};
198
- _nuxt.options.primevue.options.theme = _nuxt.options.primevue.options.theme || {};
199
- _nuxt.options.primevue.components = _nuxt.options.primevue.components || {};
200
- const include = _nuxt.options.primevue.components.include;
201
- if (include && include !== "*" && Array.isArray(include)) {
202
- if (!include.includes("ConfirmDialog")) {
203
- include.push("ConfirmDialog");
204
- }
205
- }
206
- await installModule("@primevue/nuxt-module");
207
- }
208
226
  {
209
227
  const tailwindPaths = _nuxt.options.runtimeConfig.app.owd?.tailwindPaths || [];
210
228
  tailwindPaths.push("./runtime/components/**/*.{vue,mjs,ts}");
@@ -215,23 +233,6 @@ const module$1 = defineNuxtModule({
215
233
  viewer: false
216
234
  });
217
235
  }
218
- {
219
- await installModule("@nuxt/fonts");
220
- }
221
- {
222
- await installModule("@nuxt/icon", {
223
- clientBundle: {
224
- scan: true,
225
- sizeLimitKb: 256
226
- }
227
- });
228
- }
229
- {
230
- await installModule("@vueuse/nuxt");
231
- }
232
- {
233
- await installModule("@nuxtjs/i18n");
234
- }
235
236
  {
236
237
  _nuxt.hook("vite:extendConfig", (viteConfig) => {
237
238
  viteConfig.css = viteConfig.css || {};
package/module.ts CHANGED
@@ -7,6 +7,7 @@ import {
7
7
  addPlugin
8
8
  } from '@nuxt/kit'
9
9
  import { defu } from 'defu'
10
+ import type { Nuxt } from '@nuxt/schema'
10
11
  import { assertValidDesktopUserConfig } from './runtime/utils/validateDesktopUserConfig'
11
12
  import {
12
13
  resolveDesktopConfigPath,
@@ -15,6 +16,30 @@ import {
15
16
  import { splitDesktopUserConfig } from './runtime/utils/splitDesktopUserConfig'
16
17
  import pkg from './package.json'
17
18
 
19
+ function primevueModuleDependency(nuxt: Nuxt) {
20
+ const existing = nuxt.options.primevue ?? {}
21
+ const components = { ...(existing.components ?? {}) }
22
+ const include = components.include
23
+ if (
24
+ include &&
25
+ include !== '*' &&
26
+ Array.isArray(include) &&
27
+ !include.includes('ConfirmDialog')
28
+ ) {
29
+ components.include = [...include, 'ConfirmDialog']
30
+ }
31
+
32
+ return {
33
+ defaults: defu(
34
+ {
35
+ options: { theme: {} },
36
+ components,
37
+ },
38
+ existing,
39
+ ),
40
+ }
41
+ }
42
+
18
43
  export default defineNuxtModule({
19
44
  meta: {
20
45
  name: 'desktop',
@@ -25,6 +50,21 @@ export default defineNuxtModule({
25
50
  apps: [],
26
51
  modules: [],
27
52
  },
53
+ moduleDependencies: (nuxt) => ({
54
+ '@pinia/nuxt': {},
55
+ '@primevue/nuxt-module': primevueModuleDependency(nuxt),
56
+ '@nuxt/fonts': {},
57
+ '@nuxt/icon': {
58
+ defaults: {
59
+ clientBundle: {
60
+ scan: true,
61
+ sizeLimitKb: 256,
62
+ },
63
+ },
64
+ },
65
+ '@vueuse/nuxt': {},
66
+ '@nuxtjs/i18n': {},
67
+ }),
28
68
  async setup(_options, _nuxt) {
29
69
  const { resolve } = createResolver(import.meta.url)
30
70
 
@@ -90,10 +130,6 @@ export default defineNuxtModule({
90
130
  { coreVersion: pkg.version },
91
131
  )
92
132
 
93
- // Pinia before theme/modules/apps so defineDesktopApp can use stores when
94
- // published app plugins register on app:created.
95
- await installModule('@pinia/nuxt')
96
-
97
133
  {
98
134
  // install open web desktop theme
99
135
 
@@ -125,26 +161,7 @@ export default defineNuxtModule({
125
161
  _nuxt.options.appConfig.desktop = _nuxt.options.runtimeConfig.public.desktop
126
162
 
127
163
  {
128
- // install primevue
129
-
130
- _nuxt.options.primevue = _nuxt.options.primevue || {}
131
- _nuxt.options.primevue.options = _nuxt.options.primevue.options || {}
132
- _nuxt.options.primevue.options.theme =
133
- _nuxt.options.primevue.options.theme || {}
134
- _nuxt.options.primevue.components =
135
- _nuxt.options.primevue.components || {}
136
- const include = _nuxt.options.primevue.components.include
137
- if (include && include !== '*' && Array.isArray(include)) {
138
- if (!include.includes('ConfirmDialog')) {
139
- include.push('ConfirmDialog')
140
- }
141
- }
142
-
143
- await installModule('@primevue/nuxt-module')
144
- }
145
-
146
- {
147
- // install tailwind
164
+ // Tailwind after theme/apps so registerTailwindPath paths are collected first.
148
165
 
149
166
  const tailwindPaths =
150
167
  _nuxt.options.runtimeConfig.app.owd?.tailwindPaths || []
@@ -160,35 +177,6 @@ export default defineNuxtModule({
160
177
  })
161
178
  }
162
179
 
163
- {
164
- // install @nuxt/fonts
165
-
166
- await installModule('@nuxt/fonts')
167
- }
168
-
169
- {
170
- // install @nuxt/icon
171
-
172
- await installModule('@nuxt/icon', {
173
- clientBundle: {
174
- scan: true,
175
- sizeLimitKb: 256
176
- }
177
- })
178
- }
179
-
180
- {
181
- // install @vueuse/nuxt
182
-
183
- await installModule('@vueuse/nuxt')
184
- }
185
-
186
- {
187
- // install @nuxtjs/i18n
188
-
189
- await installModule('@nuxtjs/i18n')
190
- }
191
-
192
180
  {
193
181
  // configure scss for vite
194
182
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owdproject/core",
3
- "version": "3.3.0",
3
+ "version": "3.3.1",
4
4
  "description": "Nuxt Desktop module for browser desktop experiences (windows, shell, apps)",
5
5
  "keywords": [
6
6
  "nuxt",
@@ -84,6 +84,7 @@
84
84
  "@primeuix/themes": "^2.0.3",
85
85
  "@primevue/forms": "^4.5.5",
86
86
  "@primevue/nuxt-module": "^4.5.5",
87
+ "primevue": "^4.5.5",
87
88
  "@vueuse/components": "^14.3.0",
88
89
  "@vueuse/core": "^14.3.0",
89
90
  "@vueuse/nuxt": "^14.3.0",