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,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,6 +1,20 @@
1
- type __VLS_Props = {
1
+ export interface TextNodeProps {
2
2
  content: string;
3
- };
4
- 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>;
3
+ rc?: {
4
+ root?: string;
5
+ };
6
+ }
7
+ export interface TextNodeEmits {
8
+ }
9
+ export interface TextNodeSlots {
10
+ }
11
+ type __VLS_Slots = TextNodeSlots;
12
+ declare const __VLS_base: import("vue").DefineComponent<TextNodeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TextNodeProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
5
14
  declare const _default: typeof __VLS_export;
6
15
  export default _default;
16
+ type __VLS_WithSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
@@ -1,9 +1,21 @@
1
1
  <script setup>
2
- const { content } = defineProps({
3
- content: { type: String, required: true }
2
+ import { tv } from "../../utils/tv";
3
+ import { useRC } from "../../composables/useRC";
4
+ const { content, rc: rcProp } = defineProps({
5
+ content: { type: String, required: true },
6
+ rc: { type: Object, required: false }
4
7
  });
8
+ const emit = defineEmits([]);
9
+ const slots = defineSlots();
10
+ const { rc } = useRC("TextNode", rcProp);
11
+ const textNodeStyles = tv({
12
+ slots: {
13
+ root: ""
14
+ }
15
+ });
16
+ const { root } = textNodeStyles();
5
17
  </script>
6
18
 
7
19
  <template>
8
- <span>{{ content }}</span>
20
+ <span :class="root({ class: rc.root })">{{ content }}</span>
9
21
  </template>
@@ -1,6 +1,20 @@
1
- type __VLS_Props = {
1
+ export interface TextNodeProps {
2
2
  content: string;
3
- };
4
- 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>;
3
+ rc?: {
4
+ root?: string;
5
+ };
6
+ }
7
+ export interface TextNodeEmits {
8
+ }
9
+ export interface TextNodeSlots {
10
+ }
11
+ type __VLS_Slots = TextNodeSlots;
12
+ declare const __VLS_base: import("vue").DefineComponent<TextNodeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TextNodeProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
5
14
  declare const _default: typeof __VLS_export;
6
15
  export default _default;
16
+ type __VLS_WithSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
@@ -1,5 +1,5 @@
1
1
  import { type Page, type PageSurround, type PageDefinition } from "../../types/index.js";
2
- interface PageEditorProps {
2
+ export interface PageEditorProps {
3
3
  isSaving: boolean;
4
4
  useSurround?: boolean;
5
5
  surround?: PageSurround | null;
@@ -8,24 +8,48 @@ interface PageEditorProps {
8
8
  pageDefinitions: Record<string, PageDefinition>;
9
9
  onCreatePage?: (page: Partial<Page>) => Promise<void>;
10
10
  onDeletePage?: (id: string) => Promise<void>;
11
+ rc?: {
12
+ header?: string;
13
+ headerGroup?: string;
14
+ splitContainer?: string;
15
+ editorColumn?: string;
16
+ container?: string;
17
+ grid?: string;
18
+ toc?: string;
19
+ properties?: string;
20
+ contentWrapper?: string;
21
+ banner?: string;
22
+ icon?: string;
23
+ title?: string;
24
+ surroundSkeleton?: string;
25
+ skeleton?: string;
26
+ metadata?: string;
27
+ resizer?: string;
28
+ previewColumn?: string;
29
+ };
11
30
  }
12
31
  type __VLS_Props = PageEditorProps;
32
+ export interface PageEditorEmits {
33
+ save: [value: Page];
34
+ }
35
+ export interface PageEditorSlots {
36
+ }
37
+ type __VLS_Slots = PageEditorSlots;
13
38
  type __VLS_ModelProps = {
14
39
  modelValue: Page;
15
40
  };
16
41
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
17
- declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
42
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
18
43
  undo: () => void;
19
44
  redo: () => void;
20
45
  canUndo: import("vue").ComputedRef<boolean>;
21
46
  canRedo: import("vue").ComputedRef<boolean>;
22
47
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
23
- "update:modelValue": (value: {
48
+ save: (value: {
24
49
  type: "Default";
25
50
  properties: import("../../types/index.js").BasePageProperties;
26
51
  } & import("../../types/index.js").BasePage) => any;
27
- } & {
28
- save: (value: {
52
+ "update:modelValue": (value: {
29
53
  type: "Default";
30
54
  properties: import("../../types/index.js").BasePageProperties;
31
55
  } & import("../../types/index.js").BasePage) => any;
@@ -39,5 +63,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
39
63
  properties: import("../../types/index.js").BasePageProperties;
40
64
  } & import("../../types/index.js").BasePage) => any) | undefined;
41
65
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
66
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
42
67
  declare const _default: typeof __VLS_export;
43
68
  export default _default;
69
+ type __VLS_WithSlots<T, S> = T & {
70
+ new (): {
71
+ $slots: S;
72
+ };
73
+ };
@@ -1,14 +1,20 @@
1
1
  <script setup>
2
2
  import { ref, computed, useTemplateRef, provide } from "vue";
3
3
  import {} from "../../types";
4
- import { usePageEditor, usePageRegistry } from "../../composables";
4
+ import { usePageEditor, usePageRegistry, useRC } from "../../composables";
5
5
  import { getLocalizedContent } from "../../utils";
6
6
  import { useI18n } from "vue-i18n";
7
- const { getTypeLabelKey } = usePageRegistry();
8
- const { t, locale } = useI18n();
9
- const page = defineModel({ type: null, ...{ required: true } });
10
- const { undo, redo, canUndo, canRedo, captureSnapshot } = usePageEditor(page);
11
- const { isSaving, useSurround = false, surroundStatus = "idle", surround = null, resolvePage, onCreatePage, onDeletePage } = defineProps({
7
+ import { tv } from "../../utils/tv";
8
+ const {
9
+ isSaving,
10
+ useSurround = false,
11
+ surroundStatus = "idle",
12
+ surround = null,
13
+ resolvePage,
14
+ onCreatePage,
15
+ onDeletePage,
16
+ rc: rcProp
17
+ } = defineProps({
12
18
  isSaving: { type: Boolean, required: true },
13
19
  useSurround: { type: Boolean, required: false },
14
20
  surround: { type: [Object, null], required: false },
@@ -16,9 +22,56 @@ const { isSaving, useSurround = false, surroundStatus = "idle", surround = null,
16
22
  resolvePage: { type: Function, required: true },
17
23
  pageDefinitions: { type: Object, required: true },
18
24
  onCreatePage: { type: Function, required: false },
19
- onDeletePage: { type: Function, required: false }
25
+ onDeletePage: { type: Function, required: false },
26
+ rc: { type: Object, required: false }
20
27
  });
28
+ const page = defineModel({ type: null, ...{ required: true } });
21
29
  const emit = defineEmits(["save"]);
30
+ const slots = defineSlots();
31
+ const { rc } = useRC("PageEditor", rcProp);
32
+ const pageEditorStyles = tv({
33
+ slots: {
34
+ header: "h-12 w-full bg-muted",
35
+ headerGroup: "flex items-center gap-xs",
36
+ splitContainer: "flex w-full overflow-hidden",
37
+ editorColumn: "h-full overflow-y-auto",
38
+ container: "flex flex-col py-16",
39
+ grid: "grid grid-cols-1 lg:grid-cols-24 gap-xl items-start",
40
+ toc: "hidden lg:flex lg:col-span-4 sticky top-20 self-start",
41
+ properties: "order-1 lg:order-2 lg:col-span-6",
42
+ contentWrapper: "order-2 lg:order-1 lg:col-span-14 flex flex-col gap-xl",
43
+ banner: "rounded-xl w-full object-cover",
44
+ icon: "rounded-full w-12 h-12 object-cover",
45
+ title: "",
46
+ surroundSkeleton: "grid grid-cols-1 gap-md sm:grid-cols-2",
47
+ skeleton: "h-48 w-full rounded-xl",
48
+ metadata: "flex flex-col gap-xs text-xs text-dimmed p-xl",
49
+ resizer: "relative flex flex-col items-center justify-center w-6 cursor-col-resize group px-1 py-16",
50
+ previewColumn: "h-full overflow-y-auto"
51
+ }
52
+ });
53
+ const {
54
+ header,
55
+ headerGroup,
56
+ splitContainer,
57
+ editorColumn,
58
+ container,
59
+ grid,
60
+ toc,
61
+ properties,
62
+ contentWrapper,
63
+ banner,
64
+ icon,
65
+ title: titleClass,
66
+ surroundSkeleton,
67
+ skeleton,
68
+ metadata,
69
+ resizer,
70
+ previewColumn
71
+ } = pageEditorStyles();
72
+ const { getTypeLabelKey } = usePageRegistry();
73
+ const { t, locale } = useI18n();
74
+ const { undo, redo, canUndo, canRedo, captureSnapshot } = usePageEditor(page);
22
75
  const handleSave = () => {
23
76
  const dataToPersist = JSON.parse(JSON.stringify(page.value));
24
77
  emit("save", dataToPersist);
@@ -98,9 +151,9 @@ const handleDeleteConfirm = async () => {
98
151
 
99
152
  <template>
100
153
  <RCHeaderLayer id="editor-header" :order="3">
101
- <UHeader class="h-12 w-full bg-muted">
154
+ <UHeader :class="header({ class: rc.header })">
102
155
  <template #left>
103
- <div class="flex items-center gap-xs">
156
+ <div :class="headerGroup({ class: rc.headerGroup })">
104
157
  <UButton
105
158
  icon="lucide:rotate-ccw"
106
159
  variant="outline"
@@ -121,7 +174,7 @@ const handleDeleteConfirm = async () => {
121
174
  </template>
122
175
 
123
176
  <template #right>
124
- <div class="flex items-center gap-xs">
177
+ <div :class="headerGroup({ class: rc.headerGroup })">
125
178
  <UButton
126
179
  :icon="showPreview ? 'lucide:eye-off' : 'lucide:eye'"
127
180
  label="Preview"
@@ -173,28 +226,28 @@ const handleDeleteConfirm = async () => {
173
226
 
174
227
  <div
175
228
  ref="split-container"
176
- class="flex w-full overflow-hidden"
229
+ :class="splitContainer({ class: rc.splitContainer })"
177
230
  >
178
231
  <div
179
- class="h-full overflow-y-auto"
232
+ :class="editorColumn({ class: rc.editorColumn })"
180
233
  :style="{ width: showPreview ? `${editorWidth}%` : '100%' }"
181
234
  >
182
- <UContainer class="flex flex-col py-16">
183
- <div class="grid grid-cols-1 lg:grid-cols-24 gap-xl items-start">
235
+ <UContainer :class="container({ class: rc.container })">
236
+ <div :class="grid({ class: rc.grid })">
184
237
  <RCPageTOC
185
238
  :page-blocks="page.blocks"
186
239
  :levels="[2, 3, 4]"
187
- class="hidden lg:flex lg:col-span-4 sticky top-20 self-start"
240
+ :class="toc({ class: rc.toc })"
188
241
  >
189
242
  <template #bottom> </template>
190
243
  </RCPageTOC>
191
- <RCPagePropertiesEditor v-model="page" class="order-1 lg:order-2 lg:col-span-6" />
192
- <div class="order-2 lg:order-1 lg:col-span-14 flex flex-col gap-xl">
244
+ <RCPagePropertiesEditor v-model="page" :class="properties({ class: rc.properties })" />
245
+ <div :class="contentWrapper({ class: rc.contentWrapper })">
193
246
  <RCImage
194
247
  v-if="page.banner?.src"
195
248
  :src="page.banner?.src"
196
249
  :alt="page.banner?.alt"
197
- class="rounded-xl w-full object-cover"
250
+ :class="banner({ class: rc.banner })"
198
251
  />
199
252
  <UPageHeader
200
253
  :headline="t(getTypeLabelKey(page.type))"
@@ -207,9 +260,9 @@ const handleDeleteConfirm = async () => {
207
260
  v-if="page.icon?.src"
208
261
  :src="page.icon?.src"
209
262
  :alt="page.icon?.alt"
210
- class="rounded-full w-12 h-12 object-cover"
263
+ :class="icon({ class: rc.icon })"
211
264
  />
212
- <h1>{{ getLocalizedContent(page.title, locale) }}</h1>
265
+ <h1 :class="titleClass({ class: rc.title })">{{ getLocalizedContent(page.title, locale) }}</h1>
213
266
  </div>
214
267
  </template>
215
268
  </UPageHeader>
@@ -219,9 +272,9 @@ const handleDeleteConfirm = async () => {
219
272
  @mutation="captureSnapshot"
220
273
  />
221
274
  <template v-if="useSurround">
222
- <div v-if="surroundStatus === 'pending'" class="grid grid-cols-1 gap-md sm:grid-cols-2">
223
- <USkeleton class="h-48 w-full rounded-xl" />
224
- <USkeleton class="h-48 w-full rounded-xl" />
275
+ <div v-if="surroundStatus === 'pending'" :class="surroundSkeleton({ class: rc.surroundSkeleton })">
276
+ <USkeleton :class="skeleton({ class: rc.skeleton })" />
277
+ <USkeleton :class="skeleton({ class: rc.skeleton })" />
225
278
  </div>
226
279
 
227
280
  <LazyRCPageSurround
@@ -238,7 +291,7 @@ const handleDeleteConfirm = async () => {
238
291
 
239
292
  <USeparator />
240
293
 
241
- <div class="flex flex-col gap-xs text-xs text-dimmed p-xl">
294
+ <div :class="metadata({ class: rc.metadata })">
242
295
  <h6>Metadata</h6>
243
296
  <span>Page ID: {{ page.id }}</span>
244
297
  <span
@@ -286,20 +339,16 @@ const handleDeleteConfirm = async () => {
286
339
 
287
340
  <div
288
341
  v-if="showPreview"
289
- :class="cursorClass"
290
- class="relative flex flex-col items-center justify-center w-6 cursor-col-resize group px-1 py-16"
342
+ :class="[cursorClass, resizer({ class: rc.resizer })]"
291
343
  @mousedown="startResizing"
292
344
  @dblclick="editorWidth = 50"
293
345
  >
294
- <USeparator
295
- orientation="vertical"
296
- :ui="{}"
297
- />
346
+ <USeparator orientation="vertical" />
298
347
  </div>
299
348
 
300
349
  <div
301
350
  v-if="showPreview"
302
- class="h-full overflow-y-auto"
351
+ :class="previewColumn({ class: rc.previewColumn })"
303
352
  :style="{ width: `${100 - editorWidth}%` }"
304
353
  >
305
354
  <RCPageRenderer v-model="page" :resolve-page="resolvePage" />
@@ -1,5 +1,5 @@
1
1
  import { type Page, type PageSurround, type PageDefinition } from "../../types/index.js";
2
- interface PageEditorProps {
2
+ export interface PageEditorProps {
3
3
  isSaving: boolean;
4
4
  useSurround?: boolean;
5
5
  surround?: PageSurround | null;
@@ -8,24 +8,48 @@ interface PageEditorProps {
8
8
  pageDefinitions: Record<string, PageDefinition>;
9
9
  onCreatePage?: (page: Partial<Page>) => Promise<void>;
10
10
  onDeletePage?: (id: string) => Promise<void>;
11
+ rc?: {
12
+ header?: string;
13
+ headerGroup?: string;
14
+ splitContainer?: string;
15
+ editorColumn?: string;
16
+ container?: string;
17
+ grid?: string;
18
+ toc?: string;
19
+ properties?: string;
20
+ contentWrapper?: string;
21
+ banner?: string;
22
+ icon?: string;
23
+ title?: string;
24
+ surroundSkeleton?: string;
25
+ skeleton?: string;
26
+ metadata?: string;
27
+ resizer?: string;
28
+ previewColumn?: string;
29
+ };
11
30
  }
12
31
  type __VLS_Props = PageEditorProps;
32
+ export interface PageEditorEmits {
33
+ save: [value: Page];
34
+ }
35
+ export interface PageEditorSlots {
36
+ }
37
+ type __VLS_Slots = PageEditorSlots;
13
38
  type __VLS_ModelProps = {
14
39
  modelValue: Page;
15
40
  };
16
41
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
17
- declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
42
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
18
43
  undo: () => void;
19
44
  redo: () => void;
20
45
  canUndo: import("vue").ComputedRef<boolean>;
21
46
  canRedo: import("vue").ComputedRef<boolean>;
22
47
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
23
- "update:modelValue": (value: {
48
+ save: (value: {
24
49
  type: "Default";
25
50
  properties: import("../../types/index.js").BasePageProperties;
26
51
  } & import("../../types/index.js").BasePage) => any;
27
- } & {
28
- save: (value: {
52
+ "update:modelValue": (value: {
29
53
  type: "Default";
30
54
  properties: import("../../types/index.js").BasePageProperties;
31
55
  } & import("../../types/index.js").BasePage) => any;
@@ -39,5 +63,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
39
63
  properties: import("../../types/index.js").BasePageProperties;
40
64
  } & import("../../types/index.js").BasePage) => any) | undefined;
41
65
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
66
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
42
67
  declare const _default: typeof __VLS_export;
43
68
  export default _default;
69
+ type __VLS_WithSlots<T, S> = T & {
70
+ new (): {
71
+ $slots: S;
72
+ };
73
+ };
@@ -1,6 +1,23 @@
1
- interface PageMentionProps {
1
+ export interface PageMentionProps {
2
2
  pageId: string;
3
+ rc?: {
4
+ link?: string;
5
+ icon?: string;
6
+ text?: string;
7
+ skeleton?: string;
8
+ };
3
9
  }
4
- declare const __VLS_export: import("vue").DefineComponent<PageMentionProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PageMentionProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ export interface PageMentionEmits {
11
+ }
12
+ export interface PageMentionSlots {
13
+ }
14
+ type __VLS_Slots = PageMentionSlots;
15
+ declare const __VLS_base: import("vue").DefineComponent<PageMentionProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PageMentionProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
5
17
  declare const _default: typeof __VLS_export;
6
18
  export default _default;
19
+ type __VLS_WithSlots<T, S> = T & {
20
+ new (): {
21
+ $slots: S;
22
+ };
23
+ };
@@ -4,9 +4,24 @@ import { getLocalizedContent } from "../../utils";
4
4
  import { useI18n } from "vue-i18n";
5
5
  import {} from "../../types";
6
6
  import { useAsyncData } from "#imports";
7
- const { pageId } = defineProps({
8
- pageId: { type: String, required: true }
7
+ import { tv } from "../../utils/tv";
8
+ import { useRC } from "../../composables/useRC";
9
+ const { pageId, rc: rcProp } = defineProps({
10
+ pageId: { type: String, required: true },
11
+ rc: { type: Object, required: false }
9
12
  });
13
+ const emit = defineEmits([]);
14
+ const slots = defineSlots();
15
+ const { rc } = useRC("PageMention", rcProp);
16
+ const pageMentionStyles = tv({
17
+ slots: {
18
+ link: "inline-flex items-baseline gap-1 align-middle hover:text-primary transition-colors font-medium text-inherit",
19
+ icon: "w-4 h-4 rounded-full object-cover shrink-0",
20
+ text: "truncate font-medium",
21
+ skeleton: "h-3 w-24"
22
+ }
23
+ });
24
+ const { link, icon, text, skeleton } = pageMentionStyles();
10
25
  const { locale } = useI18n();
11
26
  const resolver = inject("page-resolver");
12
27
  const { data: linkedPage, status } = await useAsyncData(`page-mention-${pageId}`, async () => {
@@ -26,17 +41,17 @@ const { data: linkedPage, status } = await useAsyncData(`page-mention-${pageId}`
26
41
  <NuxtLink
27
42
  v-if="linkedPage"
28
43
  :to="`/${linkedPage.slug}`"
29
- class="inline-flex items-baseline gap-1 align-middle hover:text-primary transition-colors font-medium text-inherit"
44
+ :class="link({ class: rc.link })"
30
45
  >
31
46
  <NuxtImg
32
47
  v-if="linkedPage.icon?.src"
33
48
  :src="linkedPage.icon.src"
34
49
  :alt="linkedPage.icon.alt"
35
- class="w-4 h-4 rounded-full object-cover shrink-0"
50
+ :class="icon({ class: rc.icon })"
36
51
  />
37
- <span class="truncate font-medium">
52
+ <span :class="text({ class: rc.text })">
38
53
  {{ getLocalizedContent(linkedPage.title, locale) }}
39
54
  </span>
40
55
  </NuxtLink>
41
- <USkeleton v-else-if="status === 'pending'" class="h-3 w-24" />
56
+ <USkeleton v-else-if="status === 'pending'" :class="skeleton({ class: rc.skeleton })" />
42
57
  </template>
@@ -1,6 +1,23 @@
1
- interface PageMentionProps {
1
+ export interface PageMentionProps {
2
2
  pageId: string;
3
+ rc?: {
4
+ link?: string;
5
+ icon?: string;
6
+ text?: string;
7
+ skeleton?: string;
8
+ };
3
9
  }
4
- declare const __VLS_export: import("vue").DefineComponent<PageMentionProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PageMentionProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ export interface PageMentionEmits {
11
+ }
12
+ export interface PageMentionSlots {
13
+ }
14
+ type __VLS_Slots = PageMentionSlots;
15
+ declare const __VLS_base: import("vue").DefineComponent<PageMentionProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PageMentionProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
5
17
  declare const _default: typeof __VLS_export;
6
18
  export default _default;
19
+ type __VLS_WithSlots<T, S> = T & {
20
+ new (): {
21
+ $slots: S;
22
+ };
23
+ };
@@ -1,17 +1,45 @@
1
1
  import { type Page } from "../../types/index.js";
2
+ export interface PagePropertiesEditorProps {
3
+ rc?: {
4
+ aside?: string;
5
+ icon?: string;
6
+ titleInput?: string;
7
+ type?: string;
8
+ tags?: string;
9
+ tabs?: string;
10
+ image?: string;
11
+ groupButton?: string;
12
+ details?: string;
13
+ field?: string;
14
+ links?: string;
15
+ };
16
+ }
17
+ type __VLS_Props = PagePropertiesEditorProps;
18
+ export interface PagePropertiesEditorEmits {
19
+ }
20
+ export interface PagePropertiesEditorSlots {
21
+ }
22
+ type __VLS_Slots = PagePropertiesEditorSlots;
2
23
  type __VLS_ModelProps = {
3
24
  modelValue: Page;
4
25
  };
5
- declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
26
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
27
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
28
  "update:modelValue": (value: {
7
29
  type: "Default";
8
30
  properties: import("../../types/index.js").BasePageProperties;
9
31
  } & import("../../types/index.js").BasePage) => any;
10
- }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
32
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
11
33
  "onUpdate:modelValue"?: ((value: {
12
34
  type: "Default";
13
35
  properties: import("../../types/index.js").BasePageProperties;
14
36
  } & import("../../types/index.js").BasePage) => any) | undefined;
15
37
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
38
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
16
39
  declare const _default: typeof __VLS_export;
17
40
  export default _default;
41
+ type __VLS_WithSlots<T, S> = T & {
42
+ new (): {
43
+ $slots: S;
44
+ };
45
+ };