@sit-onyx/nuxt-docs 0.8.0-dev-20261015135114 → 0.8.0-dev-20261015154043

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/app/app.vue CHANGED
@@ -11,7 +11,5 @@
11
11
  <NuxtPage />
12
12
  </slot>
13
13
  </NuxtLayout>
14
-
15
- <OnyxToast />
16
14
  </OnyxAppLayout>
17
15
  </template>
package/app/error.vue CHANGED
@@ -5,77 +5,10 @@ import App from "./app.vue";
5
5
  const props = defineProps<{
6
6
  error: NuxtError;
7
7
  }>();
8
-
9
- defineSlots<{
10
- /**
11
- * Slot to override the default "Back to home" action(s).
12
- *
13
- * @param clearError - Function to clear the error and redirect to the home page
14
- */
15
- actions?(props: { clearError: typeof _clearError }): unknown;
16
- /**
17
- * Slot to override the error details section.
18
- * By default, an accordion will be displayed that shows the technical error details.
19
- */
20
- details?(): unknown;
21
- }>();
22
-
23
- const localePath = useLocalePath();
24
-
25
- const _clearError = () => clearError({ redirect: localePath("/") });
26
8
  </script>
27
9
 
28
10
  <template>
29
11
  <App>
30
- <!-- error.vue does only support layouts using "NuxtLayout", see: https://nuxt.com/docs/4.x/directory-structure/app/error -->
31
- <NuxtLayout name="sidebar">
32
- <div class="error">
33
- <OnyxErrorSVG class="error__image" />
34
-
35
- <div class="error__headline">
36
- <OnyxHeadline is="h1">{{ props.error.message }}</OnyxHeadline>
37
-
38
- <slot name="actions" :clear-error="_clearError">
39
- <OnyxButton label="Back to home" @click="_clearError" />
40
- </slot>
41
- </div>
42
-
43
- <slot name="details">
44
- <OnyxAccordion>
45
- <OnyxAccordionItem value="details">
46
- <template #header>Technical error details</template>
47
- <pre class="error__details">{{ JSON.stringify(props.error, null, 2) }}</pre>
48
- </OnyxAccordionItem>
49
- </OnyxAccordion>
50
- </slot>
51
- </div>
52
- </NuxtLayout>
12
+ <OnyxError :error="props.error" />
53
13
  </App>
54
14
  </template>
55
-
56
- <style lang="scss" scoped>
57
- .error {
58
- display: flex;
59
- flex-direction: column;
60
- align-items: center;
61
- gap: var(--onyx-density-3xl);
62
-
63
- &__image {
64
- width: 32rem;
65
- display: block;
66
- }
67
-
68
- &__headline {
69
- display: flex;
70
- flex-direction: column;
71
- align-items: center;
72
- gap: var(--onyx-density-md);
73
- }
74
-
75
- &__details {
76
- white-space: pre-wrap;
77
- overflow-wrap: anywhere;
78
- font-family: var(--onyx-font-family-mono);
79
- }
80
- }
81
- </style>
@@ -10,14 +10,6 @@ const { data, error } = await useCollection({
10
10
  collection: computed(() => `content_${locale.value}` as keyof Collections),
11
11
  });
12
12
 
13
- watch(
14
- error,
15
- () => {
16
- if (error.value) showError(error.value);
17
- },
18
- { immediate: true },
19
- );
20
-
21
13
  useSeoMeta({
22
14
  title: () => data.value?.seo.title,
23
15
  description: () => data.value?.seo.description,
@@ -32,6 +24,7 @@ const layout = computed<keyof NuxtLayouts>(() => {
32
24
 
33
25
  <template>
34
26
  <NuxtLayout :name="layout">
35
- <ContentRenderer v-if="data" :value="data" />
27
+ <OnyxError v-if="error" :error />
28
+ <ContentRenderer v-else-if="data" :value="data" />
36
29
  </NuxtLayout>
37
30
  </template>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sit-onyx/nuxt-docs",
3
- "version": "0.8.0-dev-20261015135114",
3
+ "version": "0.8.0-dev-20261015154043",
4
4
  "description": "Nuxt layer/template for creating documentations with the onyx design system",
5
5
  "bugs": {
6
6
  "url": "https://github.com/SchwarzIT/onyx/issues"
@@ -32,12 +32,12 @@
32
32
  "@nuxtjs/mdc": "~0.23.2",
33
33
  "@playwright/experimental-ct-vue": "1.62.1",
34
34
  "@playwright/test": "1.62.1",
35
- "@sit-onyx/icons": "^1.13.0-dev-20261015135114",
36
- "@sit-onyx/nuxt": "^1.1.2",
35
+ "@sit-onyx/icons": "^1.13.0-dev-20261015154043",
36
+ "@sit-onyx/nuxt": "^1.2.0-dev-20261015154043",
37
37
  "@sit-onyx/shared": "^0.1.0",
38
38
  "nuxt": "4.5.2",
39
39
  "sass-embedded": "1.105.1",
40
- "sit-onyx": "^1.21.1-dev-20261015135114",
40
+ "sit-onyx": "^1.21.1-dev-20261015154043",
41
41
  "typescript": "6.0.3",
42
42
  "vue": "3.5.43"
43
43
  },
@@ -48,10 +48,10 @@
48
48
  "@nuxtjs/color-mode": ">= 4",
49
49
  "@nuxtjs/i18n": ">= 10",
50
50
  "@nuxtjs/mdc": ">= 0.20.2",
51
- "@sit-onyx/icons": "^1.13.0-dev-20261015135114",
52
- "@sit-onyx/nuxt": "^1.1.2",
51
+ "@sit-onyx/icons": "^1.13.0-dev-20261015154043",
52
+ "@sit-onyx/nuxt": "^1.2.0-dev-20261015154043",
53
53
  "sass-embedded": ">= 1",
54
- "sit-onyx": "^1.21.1-dev-20261015135114"
54
+ "sit-onyx": "^1.21.1-dev-20261015154043"
55
55
  },
56
56
  "engines": {
57
57
  "node": ">=20"