@owdproject/nuxt-kit-nuxt-ui 4.0.0-alpha.3 → 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.
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "desktop-kit-nuxt-ui",
3
3
  "configKey": "kitNuxtUi",
4
- "version": "4.0.0-alpha.3",
4
+ "version": "4.0.0-alpha.4",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.3",
7
7
  "unbuild": "3.6.1"
package/dist/module.mjs CHANGED
@@ -1,4 +1,7 @@
1
1
  import { defineNuxtModule, createResolver, installModule, addPlugin, addComponentsDir } from '@nuxt/kit';
2
+ import { existsSync } from 'node:fs';
3
+ import { resolve, dirname } from 'node:path';
4
+ import { fileURLToPath } from 'node:url';
2
5
 
3
6
  function tailwindContentPaths(nuxt) {
4
7
  nuxt.options.desktopTailwindContent ??= [];
@@ -11,6 +14,24 @@ function registerTailwindPath(nuxt, path) {
11
14
  }
12
15
  }
13
16
 
17
+ function resolveNuxtUiDistDir() {
18
+ try {
19
+ const resolveMeta = import.meta.resolve;
20
+ const resolved = resolveMeta?.("@nuxt/ui");
21
+ if (resolved) {
22
+ const distDir = dirname(fileURLToPath(resolved));
23
+ if (existsSync(resolve(distDir, "runtime/ui.config"))) return distDir;
24
+ }
25
+ } catch {
26
+ }
27
+ return void 0;
28
+ }
29
+ function registerNuxtUiTailwindContent(nuxt) {
30
+ const distDir = resolveNuxtUiDistDir();
31
+ if (!distDir) return;
32
+ registerTailwindPath(nuxt, resolve(distDir, "runtime/components/**/*.{vue,mjs,ts}"));
33
+ registerTailwindPath(nuxt, resolve(distDir, "runtime/ui.config/**/*.{mjs,js,ts}"));
34
+ }
14
35
  function flattenTailwindContentPaths(content) {
15
36
  const paths = [];
16
37
  if (typeof content === "string") {
@@ -68,6 +89,7 @@ const module$1 = defineNuxtModule({
68
89
  await installModule("@nuxt/ui", {
69
90
  global: true
70
91
  });
92
+ registerNuxtUiTailwindContent(nuxt);
71
93
  addPlugin({
72
94
  src: resolve("./runtime/plugins/01.desktop-nuxt-ui-dialogs.client"),
73
95
  mode: "client",
@@ -42,7 +42,7 @@ const hasNavSlot = computed(() => typeof slots.nav === "function");
42
42
  >
43
43
  <div :class="['flex flex-col h-full bg-white dark:bg-gray-950 border border-gray-200 dark:border-gray-800 rounded-lg shadow-lg overflow-hidden', props.chromePadding === false ? '' : 'p-2']">
44
44
  <div class="desktop-explorer-frame__header-stack">
45
- <slot v-slot:nav v-if="hasNavSlot" name="nav" />
45
+ <slot v-if="hasNavSlot" name="nav" />
46
46
  <Nav v-else>
47
47
  <template #prepend>
48
48
  <slot name="nav-prepend" />
@@ -7,7 +7,7 @@ import Frame from "./Frame.vue";
7
7
  import Chrome from "./Chrome.vue";
8
8
  import FilePane from "./FilePane.vue";
9
9
  import AddressBar from "./AddressBar.vue";
10
- import DefaultToolbar from "./presets/DefaultToolbar.vue";
10
+ import DefaultToolbar from "./DefaultToolbar.vue";
11
11
  const props = defineProps({
12
12
  config: { type: Object, required: false },
13
13
  window: { type: Object, required: true },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owdproject/nuxt-kit-nuxt-ui",
3
- "version": "4.0.0-alpha.3",
3
+ "version": "4.0.0-alpha.4",
4
4
  "description": "Nuxt UI for OWD themes: dialogs (always) and optional DesktopExplorer* UI (requires @owdproject/nuxt-module-fs; use { explorer: false } for dialogs only).",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -46,7 +46,7 @@ const hasNavSlot = computed(() => typeof slots.nav === 'function')
46
46
  >
47
47
  <div :class="['flex flex-col h-full bg-white dark:bg-gray-950 border border-gray-200 dark:border-gray-800 rounded-lg shadow-lg overflow-hidden', props.chromePadding === false ? '' : 'p-2']">
48
48
  <div class="desktop-explorer-frame__header-stack">
49
- <slot v-slot:nav v-if="hasNavSlot" name="nav" />
49
+ <slot v-if="hasNavSlot" name="nav" />
50
50
  <Nav v-else>
51
51
  <template #prepend>
52
52
  <slot name="nav-prepend" />
@@ -7,7 +7,7 @@ import Frame from './Frame.vue'
7
7
  import Chrome from './Chrome.vue'
8
8
  import FilePane from './FilePane.vue'
9
9
  import AddressBar from './AddressBar.vue'
10
- import DefaultToolbar from './presets/DefaultToolbar.vue'
10
+ import DefaultToolbar from './DefaultToolbar.vue'
11
11
 
12
12
  const props = defineProps<{
13
13
  config?: Record<string, any>