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.
Files changed (149) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +1 -1
  3. package/dist/runtime/components/app/Footer.d.vue.ts +18 -9
  4. package/dist/runtime/components/app/Footer.vue +25 -12
  5. package/dist/runtime/components/app/Footer.vue.d.ts +18 -9
  6. package/dist/runtime/components/app/Header.d.vue.ts +24 -15
  7. package/dist/runtime/components/app/Header.vue +18 -11
  8. package/dist/runtime/components/app/Header.vue.d.ts +24 -15
  9. package/dist/runtime/components/app/HeaderLayer.d.vue.ts +13 -7
  10. package/dist/runtime/components/app/HeaderLayer.vue +21 -9
  11. package/dist/runtime/components/app/HeaderLayer.vue.d.ts +13 -7
  12. package/dist/runtime/components/app/Image.d.vue.ts +18 -4
  13. package/dist/runtime/components/app/Image.vue +34 -16
  14. package/dist/runtime/components/app/Image.vue.d.ts +18 -4
  15. package/dist/runtime/components/app/Logo.d.vue.ts +17 -3
  16. package/dist/runtime/components/app/Logo.vue +16 -4
  17. package/dist/runtime/components/app/Logo.vue.d.ts +17 -3
  18. package/dist/runtime/components/app/NewsletterSignup.d.vue.ts +17 -3
  19. package/dist/runtime/components/app/NewsletterSignup.vue +16 -3
  20. package/dist/runtime/components/app/NewsletterSignup.vue.d.ts +17 -3
  21. package/dist/runtime/components/app/ScrollToTop.d.vue.ts +20 -5
  22. package/dist/runtime/components/app/ScrollToTop.vue +31 -15
  23. package/dist/runtime/components/app/ScrollToTop.vue.d.ts +20 -5
  24. package/dist/runtime/components/blocks/Block.d.vue.ts +13 -7
  25. package/dist/runtime/components/blocks/Block.vue +20 -7
  26. package/dist/runtime/components/blocks/Block.vue.d.ts +13 -7
  27. package/dist/runtime/components/blocks/BlockEditRenderer.d.vue.ts +17 -3
  28. package/dist/runtime/components/blocks/BlockEditRenderer.vue +15 -3
  29. package/dist/runtime/components/blocks/BlockEditRenderer.vue.d.ts +17 -3
  30. package/dist/runtime/components/blocks/BlockEditor.d.vue.ts +13 -4
  31. package/dist/runtime/components/blocks/BlockEditor.vue +11 -35
  32. package/dist/runtime/components/blocks/BlockEditor.vue.d.ts +13 -4
  33. package/dist/runtime/components/blocks/BlockViewRenderer.d.vue.ts +17 -3
  34. package/dist/runtime/components/blocks/BlockViewRenderer.vue +15 -3
  35. package/dist/runtime/components/blocks/BlockViewRenderer.vue.d.ts +17 -3
  36. package/dist/runtime/components/blocks/TextRenderer.d.vue.ts +17 -3
  37. package/dist/runtime/components/blocks/TextRenderer.vue +19 -5
  38. package/dist/runtime/components/blocks/TextRenderer.vue.d.ts +17 -3
  39. package/dist/runtime/components/blocks/editor/CalloutBlockEditor.d.vue.ts +17 -1
  40. package/dist/runtime/components/blocks/editor/CalloutBlockEditor.vue +18 -4
  41. package/dist/runtime/components/blocks/editor/CalloutBlockEditor.vue.d.ts +17 -1
  42. package/dist/runtime/components/blocks/editor/CardBlockEditor.d.vue.ts +17 -1
  43. package/dist/runtime/components/blocks/editor/CardBlockEditor.vue +14 -2
  44. package/dist/runtime/components/blocks/editor/CardBlockEditor.vue.d.ts +17 -1
  45. package/dist/runtime/components/blocks/editor/ImageBlockEditor.d.vue.ts +27 -3
  46. package/dist/runtime/components/blocks/editor/ImageBlockEditor.vue +25 -9
  47. package/dist/runtime/components/blocks/editor/ImageBlockEditor.vue.d.ts +27 -3
  48. package/dist/runtime/components/blocks/editor/ParagraphBlockEditor.d.vue.ts +17 -3
  49. package/dist/runtime/components/blocks/editor/ParagraphBlockEditor.vue +21 -13
  50. package/dist/runtime/components/blocks/editor/ParagraphBlockEditor.vue.d.ts +17 -3
  51. package/dist/runtime/components/blocks/editor/SectionBlockEditor.d.vue.ts +19 -3
  52. package/dist/runtime/components/blocks/editor/SectionBlockEditor.vue +20 -6
  53. package/dist/runtime/components/blocks/editor/SectionBlockEditor.vue.d.ts +19 -3
  54. package/dist/runtime/components/blocks/editor/TestBlockEditor.d.vue.ts +17 -3
  55. package/dist/runtime/components/blocks/editor/TestBlockEditor.vue +16 -4
  56. package/dist/runtime/components/blocks/editor/TestBlockEditor.vue.d.ts +17 -3
  57. package/dist/runtime/components/blocks/renderer/CalloutBlockRenderer.d.vue.ts +17 -1
  58. package/dist/runtime/components/blocks/renderer/CalloutBlockRenderer.vue +18 -4
  59. package/dist/runtime/components/blocks/renderer/CalloutBlockRenderer.vue.d.ts +17 -1
  60. package/dist/runtime/components/blocks/renderer/CardBlockRenderer.d.vue.ts +17 -1
  61. package/dist/runtime/components/blocks/renderer/CardBlockRenderer.vue +14 -2
  62. package/dist/runtime/components/blocks/renderer/CardBlockRenderer.vue.d.ts +17 -1
  63. package/dist/runtime/components/blocks/renderer/ImageBlockRenderer.d.vue.ts +19 -1
  64. package/dist/runtime/components/blocks/renderer/ImageBlockRenderer.vue +18 -4
  65. package/dist/runtime/components/blocks/renderer/ImageBlockRenderer.vue.d.ts +19 -1
  66. package/dist/runtime/components/blocks/renderer/ParagraphBlockRenderer.d.vue.ts +17 -1
  67. package/dist/runtime/components/blocks/renderer/ParagraphBlockRenderer.vue +16 -2
  68. package/dist/runtime/components/blocks/renderer/ParagraphBlockRenderer.vue.d.ts +17 -1
  69. package/dist/runtime/components/blocks/renderer/SectionBlockRenderer.d.vue.ts +17 -1
  70. package/dist/runtime/components/blocks/renderer/SectionBlockRenderer.vue +18 -4
  71. package/dist/runtime/components/blocks/renderer/SectionBlockRenderer.vue.d.ts +17 -1
  72. package/dist/runtime/components/blocks/renderer/TestBlockRenderer.d.vue.ts +17 -1
  73. package/dist/runtime/components/blocks/renderer/TestBlockRenderer.vue +16 -2
  74. package/dist/runtime/components/blocks/renderer/TestBlockRenderer.vue.d.ts +17 -1
  75. package/dist/runtime/components/cards/TeamCard.d.vue.ts +16 -7
  76. package/dist/runtime/components/cards/TeamCard.vue +29 -7
  77. package/dist/runtime/components/cards/TeamCard.vue.d.ts +16 -7
  78. package/dist/runtime/components/content/Callout.d.vue.ts +13 -7
  79. package/dist/runtime/components/content/Callout.vue +19 -6
  80. package/dist/runtime/components/content/Callout.vue.d.ts +13 -7
  81. package/dist/runtime/components/content/Section.d.vue.ts +19 -13
  82. package/dist/runtime/components/content/Section.vue +93 -87
  83. package/dist/runtime/components/content/Section.vue.d.ts +19 -13
  84. package/dist/runtime/components/content/Test.d.vue.ts +12 -7
  85. package/dist/runtime/components/content/Test.vue +15 -3
  86. package/dist/runtime/components/content/Test.vue.d.ts +12 -7
  87. package/dist/runtime/components/nodes/LinkNode.d.vue.ts +17 -3
  88. package/dist/runtime/components/nodes/LinkNode.vue +17 -3
  89. package/dist/runtime/components/nodes/LinkNode.vue.d.ts +17 -3
  90. package/dist/runtime/components/nodes/TextNode.d.vue.ts +17 -3
  91. package/dist/runtime/components/nodes/TextNode.vue +15 -3
  92. package/dist/runtime/components/nodes/TextNode.vue.d.ts +17 -3
  93. package/dist/runtime/components/page/PageEditor.d.vue.ts +35 -5
  94. package/dist/runtime/components/page/PageEditor.vue +80 -31
  95. package/dist/runtime/components/page/PageEditor.vue.d.ts +35 -5
  96. package/dist/runtime/components/page/PageMention.d.vue.ts +19 -2
  97. package/dist/runtime/components/page/PageMention.vue +21 -6
  98. package/dist/runtime/components/page/PageMention.vue.d.ts +19 -2
  99. package/dist/runtime/components/page/PagePropertiesEditor.d.vue.ts +30 -2
  100. package/dist/runtime/components/page/PagePropertiesEditor.vue +113 -76
  101. package/dist/runtime/components/page/PagePropertiesEditor.vue.d.ts +30 -2
  102. package/dist/runtime/components/page/PagePropertiesRenderer.d.vue.ts +38 -2
  103. package/dist/runtime/components/page/PagePropertiesRenderer.vue +80 -29
  104. package/dist/runtime/components/page/PagePropertiesRenderer.vue.d.ts +38 -2
  105. package/dist/runtime/components/page/PageRenderer.d.vue.ts +26 -2
  106. package/dist/runtime/components/page/PageRenderer.vue +56 -18
  107. package/dist/runtime/components/page/PageRenderer.vue.d.ts +26 -2
  108. package/dist/runtime/components/page/PageSurround.d.vue.ts +25 -3
  109. package/dist/runtime/components/page/PageSurround.vue +61 -26
  110. package/dist/runtime/components/page/PageSurround.vue.d.ts +25 -3
  111. package/dist/runtime/components/page/PageTOC.d.vue.ts +15 -7
  112. package/dist/runtime/components/page/PageTOC.vue +23 -9
  113. package/dist/runtime/components/page/PageTOC.vue.d.ts +15 -7
  114. package/dist/runtime/components/page/modals/CreatePageModal.d.vue.ts +12 -4
  115. package/dist/runtime/components/page/modals/CreatePageModal.vue +34 -24
  116. package/dist/runtime/components/page/modals/CreatePageModal.vue.d.ts +12 -4
  117. package/dist/runtime/components/page/modals/DeletePageModal.d.vue.ts +14 -7
  118. package/dist/runtime/components/page/modals/DeletePageModal.vue +28 -7
  119. package/dist/runtime/components/page/modals/DeletePageModal.vue.d.ts +14 -7
  120. package/dist/runtime/components/swatches/ColorSwatch.d.vue.ts +23 -3
  121. package/dist/runtime/components/swatches/ColorSwatch.vue +41 -15
  122. package/dist/runtime/components/swatches/ColorSwatch.vue.d.ts +23 -3
  123. package/dist/runtime/components/swatches/FontSwatch.d.vue.ts +22 -3
  124. package/dist/runtime/components/swatches/FontSwatch.vue +29 -12
  125. package/dist/runtime/components/swatches/FontSwatch.vue.d.ts +22 -3
  126. package/dist/runtime/components/swatches/ImageSwatch.d.vue.ts +22 -3
  127. package/dist/runtime/components/swatches/ImageSwatch.vue +29 -12
  128. package/dist/runtime/components/swatches/ImageSwatch.vue.d.ts +22 -3
  129. package/dist/runtime/components/utilities/Placeholder.d.vue.ts +13 -5
  130. package/dist/runtime/components/utilities/Placeholder.vue +19 -5
  131. package/dist/runtime/components/utilities/Placeholder.vue.d.ts +13 -5
  132. package/dist/runtime/composables/index.d.ts +1 -0
  133. package/dist/runtime/composables/index.js +1 -0
  134. package/dist/runtime/composables/index.mjs +1 -0
  135. package/dist/runtime/composables/useRC.d.ts +3 -0
  136. package/dist/runtime/composables/useRC.js +14 -0
  137. package/dist/runtime/composables/useRC.mjs +14 -0
  138. package/dist/runtime/types/app.config.d.ts +6 -0
  139. package/dist/runtime/types/schemas.d.ts +2 -2
  140. package/dist/runtime/types/tv.d.ts +66 -0
  141. package/dist/runtime/types/tv.js +0 -0
  142. package/dist/runtime/types/tv.mjs +0 -0
  143. package/dist/runtime/utils/index.d.ts +1 -0
  144. package/dist/runtime/utils/index.js +1 -0
  145. package/dist/runtime/utils/index.mjs +1 -0
  146. package/dist/runtime/utils/tv.d.ts +1 -0
  147. package/dist/runtime/utils/tv.js +4 -0
  148. package/dist/runtime/utils/tv.mjs +4 -0
  149. 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 __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
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
- const { getTypeLabelKey } = usePageRegistry();
8
- const page = defineModel({ type: null, ...{ required: true } });
9
- const { t, locale } = useI18n();
10
- const { useSurround = false, surroundStatus = "idle", surround = null, resolvePage } = defineProps({
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="flex flex-col py-16">
25
- <div class="grid grid-cols-1 lg:grid-cols-24 gap-xl items-start">
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="hidden lg:flex lg:col-span-4 sticky top-16"
67
+ :class="toc({ class: rc.toc })"
30
68
  >
31
69
  <template #bottom> </template>
32
70
  </RCPageTOC>
33
- <RCPagePropertiesRenderer v-model="page" class="order-1 lg:order-2 lg:col-span-6" />
34
- <div class="order-2 lg:order-1 lg:col-span-14 flex flex-col gap-xl">
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="rounded-xl w-full object-cover"
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="rounded-full w-12 h-12 object-cover"
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="grid grid-cols-1 gap-md sm:grid-cols-2">
61
- <USkeleton class="h-48 w-full rounded-xl" />
62
- <USkeleton class="h-48 w-full rounded-xl" />
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="flex flex-col gap-xs text-xs text-dimmed p-xl">
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 __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
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
- type __VLS_Props = {
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
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
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-cols-1 gap-8 sm:grid-cols-2">
65
+ <div :class="grid({ class: rc.grid })">
25
66
  <div>
26
67
  <ULink v-if="previousTitle" :to="previousTo" class="h-full">
27
- <UCard
28
- variant="soft"
29
- class="group block h-full bg-transparent hover:bg-elevated/50 focus-visible:outline-primary"
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="group-hover w-fit text-md rounded-full text-primary group-hover:text-highlighted"
74
+ :class="button({ class: rc.button })"
37
75
  />
38
- <span class="text-muted">
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="flex flex-col gap-sm">
44
- <p class="text-primary text-sm group-hover:text-highlighted">
81
+ <div :class="infoGroup({ class: rc.infoGroup })">
82
+ <p :class="titleClass({ class: rc.title })">
45
83
  {{ previousTitle }}
46
84
  </p>
47
- <p class="text-toned text-xs">
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
- variant="soft"
59
- class="group block h-full bg-transparent hover:bg-elevated/50 focus-visible:outline-primary"
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="w-fit rounded-full text-primary text-md group-hover:text-highlighted"
101
+ :class="button({ class: rc.button })"
67
102
  />
68
- <span class="text-muted">
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="flex flex-col items-end gap-xs">
74
- <p class="text-right text-sm text-primary group-hover:text-highlighted">
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="text-right text-toned text-xs">
112
+ <p :class="[descriptionClass({ class: rc.description }), descriptionEnd()]">
78
113
  {{ nextDescription }}
79
114
  </p>
80
115
  </div>
@@ -1,4 +1,4 @@
1
- type __VLS_Props = {
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
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
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
- type __VLS_Props = {
2
+ export interface PageTOCProps {
3
3
  pageBlocks: Block[] | null;
4
4
  title?: string;
5
5
  levels?: HeadingLevel[];
6
- };
7
- declare var __VLS_7: {};
8
- type __VLS_Slots = {} & {
9
- bottom?: (props: typeof __VLS_7) => any;
10
- };
11
- declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
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 "tailwind-variants";
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 { t } = useI18n();
13
- const activeId = ref(null);
14
- const tocVariants = tv({
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="flex flex-col gap-sm w-full" aria-label="Table of Contents">
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="flex flex-col">
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="tocVariants({ active: activeId === item.id, level: item.level }).link()"
110
+ :class="pageTOCStyles({ active: activeId === item.id, level: item.level }).link({ class: rc.link })"
97
111
  >
98
- <span :class="tocVariants().text()">
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
- type __VLS_Props = {
2
+ export interface PageTOCProps {
3
3
  pageBlocks: Block[] | null;
4
4
  title?: string;
5
5
  levels?: HeadingLevel[];
6
- };
7
- declare var __VLS_7: {};
8
- type __VLS_Slots = {} & {
9
- bottom?: (props: typeof __VLS_7) => any;
10
- };
11
- declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
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
- declare var __VLS_10: {};
12
- type __VLS_Slots = {} & {
13
- default?: (props: typeof __VLS_10) => any;
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<{