rimelight-components 2.1.18 → 2.1.20
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 +13 -8
- package/dist/runtime/components/app/Footer.vue +12 -7
- package/dist/runtime/components/app/Footer.vue.d.ts +13 -8
- package/dist/runtime/components/app/Header.d.vue.ts +19 -14
- package/dist/runtime/components/app/Header.vue +15 -10
- package/dist/runtime/components/app/Header.vue.d.ts +19 -14
- package/dist/runtime/components/app/HeaderLayer.d.vue.ts +8 -4
- package/dist/runtime/components/app/HeaderLayer.vue +13 -10
- package/dist/runtime/components/app/HeaderLayer.vue.d.ts +8 -4
- package/dist/runtime/components/app/Image.d.vue.ts +13 -1
- package/dist/runtime/components/app/Image.vue +10 -7
- package/dist/runtime/components/app/Image.vue.d.ts +13 -1
- package/dist/runtime/components/app/Logo.d.vue.ts +13 -1
- package/dist/runtime/components/app/Logo.vue +8 -4
- package/dist/runtime/components/app/Logo.vue.d.ts +13 -1
- package/dist/runtime/components/app/NewsletterSignup.d.vue.ts +13 -1
- package/dist/runtime/components/app/NewsletterSignup.vue +9 -4
- package/dist/runtime/components/app/NewsletterSignup.vue.d.ts +13 -1
- package/dist/runtime/components/app/ScrollToTop.d.vue.ts +17 -4
- package/dist/runtime/components/app/ScrollToTop.vue +20 -12
- package/dist/runtime/components/app/ScrollToTop.vue.d.ts +17 -4
- package/dist/runtime/components/blocks/Block.d.vue.ts +8 -4
- package/dist/runtime/components/blocks/Block.vue +9 -5
- package/dist/runtime/components/blocks/Block.vue.d.ts +8 -4
- package/dist/runtime/components/blocks/BlockEditRenderer.d.vue.ts +13 -1
- package/dist/runtime/components/blocks/BlockEditRenderer.vue +8 -4
- package/dist/runtime/components/blocks/BlockEditRenderer.vue.d.ts +13 -1
- package/dist/runtime/components/blocks/BlockEditor.d.vue.ts +13 -4
- package/dist/runtime/components/blocks/BlockEditor.vue +9 -4
- package/dist/runtime/components/blocks/BlockEditor.vue.d.ts +13 -4
- package/dist/runtime/components/blocks/BlockViewRenderer.d.vue.ts +13 -1
- package/dist/runtime/components/blocks/BlockViewRenderer.vue +8 -4
- package/dist/runtime/components/blocks/BlockViewRenderer.vue.d.ts +13 -1
- package/dist/runtime/components/blocks/TextRenderer.d.vue.ts +13 -1
- package/dist/runtime/components/blocks/TextRenderer.vue +12 -6
- package/dist/runtime/components/blocks/TextRenderer.vue.d.ts +13 -1
- package/dist/runtime/components/blocks/editor/CalloutBlockEditor.d.vue.ts +13 -1
- package/dist/runtime/components/blocks/editor/CalloutBlockEditor.vue +11 -5
- package/dist/runtime/components/blocks/editor/CalloutBlockEditor.vue.d.ts +13 -1
- package/dist/runtime/components/blocks/editor/CardBlockEditor.d.vue.ts +13 -1
- package/dist/runtime/components/blocks/editor/CardBlockEditor.vue +7 -3
- package/dist/runtime/components/blocks/editor/CardBlockEditor.vue.d.ts +13 -1
- package/dist/runtime/components/blocks/editor/ImageBlockEditor.d.vue.ts +21 -5
- package/dist/runtime/components/blocks/editor/ImageBlockEditor.vue +11 -7
- package/dist/runtime/components/blocks/editor/ImageBlockEditor.vue.d.ts +21 -5
- package/dist/runtime/components/blocks/editor/ParagraphBlockEditor.d.vue.ts +13 -1
- package/dist/runtime/components/blocks/editor/ParagraphBlockEditor.vue +12 -8
- package/dist/runtime/components/blocks/editor/ParagraphBlockEditor.vue.d.ts +13 -1
- package/dist/runtime/components/blocks/editor/SectionBlockEditor.d.vue.ts +15 -1
- package/dist/runtime/components/blocks/editor/SectionBlockEditor.vue +9 -5
- package/dist/runtime/components/blocks/editor/SectionBlockEditor.vue.d.ts +15 -1
- package/dist/runtime/components/blocks/editor/TestBlockEditor.d.vue.ts +13 -1
- package/dist/runtime/components/blocks/editor/TestBlockEditor.vue +7 -3
- package/dist/runtime/components/blocks/editor/TestBlockEditor.vue.d.ts +13 -1
- package/dist/runtime/components/blocks/renderer/CalloutBlockRenderer.d.vue.ts +13 -1
- package/dist/runtime/components/blocks/renderer/CalloutBlockRenderer.vue +11 -5
- package/dist/runtime/components/blocks/renderer/CalloutBlockRenderer.vue.d.ts +13 -1
- package/dist/runtime/components/blocks/renderer/CardBlockRenderer.d.vue.ts +13 -1
- package/dist/runtime/components/blocks/renderer/CardBlockRenderer.vue +7 -3
- package/dist/runtime/components/blocks/renderer/CardBlockRenderer.vue.d.ts +13 -1
- package/dist/runtime/components/blocks/renderer/ImageBlockRenderer.d.vue.ts +15 -1
- package/dist/runtime/components/blocks/renderer/ImageBlockRenderer.vue +9 -5
- package/dist/runtime/components/blocks/renderer/ImageBlockRenderer.vue.d.ts +15 -1
- package/dist/runtime/components/blocks/renderer/ParagraphBlockRenderer.d.vue.ts +13 -1
- package/dist/runtime/components/blocks/renderer/ParagraphBlockRenderer.vue +9 -3
- package/dist/runtime/components/blocks/renderer/ParagraphBlockRenderer.vue.d.ts +13 -1
- package/dist/runtime/components/blocks/renderer/SectionBlockRenderer.d.vue.ts +13 -1
- package/dist/runtime/components/blocks/renderer/SectionBlockRenderer.vue +11 -5
- package/dist/runtime/components/blocks/renderer/SectionBlockRenderer.vue.d.ts +13 -1
- package/dist/runtime/components/blocks/renderer/TestBlockRenderer.d.vue.ts +13 -1
- package/dist/runtime/components/blocks/renderer/TestBlockRenderer.vue +9 -3
- package/dist/runtime/components/blocks/renderer/TestBlockRenderer.vue.d.ts +13 -1
- package/dist/runtime/components/cards/TeamCard.d.vue.ts +11 -4
- package/dist/runtime/components/cards/TeamCard.vue +12 -8
- package/dist/runtime/components/cards/TeamCard.vue.d.ts +11 -4
- package/dist/runtime/components/content/Callout.d.vue.ts +8 -4
- package/dist/runtime/components/content/Callout.vue +11 -7
- package/dist/runtime/components/content/Callout.vue.d.ts +8 -4
- package/dist/runtime/components/content/Section.d.vue.ts +14 -10
- package/dist/runtime/components/content/Section.vue +17 -9
- package/dist/runtime/components/content/Section.vue.d.ts +14 -10
- package/dist/runtime/components/content/Test.d.vue.ts +7 -4
- package/dist/runtime/components/content/Test.vue +8 -4
- package/dist/runtime/components/content/Test.vue.d.ts +7 -4
- package/dist/runtime/components/nodes/LinkNode.d.vue.ts +13 -1
- package/dist/runtime/components/nodes/LinkNode.vue +8 -4
- package/dist/runtime/components/nodes/LinkNode.vue.d.ts +13 -1
- package/dist/runtime/components/nodes/TextNode.d.vue.ts +13 -1
- package/dist/runtime/components/nodes/TextNode.vue +8 -4
- package/dist/runtime/components/nodes/TextNode.vue.d.ts +13 -1
- package/dist/runtime/components/page/PageEditor.d.vue.ts +32 -5
- package/dist/runtime/components/page/PageEditor.vue +36 -24
- package/dist/runtime/components/page/PageEditor.vue.d.ts +32 -5
- package/dist/runtime/components/page/PageMention.d.vue.ts +16 -1
- package/dist/runtime/components/page/PageMention.vue +11 -7
- package/dist/runtime/components/page/PageMention.vue.d.ts +16 -1
- package/dist/runtime/components/page/PagePropertiesEditor.d.vue.ts +23 -1
- package/dist/runtime/components/page/PagePropertiesEditor.vue +83 -79
- package/dist/runtime/components/page/PagePropertiesEditor.vue.d.ts +23 -1
- package/dist/runtime/components/page/PagePropertiesRenderer.d.vue.ts +31 -1
- package/dist/runtime/components/page/PagePropertiesRenderer.vue +36 -32
- package/dist/runtime/components/page/PagePropertiesRenderer.vue.d.ts +31 -1
- package/dist/runtime/components/page/PageRenderer.d.vue.ts +23 -1
- package/dist/runtime/components/page/PageRenderer.vue +21 -17
- package/dist/runtime/components/page/PageRenderer.vue.d.ts +23 -1
- package/dist/runtime/components/page/PageSurround.d.vue.ts +21 -1
- package/dist/runtime/components/page/PageSurround.vue +25 -20
- package/dist/runtime/components/page/PageSurround.vue.d.ts +21 -1
- package/dist/runtime/components/page/PageTOC.d.vue.ts +10 -4
- package/dist/runtime/components/page/PageTOC.vue +10 -6
- package/dist/runtime/components/page/PageTOC.vue.d.ts +10 -4
- package/dist/runtime/components/page/modals/CreatePageModal.d.vue.ts +12 -4
- package/dist/runtime/components/page/modals/CreatePageModal.vue +13 -9
- 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 +13 -9
- package/dist/runtime/components/page/modals/DeletePageModal.vue.d.ts +14 -7
- package/dist/runtime/components/swatches/ColorSwatch.d.vue.ts +19 -1
- package/dist/runtime/components/swatches/ColorSwatch.vue +29 -17
- package/dist/runtime/components/swatches/ColorSwatch.vue.d.ts +19 -1
- package/dist/runtime/components/swatches/FontSwatch.d.vue.ts +18 -1
- package/dist/runtime/components/swatches/FontSwatch.vue +16 -12
- package/dist/runtime/components/swatches/FontSwatch.vue.d.ts +18 -1
- package/dist/runtime/components/swatches/ImageSwatch.d.vue.ts +18 -1
- package/dist/runtime/components/swatches/ImageSwatch.vue +16 -12
- package/dist/runtime/components/swatches/ImageSwatch.vue.d.ts +18 -1
- package/dist/runtime/components/utilities/Placeholder.d.vue.ts +8 -4
- package/dist/runtime/components/utilities/Placeholder.vue +9 -4
- package/dist/runtime/components/utilities/Placeholder.vue.d.ts +8 -4
- 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/internal/tv.d.ts +1 -0
- package/dist/runtime/internal/tv.js +4 -0
- package/dist/runtime/internal/tv.mjs +4 -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/package.json +1 -1
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { tv } from "
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { tv } from "../../internal/tv";
|
|
3
|
+
import { useRC } from "../../composables/useRC";
|
|
4
|
+
const { text, rc: rcProp } = defineProps({
|
|
5
|
+
text: { type: String, required: true },
|
|
6
|
+
rc: { type: Object, required: false }
|
|
5
7
|
});
|
|
6
8
|
const emit = defineEmits([]);
|
|
9
|
+
const slots = defineSlots();
|
|
10
|
+
const { rc } = useRC("Test", rcProp);
|
|
7
11
|
const testStyles = tv({
|
|
8
12
|
slots: {
|
|
9
13
|
root: ""
|
|
@@ -13,7 +17,7 @@ const { root } = testStyles();
|
|
|
13
17
|
</script>
|
|
14
18
|
|
|
15
19
|
<template>
|
|
16
|
-
<div :class="root()" v-bind="$attrs">
|
|
20
|
+
<div :class="root({ class: rc.root })" v-bind="$attrs">
|
|
17
21
|
<slot name="content">
|
|
18
22
|
<p>{{ text }}</p>
|
|
19
23
|
</slot>
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
export interface TestProps {
|
|
2
2
|
text: string;
|
|
3
|
+
rc?: {
|
|
4
|
+
root?: string;
|
|
5
|
+
};
|
|
3
6
|
}
|
|
4
7
|
export interface TestEmits {
|
|
5
8
|
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
export interface TestSlots {
|
|
10
|
+
content: (props: {}) => any;
|
|
11
|
+
}
|
|
12
|
+
type __VLS_Slots = TestSlots;
|
|
10
13
|
declare const __VLS_base: import("vue").DefineComponent<TestProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TestProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
14
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
15
|
declare const _default: typeof __VLS_export;
|
|
@@ -2,9 +2,21 @@ export interface LinkNodeProps {
|
|
|
2
2
|
href: string;
|
|
3
3
|
target?: string;
|
|
4
4
|
content: string;
|
|
5
|
+
rc?: {
|
|
6
|
+
root?: string;
|
|
7
|
+
};
|
|
5
8
|
}
|
|
6
9
|
export interface LinkNodeEmits {
|
|
7
10
|
}
|
|
8
|
-
|
|
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>;
|
|
9
16
|
declare const _default: typeof __VLS_export;
|
|
10
17
|
export default _default;
|
|
18
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { computed } from "vue";
|
|
3
|
-
import { tv } from "
|
|
4
|
-
|
|
3
|
+
import { tv } from "../../internal/tv";
|
|
4
|
+
import { useRC } from "../../composables/useRC";
|
|
5
|
+
const { href, target, content, rc: rcProp } = defineProps({
|
|
5
6
|
href: { type: String, required: true },
|
|
6
7
|
target: { type: String, required: false },
|
|
7
|
-
content: { type: String, required: true }
|
|
8
|
+
content: { type: String, required: true },
|
|
9
|
+
rc: { type: Object, required: false }
|
|
8
10
|
});
|
|
9
11
|
const emit = defineEmits([]);
|
|
12
|
+
const slots = defineSlots();
|
|
13
|
+
const { rc } = useRC("LinkNode", rcProp);
|
|
10
14
|
const linkNodeStyles = tv({
|
|
11
15
|
slots: {
|
|
12
16
|
root: ""
|
|
@@ -19,7 +23,7 @@ const rel = computed(
|
|
|
19
23
|
</script>
|
|
20
24
|
|
|
21
25
|
<template>
|
|
22
|
-
<ULink :to="href" :target="target" :rel="rel" :class="root()">
|
|
26
|
+
<ULink :to="href" :target="target" :rel="rel" :class="root({ class: rc.root })">
|
|
23
27
|
{{ content }}
|
|
24
28
|
</ULink>
|
|
25
29
|
</template>
|
|
@@ -2,9 +2,21 @@ export interface LinkNodeProps {
|
|
|
2
2
|
href: string;
|
|
3
3
|
target?: string;
|
|
4
4
|
content: string;
|
|
5
|
+
rc?: {
|
|
6
|
+
root?: string;
|
|
7
|
+
};
|
|
5
8
|
}
|
|
6
9
|
export interface LinkNodeEmits {
|
|
7
10
|
}
|
|
8
|
-
|
|
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>;
|
|
9
16
|
declare const _default: typeof __VLS_export;
|
|
10
17
|
export default _default;
|
|
18
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
export interface TextNodeProps {
|
|
2
2
|
content: string;
|
|
3
|
+
rc?: {
|
|
4
|
+
root?: string;
|
|
5
|
+
};
|
|
3
6
|
}
|
|
4
7
|
export interface TextNodeEmits {
|
|
5
8
|
}
|
|
6
|
-
|
|
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>;
|
|
7
14
|
declare const _default: typeof __VLS_export;
|
|
8
15
|
export default _default;
|
|
16
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { tv } from "
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { tv } from "../../internal/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 }
|
|
5
7
|
});
|
|
6
8
|
const emit = defineEmits([]);
|
|
9
|
+
const slots = defineSlots();
|
|
10
|
+
const { rc } = useRC("TextNode", rcProp);
|
|
7
11
|
const textNodeStyles = tv({
|
|
8
12
|
slots: {
|
|
9
13
|
root: ""
|
|
@@ -13,5 +17,5 @@ const { root } = textNodeStyles();
|
|
|
13
17
|
</script>
|
|
14
18
|
|
|
15
19
|
<template>
|
|
16
|
-
<span :class="root()">{{ content }}</span>
|
|
20
|
+
<span :class="root({ class: rc.root })">{{ content }}</span>
|
|
17
21
|
</template>
|
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
export interface TextNodeProps {
|
|
2
2
|
content: string;
|
|
3
|
+
rc?: {
|
|
4
|
+
root?: string;
|
|
5
|
+
};
|
|
3
6
|
}
|
|
4
7
|
export interface TextNodeEmits {
|
|
5
8
|
}
|
|
6
|
-
|
|
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>;
|
|
7
14
|
declare const _default: typeof __VLS_export;
|
|
8
15
|
export default _default;
|
|
16
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -8,27 +8,48 @@ export 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;
|
|
13
32
|
export interface PageEditorEmits {
|
|
14
|
-
|
|
33
|
+
save: [value: Page];
|
|
15
34
|
}
|
|
35
|
+
export interface PageEditorSlots {
|
|
36
|
+
}
|
|
37
|
+
type __VLS_Slots = PageEditorSlots;
|
|
16
38
|
type __VLS_ModelProps = {
|
|
17
39
|
modelValue: Page;
|
|
18
40
|
};
|
|
19
41
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
20
|
-
declare const
|
|
42
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
21
43
|
undo: () => void;
|
|
22
44
|
redo: () => void;
|
|
23
45
|
canUndo: import("vue").ComputedRef<boolean>;
|
|
24
46
|
canRedo: import("vue").ComputedRef<boolean>;
|
|
25
47
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
26
|
-
|
|
48
|
+
save: (value: {
|
|
27
49
|
type: "Default";
|
|
28
50
|
properties: import("../../types/index.js").BasePageProperties;
|
|
29
51
|
} & import("../../types/index.js").BasePage) => any;
|
|
30
|
-
|
|
31
|
-
save: (value: {
|
|
52
|
+
"update:modelValue": (value: {
|
|
32
53
|
type: "Default";
|
|
33
54
|
properties: import("../../types/index.js").BasePageProperties;
|
|
34
55
|
} & import("../../types/index.js").BasePage) => any;
|
|
@@ -42,5 +63,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
42
63
|
properties: import("../../types/index.js").BasePageProperties;
|
|
43
64
|
} & import("../../types/index.js").BasePage) => any) | undefined;
|
|
44
65
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
66
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
45
67
|
declare const _default: typeof __VLS_export;
|
|
46
68
|
export default _default;
|
|
69
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
70
|
+
new (): {
|
|
71
|
+
$slots: S;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
@@ -1,11 +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
|
-
import { tv } from "
|
|
8
|
-
const {
|
|
7
|
+
import { tv } from "../../internal/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({
|
|
9
18
|
isSaving: { type: Boolean, required: true },
|
|
10
19
|
useSurround: { type: Boolean, required: false },
|
|
11
20
|
surround: { type: [Object, null], required: false },
|
|
@@ -13,9 +22,13 @@ const { isSaving, useSurround = false, surroundStatus = "idle", surround = null,
|
|
|
13
22
|
resolvePage: { type: Function, required: true },
|
|
14
23
|
pageDefinitions: { type: Object, required: true },
|
|
15
24
|
onCreatePage: { type: Function, required: false },
|
|
16
|
-
onDeletePage: { type: Function, required: false }
|
|
25
|
+
onDeletePage: { type: Function, required: false },
|
|
26
|
+
rc: { type: Object, required: false }
|
|
17
27
|
});
|
|
28
|
+
const page = defineModel({ type: null, ...{ required: true } });
|
|
18
29
|
const emit = defineEmits(["save"]);
|
|
30
|
+
const slots = defineSlots();
|
|
31
|
+
const { rc } = useRC("PageEditor", rcProp);
|
|
19
32
|
const pageEditorStyles = tv({
|
|
20
33
|
slots: {
|
|
21
34
|
header: "h-12 w-full bg-muted",
|
|
@@ -58,7 +71,6 @@ const {
|
|
|
58
71
|
} = pageEditorStyles();
|
|
59
72
|
const { getTypeLabelKey } = usePageRegistry();
|
|
60
73
|
const { t, locale } = useI18n();
|
|
61
|
-
const page = defineModel({ type: null, ...{ required: true } });
|
|
62
74
|
const { undo, redo, canUndo, canRedo, captureSnapshot } = usePageEditor(page);
|
|
63
75
|
const handleSave = () => {
|
|
64
76
|
const dataToPersist = JSON.parse(JSON.stringify(page.value));
|
|
@@ -139,9 +151,9 @@ const handleDeleteConfirm = async () => {
|
|
|
139
151
|
|
|
140
152
|
<template>
|
|
141
153
|
<RCHeaderLayer id="editor-header" :order="3">
|
|
142
|
-
<UHeader :class="header()">
|
|
154
|
+
<UHeader :class="header({ class: rc.header })">
|
|
143
155
|
<template #left>
|
|
144
|
-
<div :class="headerGroup()">
|
|
156
|
+
<div :class="headerGroup({ class: rc.headerGroup })">
|
|
145
157
|
<UButton
|
|
146
158
|
icon="lucide:rotate-ccw"
|
|
147
159
|
variant="outline"
|
|
@@ -162,7 +174,7 @@ const handleDeleteConfirm = async () => {
|
|
|
162
174
|
</template>
|
|
163
175
|
|
|
164
176
|
<template #right>
|
|
165
|
-
<div :class="headerGroup()">
|
|
177
|
+
<div :class="headerGroup({ class: rc.headerGroup })">
|
|
166
178
|
<UButton
|
|
167
179
|
:icon="showPreview ? 'lucide:eye-off' : 'lucide:eye'"
|
|
168
180
|
label="Preview"
|
|
@@ -214,28 +226,28 @@ const handleDeleteConfirm = async () => {
|
|
|
214
226
|
|
|
215
227
|
<div
|
|
216
228
|
ref="split-container"
|
|
217
|
-
:class="splitContainer()"
|
|
229
|
+
:class="splitContainer({ class: rc.splitContainer })"
|
|
218
230
|
>
|
|
219
231
|
<div
|
|
220
|
-
:class="editorColumn()"
|
|
232
|
+
:class="editorColumn({ class: rc.editorColumn })"
|
|
221
233
|
:style="{ width: showPreview ? `${editorWidth}%` : '100%' }"
|
|
222
234
|
>
|
|
223
|
-
<UContainer :class="container()">
|
|
224
|
-
<div :class="grid()">
|
|
235
|
+
<UContainer :class="container({ class: rc.container })">
|
|
236
|
+
<div :class="grid({ class: rc.grid })">
|
|
225
237
|
<RCPageTOC
|
|
226
238
|
:page-blocks="page.blocks"
|
|
227
239
|
:levels="[2, 3, 4]"
|
|
228
|
-
:class="toc()"
|
|
240
|
+
:class="toc({ class: rc.toc })"
|
|
229
241
|
>
|
|
230
242
|
<template #bottom> </template>
|
|
231
243
|
</RCPageTOC>
|
|
232
|
-
<RCPagePropertiesEditor v-model="page" :class="properties()" />
|
|
233
|
-
<div :class="contentWrapper()">
|
|
244
|
+
<RCPagePropertiesEditor v-model="page" :class="properties({ class: rc.properties })" />
|
|
245
|
+
<div :class="contentWrapper({ class: rc.contentWrapper })">
|
|
234
246
|
<RCImage
|
|
235
247
|
v-if="page.banner?.src"
|
|
236
248
|
:src="page.banner?.src"
|
|
237
249
|
:alt="page.banner?.alt"
|
|
238
|
-
:class="banner()"
|
|
250
|
+
:class="banner({ class: rc.banner })"
|
|
239
251
|
/>
|
|
240
252
|
<UPageHeader
|
|
241
253
|
:headline="t(getTypeLabelKey(page.type))"
|
|
@@ -248,9 +260,9 @@ const handleDeleteConfirm = async () => {
|
|
|
248
260
|
v-if="page.icon?.src"
|
|
249
261
|
:src="page.icon?.src"
|
|
250
262
|
:alt="page.icon?.alt"
|
|
251
|
-
:class="icon()"
|
|
263
|
+
:class="icon({ class: rc.icon })"
|
|
252
264
|
/>
|
|
253
|
-
<h1 :class="titleClass()">{{ getLocalizedContent(page.title, locale) }}</h1>
|
|
265
|
+
<h1 :class="titleClass({ class: rc.title })">{{ getLocalizedContent(page.title, locale) }}</h1>
|
|
254
266
|
</div>
|
|
255
267
|
</template>
|
|
256
268
|
</UPageHeader>
|
|
@@ -260,9 +272,9 @@ const handleDeleteConfirm = async () => {
|
|
|
260
272
|
@mutation="captureSnapshot"
|
|
261
273
|
/>
|
|
262
274
|
<template v-if="useSurround">
|
|
263
|
-
<div v-if="surroundStatus === 'pending'" :class="surroundSkeleton()">
|
|
264
|
-
<USkeleton :class="skeleton()" />
|
|
265
|
-
<USkeleton :class="skeleton()" />
|
|
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 })" />
|
|
266
278
|
</div>
|
|
267
279
|
|
|
268
280
|
<LazyRCPageSurround
|
|
@@ -279,7 +291,7 @@ const handleDeleteConfirm = async () => {
|
|
|
279
291
|
|
|
280
292
|
<USeparator />
|
|
281
293
|
|
|
282
|
-
<div :class="metadata()">
|
|
294
|
+
<div :class="metadata({ class: rc.metadata })">
|
|
283
295
|
<h6>Metadata</h6>
|
|
284
296
|
<span>Page ID: {{ page.id }}</span>
|
|
285
297
|
<span
|
|
@@ -327,7 +339,7 @@ const handleDeleteConfirm = async () => {
|
|
|
327
339
|
|
|
328
340
|
<div
|
|
329
341
|
v-if="showPreview"
|
|
330
|
-
:class="[cursorClass, resizer()]"
|
|
342
|
+
:class="[cursorClass, resizer({ class: rc.resizer })]"
|
|
331
343
|
@mousedown="startResizing"
|
|
332
344
|
@dblclick="editorWidth = 50"
|
|
333
345
|
>
|
|
@@ -336,7 +348,7 @@ const handleDeleteConfirm = async () => {
|
|
|
336
348
|
|
|
337
349
|
<div
|
|
338
350
|
v-if="showPreview"
|
|
339
|
-
:class="previewColumn()"
|
|
351
|
+
:class="previewColumn({ class: rc.previewColumn })"
|
|
340
352
|
:style="{ width: `${100 - editorWidth}%` }"
|
|
341
353
|
>
|
|
342
354
|
<RCPageRenderer v-model="page" :resolve-page="resolvePage" />
|
|
@@ -8,27 +8,48 @@ export 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;
|
|
13
32
|
export interface PageEditorEmits {
|
|
14
|
-
|
|
33
|
+
save: [value: Page];
|
|
15
34
|
}
|
|
35
|
+
export interface PageEditorSlots {
|
|
36
|
+
}
|
|
37
|
+
type __VLS_Slots = PageEditorSlots;
|
|
16
38
|
type __VLS_ModelProps = {
|
|
17
39
|
modelValue: Page;
|
|
18
40
|
};
|
|
19
41
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
20
|
-
declare const
|
|
42
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
21
43
|
undo: () => void;
|
|
22
44
|
redo: () => void;
|
|
23
45
|
canUndo: import("vue").ComputedRef<boolean>;
|
|
24
46
|
canRedo: import("vue").ComputedRef<boolean>;
|
|
25
47
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
26
|
-
|
|
48
|
+
save: (value: {
|
|
27
49
|
type: "Default";
|
|
28
50
|
properties: import("../../types/index.js").BasePageProperties;
|
|
29
51
|
} & import("../../types/index.js").BasePage) => any;
|
|
30
|
-
|
|
31
|
-
save: (value: {
|
|
52
|
+
"update:modelValue": (value: {
|
|
32
53
|
type: "Default";
|
|
33
54
|
properties: import("../../types/index.js").BasePageProperties;
|
|
34
55
|
} & import("../../types/index.js").BasePage) => any;
|
|
@@ -42,5 +63,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
42
63
|
properties: import("../../types/index.js").BasePageProperties;
|
|
43
64
|
} & import("../../types/index.js").BasePage) => any) | undefined;
|
|
44
65
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
66
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
45
67
|
declare const _default: typeof __VLS_export;
|
|
46
68
|
export default _default;
|
|
69
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
70
|
+
new (): {
|
|
71
|
+
$slots: S;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
@@ -1,8 +1,23 @@
|
|
|
1
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 {
|
|
5
11
|
}
|
|
6
|
-
|
|
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>;
|
|
7
17
|
declare const _default: typeof __VLS_export;
|
|
8
18
|
export default _default;
|
|
19
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -4,11 +4,15 @@ import { getLocalizedContent } from "../../utils";
|
|
|
4
4
|
import { useI18n } from "vue-i18n";
|
|
5
5
|
import {} from "../../types";
|
|
6
6
|
import { useAsyncData } from "#imports";
|
|
7
|
-
import { tv } from "
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
import { tv } from "../../internal/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 }
|
|
10
12
|
});
|
|
11
13
|
const emit = defineEmits([]);
|
|
14
|
+
const slots = defineSlots();
|
|
15
|
+
const { rc } = useRC("PageMention", rcProp);
|
|
12
16
|
const pageMentionStyles = tv({
|
|
13
17
|
slots: {
|
|
14
18
|
link: "inline-flex items-baseline gap-1 align-middle hover:text-primary transition-colors font-medium text-inherit",
|
|
@@ -37,17 +41,17 @@ const { data: linkedPage, status } = await useAsyncData(`page-mention-${pageId}`
|
|
|
37
41
|
<NuxtLink
|
|
38
42
|
v-if="linkedPage"
|
|
39
43
|
:to="`/${linkedPage.slug}`"
|
|
40
|
-
:class="link()"
|
|
44
|
+
:class="link({ class: rc.link })"
|
|
41
45
|
>
|
|
42
46
|
<NuxtImg
|
|
43
47
|
v-if="linkedPage.icon?.src"
|
|
44
48
|
:src="linkedPage.icon.src"
|
|
45
49
|
:alt="linkedPage.icon.alt"
|
|
46
|
-
:class="icon()"
|
|
50
|
+
:class="icon({ class: rc.icon })"
|
|
47
51
|
/>
|
|
48
|
-
<span :class="text()">
|
|
52
|
+
<span :class="text({ class: rc.text })">
|
|
49
53
|
{{ getLocalizedContent(linkedPage.title, locale) }}
|
|
50
54
|
</span>
|
|
51
55
|
</NuxtLink>
|
|
52
|
-
<USkeleton v-else-if="status === 'pending'" :class="skeleton()" />
|
|
56
|
+
<USkeleton v-else-if="status === 'pending'" :class="skeleton({ class: rc.skeleton })" />
|
|
53
57
|
</template>
|
|
@@ -1,8 +1,23 @@
|
|
|
1
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 {
|
|
5
11
|
}
|
|
6
|
-
|
|
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>;
|
|
7
17
|
declare const _default: typeof __VLS_export;
|
|
8
18
|
export default _default;
|
|
19
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -1,14 +1,30 @@
|
|
|
1
1
|
import { type Page } from "../../types/index.js";
|
|
2
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
|
+
};
|
|
3
16
|
}
|
|
4
17
|
type __VLS_Props = PagePropertiesEditorProps;
|
|
5
18
|
export interface PagePropertiesEditorEmits {
|
|
6
19
|
}
|
|
20
|
+
export interface PagePropertiesEditorSlots {
|
|
21
|
+
}
|
|
22
|
+
type __VLS_Slots = PagePropertiesEditorSlots;
|
|
7
23
|
type __VLS_ModelProps = {
|
|
8
24
|
modelValue: Page;
|
|
9
25
|
};
|
|
10
26
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
11
|
-
declare const
|
|
27
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
28
|
"update:modelValue": (value: {
|
|
13
29
|
type: "Default";
|
|
14
30
|
properties: import("../../types/index.js").BasePageProperties;
|
|
@@ -19,5 +35,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
19
35
|
properties: import("../../types/index.js").BasePageProperties;
|
|
20
36
|
} & import("../../types/index.js").BasePage) => any) | undefined;
|
|
21
37
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
38
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
22
39
|
declare const _default: typeof __VLS_export;
|
|
23
40
|
export default _default;
|
|
41
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
42
|
+
new (): {
|
|
43
|
+
$slots: S;
|
|
44
|
+
};
|
|
45
|
+
};
|