@shwfed/nuxt 0.1.52 → 0.1.53

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.d.mts CHANGED
@@ -66,6 +66,7 @@ interface ModuleOptions {
66
66
  */
67
67
  name: string;
68
68
  }>;
69
+ title: string;
69
70
  }
70
71
  interface Env {
71
72
  git: Readonly<{
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shwfed/nuxt",
3
3
  "configKey": "shwfed",
4
- "version": "0.1.52",
4
+ "version": "0.1.53",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -1,5 +1,5 @@
1
1
  <script setup>
2
- import { useHead, useNuxtApp, useRouter } from "#app";
2
+ import { useHead, useNuxtApp, useRouter, useRuntimeConfig } from "#app";
3
3
  import { computed, ref } from "vue";
4
4
  import { CommandDialog, CommandInput, CommandList, CommandGroup, CommandEmpty, CommandItem } from "./ui/command";
5
5
  import { TooltipProvider } from "./ui/tooltip";
@@ -14,6 +14,7 @@ import { Sidebar, SidebarContent, SidebarGroup, SidebarGroupLabel, SidebarMenu,
14
14
  import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "./ui/collapsible";
15
15
  import Logo from "./logo.vue";
16
16
  const { $dsl } = useNuxtApp();
17
+ const config = useRuntimeConfig().public.shwfed;
17
18
  const props = defineProps({
18
19
  navigation: { type: Array, required: false },
19
20
  commands: { type: Array, required: false },
@@ -286,6 +287,9 @@ const tabs = useSessionStorage("navigation-tabs", /* @__PURE__ */ new Set(), {
286
287
  const activeTab = useSessionStorage("navigation-active-tab", void 0, {
287
288
  writeDefaults: false
288
289
  });
290
+ useHead({
291
+ title: () => activeTab.value ? findNavigationByKey(navigation.value, activeTab.value)?.title ?? config.title : config.title
292
+ });
289
293
  </script>
290
294
 
291
295
  <template>
@@ -665,7 +669,7 @@ const activeTab = useSessionStorage("navigation-active-tab", void 0, {
665
669
  </button>
666
670
  </div>
667
671
  </nav>
668
- <main class="m-2 flex-1 p-1 bg-white border border-zinc-100 rounded">
672
+ <main class="m-2 flex-1 p-1 bg-white border border-zinc-100 rounded overflow-hidden">
669
673
  <slot />
670
674
  </main>
671
675
  </main>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shwfed/nuxt",
3
- "version": "0.1.52",
3
+ "version": "0.1.53",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "type": "module",