@happydesigns/ui 0.17.4 → 0.17.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.
@@ -1,5 +1,5 @@
1
- <script setup lang="ts" generic="C extends 'page' = 'page'">
2
- import type { Collections } from '@nuxt/content'
1
+ <script setup lang="ts" generic="C extends keyof PageCollections = 'page'">
2
+ import type { Collections, PageCollections } from '@nuxt/content'
3
3
 
4
4
  const {
5
5
  path,
@@ -42,7 +42,9 @@ if (!page.value) {
42
42
 
43
43
  usePageSeo(page)
44
44
 
45
+ const tocEnabled = computed(() => !page.value || !('toc' in page.value) || page.value.toc !== false)
45
46
  const renderToc = computed(() => hasToc.value
47
+ && tocEnabled.value
46
48
  && Boolean(page.value?.body?.toc?.links?.length))
47
49
  const header = computed(() => resolvePageHeader(page.value))
48
50
  </script>
@@ -1,5 +1,5 @@
1
- <script setup lang="ts" generic="C extends 'page' = 'page'">
2
- import type { Collections } from '@nuxt/content'
1
+ <script setup lang="ts" generic="C extends keyof PageCollections = 'page'">
2
+ import type { Collections, PageCollections } from '@nuxt/content'
3
3
 
4
4
  const {
5
5
  path,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@happydesigns/ui",
3
3
  "type": "module",
4
- "version": "0.17.4",
4
+ "version": "0.17.5",
5
5
  "private": false,
6
6
  "packageManager": "pnpm@11.11.0",
7
7
  "description": "A reusable Nuxt foundation for content-driven happydesigns websites and applications.",