rimelight-components 2.1.17 → 2.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/app/Footer.d.vue.ts +18 -9
- package/dist/runtime/components/app/Footer.vue +25 -12
- package/dist/runtime/components/app/Footer.vue.d.ts +18 -9
- package/dist/runtime/components/app/Header.d.vue.ts +24 -15
- package/dist/runtime/components/app/Header.vue +18 -11
- package/dist/runtime/components/app/Header.vue.d.ts +24 -15
- package/dist/runtime/components/app/HeaderLayer.d.vue.ts +13 -7
- package/dist/runtime/components/app/HeaderLayer.vue +21 -9
- package/dist/runtime/components/app/HeaderLayer.vue.d.ts +13 -7
- package/dist/runtime/components/app/Image.d.vue.ts +18 -4
- package/dist/runtime/components/app/Image.vue +34 -16
- package/dist/runtime/components/app/Image.vue.d.ts +18 -4
- package/dist/runtime/components/app/Logo.d.vue.ts +17 -3
- package/dist/runtime/components/app/Logo.vue +16 -4
- package/dist/runtime/components/app/Logo.vue.d.ts +17 -3
- package/dist/runtime/components/app/NewsletterSignup.d.vue.ts +17 -3
- package/dist/runtime/components/app/NewsletterSignup.vue +16 -3
- package/dist/runtime/components/app/NewsletterSignup.vue.d.ts +17 -3
- package/dist/runtime/components/app/ScrollToTop.d.vue.ts +20 -5
- package/dist/runtime/components/app/ScrollToTop.vue +31 -15
- package/dist/runtime/components/app/ScrollToTop.vue.d.ts +20 -5
- package/dist/runtime/components/blocks/Block.d.vue.ts +13 -7
- package/dist/runtime/components/blocks/Block.vue +20 -7
- package/dist/runtime/components/blocks/Block.vue.d.ts +13 -7
- package/dist/runtime/components/blocks/BlockEditRenderer.d.vue.ts +17 -3
- package/dist/runtime/components/blocks/BlockEditRenderer.vue +15 -3
- package/dist/runtime/components/blocks/BlockEditRenderer.vue.d.ts +17 -3
- package/dist/runtime/components/blocks/BlockEditor.d.vue.ts +13 -4
- package/dist/runtime/components/blocks/BlockEditor.vue +11 -35
- package/dist/runtime/components/blocks/BlockEditor.vue.d.ts +13 -4
- package/dist/runtime/components/blocks/BlockViewRenderer.d.vue.ts +17 -3
- package/dist/runtime/components/blocks/BlockViewRenderer.vue +15 -3
- package/dist/runtime/components/blocks/BlockViewRenderer.vue.d.ts +17 -3
- package/dist/runtime/components/blocks/TextRenderer.d.vue.ts +17 -3
- package/dist/runtime/components/blocks/TextRenderer.vue +19 -5
- package/dist/runtime/components/blocks/TextRenderer.vue.d.ts +17 -3
- package/dist/runtime/components/blocks/editor/CalloutBlockEditor.d.vue.ts +17 -1
- package/dist/runtime/components/blocks/editor/CalloutBlockEditor.vue +18 -4
- package/dist/runtime/components/blocks/editor/CalloutBlockEditor.vue.d.ts +17 -1
- package/dist/runtime/components/blocks/editor/CardBlockEditor.d.vue.ts +17 -1
- package/dist/runtime/components/blocks/editor/CardBlockEditor.vue +14 -2
- package/dist/runtime/components/blocks/editor/CardBlockEditor.vue.d.ts +17 -1
- package/dist/runtime/components/blocks/editor/ImageBlockEditor.d.vue.ts +27 -3
- package/dist/runtime/components/blocks/editor/ImageBlockEditor.vue +25 -9
- package/dist/runtime/components/blocks/editor/ImageBlockEditor.vue.d.ts +27 -3
- package/dist/runtime/components/blocks/editor/ParagraphBlockEditor.d.vue.ts +17 -3
- package/dist/runtime/components/blocks/editor/ParagraphBlockEditor.vue +21 -13
- package/dist/runtime/components/blocks/editor/ParagraphBlockEditor.vue.d.ts +17 -3
- package/dist/runtime/components/blocks/editor/SectionBlockEditor.d.vue.ts +19 -3
- package/dist/runtime/components/blocks/editor/SectionBlockEditor.vue +20 -6
- package/dist/runtime/components/blocks/editor/SectionBlockEditor.vue.d.ts +19 -3
- package/dist/runtime/components/blocks/editor/TestBlockEditor.d.vue.ts +17 -3
- package/dist/runtime/components/blocks/editor/TestBlockEditor.vue +16 -4
- package/dist/runtime/components/blocks/editor/TestBlockEditor.vue.d.ts +17 -3
- package/dist/runtime/components/blocks/renderer/CalloutBlockRenderer.d.vue.ts +17 -1
- package/dist/runtime/components/blocks/renderer/CalloutBlockRenderer.vue +18 -4
- package/dist/runtime/components/blocks/renderer/CalloutBlockRenderer.vue.d.ts +17 -1
- package/dist/runtime/components/blocks/renderer/CardBlockRenderer.d.vue.ts +17 -1
- package/dist/runtime/components/blocks/renderer/CardBlockRenderer.vue +14 -2
- package/dist/runtime/components/blocks/renderer/CardBlockRenderer.vue.d.ts +17 -1
- package/dist/runtime/components/blocks/renderer/ImageBlockRenderer.d.vue.ts +19 -1
- package/dist/runtime/components/blocks/renderer/ImageBlockRenderer.vue +18 -4
- package/dist/runtime/components/blocks/renderer/ImageBlockRenderer.vue.d.ts +19 -1
- package/dist/runtime/components/blocks/renderer/ParagraphBlockRenderer.d.vue.ts +17 -1
- package/dist/runtime/components/blocks/renderer/ParagraphBlockRenderer.vue +16 -2
- package/dist/runtime/components/blocks/renderer/ParagraphBlockRenderer.vue.d.ts +17 -1
- package/dist/runtime/components/blocks/renderer/SectionBlockRenderer.d.vue.ts +17 -1
- package/dist/runtime/components/blocks/renderer/SectionBlockRenderer.vue +18 -4
- package/dist/runtime/components/blocks/renderer/SectionBlockRenderer.vue.d.ts +17 -1
- package/dist/runtime/components/blocks/renderer/TestBlockRenderer.d.vue.ts +17 -1
- package/dist/runtime/components/blocks/renderer/TestBlockRenderer.vue +16 -2
- package/dist/runtime/components/blocks/renderer/TestBlockRenderer.vue.d.ts +17 -1
- package/dist/runtime/components/cards/TeamCard.d.vue.ts +16 -7
- package/dist/runtime/components/cards/TeamCard.vue +29 -7
- package/dist/runtime/components/cards/TeamCard.vue.d.ts +16 -7
- package/dist/runtime/components/content/Callout.d.vue.ts +13 -7
- package/dist/runtime/components/content/Callout.vue +19 -6
- package/dist/runtime/components/content/Callout.vue.d.ts +13 -7
- package/dist/runtime/components/content/Section.d.vue.ts +19 -13
- package/dist/runtime/components/content/Section.vue +93 -87
- package/dist/runtime/components/content/Section.vue.d.ts +19 -13
- package/dist/runtime/components/content/Test.d.vue.ts +12 -7
- package/dist/runtime/components/content/Test.vue +15 -3
- package/dist/runtime/components/content/Test.vue.d.ts +12 -7
- package/dist/runtime/components/nodes/LinkNode.d.vue.ts +17 -3
- package/dist/runtime/components/nodes/LinkNode.vue +17 -3
- package/dist/runtime/components/nodes/LinkNode.vue.d.ts +17 -3
- package/dist/runtime/components/nodes/TextNode.d.vue.ts +17 -3
- package/dist/runtime/components/nodes/TextNode.vue +15 -3
- package/dist/runtime/components/nodes/TextNode.vue.d.ts +17 -3
- package/dist/runtime/components/page/PageEditor.d.vue.ts +35 -5
- package/dist/runtime/components/page/PageEditor.vue +80 -31
- package/dist/runtime/components/page/PageEditor.vue.d.ts +35 -5
- package/dist/runtime/components/page/PageMention.d.vue.ts +19 -2
- package/dist/runtime/components/page/PageMention.vue +21 -6
- package/dist/runtime/components/page/PageMention.vue.d.ts +19 -2
- package/dist/runtime/components/page/PagePropertiesEditor.d.vue.ts +30 -2
- package/dist/runtime/components/page/PagePropertiesEditor.vue +113 -76
- package/dist/runtime/components/page/PagePropertiesEditor.vue.d.ts +30 -2
- package/dist/runtime/components/page/PagePropertiesRenderer.d.vue.ts +38 -2
- package/dist/runtime/components/page/PagePropertiesRenderer.vue +80 -29
- package/dist/runtime/components/page/PagePropertiesRenderer.vue.d.ts +38 -2
- package/dist/runtime/components/page/PageRenderer.d.vue.ts +26 -2
- package/dist/runtime/components/page/PageRenderer.vue +56 -18
- package/dist/runtime/components/page/PageRenderer.vue.d.ts +26 -2
- package/dist/runtime/components/page/PageSurround.d.vue.ts +25 -3
- package/dist/runtime/components/page/PageSurround.vue +61 -26
- package/dist/runtime/components/page/PageSurround.vue.d.ts +25 -3
- package/dist/runtime/components/page/PageTOC.d.vue.ts +15 -7
- package/dist/runtime/components/page/PageTOC.vue +23 -9
- package/dist/runtime/components/page/PageTOC.vue.d.ts +15 -7
- package/dist/runtime/components/page/modals/CreatePageModal.d.vue.ts +12 -4
- package/dist/runtime/components/page/modals/CreatePageModal.vue +34 -24
- package/dist/runtime/components/page/modals/CreatePageModal.vue.d.ts +12 -4
- package/dist/runtime/components/page/modals/DeletePageModal.d.vue.ts +14 -7
- package/dist/runtime/components/page/modals/DeletePageModal.vue +28 -7
- package/dist/runtime/components/page/modals/DeletePageModal.vue.d.ts +14 -7
- package/dist/runtime/components/swatches/ColorSwatch.d.vue.ts +23 -3
- package/dist/runtime/components/swatches/ColorSwatch.vue +41 -15
- package/dist/runtime/components/swatches/ColorSwatch.vue.d.ts +23 -3
- package/dist/runtime/components/swatches/FontSwatch.d.vue.ts +22 -3
- package/dist/runtime/components/swatches/FontSwatch.vue +29 -12
- package/dist/runtime/components/swatches/FontSwatch.vue.d.ts +22 -3
- package/dist/runtime/components/swatches/ImageSwatch.d.vue.ts +22 -3
- package/dist/runtime/components/swatches/ImageSwatch.vue +29 -12
- package/dist/runtime/components/swatches/ImageSwatch.vue.d.ts +22 -3
- package/dist/runtime/components/utilities/Placeholder.d.vue.ts +13 -5
- package/dist/runtime/components/utilities/Placeholder.vue +19 -5
- package/dist/runtime/components/utilities/Placeholder.vue.d.ts +13 -5
- package/dist/runtime/composables/index.d.ts +1 -0
- package/dist/runtime/composables/index.js +1 -0
- package/dist/runtime/composables/index.mjs +1 -0
- package/dist/runtime/composables/useRC.d.ts +3 -0
- package/dist/runtime/composables/useRC.js +14 -0
- package/dist/runtime/composables/useRC.mjs +14 -0
- package/dist/runtime/types/app.config.d.ts +6 -0
- package/dist/runtime/types/schemas.d.ts +2 -2
- package/dist/runtime/types/tv.d.ts +66 -0
- package/dist/runtime/types/tv.js +0 -0
- package/dist/runtime/types/tv.mjs +0 -0
- package/dist/runtime/utils/index.d.ts +1 -0
- package/dist/runtime/utils/index.js +1 -0
- package/dist/runtime/utils/index.mjs +1 -0
- package/dist/runtime/utils/tv.d.ts +1 -0
- package/dist/runtime/utils/tv.js +4 -0
- package/dist/runtime/utils/tv.mjs +4 -0
- package/package.json +1 -1
|
@@ -1,8 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
export interface LinkNodeProps {
|
|
2
2
|
href: string;
|
|
3
3
|
target?: string;
|
|
4
4
|
content: string;
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
1
|
+
export interface TextNodeProps {
|
|
2
2
|
content: string;
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
|
|
3
|
-
|
|
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
|
-
|
|
1
|
+
export interface TextNodeProps {
|
|
2
2
|
content: string;
|
|
3
|
-
|
|
4
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
8
|
-
const {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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="
|
|
154
|
+
<UHeader :class="header({ class: rc.header })">
|
|
102
155
|
<template #left>
|
|
103
|
-
<div class="
|
|
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="
|
|
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="
|
|
229
|
+
:class="splitContainer({ class: rc.splitContainer })"
|
|
177
230
|
>
|
|
178
231
|
<div
|
|
179
|
-
class="
|
|
232
|
+
:class="editorColumn({ class: rc.editorColumn })"
|
|
180
233
|
:style="{ width: showPreview ? `${editorWidth}%` : '100%' }"
|
|
181
234
|
>
|
|
182
|
-
<UContainer class="
|
|
183
|
-
<div class="grid
|
|
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="
|
|
240
|
+
:class="toc({ class: rc.toc })"
|
|
188
241
|
>
|
|
189
242
|
<template #bottom> </template>
|
|
190
243
|
</RCPageTOC>
|
|
191
|
-
<RCPagePropertiesEditor v-model="page" class="
|
|
192
|
-
<div class="
|
|
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="
|
|
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="
|
|
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="
|
|
223
|
-
<USkeleton class="
|
|
224
|
-
<USkeleton class="
|
|
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="
|
|
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="
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
8
|
-
|
|
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="
|
|
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="
|
|
50
|
+
:class="icon({ class: rc.icon })"
|
|
36
51
|
/>
|
|
37
|
-
<span class="
|
|
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="
|
|
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
|
-
|
|
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
|
-
|
|
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<
|
|
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
|
+
};
|