rimelight-components 2.1.17 → 2.1.19
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.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/app/Footer.d.vue.ts +18 -9
- package/dist/runtime/components/app/Footer.vue +25 -12
- package/dist/runtime/components/app/Footer.vue.d.ts +18 -9
- package/dist/runtime/components/app/Header.d.vue.ts +24 -15
- package/dist/runtime/components/app/Header.vue +18 -11
- package/dist/runtime/components/app/Header.vue.d.ts +24 -15
- package/dist/runtime/components/app/HeaderLayer.d.vue.ts +13 -7
- package/dist/runtime/components/app/HeaderLayer.vue +21 -9
- package/dist/runtime/components/app/HeaderLayer.vue.d.ts +13 -7
- package/dist/runtime/components/app/Image.d.vue.ts +18 -4
- package/dist/runtime/components/app/Image.vue +34 -16
- package/dist/runtime/components/app/Image.vue.d.ts +18 -4
- package/dist/runtime/components/app/Logo.d.vue.ts +17 -3
- package/dist/runtime/components/app/Logo.vue +16 -4
- package/dist/runtime/components/app/Logo.vue.d.ts +17 -3
- package/dist/runtime/components/app/NewsletterSignup.d.vue.ts +17 -3
- package/dist/runtime/components/app/NewsletterSignup.vue +16 -3
- package/dist/runtime/components/app/NewsletterSignup.vue.d.ts +17 -3
- package/dist/runtime/components/app/ScrollToTop.d.vue.ts +20 -5
- package/dist/runtime/components/app/ScrollToTop.vue +31 -15
- package/dist/runtime/components/app/ScrollToTop.vue.d.ts +20 -5
- package/dist/runtime/components/blocks/Block.d.vue.ts +13 -7
- package/dist/runtime/components/blocks/Block.vue +20 -7
- package/dist/runtime/components/blocks/Block.vue.d.ts +13 -7
- package/dist/runtime/components/blocks/BlockEditRenderer.d.vue.ts +17 -3
- package/dist/runtime/components/blocks/BlockEditRenderer.vue +15 -3
- package/dist/runtime/components/blocks/BlockEditRenderer.vue.d.ts +17 -3
- package/dist/runtime/components/blocks/BlockEditor.d.vue.ts +13 -4
- package/dist/runtime/components/blocks/BlockEditor.vue +11 -35
- package/dist/runtime/components/blocks/BlockEditor.vue.d.ts +13 -4
- package/dist/runtime/components/blocks/BlockViewRenderer.d.vue.ts +17 -3
- package/dist/runtime/components/blocks/BlockViewRenderer.vue +15 -3
- package/dist/runtime/components/blocks/BlockViewRenderer.vue.d.ts +17 -3
- package/dist/runtime/components/blocks/TextRenderer.d.vue.ts +17 -3
- package/dist/runtime/components/blocks/TextRenderer.vue +19 -5
- package/dist/runtime/components/blocks/TextRenderer.vue.d.ts +17 -3
- package/dist/runtime/components/blocks/editor/CalloutBlockEditor.d.vue.ts +17 -1
- package/dist/runtime/components/blocks/editor/CalloutBlockEditor.vue +18 -4
- package/dist/runtime/components/blocks/editor/CalloutBlockEditor.vue.d.ts +17 -1
- package/dist/runtime/components/blocks/editor/CardBlockEditor.d.vue.ts +17 -1
- package/dist/runtime/components/blocks/editor/CardBlockEditor.vue +14 -2
- package/dist/runtime/components/blocks/editor/CardBlockEditor.vue.d.ts +17 -1
- package/dist/runtime/components/blocks/editor/ImageBlockEditor.d.vue.ts +27 -3
- package/dist/runtime/components/blocks/editor/ImageBlockEditor.vue +25 -9
- package/dist/runtime/components/blocks/editor/ImageBlockEditor.vue.d.ts +27 -3
- package/dist/runtime/components/blocks/editor/ParagraphBlockEditor.d.vue.ts +17 -3
- package/dist/runtime/components/blocks/editor/ParagraphBlockEditor.vue +21 -13
- package/dist/runtime/components/blocks/editor/ParagraphBlockEditor.vue.d.ts +17 -3
- package/dist/runtime/components/blocks/editor/SectionBlockEditor.d.vue.ts +19 -3
- package/dist/runtime/components/blocks/editor/SectionBlockEditor.vue +20 -6
- package/dist/runtime/components/blocks/editor/SectionBlockEditor.vue.d.ts +19 -3
- package/dist/runtime/components/blocks/editor/TestBlockEditor.d.vue.ts +17 -3
- package/dist/runtime/components/blocks/editor/TestBlockEditor.vue +16 -4
- package/dist/runtime/components/blocks/editor/TestBlockEditor.vue.d.ts +17 -3
- package/dist/runtime/components/blocks/renderer/CalloutBlockRenderer.d.vue.ts +17 -1
- package/dist/runtime/components/blocks/renderer/CalloutBlockRenderer.vue +18 -4
- package/dist/runtime/components/blocks/renderer/CalloutBlockRenderer.vue.d.ts +17 -1
- package/dist/runtime/components/blocks/renderer/CardBlockRenderer.d.vue.ts +17 -1
- package/dist/runtime/components/blocks/renderer/CardBlockRenderer.vue +14 -2
- package/dist/runtime/components/blocks/renderer/CardBlockRenderer.vue.d.ts +17 -1
- package/dist/runtime/components/blocks/renderer/ImageBlockRenderer.d.vue.ts +19 -1
- package/dist/runtime/components/blocks/renderer/ImageBlockRenderer.vue +18 -4
- package/dist/runtime/components/blocks/renderer/ImageBlockRenderer.vue.d.ts +19 -1
- package/dist/runtime/components/blocks/renderer/ParagraphBlockRenderer.d.vue.ts +17 -1
- package/dist/runtime/components/blocks/renderer/ParagraphBlockRenderer.vue +16 -2
- package/dist/runtime/components/blocks/renderer/ParagraphBlockRenderer.vue.d.ts +17 -1
- package/dist/runtime/components/blocks/renderer/SectionBlockRenderer.d.vue.ts +17 -1
- package/dist/runtime/components/blocks/renderer/SectionBlockRenderer.vue +18 -4
- package/dist/runtime/components/blocks/renderer/SectionBlockRenderer.vue.d.ts +17 -1
- package/dist/runtime/components/blocks/renderer/TestBlockRenderer.d.vue.ts +17 -1
- package/dist/runtime/components/blocks/renderer/TestBlockRenderer.vue +16 -2
- package/dist/runtime/components/blocks/renderer/TestBlockRenderer.vue.d.ts +17 -1
- package/dist/runtime/components/cards/TeamCard.d.vue.ts +16 -7
- package/dist/runtime/components/cards/TeamCard.vue +29 -7
- package/dist/runtime/components/cards/TeamCard.vue.d.ts +16 -7
- package/dist/runtime/components/content/Callout.d.vue.ts +13 -7
- package/dist/runtime/components/content/Callout.vue +19 -6
- package/dist/runtime/components/content/Callout.vue.d.ts +13 -7
- package/dist/runtime/components/content/Section.d.vue.ts +19 -13
- package/dist/runtime/components/content/Section.vue +93 -87
- package/dist/runtime/components/content/Section.vue.d.ts +19 -13
- package/dist/runtime/components/content/Test.d.vue.ts +12 -7
- package/dist/runtime/components/content/Test.vue +15 -3
- package/dist/runtime/components/content/Test.vue.d.ts +12 -7
- package/dist/runtime/components/nodes/LinkNode.d.vue.ts +17 -3
- package/dist/runtime/components/nodes/LinkNode.vue +17 -3
- package/dist/runtime/components/nodes/LinkNode.vue.d.ts +17 -3
- package/dist/runtime/components/nodes/TextNode.d.vue.ts +17 -3
- package/dist/runtime/components/nodes/TextNode.vue +15 -3
- package/dist/runtime/components/nodes/TextNode.vue.d.ts +17 -3
- package/dist/runtime/components/page/PageEditor.d.vue.ts +35 -5
- package/dist/runtime/components/page/PageEditor.vue +80 -31
- package/dist/runtime/components/page/PageEditor.vue.d.ts +35 -5
- package/dist/runtime/components/page/PageMention.d.vue.ts +19 -2
- package/dist/runtime/components/page/PageMention.vue +21 -6
- package/dist/runtime/components/page/PageMention.vue.d.ts +19 -2
- package/dist/runtime/components/page/PagePropertiesEditor.d.vue.ts +30 -2
- package/dist/runtime/components/page/PagePropertiesEditor.vue +113 -76
- package/dist/runtime/components/page/PagePropertiesEditor.vue.d.ts +30 -2
- package/dist/runtime/components/page/PagePropertiesRenderer.d.vue.ts +38 -2
- package/dist/runtime/components/page/PagePropertiesRenderer.vue +80 -29
- package/dist/runtime/components/page/PagePropertiesRenderer.vue.d.ts +38 -2
- package/dist/runtime/components/page/PageRenderer.d.vue.ts +26 -2
- package/dist/runtime/components/page/PageRenderer.vue +56 -18
- package/dist/runtime/components/page/PageRenderer.vue.d.ts +26 -2
- package/dist/runtime/components/page/PageSurround.d.vue.ts +25 -3
- package/dist/runtime/components/page/PageSurround.vue +61 -26
- package/dist/runtime/components/page/PageSurround.vue.d.ts +25 -3
- package/dist/runtime/components/page/PageTOC.d.vue.ts +15 -7
- package/dist/runtime/components/page/PageTOC.vue +23 -9
- package/dist/runtime/components/page/PageTOC.vue.d.ts +15 -7
- package/dist/runtime/components/page/modals/CreatePageModal.d.vue.ts +12 -4
- package/dist/runtime/components/page/modals/CreatePageModal.vue +34 -24
- package/dist/runtime/components/page/modals/CreatePageModal.vue.d.ts +12 -4
- package/dist/runtime/components/page/modals/DeletePageModal.d.vue.ts +14 -7
- package/dist/runtime/components/page/modals/DeletePageModal.vue +28 -7
- package/dist/runtime/components/page/modals/DeletePageModal.vue.d.ts +14 -7
- package/dist/runtime/components/swatches/ColorSwatch.d.vue.ts +23 -3
- package/dist/runtime/components/swatches/ColorSwatch.vue +41 -15
- package/dist/runtime/components/swatches/ColorSwatch.vue.d.ts +23 -3
- package/dist/runtime/components/swatches/FontSwatch.d.vue.ts +22 -3
- package/dist/runtime/components/swatches/FontSwatch.vue +29 -12
- package/dist/runtime/components/swatches/FontSwatch.vue.d.ts +22 -3
- package/dist/runtime/components/swatches/ImageSwatch.d.vue.ts +22 -3
- package/dist/runtime/components/swatches/ImageSwatch.vue +29 -12
- package/dist/runtime/components/swatches/ImageSwatch.vue.d.ts +22 -3
- package/dist/runtime/components/utilities/Placeholder.d.vue.ts +13 -5
- package/dist/runtime/components/utilities/Placeholder.vue +19 -5
- package/dist/runtime/components/utilities/Placeholder.vue.d.ts +13 -5
- package/dist/runtime/composables/index.d.ts +1 -0
- package/dist/runtime/composables/index.js +1 -0
- package/dist/runtime/composables/index.mjs +1 -0
- package/dist/runtime/composables/useRC.d.ts +3 -0
- package/dist/runtime/composables/useRC.js +14 -0
- package/dist/runtime/composables/useRC.mjs +14 -0
- package/dist/runtime/types/app.config.d.ts +6 -0
- package/dist/runtime/types/schemas.d.ts +2 -2
- package/dist/runtime/types/tv.d.ts +66 -0
- package/dist/runtime/types/tv.js +0 -0
- package/dist/runtime/types/tv.mjs +0 -0
- package/dist/runtime/utils/index.d.ts +1 -0
- package/dist/runtime/utils/index.js +1 -0
- package/dist/runtime/utils/index.mjs +1 -0
- package/dist/runtime/utils/tv.d.ts +1 -0
- package/dist/runtime/utils/tv.js +4 -0
- package/dist/runtime/utils/tv.mjs +4 -0
- package/package.json +1 -1
|
@@ -1,16 +1,34 @@
|
|
|
1
1
|
import { type Page, type PageSurround } from "../../types/index.js";
|
|
2
|
-
interface PageRendererProps {
|
|
2
|
+
export interface PageRendererProps {
|
|
3
3
|
useSurround?: boolean;
|
|
4
4
|
surround?: PageSurround | null;
|
|
5
5
|
surroundStatus?: 'idle' | 'pending' | 'success' | 'error';
|
|
6
6
|
resolvePage: (id: string) => Promise<Pick<Page, 'title' | 'icon' | 'slug'>>;
|
|
7
|
+
rc?: {
|
|
8
|
+
container?: string;
|
|
9
|
+
grid?: string;
|
|
10
|
+
toc?: string;
|
|
11
|
+
properties?: string;
|
|
12
|
+
contentWrapper?: string;
|
|
13
|
+
banner?: string;
|
|
14
|
+
icon?: string;
|
|
15
|
+
title?: string;
|
|
16
|
+
surroundSkeleton?: string;
|
|
17
|
+
skeleton?: string;
|
|
18
|
+
metadata?: string;
|
|
19
|
+
};
|
|
7
20
|
}
|
|
8
21
|
type __VLS_Props = PageRendererProps;
|
|
22
|
+
export interface PageRendererEmits {
|
|
23
|
+
}
|
|
24
|
+
export interface PageRendererSlots {
|
|
25
|
+
}
|
|
26
|
+
type __VLS_Slots = PageRendererSlots;
|
|
9
27
|
type __VLS_ModelProps = {
|
|
10
28
|
modelValue: Page;
|
|
11
29
|
};
|
|
12
30
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
13
|
-
declare const
|
|
31
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
32
|
"update:modelValue": (value: {
|
|
15
33
|
type: "Default";
|
|
16
34
|
properties: import("../../types/index.js").BasePageProperties;
|
|
@@ -21,5 +39,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
21
39
|
properties: import("../../types/index.js").BasePageProperties;
|
|
22
40
|
} & import("../../types/index.js").BasePage) => any) | undefined;
|
|
23
41
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
42
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
24
43
|
declare const _default: typeof __VLS_export;
|
|
25
44
|
export default _default;
|
|
45
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
46
|
+
new (): {
|
|
47
|
+
$slots: S;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
@@ -3,17 +3,55 @@ import { computed, provide } from "vue";
|
|
|
3
3
|
import {} from "../../types";
|
|
4
4
|
import { getLocalizedContent } from "../../utils";
|
|
5
5
|
import { useI18n } from "vue-i18n";
|
|
6
|
-
import { usePageRegistry } from "../../composables";
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
import { usePageRegistry, useRC } from "../../composables";
|
|
7
|
+
import { tv } from "../../utils/tv";
|
|
8
|
+
const {
|
|
9
|
+
useSurround = false,
|
|
10
|
+
surroundStatus = "idle",
|
|
11
|
+
surround = null,
|
|
12
|
+
resolvePage,
|
|
13
|
+
rc: rcProp
|
|
14
|
+
} = defineProps({
|
|
11
15
|
useSurround: { type: Boolean, required: false },
|
|
12
16
|
surround: { type: [Object, null], required: false },
|
|
13
17
|
surroundStatus: { type: String, required: false },
|
|
14
|
-
resolvePage: { type: Function, required: true }
|
|
18
|
+
resolvePage: { type: Function, required: true },
|
|
19
|
+
rc: { type: Object, required: false }
|
|
15
20
|
});
|
|
21
|
+
const page = defineModel({ type: null, ...{ required: true } });
|
|
16
22
|
const emit = defineEmits([]);
|
|
23
|
+
const slots = defineSlots();
|
|
24
|
+
const { rc } = useRC("PageRenderer", rcProp);
|
|
25
|
+
const pageRendererStyles = tv({
|
|
26
|
+
slots: {
|
|
27
|
+
container: "flex flex-col py-16",
|
|
28
|
+
grid: "grid grid-cols-1 lg:grid-cols-24 gap-xl items-start",
|
|
29
|
+
toc: "hidden lg:flex lg:col-span-4 sticky top-16",
|
|
30
|
+
properties: "order-1 lg:order-2 lg:col-span-6",
|
|
31
|
+
contentWrapper: "order-2 lg:order-1 lg:col-span-14 flex flex-col gap-xl",
|
|
32
|
+
banner: "rounded-xl w-full object-cover",
|
|
33
|
+
icon: "rounded-full w-12 h-12 object-cover",
|
|
34
|
+
title: "",
|
|
35
|
+
surroundSkeleton: "grid grid-cols-1 gap-md sm:grid-cols-2",
|
|
36
|
+
skeleton: "h-48 w-full rounded-xl",
|
|
37
|
+
metadata: "flex flex-col gap-xs text-xs text-dimmed p-xl"
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
const {
|
|
41
|
+
container,
|
|
42
|
+
grid,
|
|
43
|
+
toc,
|
|
44
|
+
properties,
|
|
45
|
+
contentWrapper,
|
|
46
|
+
banner,
|
|
47
|
+
icon,
|
|
48
|
+
title: titleClass,
|
|
49
|
+
surroundSkeleton,
|
|
50
|
+
skeleton,
|
|
51
|
+
metadata
|
|
52
|
+
} = pageRendererStyles();
|
|
53
|
+
const { getTypeLabelKey } = usePageRegistry();
|
|
54
|
+
const { t, locale } = useI18n();
|
|
17
55
|
provide("page-resolver", resolvePage);
|
|
18
56
|
const previousPage = computed(() => surround?.previous);
|
|
19
57
|
const nextPage = computed(() => surround?.next);
|
|
@@ -21,22 +59,22 @@ const hasSurround = computed(() => !!(surround?.previous || surround?.next));
|
|
|
21
59
|
</script>
|
|
22
60
|
|
|
23
61
|
<template>
|
|
24
|
-
<UContainer class="
|
|
25
|
-
<div class="grid
|
|
62
|
+
<UContainer :class="container({ class: rc.container })">
|
|
63
|
+
<div :class="grid({ class: rc.grid })">
|
|
26
64
|
<RCPageTOC
|
|
27
65
|
:page-blocks="page.blocks"
|
|
28
66
|
:levels="[2, 3, 4]"
|
|
29
|
-
class="
|
|
67
|
+
:class="toc({ class: rc.toc })"
|
|
30
68
|
>
|
|
31
69
|
<template #bottom> </template>
|
|
32
70
|
</RCPageTOC>
|
|
33
|
-
<RCPagePropertiesRenderer v-model="page" class="
|
|
34
|
-
<div class="
|
|
71
|
+
<RCPagePropertiesRenderer v-model="page" :class="properties({ class: rc.properties })" />
|
|
72
|
+
<div :class="contentWrapper({ class: rc.contentWrapper })">
|
|
35
73
|
<RCImage
|
|
36
74
|
v-if="page.banner?.src"
|
|
37
75
|
:src="page.banner?.src"
|
|
38
76
|
:alt="page.banner?.alt"
|
|
39
|
-
class="
|
|
77
|
+
:class="banner({ class: rc.banner })"
|
|
40
78
|
/>
|
|
41
79
|
<UPageHeader
|
|
42
80
|
:headline="t(getTypeLabelKey(page.type))"
|
|
@@ -49,17 +87,17 @@ const hasSurround = computed(() => !!(surround?.previous || surround?.next));
|
|
|
49
87
|
v-if="page.icon?.src"
|
|
50
88
|
:src="page.icon?.src"
|
|
51
89
|
:alt="page.icon?.alt"
|
|
52
|
-
class="
|
|
90
|
+
:class="icon({ class: rc.icon })"
|
|
53
91
|
/>
|
|
54
|
-
<h1>{{ getLocalizedContent(page.title, locale) }}</h1>
|
|
92
|
+
<h1 :class="titleClass({ class: rc.title })">{{ getLocalizedContent(page.title, locale) }}</h1>
|
|
55
93
|
</div>
|
|
56
94
|
</template>
|
|
57
95
|
</UPageHeader>
|
|
58
96
|
<RCBlockViewRenderer :blocks="page.blocks" />
|
|
59
97
|
<template v-if="useSurround">
|
|
60
|
-
<div v-if="surroundStatus === 'pending'" class="
|
|
61
|
-
<USkeleton class="
|
|
62
|
-
<USkeleton class="
|
|
98
|
+
<div v-if="surroundStatus === 'pending'" :class="surroundSkeleton({ class: rc.surroundSkeleton })">
|
|
99
|
+
<USkeleton :class="skeleton({ class: rc.skeleton })" />
|
|
100
|
+
<USkeleton :class="skeleton({ class: rc.skeleton })" />
|
|
63
101
|
</div>
|
|
64
102
|
|
|
65
103
|
<LazyRCPageSurround
|
|
@@ -76,7 +114,7 @@ const hasSurround = computed(() => !!(surround?.previous || surround?.next));
|
|
|
76
114
|
|
|
77
115
|
<USeparator />
|
|
78
116
|
|
|
79
|
-
<div class="
|
|
117
|
+
<div :class="metadata({ class: rc.metadata })">
|
|
80
118
|
<h6>Metadata</h6>
|
|
81
119
|
<span>Page ID: {{ page.id }}</span>
|
|
82
120
|
<span
|
|
@@ -1,16 +1,34 @@
|
|
|
1
1
|
import { type Page, type PageSurround } from "../../types/index.js";
|
|
2
|
-
interface PageRendererProps {
|
|
2
|
+
export interface PageRendererProps {
|
|
3
3
|
useSurround?: boolean;
|
|
4
4
|
surround?: PageSurround | null;
|
|
5
5
|
surroundStatus?: 'idle' | 'pending' | 'success' | 'error';
|
|
6
6
|
resolvePage: (id: string) => Promise<Pick<Page, 'title' | 'icon' | 'slug'>>;
|
|
7
|
+
rc?: {
|
|
8
|
+
container?: string;
|
|
9
|
+
grid?: string;
|
|
10
|
+
toc?: string;
|
|
11
|
+
properties?: string;
|
|
12
|
+
contentWrapper?: string;
|
|
13
|
+
banner?: string;
|
|
14
|
+
icon?: string;
|
|
15
|
+
title?: string;
|
|
16
|
+
surroundSkeleton?: string;
|
|
17
|
+
skeleton?: string;
|
|
18
|
+
metadata?: string;
|
|
19
|
+
};
|
|
7
20
|
}
|
|
8
21
|
type __VLS_Props = PageRendererProps;
|
|
22
|
+
export interface PageRendererEmits {
|
|
23
|
+
}
|
|
24
|
+
export interface PageRendererSlots {
|
|
25
|
+
}
|
|
26
|
+
type __VLS_Slots = PageRendererSlots;
|
|
9
27
|
type __VLS_ModelProps = {
|
|
10
28
|
modelValue: Page;
|
|
11
29
|
};
|
|
12
30
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
13
|
-
declare const
|
|
31
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
32
|
"update:modelValue": (value: {
|
|
15
33
|
type: "Default";
|
|
16
34
|
properties: import("../../types/index.js").BasePageProperties;
|
|
@@ -21,5 +39,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
21
39
|
properties: import("../../types/index.js").BasePageProperties;
|
|
22
40
|
} & import("../../types/index.js").BasePage) => any) | undefined;
|
|
23
41
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
42
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
24
43
|
declare const _default: typeof __VLS_export;
|
|
25
44
|
export default _default;
|
|
45
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
46
|
+
new (): {
|
|
47
|
+
$slots: S;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
export interface PageSurroundProps {
|
|
2
2
|
pageType: string;
|
|
3
3
|
previousTitle?: string;
|
|
4
4
|
previousDescription?: string;
|
|
@@ -6,7 +6,29 @@ type __VLS_Props = {
|
|
|
6
6
|
nextTitle?: string;
|
|
7
7
|
nextDescription?: string;
|
|
8
8
|
nextTo?: string;
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
rc?: {
|
|
10
|
+
grid?: string;
|
|
11
|
+
card?: string;
|
|
12
|
+
cardContent?: string;
|
|
13
|
+
headingGroup?: string;
|
|
14
|
+
button?: string;
|
|
15
|
+
typeLabel?: string;
|
|
16
|
+
infoGroup?: string;
|
|
17
|
+
title?: string;
|
|
18
|
+
description?: string;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export interface PageSurroundEmits {
|
|
22
|
+
}
|
|
23
|
+
export interface PageSurroundSlots {
|
|
24
|
+
}
|
|
25
|
+
type __VLS_Slots = PageSurroundSlots;
|
|
26
|
+
declare const __VLS_base: import("vue").DefineComponent<PageSurroundProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PageSurroundProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
28
|
declare const _default: typeof __VLS_export;
|
|
12
29
|
export default _default;
|
|
30
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
31
|
+
new (): {
|
|
32
|
+
$slots: S;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { tv } from "../../utils/tv";
|
|
3
|
+
import { useRC } from "../../composables/useRC";
|
|
2
4
|
import { useI18n } from "vue-i18n";
|
|
3
|
-
const { t } = useI18n();
|
|
4
5
|
const {
|
|
5
6
|
pageType,
|
|
6
7
|
previousTitle,
|
|
@@ -8,7 +9,8 @@ const {
|
|
|
8
9
|
previousTo,
|
|
9
10
|
nextTitle,
|
|
10
11
|
nextDescription,
|
|
11
|
-
nextTo
|
|
12
|
+
nextTo,
|
|
13
|
+
rc: rcProp
|
|
12
14
|
} = defineProps({
|
|
13
15
|
pageType: { type: String, required: true },
|
|
14
16
|
previousTitle: { type: String, required: false },
|
|
@@ -16,35 +18,71 @@ const {
|
|
|
16
18
|
previousTo: { type: String, required: false },
|
|
17
19
|
nextTitle: { type: String, required: false },
|
|
18
20
|
nextDescription: { type: String, required: false },
|
|
19
|
-
nextTo: { type: String, required: false }
|
|
21
|
+
nextTo: { type: String, required: false },
|
|
22
|
+
rc: { type: Object, required: false }
|
|
23
|
+
});
|
|
24
|
+
const emit = defineEmits([]);
|
|
25
|
+
const slots = defineSlots();
|
|
26
|
+
const { rc } = useRC("PageSurround", rcProp);
|
|
27
|
+
const pageSurroundStyles = tv({
|
|
28
|
+
slots: {
|
|
29
|
+
grid: "grid grid-cols-1 gap-8 sm:grid-cols-2",
|
|
30
|
+
card: "group block h-full bg-transparent hover:bg-elevated/50 focus-visible:outline-primary",
|
|
31
|
+
cardContent: "flex flex-col gap-md",
|
|
32
|
+
cardContentEnd: "items-end",
|
|
33
|
+
headingGroup: "flex flex-col gap-xs",
|
|
34
|
+
headingGroupEnd: "items-end",
|
|
35
|
+
button: "w-fit text-md rounded-full text-primary group-hover:text-highlighted",
|
|
36
|
+
typeLabel: "text-muted",
|
|
37
|
+
infoGroup: "flex flex-col gap-sm",
|
|
38
|
+
infoGroupEnd: "items-end gap-xs",
|
|
39
|
+
title: "text-primary text-sm group-hover:text-highlighted",
|
|
40
|
+
titleEnd: "text-right",
|
|
41
|
+
description: "text-toned text-xs",
|
|
42
|
+
descriptionEnd: "text-right"
|
|
43
|
+
}
|
|
20
44
|
});
|
|
45
|
+
const {
|
|
46
|
+
grid,
|
|
47
|
+
card,
|
|
48
|
+
cardContent,
|
|
49
|
+
cardContentEnd,
|
|
50
|
+
headingGroup,
|
|
51
|
+
headingGroupEnd,
|
|
52
|
+
button,
|
|
53
|
+
typeLabel,
|
|
54
|
+
infoGroup,
|
|
55
|
+
infoGroupEnd,
|
|
56
|
+
title: titleClass,
|
|
57
|
+
titleEnd,
|
|
58
|
+
description: descriptionClass,
|
|
59
|
+
descriptionEnd
|
|
60
|
+
} = pageSurroundStyles();
|
|
61
|
+
const { t } = useI18n();
|
|
21
62
|
</script>
|
|
22
63
|
|
|
23
64
|
<template>
|
|
24
|
-
<div class="grid grid
|
|
65
|
+
<div :class="grid({ class: rc.grid })">
|
|
25
66
|
<div>
|
|
26
67
|
<ULink v-if="previousTitle" :to="previousTo" class="h-full">
|
|
27
|
-
<UCard
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
>
|
|
31
|
-
<div class="flex flex-col gap-md">
|
|
32
|
-
<div class="flex flex-col gap-xs">
|
|
68
|
+
<UCard variant="soft" :class="card({ class: rc.card })">
|
|
69
|
+
<div :class="cardContent({ class: rc.cardContent })">
|
|
70
|
+
<div :class="headingGroup({ class: rc.headingGroup })">
|
|
33
71
|
<UButton
|
|
34
72
|
variant="outline"
|
|
35
73
|
icon="lucide:arrow-left"
|
|
36
|
-
class="
|
|
74
|
+
:class="button({ class: rc.button })"
|
|
37
75
|
/>
|
|
38
|
-
<span class="
|
|
76
|
+
<span :class="typeLabel({ class: rc.typeLabel })">
|
|
39
77
|
{{ t("navigation_previous") }}
|
|
40
78
|
{{ t(pageType) }}
|
|
41
79
|
</span>
|
|
42
80
|
</div>
|
|
43
|
-
<div class="
|
|
44
|
-
<p class="
|
|
81
|
+
<div :class="infoGroup({ class: rc.infoGroup })">
|
|
82
|
+
<p :class="titleClass({ class: rc.title })">
|
|
45
83
|
{{ previousTitle }}
|
|
46
84
|
</p>
|
|
47
|
-
<p class="
|
|
85
|
+
<p :class="descriptionClass({ class: rc.description })">
|
|
48
86
|
{{ previousDescription }}
|
|
49
87
|
</p>
|
|
50
88
|
</div>
|
|
@@ -54,27 +92,24 @@ const {
|
|
|
54
92
|
</div>
|
|
55
93
|
<div>
|
|
56
94
|
<ULink v-if="nextTitle" :to="nextTo" class="h-full">
|
|
57
|
-
<UCard
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
>
|
|
61
|
-
<div class="flex flex-col items-end gap-md">
|
|
62
|
-
<div class="flex flex-col items-end gap-xs">
|
|
95
|
+
<UCard variant="soft" :class="card({ class: rc.card })">
|
|
96
|
+
<div :class="[cardContent({ class: rc.cardContent }), cardContentEnd()]">
|
|
97
|
+
<div :class="[headingGroup({ class: rc.headingGroup }), headingGroupEnd()]">
|
|
63
98
|
<UButton
|
|
64
99
|
variant="outline"
|
|
65
100
|
icon="lucide:arrow-right"
|
|
66
|
-
class="
|
|
101
|
+
:class="button({ class: rc.button })"
|
|
67
102
|
/>
|
|
68
|
-
<span class="
|
|
103
|
+
<span :class="typeLabel({ class: rc.typeLabel })">
|
|
69
104
|
{{ t("navigation_next") }}
|
|
70
105
|
{{ t(pageType) }}</span
|
|
71
106
|
>
|
|
72
107
|
</div>
|
|
73
|
-
<div class="
|
|
74
|
-
<p class="
|
|
108
|
+
<div :class="[infoGroup({ class: rc.infoGroup }), infoGroupEnd()]">
|
|
109
|
+
<p :class="[titleClass({ class: rc.title }), titleEnd()]">
|
|
75
110
|
{{ nextTitle }}
|
|
76
111
|
</p>
|
|
77
|
-
<p class="
|
|
112
|
+
<p :class="[descriptionClass({ class: rc.description }), descriptionEnd()]">
|
|
78
113
|
{{ nextDescription }}
|
|
79
114
|
</p>
|
|
80
115
|
</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
export interface PageSurroundProps {
|
|
2
2
|
pageType: string;
|
|
3
3
|
previousTitle?: string;
|
|
4
4
|
previousDescription?: string;
|
|
@@ -6,7 +6,29 @@ type __VLS_Props = {
|
|
|
6
6
|
nextTitle?: string;
|
|
7
7
|
nextDescription?: string;
|
|
8
8
|
nextTo?: string;
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
rc?: {
|
|
10
|
+
grid?: string;
|
|
11
|
+
card?: string;
|
|
12
|
+
cardContent?: string;
|
|
13
|
+
headingGroup?: string;
|
|
14
|
+
button?: string;
|
|
15
|
+
typeLabel?: string;
|
|
16
|
+
infoGroup?: string;
|
|
17
|
+
title?: string;
|
|
18
|
+
description?: string;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export interface PageSurroundEmits {
|
|
22
|
+
}
|
|
23
|
+
export interface PageSurroundSlots {
|
|
24
|
+
}
|
|
25
|
+
type __VLS_Slots = PageSurroundSlots;
|
|
26
|
+
declare const __VLS_base: import("vue").DefineComponent<PageSurroundProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PageSurroundProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
28
|
declare const _default: typeof __VLS_export;
|
|
12
29
|
export default _default;
|
|
30
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
31
|
+
new (): {
|
|
32
|
+
$slots: S;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
import type { Block, HeadingLevel } from "../../types/index.js";
|
|
2
|
-
|
|
2
|
+
export interface PageTOCProps {
|
|
3
3
|
pageBlocks: Block[] | null;
|
|
4
4
|
title?: string;
|
|
5
5
|
levels?: HeadingLevel[];
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
rc?: {
|
|
7
|
+
nav?: string;
|
|
8
|
+
list?: string;
|
|
9
|
+
link?: string;
|
|
10
|
+
text?: string;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export interface PageTOCEmits {
|
|
14
|
+
}
|
|
15
|
+
export interface PageTOCSlots {
|
|
16
|
+
bottom: (props: {}) => any;
|
|
17
|
+
}
|
|
18
|
+
type __VLS_Slots = PageTOCSlots;
|
|
19
|
+
declare const __VLS_base: import("vue").DefineComponent<PageTOCProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PageTOCProps> & Readonly<{}>, {
|
|
12
20
|
title: string;
|
|
13
21
|
levels: HeadingLevel[];
|
|
14
22
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -2,17 +2,22 @@
|
|
|
2
2
|
import { computed, ref, onMounted, watch } from "vue";
|
|
3
3
|
import { useI18n } from "vue-i18n";
|
|
4
4
|
import { useIntersectionObserver } from "@vueuse/core";
|
|
5
|
-
import { tv } from "
|
|
5
|
+
import { tv } from "../../utils/tv";
|
|
6
|
+
import { useRC } from "../../composables/useRC";
|
|
6
7
|
import { slugify } from "../../utils";
|
|
7
8
|
const props = defineProps({
|
|
8
9
|
pageBlocks: { type: [Array, null], required: true },
|
|
9
10
|
title: { type: String, required: false, default: "table_of_contents" },
|
|
10
|
-
levels: { type: Array, required: false, default: () => [2, 3, 4] }
|
|
11
|
+
levels: { type: Array, required: false, default: () => [2, 3, 4] },
|
|
12
|
+
rc: { type: Object, required: false }
|
|
11
13
|
});
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
14
|
+
const emit = defineEmits([]);
|
|
15
|
+
const slots = defineSlots();
|
|
16
|
+
const { rc } = useRC("PageTOC", props.rc);
|
|
17
|
+
const pageTOCStyles = tv({
|
|
15
18
|
slots: {
|
|
19
|
+
nav: "flex flex-col gap-sm w-full",
|
|
20
|
+
list: "flex flex-col",
|
|
16
21
|
link: "group relative flex items-center px-3 py-1.5 text-sm transition-all duration-200 border-s-2 -ms-px",
|
|
17
22
|
text: "truncate"
|
|
18
23
|
},
|
|
@@ -35,6 +40,15 @@ const tocVariants = tv({
|
|
|
35
40
|
}
|
|
36
41
|
}
|
|
37
42
|
});
|
|
43
|
+
const {
|
|
44
|
+
nav,
|
|
45
|
+
list,
|
|
46
|
+
link,
|
|
47
|
+
text
|
|
48
|
+
} = pageTOCStyles();
|
|
49
|
+
const { t } = useI18n();
|
|
50
|
+
const activeId = ref(null);
|
|
51
|
+
const { locale } = useI18n();
|
|
38
52
|
const extractHeadings = (blocks) => {
|
|
39
53
|
const headings = [];
|
|
40
54
|
if (!blocks) return headings;
|
|
@@ -84,18 +98,18 @@ onMounted(() => {
|
|
|
84
98
|
</script>
|
|
85
99
|
|
|
86
100
|
<template>
|
|
87
|
-
<nav class="
|
|
101
|
+
<nav :class="nav({ class: rc.nav })" aria-label="Table of Contents">
|
|
88
102
|
<h5 v-if="title">
|
|
89
103
|
{{ t(title) }}
|
|
90
104
|
</h5>
|
|
91
105
|
|
|
92
|
-
<ul v-if="items.length > 0" class="
|
|
106
|
+
<ul v-if="items.length > 0" :class="list({ class: rc.list })">
|
|
93
107
|
<li v-for="item in items" :key="item.id">
|
|
94
108
|
<NuxtLink
|
|
95
109
|
:to="{ hash: `#${item.id}` }"
|
|
96
|
-
:class="
|
|
110
|
+
:class="pageTOCStyles({ active: activeId === item.id, level: item.level }).link({ class: rc.link })"
|
|
97
111
|
>
|
|
98
|
-
<span :class="
|
|
112
|
+
<span :class="text({ class: rc.text })">
|
|
99
113
|
{{ item.title }}
|
|
100
114
|
</span>
|
|
101
115
|
</NuxtLink>
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
import type { Block, HeadingLevel } from "../../types/index.js";
|
|
2
|
-
|
|
2
|
+
export interface PageTOCProps {
|
|
3
3
|
pageBlocks: Block[] | null;
|
|
4
4
|
title?: string;
|
|
5
5
|
levels?: HeadingLevel[];
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
rc?: {
|
|
7
|
+
nav?: string;
|
|
8
|
+
list?: string;
|
|
9
|
+
link?: string;
|
|
10
|
+
text?: string;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export interface PageTOCEmits {
|
|
14
|
+
}
|
|
15
|
+
export interface PageTOCSlots {
|
|
16
|
+
bottom: (props: {}) => any;
|
|
17
|
+
}
|
|
18
|
+
type __VLS_Slots = PageTOCSlots;
|
|
19
|
+
declare const __VLS_base: import("vue").DefineComponent<PageTOCProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PageTOCProps> & Readonly<{}>, {
|
|
12
20
|
title: string;
|
|
13
21
|
levels: HeadingLevel[];
|
|
14
22
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -3,15 +3,23 @@ export interface CreatePageModalProps {
|
|
|
3
3
|
isOpen: boolean;
|
|
4
4
|
definitions: Record<string, PageDefinition>;
|
|
5
5
|
loading?: boolean;
|
|
6
|
+
rc?: {
|
|
7
|
+
header?: string;
|
|
8
|
+
headerTitle?: string;
|
|
9
|
+
closeButton?: string;
|
|
10
|
+
body?: string;
|
|
11
|
+
field?: string;
|
|
12
|
+
footer?: string;
|
|
13
|
+
};
|
|
6
14
|
}
|
|
7
15
|
export interface CreatePageModalEmits {
|
|
8
16
|
close: [];
|
|
9
17
|
confirm: [page: Partial<Page>];
|
|
10
18
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
19
|
+
export interface CreatePageModalSlots {
|
|
20
|
+
default: (props: {}) => any;
|
|
21
|
+
}
|
|
22
|
+
type __VLS_Slots = CreatePageModalSlots;
|
|
15
23
|
declare const __VLS_base: import("vue").DefineComponent<CreatePageModalProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
24
|
close: () => any;
|
|
17
25
|
confirm: (page: Partial<{
|