@happydesigns/ui 0.17.0 → 0.17.2

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/README.md CHANGED
@@ -1,9 +1,15 @@
1
1
  # @happydesigns/ui
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/%40happydesigns%2Fui?logo=npm)](https://www.npmjs.com/package/@happydesigns/ui)
4
+ [![npm downloads](https://img.shields.io/npm/dm/%40happydesigns%2Fui?logo=npm)](https://www.npmjs.com/package/@happydesigns/ui)
5
+ [![CI](https://github.com/happydesigns/ui/actions/workflows/ci.yml/badge.svg)](https://github.com/happydesigns/ui/actions/workflows/ci.yml)
6
+
3
7
  Reusable Nuxt layer for happydesigns websites, docs sites, and product apps.
4
8
 
5
9
  The package provides shared Nuxt setup, Nuxt UI conventions, content collection schemas, public `H*` components, composables, variants, and app config conventions. Projects extend the layer and keep project-specific routes, content, branding, and deployment settings in the project that owns them.
6
10
 
11
+ [npm](https://www.npmjs.com/package/@happydesigns/ui) · [npmx](https://npmx.dev/package/@happydesigns/ui) · [GitHub](https://github.com/happydesigns/ui)
12
+
7
13
  ## Installation
8
14
 
9
15
  ```bash
@@ -1,7 +1,6 @@
1
1
  <script setup lang="ts" generic="C extends keyof PageCollections = 'article'">
2
2
  import type { PageCollections } from '@nuxt/content'
3
3
  import type { BreadcrumbItem } from '@nuxt/ui'
4
- import { getPageLayoutUi } from '../internal/pageLayout'
5
4
 
6
5
  const props = defineProps<{
7
6
  path?: string
@@ -27,7 +26,6 @@ const tocEnabled = computed(() => !page.value || !('toc' in page.value) || page.
27
26
  const renderToc = computed(() => hasToc.value
28
27
  && tocEnabled.value
29
28
  && Boolean(page.value?.body?.toc?.links?.length))
30
- const pageUi = computed(() => getPageLayoutUi(renderToc.value))
31
29
 
32
30
  if (!page.value) {
33
31
  throw createError({
@@ -93,7 +91,7 @@ const backLink = computed(() => {
93
91
  </HArticleHeaderBody>
94
92
  </UPageHeader>
95
93
 
96
- <UPage :ui="pageUi">
94
+ <UPage>
97
95
  <UPageBody>
98
96
  <slot />
99
97
 
@@ -1,6 +1,5 @@
1
1
  <script setup lang="ts" generic="C extends 'page' = 'page'">
2
2
  import type { Collections } from '@nuxt/content'
3
- import { getPageLayoutUi } from '../internal/pageLayout'
4
3
 
5
4
  const {
6
5
  path,
@@ -35,18 +34,17 @@ usePageSeo(page)
35
34
  const renderToc = computed(() => hasToc.value
36
35
  && page.value?.toc !== false
37
36
  && Boolean(page.value?.body?.toc?.links?.length))
38
- const pageUi = computed(() => getPageLayoutUi(renderToc.value))
39
37
  const header = computed(() => resolvePageHeader(page.value))
40
38
  </script>
41
39
 
42
40
  <template>
43
41
  <UContainer v-if="page">
44
- <UPageHeader
45
- v-if="hasHeader && header"
46
- v-bind="header"
47
- />
42
+ <UPage>
43
+ <UPageHeader
44
+ v-if="hasHeader && header"
45
+ v-bind="header"
46
+ />
48
47
 
49
- <UPage :ui="pageUi">
50
48
  <UPageBody>
51
49
  <slot />
52
50
  </UPageBody>
package/package.json CHANGED
@@ -1,11 +1,28 @@
1
1
  {
2
2
  "name": "@happydesigns/ui",
3
3
  "type": "module",
4
- "version": "0.17.0",
4
+ "version": "0.17.2",
5
5
  "private": false,
6
6
  "packageManager": "pnpm@11.11.0",
7
+ "description": "A reusable Nuxt foundation for content-driven happydesigns websites and applications.",
7
8
  "author": "happydesigns",
8
- "homepage": "https://github.com/happydesigns",
9
+ "homepage": "https://github.com/happydesigns/ui#readme",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/happydesigns/ui.git"
13
+ },
14
+ "bugs": {
15
+ "url": "https://github.com/happydesigns/ui/issues"
16
+ },
17
+ "keywords": [
18
+ "nuxt",
19
+ "nuxt-layer",
20
+ "nuxt-ui",
21
+ "nuxt-content",
22
+ "vue",
23
+ "design-system",
24
+ "content-management"
25
+ ],
9
26
  "exports": {
10
27
  ".": "./nuxt.config.ts",
11
28
  "./schemas": "./schemas/index.ts",
@@ -1,7 +0,0 @@
1
- export function getPageLayoutUi(hasToc: boolean) {
2
- return {
3
- root: 'lg:grid-cols-12',
4
- center: hasToc ? 'lg:col-span-9' : 'lg:col-span-12',
5
- right: 'lg:col-span-3',
6
- }
7
- }