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,12 +1,29 @@
1
1
  <script setup>
2
- import { computed } from "#imports";
3
- const { name, jpg, png, webp, svg } = defineProps({
2
+ import { computed } from "vue";
3
+ import { tv } from "../../utils/tv";
4
+ import { useRC } from "../../composables/useRC";
5
+ const { name, jpg, png, webp, svg, rc: rcProp } = defineProps({
4
6
  name: { type: String, required: false },
5
7
  jpg: { type: String, required: false },
6
8
  png: { type: String, required: false },
7
9
  webp: { type: String, required: false },
8
- svg: { type: String, required: false }
10
+ svg: { type: String, required: false },
11
+ rc: { type: Object, required: false }
9
12
  });
13
+ const emit = defineEmits([]);
14
+ const slots = defineSlots();
15
+ const { rc } = useRC("ImageSwatch", rcProp);
16
+ const imageSwatchStyles = tv({
17
+ slots: {
18
+ card: "w-full rounded-none xl:w-fit",
19
+ title: "text-lg font-bold",
20
+ content: "flex flex-col items-center gap-sm xl:flex-row xl:items-start",
21
+ image: "size-48",
22
+ buttonGroup: "flex w-full flex-col justify-center gap-sm",
23
+ button: "w-full xl:w-36"
24
+ }
25
+ });
26
+ const { card, title: titleStyle, content, image: imageStyle, buttonGroup, button } = imageSwatchStyles();
10
27
  const image = computed(() => {
11
28
  if (webp) return webp;
12
29
  if (png) return png;
@@ -17,20 +34,20 @@ const image = computed(() => {
17
34
  </script>
18
35
 
19
36
  <template>
20
- <UCard variant="subtle" class="w-full rounded-none xl:w-fit">
37
+ <UCard variant="subtle" :class="card({ class: rc.card })">
21
38
  <template #header v-if="name">
22
- <h3 class="text-lg font-bold">{{ name }}</h3>
39
+ <h3 :class="titleStyle({ class: rc.title })">{{ name }}</h3>
23
40
  </template>
24
- <div class="flex flex-col items-center gap-sm xl:flex-row xl:items-start">
25
- <NuxtImg :src="image" class="size-48" />
26
- <div class="flex w-full flex-col justify-center gap-sm">
41
+ <div :class="content({ class: rc.content })">
42
+ <NuxtImg :src="image" :class="imageStyle({ class: rc.image })" />
43
+ <div :class="buttonGroup({ class: rc.buttonGroup })">
27
44
  <UButton
28
45
  v-if="jpg"
29
46
  variant="outline"
30
47
  size="sm"
31
48
  icon="lucide:download"
32
49
  label="Download JPG"
33
- class="w-full xl:w-36"
50
+ :class="button({ class: rc.button })"
34
51
  :to="jpg"
35
52
  target="_blank"
36
53
  />
@@ -40,7 +57,7 @@ const image = computed(() => {
40
57
  size="sm"
41
58
  icon="lucide:download"
42
59
  label="Download PNG"
43
- class="w-full xl:w-36"
60
+ :class="button({ class: rc.button })"
44
61
  :to="png"
45
62
  target="_blank"
46
63
  />
@@ -50,7 +67,7 @@ const image = computed(() => {
50
67
  size="sm"
51
68
  icon="lucide:download"
52
69
  label="Download WEBP"
53
- class="w-full xl:w-36"
70
+ :class="button({ class: rc.button })"
54
71
  :to="webp"
55
72
  target="_blank"
56
73
  />
@@ -60,7 +77,7 @@ const image = computed(() => {
60
77
  size="sm"
61
78
  icon="lucide:download"
62
79
  label="Download SVG"
63
- class="w-full xl:w-36"
80
+ :class="button({ class: rc.button })"
64
81
  :to="svg"
65
82
  target="_blank"
66
83
  />
@@ -1,10 +1,29 @@
1
- type __VLS_Props = {
1
+ export interface ImageSwatchProps {
2
2
  name?: string;
3
3
  jpg?: string;
4
4
  png?: string;
5
5
  webp?: string;
6
6
  svg?: string;
7
- };
8
- 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>;
7
+ rc?: {
8
+ card?: string;
9
+ title?: string;
10
+ content?: string;
11
+ image?: string;
12
+ buttonGroup?: string;
13
+ button?: string;
14
+ };
15
+ }
16
+ export interface ImageSwatchEmits {
17
+ }
18
+ export interface ImageSwatchSlots {
19
+ }
20
+ type __VLS_Slots = ImageSwatchSlots;
21
+ declare const __VLS_base: import("vue").DefineComponent<ImageSwatchProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ImageSwatchProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
9
23
  declare const _default: typeof __VLS_export;
10
24
  export default _default;
25
+ type __VLS_WithSlots<T, S> = T & {
26
+ new (): {
27
+ $slots: S;
28
+ };
29
+ };
@@ -1,8 +1,16 @@
1
- declare var __VLS_1: {};
2
- type __VLS_Slots = {} & {
3
- default?: (props: typeof __VLS_1) => any;
4
- };
5
- declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
1
+ export interface PlaceholderProps {
2
+ rc?: {
3
+ base?: string;
4
+ svg?: string;
5
+ };
6
+ }
7
+ export interface PlaceholderEmits {
8
+ }
9
+ export interface PlaceholderSlots {
10
+ default: (props: {}) => any;
11
+ }
12
+ type __VLS_Slots = PlaceholderSlots;
13
+ declare const __VLS_base: import("vue").DefineComponent<PlaceholderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PlaceholderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
14
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
15
  declare const _default: typeof __VLS_export;
8
16
  export default _default;
@@ -1,10 +1,24 @@
1
- <script setup lang="ts"></script>
1
+ <script setup>
2
+ import { tv } from "../../utils/tv";
3
+ import { useRC } from "../../composables/useRC";
4
+ const { rc: rcProp } = defineProps({
5
+ rc: { type: Object, required: false }
6
+ });
7
+ const emit = defineEmits([]);
8
+ const slots = defineSlots();
9
+ const { rc } = useRC("Placeholder", rcProp);
10
+ const placeholderStyles = tv({
11
+ slots: {
12
+ base: "relative flex items-center justify-center overflow-hidden rounded-sm border border-dashed border-accented px-4 opacity-75",
13
+ svg: "absolute inset-0 h-full w-full stroke-inverted/10"
14
+ }
15
+ });
16
+ const { base, svg } = placeholderStyles();
17
+ </script>
2
18
 
3
19
  <template>
4
- <div
5
- class="relative flex items-center justify-center overflow-hidden rounded-sm border border-dashed border-accented px-4 opacity-75"
6
- >
7
- <svg class="absolute inset-0 h-full w-full stroke-inverted/10">
20
+ <div :class="base({ class: rc.base })">
21
+ <svg :class="svg({ class: rc.svg })">
8
22
  <defs>
9
23
  <pattern
10
24
  id="pattern-5c1e4f0e-62d5-498b-8ff0-cf77bb448c8e"
@@ -1,8 +1,16 @@
1
- declare var __VLS_1: {};
2
- type __VLS_Slots = {} & {
3
- default?: (props: typeof __VLS_1) => any;
4
- };
5
- declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
1
+ export interface PlaceholderProps {
2
+ rc?: {
3
+ base?: string;
4
+ svg?: string;
5
+ };
6
+ }
7
+ export interface PlaceholderEmits {
8
+ }
9
+ export interface PlaceholderSlots {
10
+ default: (props: {}) => any;
11
+ }
12
+ type __VLS_Slots = PlaceholderSlots;
13
+ declare const __VLS_base: import("vue").DefineComponent<PlaceholderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PlaceholderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
14
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
15
  declare const _default: typeof __VLS_export;
8
16
  export default _default;
@@ -4,3 +4,4 @@ export * from "./usePageEditor.js";
4
4
  export * from "./useBlockEditor.js";
5
5
  export * from "./usePageRegistry.js";
6
6
  export * from "./useInfobox.js";
7
+ export * from "./useRC.js";
@@ -4,3 +4,4 @@ export * from "./usePageEditor.js";
4
4
  export * from "./useBlockEditor.js";
5
5
  export * from "./usePageRegistry.js";
6
6
  export * from "./useInfobox.js";
7
+ export * from "./useRC.js";
@@ -4,3 +4,4 @@ export * from "./usePageEditor.mjs";
4
4
  export * from "./useBlockEditor.mjs";
5
5
  export * from "./usePageRegistry.mjs";
6
6
  export * from "./useInfobox.mjs";
7
+ export * from "./useRC.mjs";
@@ -0,0 +1,3 @@
1
+ export declare function useRC<T extends Record<string, any>>(namespace: string, propsProp: T | undefined): {
2
+ rc: import("vue").ComputedRef<T | (T extends any ? T : Omit<T, keyof T & (string | number | symbol)> & Omit<any, keyof T & (string | number | symbol)> & { -readonly [Key in keyof T & (string | number | symbol)]: T[Key] extends void | null | undefined ? any : T[Key] | (T[Key] extends infer T_1 ? T_1 extends T[Key] ? T_1 extends void | null | undefined ? any : T_1 | (T_1 extends any[] ? any : T_1 extends Function ? any : T_1 extends RegExp ? any : T_1 extends Promise<any> ? any : any) : never : never); })>;
3
+ };
@@ -0,0 +1,14 @@
1
+ import { computed } from "vue";
2
+ import { useAppConfig } from "#imports";
3
+ import { defu } from "defu";
4
+ export function useRC(namespace, propsProp) {
5
+ const appConfig = useAppConfig();
6
+ const rc = computed(() => {
7
+ const config = appConfig.rimelightComponents || {};
8
+ const conf = config[namespace] || config[namespace.toLowerCase()] || {};
9
+ return defu(propsProp || {}, conf.slots || conf);
10
+ });
11
+ return {
12
+ rc
13
+ };
14
+ }
@@ -0,0 +1,14 @@
1
+ import { computed } from "vue";
2
+ import { useAppConfig } from "#imports";
3
+ import { defu } from "defu";
4
+ export function useRC(namespace, propsProp) {
5
+ const appConfig = useAppConfig();
6
+ const rc = computed(() => {
7
+ const config = appConfig.rimelightComponents || {};
8
+ const conf = config[namespace] || config[namespace.toLowerCase()] || {};
9
+ return defu(propsProp || {}, conf.slots || conf);
10
+ });
11
+ return {
12
+ rc
13
+ };
14
+ }
@@ -0,0 +1,6 @@
1
+ declare module '#build/app.config' {
2
+ import type { AppConfig } from '@nuxt/schema'
3
+
4
+ const _default: AppConfig
5
+ export default _default
6
+ }
@@ -5,12 +5,12 @@ import { type Localized } from "./index.js";
5
5
  */
6
6
  export declare const LocalizedSchema: <T extends z.ZodTypeAny>(schema: T) => z.ZodType<Localized<z.infer<T>>>;
7
7
  export declare const linkVariantEnum: z.ZodEnum<{
8
- link: "link";
9
8
  solid: "solid";
10
9
  outline: "outline";
11
10
  soft: "soft";
12
11
  subtle: "subtle";
13
12
  ghost: "ghost";
13
+ link: "link";
14
14
  }>;
15
15
  export declare const linkColorEnum: z.ZodEnum<{
16
16
  primary: "primary";
@@ -44,12 +44,12 @@ export declare const LinkSchema: z.ZodObject<{
44
44
  error: "error";
45
45
  }>>;
46
46
  variant: z.ZodOptional<z.ZodEnum<{
47
- link: "link";
48
47
  solid: "solid";
49
48
  outline: "outline";
50
49
  soft: "soft";
51
50
  subtle: "subtle";
52
51
  ghost: "ghost";
52
+ link: "link";
53
53
  }>>;
54
54
  }, z.core.$strip>;
55
55
  export type Link = z.infer<typeof LinkSchema>;
@@ -0,0 +1,66 @@
1
+ import type { ClassValue, TVVariants, TVCompoundVariants, TVDefaultVariants } from 'tailwind-variants';
2
+ /**
3
+ * Defines the AppConfig object based on the tailwind-variants configuration.
4
+ */
5
+ export type TVConfig<T extends Record<string, any>> = {
6
+ [P in keyof T]?: {
7
+ [K in keyof T[P] as K extends 'base' | 'slots' | 'variants' | 'defaultVariants' ? K : never]?: K extends 'base' ? ClassValue : K extends 'slots' ? {
8
+ [S in keyof T[P]['slots']]?: ClassValue;
9
+ } : K extends 'variants' ? TVVariants<T[P]['slots'], ClassValue, WidenVariantsValues<T[P]['variants']>> : K extends 'defaultVariants' ? TVDefaultVariants<WidenVariantsValues<T[P]['variants']>, T[P]['slots'], object, undefined> : never;
10
+ };
11
+ } & {
12
+ [P in keyof T]?: {
13
+ compoundVariants?: TVCompoundVariants<WidenVariantsValues<T[P]['variants']>, T[P]['slots'], ClassValue, object, undefined>;
14
+ };
15
+ };
16
+ type WidenVariantsValues<V extends Record<string, any> | undefined> = V extends Record<string, any> ? V & {
17
+ [K in keyof V]: V[K] extends Record<string, any> ? V[K] & Record<string & {}, any> : V[K];
18
+ } : V;
19
+ /**
20
+ * Utility type to flatten intersection types for better IDE hover information.
21
+ * @template T The type to flatten.
22
+ */
23
+ type Id<T> = {} & {
24
+ [P in keyof T]: T[P];
25
+ };
26
+ type ComponentVariants<T extends {
27
+ variants?: Record<string, Record<string, any>>;
28
+ }> = {
29
+ [K in keyof T['variants']]: keyof T['variants'][K];
30
+ };
31
+ type ComponentSlots<T extends {
32
+ slots?: Record<string, any>;
33
+ }> = Id<{
34
+ [K in keyof T['slots']]?: ClassValue;
35
+ }>;
36
+ type ComponentUI<T extends {
37
+ slots?: Record<string, any>;
38
+ }> = Id<{
39
+ [K in keyof Required<T['slots']>]: (props?: Record<string, any>) => string;
40
+ }>;
41
+ type GetComponentAppConfig<A, U extends string, K extends string> = A extends Record<U, Record<K, any>> ? A[U][K] : {};
42
+ type ComponentAppConfig<T, A extends Record<string, any>, K extends string, U extends string = 'ui' | 'ui.prose'> = A & (U extends 'ui.prose' ? {
43
+ ui?: {
44
+ prose?: {
45
+ [k in K]?: Partial<T>;
46
+ };
47
+ };
48
+ } : {
49
+ [key in Exclude<U, 'ui.prose'>]?: {
50
+ [k in K]?: Partial<T>;
51
+ };
52
+ });
53
+ /**
54
+ * Defines the configuration shape expected for a component.
55
+ * @template T The component's theme imported from `#build/rimelight-components/*`.
56
+ * @template A The base AppConfig type from `@nuxt/schema`.
57
+ * @template K The key identifying the component (e.g., 'badge').
58
+ * @template U The top-level key in AppConfig ('rimelightComponents').
59
+ */
60
+ export type ComponentConfig<T extends Record<string, any>, A extends Record<string, any>, K extends string, U extends 'rimelightComponents'> = {
61
+ AppConfig: ComponentAppConfig<T, A, K, U>;
62
+ variants: ComponentVariants<T & GetComponentAppConfig<A, U, K>>;
63
+ slots: ComponentSlots<T>;
64
+ ui: ComponentUI<T>;
65
+ };
66
+ export {};
File without changes
File without changes
@@ -1,5 +1,6 @@
1
1
  export * from "./richTextHelpers.js";
2
2
  export * from "./page.js";
3
+ export * from "./tv.js";
3
4
  /**
4
5
  * Converts a string into a URL-friendly slug.
5
6
  * - Converts to lowercase.
@@ -1,5 +1,6 @@
1
1
  export * from "./richTextHelpers.js";
2
2
  export * from "./page.js";
3
+ export * from "./tv.js";
3
4
  export function slugify(text) {
4
5
  if (!text) {
5
6
  return "";
@@ -1,5 +1,6 @@
1
1
  export * from "./richTextHelpers.mjs";
2
2
  export * from "./page.mjs";
3
+ export * from "./tv.mjs";
3
4
  export function slugify(text) {
4
5
  if (!text) {
5
6
  return "";
@@ -0,0 +1 @@
1
+ export declare const tv: import("tailwind-variants").TV;
@@ -0,0 +1,4 @@
1
+ import { createTV } from "tailwind-variants";
2
+ import appConfig from "#build/app.config";
3
+ const appConfigTv = appConfig;
4
+ export const tv = /* @__PURE__ */ createTV(appConfigTv.rimelightComponents?.tv);
@@ -0,0 +1,4 @@
1
+ import { createTV } from "tailwind-variants";
2
+ import appConfig from "#build/app.config";
3
+ const appConfigTv = appConfig;
4
+ export const tv = /* @__PURE__ */ createTV(appConfigTv.rimelightComponents?.tv);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rimelight-components",
3
- "version": "2.1.17",
3
+ "version": "2.1.19",
4
4
  "description": "A component library by Rimelight Entertainment.",
5
5
  "keywords": [
6
6
  "nuxt",