@sit-onyx/nuxt-docs 0.5.0 → 0.5.1-dev-20260401171305
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/components/PackageManagerCodeTabs.vue +1 -1
- package/app/components/content/InfoCard.global.vue +1 -1
- package/nuxt.config.ts +1 -18
- package/package.json +14 -11
- package/app/assets/styles/index.scss +0 -4
- package/app/components/content/ProseA.vue +0 -31
- package/app/components/content/ProseBr.global.vue +0 -13
- package/app/components/content/ProseCode.vue +0 -20
- package/app/components/content/ProseH1.vue +0 -21
- package/app/components/content/ProseH2.vue +0 -22
- package/app/components/content/ProseH3.vue +0 -22
- package/app/components/content/ProseH4.vue +0 -22
- package/app/components/content/ProseH5.vue +0 -22
- package/app/components/content/ProseH6.vue +0 -22
- package/app/components/content/ProseHr.global.vue +0 -12
- package/app/components/content/ProseOl.vue +0 -17
- package/app/components/content/ProseP.vue +0 -17
- package/app/components/content/ProsePre.vue +0 -46
- package/app/components/content/ProseTable.vue +0 -49
- package/app/components/content/ProseUl.vue +0 -17
package/nuxt.config.ts
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import { createResolver } from "nuxt/kit";
|
|
2
|
-
|
|
3
|
-
// using a resolver here so path are correctly resolved when extending this app as Nuxt layer
|
|
4
|
-
const { resolve } = createResolver(import.meta.url);
|
|
5
|
-
|
|
6
1
|
/**
|
|
7
2
|
* @see https://nuxt.com/docs/api/configuration/nuxt-config
|
|
8
3
|
*/
|
|
@@ -17,23 +12,11 @@ export default defineNuxtConfig({
|
|
|
17
12
|
compatibilityDate: "2025-01-20",
|
|
18
13
|
typescript: { typeCheck: "build" },
|
|
19
14
|
modules: ["@sit-onyx/nuxt", "@nuxt/content", "@nuxtjs/color-mode", "@nuxtjs/i18n"],
|
|
20
|
-
css: [
|
|
21
|
-
"@fontsource-variable/source-code-pro",
|
|
22
|
-
"@fontsource-variable/source-sans-3",
|
|
23
|
-
resolve("./app/assets/styles/index.scss"),
|
|
24
|
-
],
|
|
15
|
+
css: ["@fontsource-variable/source-code-pro", "@fontsource-variable/source-sans-3"],
|
|
25
16
|
i18n: {
|
|
26
17
|
defaultLocale: "en",
|
|
27
18
|
// we explicitly don't define any default locales here so the project is fully in charge if defining which locales to use.
|
|
28
19
|
// Otherwise if we would e.g. add en here, the project would always be forced to register en, even if it does not plan to add en translations
|
|
29
20
|
// which could conflict with e.g. "const { locales } = useI18n()" to render a language switch which would always include en then
|
|
30
21
|
},
|
|
31
|
-
mdc: {
|
|
32
|
-
components: {
|
|
33
|
-
map: {
|
|
34
|
-
br: "ProseBr",
|
|
35
|
-
hr: "ProseHr",
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
22
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sit-onyx/nuxt-docs",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1-dev-20260401171305",
|
|
4
4
|
"description": "Nuxt layer/template for creating documentations with the onyx design system",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Schwarz IT KG",
|
|
@@ -22,6 +22,9 @@
|
|
|
22
22
|
"content.config.ts",
|
|
23
23
|
"nuxt.config.ts"
|
|
24
24
|
],
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@sit-onyx/mdc": "^0.1.0-dev-20260401171305"
|
|
27
|
+
},
|
|
25
28
|
"peerDependencies": {
|
|
26
29
|
"@fontsource-variable/source-code-pro": ">= 5",
|
|
27
30
|
"@fontsource-variable/source-sans-3": ">= 5",
|
|
@@ -30,27 +33,27 @@
|
|
|
30
33
|
"@nuxtjs/i18n": ">= 10",
|
|
31
34
|
"@nuxtjs/mdc": ">= 0.20.2",
|
|
32
35
|
"sass-embedded": ">= 1",
|
|
33
|
-
"@sit-onyx/icons": "^1.
|
|
36
|
+
"@sit-onyx/icons": "^1.9.0-dev-20260401171305",
|
|
34
37
|
"@sit-onyx/nuxt": "^1.0.1",
|
|
35
|
-
"sit-onyx": "^1.
|
|
38
|
+
"sit-onyx": "^1.12.0-dev-20260401171305"
|
|
36
39
|
},
|
|
37
40
|
"devDependencies": {
|
|
38
|
-
"@fontsource-variable/source-code-pro": "
|
|
39
|
-
"@fontsource-variable/source-sans-3": "
|
|
40
|
-
"@nuxt/content": "
|
|
41
|
+
"@fontsource-variable/source-code-pro": "^5.2.7",
|
|
42
|
+
"@fontsource-variable/source-sans-3": "^5.2.9",
|
|
43
|
+
"@nuxt/content": "^3.12.0",
|
|
41
44
|
"@nuxt/test-utils": "^4.0.0",
|
|
42
|
-
"@nuxtjs/color-mode": "
|
|
43
|
-
"@nuxtjs/mdc": "
|
|
45
|
+
"@nuxtjs/color-mode": "^4.0.0",
|
|
46
|
+
"@nuxtjs/mdc": "~0.21.0",
|
|
44
47
|
"@playwright/experimental-ct-vue": "1.57.0",
|
|
45
48
|
"@playwright/test": "1.57.0",
|
|
46
49
|
"nuxt": "4.4.2",
|
|
47
50
|
"sass-embedded": "1.98.0",
|
|
48
51
|
"typescript": "5.9.3",
|
|
49
|
-
"vue": "3.5.
|
|
50
|
-
"@sit-onyx/icons": "^1.
|
|
52
|
+
"vue": "3.5.31",
|
|
53
|
+
"@sit-onyx/icons": "^1.9.0-dev-20260401171305",
|
|
51
54
|
"@sit-onyx/nuxt": "^1.0.1",
|
|
52
55
|
"@sit-onyx/shared": "^0.1.0",
|
|
53
|
-
"sit-onyx": "^1.
|
|
56
|
+
"sit-onyx": "^1.12.0-dev-20260401171305"
|
|
54
57
|
},
|
|
55
58
|
"scripts": {
|
|
56
59
|
"dev": "pnpm dev:prepare && nuxi dev playground",
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import { isInternalLink, type LinkTarget } from "sit-onyx";
|
|
3
|
-
|
|
4
|
-
const props = withDefaults(
|
|
5
|
-
defineProps<{
|
|
6
|
-
href?: string;
|
|
7
|
-
target?: LinkTarget;
|
|
8
|
-
}>(),
|
|
9
|
-
{
|
|
10
|
-
href: "",
|
|
11
|
-
},
|
|
12
|
-
);
|
|
13
|
-
|
|
14
|
-
defineSlots<{
|
|
15
|
-
default(): unknown;
|
|
16
|
-
}>();
|
|
17
|
-
|
|
18
|
-
// needed to show external link icon only on mounted to prevent hydration errors
|
|
19
|
-
const isMounted = ref(false);
|
|
20
|
-
onMounted(() => (isMounted.value = true));
|
|
21
|
-
</script>
|
|
22
|
-
|
|
23
|
-
<template>
|
|
24
|
-
<OnyxLink
|
|
25
|
-
v-bind="props"
|
|
26
|
-
:target="!isInternalLink(props.href) ? '_blank' : props.target"
|
|
27
|
-
:with-external-icon="isMounted ? 'auto' : false"
|
|
28
|
-
>
|
|
29
|
-
<slot></slot>
|
|
30
|
-
</OnyxLink>
|
|
31
|
-
</template>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
Note: this component needs to marked as global so it is displayed correctly when building the app (since @nuxt/content does not include a ProseBr by default)
|
|
3
|
-
-->
|
|
4
|
-
<template>
|
|
5
|
-
<br aria-hidden="true" />
|
|
6
|
-
</template>
|
|
7
|
-
|
|
8
|
-
<style lang="scss" scoped>
|
|
9
|
-
br {
|
|
10
|
-
display: block;
|
|
11
|
-
height: 1lh;
|
|
12
|
-
}
|
|
13
|
-
</style>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
defineSlots<{
|
|
3
|
-
default(): unknown;
|
|
4
|
-
}>();
|
|
5
|
-
</script>
|
|
6
|
-
|
|
7
|
-
<template>
|
|
8
|
-
<code class="onyx-text--small">
|
|
9
|
-
<slot></slot>
|
|
10
|
-
</code>
|
|
11
|
-
</template>
|
|
12
|
-
|
|
13
|
-
<style lang="scss" scoped>
|
|
14
|
-
code {
|
|
15
|
-
background-color: var(--onyx-color-base-background-blank);
|
|
16
|
-
border: var(--onyx-1px-in-rem) solid var(--onyx-color-component-border-neutral);
|
|
17
|
-
border-radius: var(--onyx-radius-sm);
|
|
18
|
-
padding: var(--onyx-density-3xs) var(--onyx-density-2xs);
|
|
19
|
-
}
|
|
20
|
-
</style>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
const props = defineProps<{
|
|
3
|
-
id?: string;
|
|
4
|
-
}>();
|
|
5
|
-
|
|
6
|
-
defineSlots<{
|
|
7
|
-
default(): unknown;
|
|
8
|
-
}>();
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<template>
|
|
12
|
-
<OnyxHeadline is="h1" :hash="props.id">
|
|
13
|
-
<slot />
|
|
14
|
-
</OnyxHeadline>
|
|
15
|
-
</template>
|
|
16
|
-
|
|
17
|
-
<style lang="scss" scoped>
|
|
18
|
-
.onyx-headline {
|
|
19
|
-
margin-bottom: var(--onyx-density-lg);
|
|
20
|
-
}
|
|
21
|
-
</style>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
const props = defineProps<{
|
|
3
|
-
id?: string;
|
|
4
|
-
}>();
|
|
5
|
-
|
|
6
|
-
defineSlots<{
|
|
7
|
-
default(): unknown;
|
|
8
|
-
}>();
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<template>
|
|
12
|
-
<OnyxHeadline is="h2" :hash="props.id">
|
|
13
|
-
<slot />
|
|
14
|
-
</OnyxHeadline>
|
|
15
|
-
</template>
|
|
16
|
-
|
|
17
|
-
<style lang="scss" scoped>
|
|
18
|
-
.onyx-headline {
|
|
19
|
-
margin-top: var(--onyx-density-2xl);
|
|
20
|
-
margin-bottom: var(--onyx-density-xs);
|
|
21
|
-
}
|
|
22
|
-
</style>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
const props = defineProps<{
|
|
3
|
-
id?: string;
|
|
4
|
-
}>();
|
|
5
|
-
|
|
6
|
-
defineSlots<{
|
|
7
|
-
default(): unknown;
|
|
8
|
-
}>();
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<template>
|
|
12
|
-
<OnyxHeadline is="h3" :hash="props.id">
|
|
13
|
-
<slot />
|
|
14
|
-
</OnyxHeadline>
|
|
15
|
-
</template>
|
|
16
|
-
|
|
17
|
-
<style lang="scss" scoped>
|
|
18
|
-
.onyx-headline {
|
|
19
|
-
margin-top: var(--onyx-density-xl);
|
|
20
|
-
margin-bottom: var(--onyx-density-2xs);
|
|
21
|
-
}
|
|
22
|
-
</style>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
const props = defineProps<{
|
|
3
|
-
id?: string;
|
|
4
|
-
}>();
|
|
5
|
-
|
|
6
|
-
defineSlots<{
|
|
7
|
-
default(): unknown;
|
|
8
|
-
}>();
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<template>
|
|
12
|
-
<OnyxHeadline is="h4" :hash="props.id">
|
|
13
|
-
<slot />
|
|
14
|
-
</OnyxHeadline>
|
|
15
|
-
</template>
|
|
16
|
-
|
|
17
|
-
<style lang="scss" scoped>
|
|
18
|
-
.onyx-headline {
|
|
19
|
-
margin-top: var(--onyx-density-lg);
|
|
20
|
-
margin-bottom: var(--onyx-density-3xs);
|
|
21
|
-
}
|
|
22
|
-
</style>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
const props = defineProps<{
|
|
3
|
-
id?: string;
|
|
4
|
-
}>();
|
|
5
|
-
|
|
6
|
-
defineSlots<{
|
|
7
|
-
default(): unknown;
|
|
8
|
-
}>();
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<template>
|
|
12
|
-
<OnyxHeadline is="h5" :hash="props.id">
|
|
13
|
-
<slot />
|
|
14
|
-
</OnyxHeadline>
|
|
15
|
-
</template>
|
|
16
|
-
|
|
17
|
-
<style lang="scss" scoped>
|
|
18
|
-
.onyx-headline {
|
|
19
|
-
margin-top: var(--onyx-density-lg);
|
|
20
|
-
margin-bottom: var(--onyx-density-3xs);
|
|
21
|
-
}
|
|
22
|
-
</style>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
const props = defineProps<{
|
|
3
|
-
id?: string;
|
|
4
|
-
}>();
|
|
5
|
-
|
|
6
|
-
defineSlots<{
|
|
7
|
-
default(): unknown;
|
|
8
|
-
}>();
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<template>
|
|
12
|
-
<OnyxHeadline is="h6" :hash="props.id">
|
|
13
|
-
<slot />
|
|
14
|
-
</OnyxHeadline>
|
|
15
|
-
</template>
|
|
16
|
-
|
|
17
|
-
<style lang="scss" scoped>
|
|
18
|
-
.onyx-headline {
|
|
19
|
-
margin-top: var(--onyx-density-lg);
|
|
20
|
-
margin-bottom: var(--onyx-density-3xs);
|
|
21
|
-
}
|
|
22
|
-
</style>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
Note: this component needs to marked as global so it is displayed correctly when building the app (since @nuxt/content does not include a ProseHr by default)
|
|
3
|
-
-->
|
|
4
|
-
<template>
|
|
5
|
-
<OnyxSeparator class="separator" />
|
|
6
|
-
</template>
|
|
7
|
-
|
|
8
|
-
<style lang="scss" scoped>
|
|
9
|
-
.separator {
|
|
10
|
-
margin-block: var(--onyx-docs-density-paragraph);
|
|
11
|
-
}
|
|
12
|
-
</style>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
defineSlots<{
|
|
3
|
-
default(): unknown;
|
|
4
|
-
}>();
|
|
5
|
-
</script>
|
|
6
|
-
|
|
7
|
-
<template>
|
|
8
|
-
<p>
|
|
9
|
-
<slot></slot>
|
|
10
|
-
</p>
|
|
11
|
-
</template>
|
|
12
|
-
|
|
13
|
-
<style lang="scss" scoped>
|
|
14
|
-
p {
|
|
15
|
-
margin-block: var(--onyx-docs-density-paragraph);
|
|
16
|
-
}
|
|
17
|
-
</style>
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
const props = withDefaults(
|
|
3
|
-
defineProps<{
|
|
4
|
-
/**
|
|
5
|
-
* Raw code snippet.
|
|
6
|
-
*/
|
|
7
|
-
code?: string;
|
|
8
|
-
/**
|
|
9
|
-
* Code language
|
|
10
|
-
*
|
|
11
|
-
* @example js, ts, html, css, etc.
|
|
12
|
-
*/
|
|
13
|
-
language?: string;
|
|
14
|
-
/**
|
|
15
|
-
* Filename.
|
|
16
|
-
*/
|
|
17
|
-
filename?: string;
|
|
18
|
-
/**
|
|
19
|
-
* Highlighted code line numbers.
|
|
20
|
-
*/
|
|
21
|
-
highlights?: number[];
|
|
22
|
-
meta?: string;
|
|
23
|
-
class?: string;
|
|
24
|
-
}>(),
|
|
25
|
-
{
|
|
26
|
-
code: "",
|
|
27
|
-
},
|
|
28
|
-
);
|
|
29
|
-
|
|
30
|
-
defineSlots<{
|
|
31
|
-
/**
|
|
32
|
-
* Renderer code snippet.
|
|
33
|
-
*/
|
|
34
|
-
default(): unknown;
|
|
35
|
-
}>();
|
|
36
|
-
|
|
37
|
-
const value = "tab-1";
|
|
38
|
-
</script>
|
|
39
|
-
|
|
40
|
-
<template>
|
|
41
|
-
<OnyxCodeTabs :model-value="value">
|
|
42
|
-
<OnyxCodeTab :value :code="props.code" :language="props.language" :label="props.filename">
|
|
43
|
-
<pre :class="props.class"><slot></slot></pre>
|
|
44
|
-
</OnyxCodeTab>
|
|
45
|
-
</OnyxCodeTabs>
|
|
46
|
-
</template>
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import type { VNode } from "vue";
|
|
3
|
-
|
|
4
|
-
const slots = defineSlots<{
|
|
5
|
-
default(): VNode[];
|
|
6
|
-
}>();
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Extracts all table rows `<tr>` vnodes from the given vnode (e.g. table head or body).
|
|
10
|
-
*/
|
|
11
|
-
const extractTableRows = (vnode?: VNode): VNode[] => {
|
|
12
|
-
if (
|
|
13
|
-
!vnode?.children ||
|
|
14
|
-
typeof vnode.children !== "object" ||
|
|
15
|
-
!("default" in vnode.children) ||
|
|
16
|
-
typeof vnode.children.default !== "function"
|
|
17
|
-
) {
|
|
18
|
-
return [];
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
return vnode.children.default();
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
const content = computed(() => {
|
|
25
|
-
const children = slots.default?.() ?? [];
|
|
26
|
-
const [head, body] = children;
|
|
27
|
-
|
|
28
|
-
return {
|
|
29
|
-
headRows: extractTableRows(head),
|
|
30
|
-
bodyRows: extractTableRows(body),
|
|
31
|
-
};
|
|
32
|
-
});
|
|
33
|
-
</script>
|
|
34
|
-
|
|
35
|
-
<template>
|
|
36
|
-
<OnyxTable class="table" striped with-vertical-borders>
|
|
37
|
-
<template #head>
|
|
38
|
-
<component :is="tr" v-for="tr in content.headRows" :key="tr.key" />
|
|
39
|
-
</template>
|
|
40
|
-
|
|
41
|
-
<component :is="tr" v-for="tr in content.bodyRows" :key="tr.key" />
|
|
42
|
-
</OnyxTable>
|
|
43
|
-
</template>
|
|
44
|
-
|
|
45
|
-
<style lang="scss" scoped>
|
|
46
|
-
.table {
|
|
47
|
-
margin-block: var(--onyx-docs-density-paragraph);
|
|
48
|
-
}
|
|
49
|
-
</style>
|