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,27 +1,49 @@
1
1
  <script setup>
2
- const {} = defineProps({
2
+ import { tv } from "../../utils/tv";
3
+ import { useRC } from "../../composables/useRC";
4
+ const { src, alt, name, role, description, rc: rcProp } = defineProps({
3
5
  src: { type: String, required: true },
4
6
  alt: { type: String, required: true },
5
7
  name: { type: String, required: true },
6
8
  role: { type: String, required: true },
7
- description: { type: String, required: true }
9
+ description: { type: String, required: true },
10
+ rc: { type: Object, required: false }
8
11
  });
12
+ const emit = defineEmits([]);
13
+ const slots = defineSlots();
14
+ const { rc } = useRC("TeamCard", rcProp);
15
+ const teamCardStyles = tv({
16
+ slots: {
17
+ details: "flex flex-col gap-xs",
18
+ name: "text-xl font-bold",
19
+ role: "text-sm",
20
+ description: "text-md",
21
+ links: "flex flex-row gap-md"
22
+ }
23
+ });
24
+ const {
25
+ details,
26
+ name: nameClass,
27
+ role: roleClass,
28
+ description: descriptionClass,
29
+ links
30
+ } = teamCardStyles();
9
31
  </script>
10
32
 
11
33
  <template>
12
34
  <UCard>
13
35
  <RCImage :src="src" :alt="alt" />
14
- <div class="flex flex-col gap-xs">
15
- <h3 class="text-xl font-bold">
36
+ <div :class="details({ class: rc.details })">
37
+ <h3 :class="nameClass({ class: rc.name })">
16
38
  {{ name }}
17
39
  </h3>
18
- <span class="text-sm">{{ role }}</span>
40
+ <span :class="roleClass({ class: rc.role })">{{ role }}</span>
19
41
  </div>
20
- <p class="text-md">
42
+ <p :class="descriptionClass({ class: rc.description })">
21
43
  {{ description }}
22
44
  </p>
23
45
  <template #footer>
24
- <div class="flex flex-row gap-md">
46
+ <div :class="links({ class: rc.links })">
25
47
  <slot name="links" />
26
48
  </div>
27
49
  </template>
@@ -1,15 +1,24 @@
1
- type __VLS_Props = {
1
+ export interface TeamCardProps {
2
2
  src: string;
3
3
  alt: string;
4
4
  name: string;
5
5
  role: string;
6
6
  description: string;
7
- };
8
- declare var __VLS_14: {};
9
- type __VLS_Slots = {} & {
10
- links?: (props: typeof __VLS_14) => any;
11
- };
12
- declare const __VLS_base: 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>;
7
+ rc?: {
8
+ details?: string;
9
+ name?: string;
10
+ role?: string;
11
+ description?: string;
12
+ links?: string;
13
+ };
14
+ }
15
+ export interface TeamCardEmits {
16
+ }
17
+ export interface TeamCardSlots {
18
+ links: (props: {}) => any;
19
+ }
20
+ type __VLS_Slots = TeamCardSlots;
21
+ declare const __VLS_base: import("vue").DefineComponent<TeamCardProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TeamCardProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
22
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
14
23
  declare const _default: typeof __VLS_export;
15
24
  export default _default;
@@ -1,14 +1,20 @@
1
1
  export type CalloutVariant = "info" | "success" | "warning" | "error" | "commentary" | "ideation" | "source";
2
- type __VLS_Props = {
2
+ export interface CalloutProps {
3
3
  variant: CalloutVariant;
4
4
  to?: string;
5
5
  target?: string;
6
- };
7
- declare var __VLS_21: {};
8
- type __VLS_Slots = {} & {
9
- default?: (props: typeof __VLS_21) => 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<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ rc?: {
7
+ icon?: string;
8
+ tooltipIcon?: string;
9
+ };
10
+ }
11
+ export interface CalloutEmits {
12
+ }
13
+ export interface CalloutSlots {
14
+ default: (props: {}) => any;
15
+ }
16
+ type __VLS_Slots = CalloutSlots;
17
+ declare const __VLS_base: import("vue").DefineComponent<CalloutProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CalloutProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
18
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
13
19
  declare const _default: typeof __VLS_export;
14
20
  export default _default;
@@ -2,13 +2,26 @@
2
2
  import { useAppConfig } from "#imports";
3
3
  import { computed } from "#imports";
4
4
  import { useI18n } from "vue-i18n";
5
- const { t } = useI18n();
6
- const appConfig = useAppConfig();
7
- const { variant, to, target } = defineProps({
5
+ import { tv } from "../../utils/tv";
6
+ import { useRC } from "../../composables/useRC";
7
+ const { variant, to, target, rc: rcProp } = defineProps({
8
8
  variant: { type: String, required: true },
9
9
  to: { type: String, required: false },
10
- target: { type: String, required: false }
10
+ target: { type: String, required: false },
11
+ rc: { type: Object, required: false }
12
+ });
13
+ const emit = defineEmits([]);
14
+ const slots = defineSlots();
15
+ const { rc } = useRC("Callout", rcProp);
16
+ const calloutStyles = tv({
17
+ slots: {
18
+ icon: "size-6",
19
+ tooltipIcon: "pointer-events-auto size-5"
20
+ }
11
21
  });
22
+ const { icon: iconClass, tooltipIcon } = calloutStyles();
23
+ const { t } = useI18n();
24
+ const appConfig = useAppConfig();
12
25
  const config = computed(() => {
13
26
  return appConfig.rimelightComponents?.callouts?.[variant] ?? {
14
27
  icon: "lucide:alert-circle",
@@ -32,14 +45,14 @@ const tooltip = computed(() => config.value.tooltip);
32
45
  }"
33
46
  >
34
47
  <template #leading>
35
- <UIcon :name="icon" class="size-6" />
48
+ <UIcon :name="icon" :class="iconClass({ class: rc.icon })" />
36
49
  </template>
37
50
  <template #description>
38
51
  <slot />
39
52
  </template>
40
53
  <template #close>
41
54
  <UTooltip v-if="tooltip" :text="t(tooltip)">
42
- <UIcon name="lucide:circle-question-mark" class="pointer-events-auto size-5" />
55
+ <UIcon name="lucide:circle-question-mark" :class="tooltipIcon({ class: rc.tooltipIcon })" />
43
56
  </UTooltip>
44
57
  </template>
45
58
  </UAlert>
@@ -1,14 +1,20 @@
1
1
  export type CalloutVariant = "info" | "success" | "warning" | "error" | "commentary" | "ideation" | "source";
2
- type __VLS_Props = {
2
+ export interface CalloutProps {
3
3
  variant: CalloutVariant;
4
4
  to?: string;
5
5
  target?: string;
6
- };
7
- declare var __VLS_21: {};
8
- type __VLS_Slots = {} & {
9
- default?: (props: typeof __VLS_21) => 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<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ rc?: {
7
+ icon?: string;
8
+ tooltipIcon?: string;
9
+ };
10
+ }
11
+ export interface CalloutEmits {
12
+ }
13
+ export interface CalloutSlots {
14
+ default: (props: {}) => any;
15
+ }
16
+ type __VLS_Slots = CalloutSlots;
17
+ declare const __VLS_base: import("vue").DefineComponent<CalloutProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CalloutProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
18
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
13
19
  declare const _default: typeof __VLS_export;
14
20
  export default _default;
@@ -1,21 +1,27 @@
1
1
  export type SectionLevel = 1 | 2 | 3 | 4 | 5 | 6;
2
- type __VLS_Props = {
2
+ export interface SectionProps {
3
3
  level?: SectionLevel;
4
4
  title: string;
5
5
  description?: string;
6
6
  isEditing?: boolean;
7
- };
8
- declare var __VLS_27: {}, __VLS_29: {}, __VLS_31: {}, __VLS_38: {};
9
- type __VLS_Slots = {} & {
10
- title?: (props: typeof __VLS_27) => any;
11
- } & {
12
- title?: (props: typeof __VLS_29) => any;
13
- } & {
14
- description?: (props: typeof __VLS_31) => any;
15
- } & {
16
- default?: (props: typeof __VLS_38) => any;
17
- };
18
- declare const __VLS_base: 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>;
7
+ rc?: {
8
+ section?: string;
9
+ link?: string;
10
+ heading?: string;
11
+ descriptionText?: string;
12
+ separator?: string;
13
+ content?: string;
14
+ };
15
+ }
16
+ export interface SectionEmits {
17
+ }
18
+ export interface SectionSlots {
19
+ default: (props: {}) => any;
20
+ title: (props: {}) => any;
21
+ description: (props: {}) => any;
22
+ }
23
+ type __VLS_Slots = SectionSlots;
24
+ declare const __VLS_base: import("vue").DefineComponent<SectionProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SectionProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
25
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
20
26
  declare const _default: typeof __VLS_export;
21
27
  export default _default;
@@ -3,108 +3,114 @@ import { useRoute } from "#imports";
3
3
  import { computed } from "vue";
4
4
  import { useClipboard } from "@vueuse/core";
5
5
  import { useToast } from "@nuxt/ui/composables";
6
- import { tv } from "tailwind-variants";
6
+ import { tv } from "../../utils/tv";
7
+ import { useRC } from "../../composables/useRC";
7
8
  import { slugify } from "../../utils";
8
- const { copy } = useClipboard();
9
- const toast = useToast();
10
- const route = useRoute();
11
- const copyToClipboard = async (text) => {
12
- try {
13
- await copy(`${text}`);
14
- toast.add({
15
- title: "Heading copied to clipboard!",
16
- description: text,
17
- color: "success"
18
- });
19
- } catch {
20
- toast.add({
21
- title: "Failed to copy heading to clipboard.",
22
- description: "An unexpected error occurred. Please try again.",
23
- color: "error"
24
- });
25
- }
26
- };
27
- const sectionVariants = tv({
9
+ const {
10
+ level = 1,
11
+ title,
12
+ description,
13
+ isEditing = false,
14
+ rc: rcProp
15
+ } = defineProps({
16
+ level: { type: Number, required: false },
17
+ title: { type: String, required: true },
18
+ description: { type: String, required: false },
19
+ isEditing: { type: Boolean, required: false },
20
+ rc: { type: Object, required: false }
21
+ });
22
+ const emit = defineEmits([]);
23
+ const slots = defineSlots();
24
+ const { rc } = useRC("Section", rcProp);
25
+ const sectionStyles = tv({
28
26
  slots: {
29
- sectionSlot: "flex flex-col scroll-mt-24 w-full",
30
- linkSlot: "",
31
- headingSlot: "font-bold w-full",
32
- descriptionSlot: "text-muted",
33
- separatorSlot: "py-2",
34
- contentSlot: "flex flex-col gap-md mt-2"
27
+ section: "flex flex-col scroll-mt-24 w-full",
28
+ link: "",
29
+ heading: "font-bold w-full",
30
+ descriptionText: "text-muted",
31
+ separator: "py-2",
32
+ content: "flex flex-col gap-md mt-2"
35
33
  },
36
34
  variants: {
37
35
  level: {
38
36
  1: {
39
- sectionSlot: "gap-2",
40
- linkSlot: "",
41
- headingSlot: "",
42
- descriptionSlot: "text-2xl",
43
- separatorSlot: "",
44
- contentSlot: ""
37
+ section: "gap-2",
38
+ link: "",
39
+ heading: "",
40
+ descriptionText: "text-2xl",
41
+ separator: "",
42
+ content: ""
45
43
  },
46
44
  2: {
47
- sectionSlot: "gap-1.5",
48
- linkSlot: "",
49
- headingSlot: "",
50
- descriptionSlot: "text-xl",
51
- separatorSlot: "",
52
- contentSlot: ""
45
+ section: "gap-1.5",
46
+ link: "",
47
+ heading: "",
48
+ descriptionText: "text-xl",
49
+ separator: "",
50
+ content: ""
53
51
  },
54
52
  3: {
55
- sectionSlot: "gap-1",
56
- linkSlot: "",
57
- headingSlot: "",
58
- descriptionSlot: "text-lg",
59
- separatorSlot: "",
60
- contentSlot: ""
53
+ section: "gap-1",
54
+ link: "",
55
+ heading: "",
56
+ descriptionText: "text-lg",
57
+ separator: "",
58
+ content: ""
61
59
  },
62
60
  4: {
63
- sectionSlot: "gap-0.5",
64
- linkSlot: "",
65
- headingSlot: "",
66
- descriptionSlot: "text-md",
67
- separatorSlot: "",
68
- contentSlot: ""
61
+ section: "gap-0.5",
62
+ link: "",
63
+ heading: "",
64
+ descriptionText: "text-md",
65
+ separator: "",
66
+ content: ""
69
67
  },
70
68
  5: {
71
- sectionSlot: "gap-0.25",
72
- linkSlot: "",
73
- headingSlot: "",
74
- descriptionSlot: "text-sm",
75
- separatorSlot: "",
76
- contentSlot: ""
69
+ section: "gap-0.25",
70
+ link: "",
71
+ heading: "",
72
+ descriptionText: "text-sm",
73
+ separator: "",
74
+ content: ""
77
75
  },
78
76
  6: {
79
- sectionSlot: "gap-0.125",
80
- linkSlot: "",
81
- headingSlot: "",
82
- descriptionSlot: "text-xs",
83
- separatorSlot: "",
84
- contentSlot: ""
77
+ section: "gap-0.125",
78
+ link: "",
79
+ heading: "",
80
+ descriptionText: "text-xs",
81
+ separator: "",
82
+ content: ""
85
83
  }
86
84
  }
87
85
  }
88
86
  });
89
87
  const {
90
- level = 1,
91
- title,
92
- description,
93
- isEditing = false
94
- } = defineProps({
95
- level: { type: Number, required: false },
96
- title: { type: String, required: true },
97
- description: { type: String, required: false },
98
- isEditing: { type: Boolean, required: false }
99
- });
100
- const {
101
- sectionSlot,
102
- linkSlot,
103
- headingSlot,
104
- descriptionSlot,
105
- separatorSlot,
106
- contentSlot
107
- } = sectionVariants({ level });
88
+ section,
89
+ link,
90
+ heading,
91
+ descriptionText,
92
+ separator,
93
+ content
94
+ } = sectionStyles({ level });
95
+ const { copy } = useClipboard();
96
+ const toast = useToast();
97
+ const route = useRoute();
98
+ const copyToClipboard = async (text) => {
99
+ try {
100
+ await copy(`${text}`);
101
+ toast.add({
102
+ title: "Heading copied to clipboard!",
103
+ description: text,
104
+ color: "success"
105
+ });
106
+ } catch {
107
+ toast.add({
108
+ title: "Failed to copy heading to clipboard.",
109
+ description: "An unexpected error occurred. Please try again.",
110
+ color: "error"
111
+ });
112
+ }
113
+ };
108
114
  const sectionId = computed(() => slugify(title));
109
115
  const sectionHash = computed(() => `#${sectionId.value}`);
110
116
  const fullSectionUrl = computed(() => {
@@ -114,12 +120,12 @@ const fullSectionUrl = computed(() => {
114
120
  </script>
115
121
 
116
122
  <template>
117
- <section :id="sectionId" :class="sectionSlot()" v-bind="$attrs">
118
- <component :id="sectionId" :is="`h${level}`" :class="headingSlot()">
123
+ <section :id="sectionId" :class="section({ class: rc.section })" v-bind="$attrs">
124
+ <component :id="sectionId" :is="`h${level}`" :class="heading({ class: rc.heading })">
119
125
  <NuxtLink
120
126
  v-if="!isEditing"
121
127
  :href="`#${sectionId}`"
122
- :class="linkSlot()"
128
+ :class="link({ class: rc.link })"
123
129
  class="group relative lg:-ms-2 lg:ps-2 inline-block w-full"
124
130
  >
125
131
  <ClientOnly>
@@ -142,12 +148,12 @@ const fullSectionUrl = computed(() => {
142
148
  <slot v-else name="title">{{ title }}</slot>
143
149
  </component>
144
150
  <slot name="description">
145
- <p v-if="description" :class="descriptionSlot()">
151
+ <p v-if="description" :class="descriptionText({ class: rc.descriptionText })">
146
152
  {{ description }}
147
153
  </p>
148
154
  </slot>
149
- <USeparator :class="separatorSlot()" />
150
- <div :class="contentSlot()">
155
+ <USeparator :class="separator({ class: rc.separator })" />
156
+ <div :class="content({ class: rc.content })">
151
157
  <slot />
152
158
  </div>
153
159
  </section>
@@ -1,21 +1,27 @@
1
1
  export type SectionLevel = 1 | 2 | 3 | 4 | 5 | 6;
2
- type __VLS_Props = {
2
+ export interface SectionProps {
3
3
  level?: SectionLevel;
4
4
  title: string;
5
5
  description?: string;
6
6
  isEditing?: boolean;
7
- };
8
- declare var __VLS_27: {}, __VLS_29: {}, __VLS_31: {}, __VLS_38: {};
9
- type __VLS_Slots = {} & {
10
- title?: (props: typeof __VLS_27) => any;
11
- } & {
12
- title?: (props: typeof __VLS_29) => any;
13
- } & {
14
- description?: (props: typeof __VLS_31) => any;
15
- } & {
16
- default?: (props: typeof __VLS_38) => any;
17
- };
18
- declare const __VLS_base: 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>;
7
+ rc?: {
8
+ section?: string;
9
+ link?: string;
10
+ heading?: string;
11
+ descriptionText?: string;
12
+ separator?: string;
13
+ content?: string;
14
+ };
15
+ }
16
+ export interface SectionEmits {
17
+ }
18
+ export interface SectionSlots {
19
+ default: (props: {}) => any;
20
+ title: (props: {}) => any;
21
+ description: (props: {}) => any;
22
+ }
23
+ type __VLS_Slots = SectionSlots;
24
+ declare const __VLS_base: import("vue").DefineComponent<SectionProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SectionProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
25
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
20
26
  declare const _default: typeof __VLS_export;
21
27
  export default _default;
@@ -1,11 +1,16 @@
1
- type __VLS_Props = {
1
+ export interface TestProps {
2
2
  text: string;
3
- };
4
- declare var __VLS_1: {};
5
- type __VLS_Slots = {} & {
6
- content?: (props: typeof __VLS_1) => any;
7
- };
8
- declare const __VLS_base: 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>;
3
+ rc?: {
4
+ root?: string;
5
+ };
6
+ }
7
+ export interface TestEmits {
8
+ }
9
+ export interface TestSlots {
10
+ content: (props: {}) => any;
11
+ }
12
+ type __VLS_Slots = TestSlots;
13
+ declare const __VLS_base: import("vue").DefineComponent<TestProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TestProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
14
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
10
15
  declare const _default: typeof __VLS_export;
11
16
  export default _default;
@@ -1,11 +1,23 @@
1
1
  <script setup>
2
- const { text } = defineProps({
3
- text: { type: String, required: true }
2
+ import { tv } from "../../utils/tv";
3
+ import { useRC } from "../../composables/useRC";
4
+ const { text, rc: rcProp } = defineProps({
5
+ text: { type: String, required: true },
6
+ rc: { type: Object, required: false }
4
7
  });
8
+ const emit = defineEmits([]);
9
+ const slots = defineSlots();
10
+ const { rc } = useRC("Test", rcProp);
11
+ const testStyles = tv({
12
+ slots: {
13
+ root: ""
14
+ }
15
+ });
16
+ const { root } = testStyles();
5
17
  </script>
6
18
 
7
19
  <template>
8
- <div v-bind="$attrs">
20
+ <div :class="root({ class: rc.root })" v-bind="$attrs">
9
21
  <slot name="content">
10
22
  <p>{{ text }}</p>
11
23
  </slot>
@@ -1,11 +1,16 @@
1
- type __VLS_Props = {
1
+ export interface TestProps {
2
2
  text: string;
3
- };
4
- declare var __VLS_1: {};
5
- type __VLS_Slots = {} & {
6
- content?: (props: typeof __VLS_1) => any;
7
- };
8
- declare const __VLS_base: 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>;
3
+ rc?: {
4
+ root?: string;
5
+ };
6
+ }
7
+ export interface TestEmits {
8
+ }
9
+ export interface TestSlots {
10
+ content: (props: {}) => any;
11
+ }
12
+ type __VLS_Slots = TestSlots;
13
+ declare const __VLS_base: import("vue").DefineComponent<TestProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TestProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
14
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
10
15
  declare const _default: typeof __VLS_export;
11
16
  export default _default;
@@ -1,8 +1,22 @@
1
- type __VLS_Props = {
1
+ export interface LinkNodeProps {
2
2
  href: string;
3
3
  target?: string;
4
4
  content: string;
5
- };
6
- 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>;
5
+ rc?: {
6
+ root?: string;
7
+ };
8
+ }
9
+ export interface LinkNodeEmits {
10
+ }
11
+ export interface LinkNodeSlots {
12
+ }
13
+ type __VLS_Slots = LinkNodeSlots;
14
+ declare const __VLS_base: import("vue").DefineComponent<LinkNodeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkNodeProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
16
  declare const _default: typeof __VLS_export;
8
17
  export default _default;
18
+ type __VLS_WithSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
@@ -1,15 +1,29 @@
1
1
  <script setup>
2
2
  import { computed } from "vue";
3
- const { href, target, content } = defineProps({
3
+ import { tv } from "../../utils/tv";
4
+ import { useRC } from "../../composables/useRC";
5
+ const { href, target, content, rc: rcProp } = defineProps({
4
6
  href: { type: String, required: true },
5
7
  target: { type: String, required: false },
6
- content: { type: String, required: true }
8
+ content: { type: String, required: true },
9
+ rc: { type: Object, required: false }
7
10
  });
11
+ const emit = defineEmits([]);
12
+ const slots = defineSlots();
13
+ const { rc } = useRC("LinkNode", rcProp);
14
+ const linkNodeStyles = tv({
15
+ slots: {
16
+ root: ""
17
+ }
18
+ });
19
+ const { root } = linkNodeStyles();
8
20
  const rel = computed(
9
21
  () => target === "_blank" ? "noopener noreferrer" : void 0
10
22
  );
11
23
  </script>
12
24
 
13
25
  <template>
14
- <ULink :to="href" :target="target" :rel="rel">{{ content }}</ULink>
26
+ <ULink :to="href" :target="target" :rel="rel" :class="root({ class: rc.root })">
27
+ {{ content }}
28
+ </ULink>
15
29
  </template>