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,11 +1,19 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { computed, onMounted, onUnmounted, ref } from "vue";
|
|
3
|
-
import { tv } from "
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import { tv } from "../../internal/tv";
|
|
4
|
+
import { useRC } from "../../composables/useRC";
|
|
5
|
+
const {
|
|
6
|
+
circleStrokeWidth = 4,
|
|
7
|
+
duration = 0.1,
|
|
8
|
+
rc: rcProp
|
|
9
|
+
} = defineProps({
|
|
10
|
+
circleStrokeWidth: { type: Number, required: false },
|
|
11
|
+
duration: { type: Number, required: false },
|
|
12
|
+
rc: { type: Object, required: false }
|
|
7
13
|
});
|
|
8
14
|
const emit = defineEmits([]);
|
|
15
|
+
const slots = defineSlots();
|
|
16
|
+
const { rc } = useRC("ScrollToTop", rcProp);
|
|
9
17
|
const scrollToTopStyles = tv({
|
|
10
18
|
slots: {
|
|
11
19
|
button: "fixed right-4 bottom-4 z-50 size-20 lg:size-16",
|
|
@@ -53,7 +61,7 @@ const currentPercent = computed(
|
|
|
53
61
|
() => (scrollPercentage.value - 0) / 100 * 100
|
|
54
62
|
);
|
|
55
63
|
const percentageInPx = computed(() => `${percentPx}px`);
|
|
56
|
-
const durationInSeconds = computed(() => `${
|
|
64
|
+
const durationInSeconds = computed(() => `${duration}s`);
|
|
57
65
|
</script>
|
|
58
66
|
|
|
59
67
|
<template>
|
|
@@ -65,15 +73,15 @@ const durationInSeconds = computed(() => `${props.duration}s`);
|
|
|
65
73
|
leave-to-class="opacity-0"
|
|
66
74
|
>
|
|
67
75
|
<div v-if="isVisible">
|
|
68
|
-
<UButton variant="ghost" :class="button()" @click="scrollToTop">
|
|
69
|
-
<div :class="progressBase()">
|
|
70
|
-
<svg :class="svg()" viewBox="0 0 100 100">
|
|
76
|
+
<UButton variant="ghost" :class="button({ class: rc.button })" @click="scrollToTop">
|
|
77
|
+
<div :class="progressBase({ class: rc.progressBase })">
|
|
78
|
+
<svg :class="svg({ class: rc.svg })" viewBox="0 0 100 100">
|
|
71
79
|
<circle
|
|
72
80
|
cx="50"
|
|
73
81
|
cy="50"
|
|
74
82
|
r="45"
|
|
75
83
|
fill="var(--color-primary-950)"
|
|
76
|
-
:stroke-width="
|
|
84
|
+
:stroke-width="circleStrokeWidth"
|
|
77
85
|
stroke-dashoffset="0"
|
|
78
86
|
stroke-linecap="round"
|
|
79
87
|
class="gauge-secondary-stroke opacity-100"
|
|
@@ -83,14 +91,14 @@ const durationInSeconds = computed(() => `${props.duration}s`);
|
|
|
83
91
|
cy="50"
|
|
84
92
|
r="45"
|
|
85
93
|
fill="transparent"
|
|
86
|
-
:stroke-width="
|
|
94
|
+
:stroke-width="circleStrokeWidth"
|
|
87
95
|
stroke-dashoffset="0"
|
|
88
96
|
stroke-linecap="round"
|
|
89
97
|
class="gauge-primary-stroke opacity-100"
|
|
90
98
|
/>
|
|
91
99
|
</svg>
|
|
92
|
-
<div :class="iconContainer()">
|
|
93
|
-
<UIcon name="lucide:arrow-up" :class="icon()" />
|
|
100
|
+
<div :class="iconContainer({ class: rc.iconContainer })">
|
|
101
|
+
<UIcon name="lucide:arrow-up" :class="icon({ class: rc.icon })" />
|
|
94
102
|
</div>
|
|
95
103
|
</div>
|
|
96
104
|
</UButton>
|
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
export interface ScrollToTopProps {
|
|
2
2
|
circleStrokeWidth?: number;
|
|
3
3
|
duration?: number;
|
|
4
|
+
rc?: {
|
|
5
|
+
button?: string;
|
|
6
|
+
progressBase?: string;
|
|
7
|
+
svg?: string;
|
|
8
|
+
iconContainer?: string;
|
|
9
|
+
icon?: string;
|
|
10
|
+
};
|
|
4
11
|
}
|
|
5
12
|
export interface ScrollToTopEmits {
|
|
6
13
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
export interface ScrollToTopSlots {
|
|
15
|
+
}
|
|
16
|
+
type __VLS_Slots = ScrollToTopSlots;
|
|
17
|
+
declare const __VLS_base: import("vue").DefineComponent<ScrollToTopProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ScrollToTopProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
19
|
declare const _default: typeof __VLS_export;
|
|
12
20
|
export default _default;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
export interface BlockProps {
|
|
2
2
|
id: string;
|
|
3
3
|
type: string;
|
|
4
|
+
rc?: {
|
|
5
|
+
root?: string;
|
|
6
|
+
menuContainer?: string;
|
|
7
|
+
};
|
|
4
8
|
}
|
|
5
9
|
export interface BlockEmits {
|
|
6
10
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
export interface BlockSlots {
|
|
12
|
+
default: (props: {}) => any;
|
|
13
|
+
}
|
|
14
|
+
type __VLS_Slots = BlockSlots;
|
|
11
15
|
declare const __VLS_base: import("vue").DefineComponent<BlockProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BlockProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
16
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
13
17
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { inject, ref } from "vue";
|
|
3
|
-
import { tv } from "
|
|
4
|
-
|
|
3
|
+
import { tv } from "../../internal/tv";
|
|
4
|
+
import { useRC } from "../../composables/useRC";
|
|
5
|
+
const { id, type, rc: rcProp } = defineProps({
|
|
5
6
|
id: { type: String, required: true },
|
|
6
|
-
type: { type: String, required: true }
|
|
7
|
+
type: { type: String, required: true },
|
|
8
|
+
rc: { type: Object, required: false }
|
|
7
9
|
});
|
|
8
10
|
const emit = defineEmits([]);
|
|
11
|
+
const slots = defineSlots();
|
|
12
|
+
const { rc } = useRC("Block", rcProp);
|
|
9
13
|
const blockStyles = tv({
|
|
10
14
|
slots: {
|
|
11
15
|
root: "group relative pl-12 flex flex-row gap-xs",
|
|
@@ -63,8 +67,8 @@ const items = ref([
|
|
|
63
67
|
</script>
|
|
64
68
|
|
|
65
69
|
<template>
|
|
66
|
-
<div :class="root()">
|
|
67
|
-
<div :class="menuContainer()">
|
|
70
|
+
<div :class="root({ class: rc.root })">
|
|
71
|
+
<div :class="menuContainer({ class: rc.menuContainer })">
|
|
68
72
|
<UDropdownMenu :items="items">
|
|
69
73
|
<UButton icon="lucide:grip-vertical" variant="ghost" color="neutral" />
|
|
70
74
|
</UDropdownMenu>
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
export interface BlockProps {
|
|
2
2
|
id: string;
|
|
3
3
|
type: string;
|
|
4
|
+
rc?: {
|
|
5
|
+
root?: string;
|
|
6
|
+
menuContainer?: string;
|
|
7
|
+
};
|
|
4
8
|
}
|
|
5
9
|
export interface BlockEmits {
|
|
6
10
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
export interface BlockSlots {
|
|
12
|
+
default: (props: {}) => any;
|
|
13
|
+
}
|
|
14
|
+
type __VLS_Slots = BlockSlots;
|
|
11
15
|
declare const __VLS_base: import("vue").DefineComponent<BlockProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BlockProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
16
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
13
17
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import type { Block } from "../../types/index.js";
|
|
2
2
|
export interface BlockEditRendererProps {
|
|
3
3
|
blocks: Block[];
|
|
4
|
+
rc?: {
|
|
5
|
+
root?: string;
|
|
6
|
+
};
|
|
4
7
|
}
|
|
5
8
|
export interface BlockEditRendererEmits {
|
|
6
9
|
}
|
|
7
|
-
|
|
10
|
+
export interface BlockEditRendererSlots {
|
|
11
|
+
}
|
|
12
|
+
type __VLS_Slots = BlockEditRendererSlots;
|
|
13
|
+
declare const __VLS_base: import("vue").DefineComponent<BlockEditRendererProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BlockEditRendererProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
8
15
|
declare const _default: typeof __VLS_export;
|
|
9
16
|
export default _default;
|
|
17
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import {} from "vue";
|
|
3
3
|
import { getBlockEditorComponent } from "../../internal/blockMapper";
|
|
4
|
-
import { tv } from "
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
import { tv } from "../../internal/tv";
|
|
5
|
+
import { useRC } from "../../composables/useRC";
|
|
6
|
+
const { blocks, rc: rcProp } = defineProps({
|
|
7
|
+
blocks: { type: Array, required: true },
|
|
8
|
+
rc: { type: Object, required: false }
|
|
7
9
|
});
|
|
8
10
|
const emit = defineEmits([]);
|
|
11
|
+
const slots = defineSlots();
|
|
12
|
+
const { rc } = useRC("BlockEditRenderer", rcProp);
|
|
9
13
|
const blockEditRendererStyles = tv({
|
|
10
14
|
slots: {
|
|
11
15
|
root: "flex flex-col gap-lg w-full"
|
|
@@ -27,7 +31,7 @@ const getComponent = (block) => {
|
|
|
27
31
|
</script>
|
|
28
32
|
|
|
29
33
|
<template>
|
|
30
|
-
<div :class="root()">
|
|
34
|
+
<div :class="root({ class: rc.root })">
|
|
31
35
|
<UEmpty
|
|
32
36
|
v-if="!blocks || blocks.length === 0"
|
|
33
37
|
variant="naked"
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import type { Block } from "../../types/index.js";
|
|
2
2
|
export interface BlockEditRendererProps {
|
|
3
3
|
blocks: Block[];
|
|
4
|
+
rc?: {
|
|
5
|
+
root?: string;
|
|
6
|
+
};
|
|
4
7
|
}
|
|
5
8
|
export interface BlockEditRendererEmits {
|
|
6
9
|
}
|
|
7
|
-
|
|
10
|
+
export interface BlockEditRendererSlots {
|
|
11
|
+
}
|
|
12
|
+
type __VLS_Slots = BlockEditRendererSlots;
|
|
13
|
+
declare const __VLS_base: import("vue").DefineComponent<BlockEditRendererProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BlockEditRendererProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
8
15
|
declare const _default: typeof __VLS_export;
|
|
9
16
|
export default _default;
|
|
17
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -1,27 +1,36 @@
|
|
|
1
1
|
import type { Block } from "../../types/index.js";
|
|
2
2
|
export interface BlockEditorProps {
|
|
3
3
|
historyLimit?: number;
|
|
4
|
+
rc?: {};
|
|
4
5
|
}
|
|
5
6
|
type __VLS_Props = BlockEditorProps;
|
|
6
7
|
export interface BlockEditorEmits {
|
|
7
|
-
|
|
8
|
+
save: [];
|
|
8
9
|
}
|
|
10
|
+
export interface BlockEditorSlots {
|
|
11
|
+
}
|
|
12
|
+
type __VLS_Slots = BlockEditorSlots;
|
|
9
13
|
type __VLS_ModelProps = {
|
|
10
14
|
modelValue: Block[];
|
|
11
15
|
};
|
|
12
16
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
13
|
-
declare const
|
|
17
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
14
18
|
undo: () => void;
|
|
15
19
|
redo: () => void;
|
|
16
20
|
canUndo: import("vue").ComputedRef<boolean>;
|
|
17
21
|
canRedo: import("vue").ComputedRef<boolean>;
|
|
18
22
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
|
-
"update:modelValue": (value: Block[]) => any;
|
|
20
|
-
} & {
|
|
21
23
|
save: () => any;
|
|
24
|
+
"update:modelValue": (value: Block[]) => any;
|
|
22
25
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
23
26
|
onSave?: (() => any) | undefined;
|
|
24
27
|
"onUpdate:modelValue"?: ((value: Block[]) => any) | undefined;
|
|
25
28
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
29
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
26
30
|
declare const _default: typeof __VLS_export;
|
|
27
31
|
export default _default;
|
|
32
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
33
|
+
new (): {
|
|
34
|
+
$slots: S;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { provide } from "vue";
|
|
3
3
|
import { useBlockEditor } from "../../composables";
|
|
4
|
-
import { tv } from "
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
import { tv } from "../../internal/tv";
|
|
5
|
+
import { useRC } from "../../composables/useRC";
|
|
6
|
+
const { historyLimit, rc: rcProp } = defineProps({
|
|
7
|
+
historyLimit: { type: Number, required: false },
|
|
8
|
+
rc: { type: Object, required: false }
|
|
7
9
|
});
|
|
8
|
-
const emit = defineEmits(["save"]);
|
|
9
10
|
const blocks = defineModel({ type: Array, ...{ required: true } });
|
|
11
|
+
const emit = defineEmits(["save"]);
|
|
12
|
+
const slots = defineSlots();
|
|
13
|
+
const { rc } = useRC("BlockEditor", rcProp);
|
|
10
14
|
const blockEditorStyles = tv({});
|
|
15
|
+
const {} = blockEditorStyles();
|
|
11
16
|
const {
|
|
12
17
|
removeBlock,
|
|
13
18
|
moveBlock,
|
|
@@ -1,27 +1,36 @@
|
|
|
1
1
|
import type { Block } from "../../types/index.js";
|
|
2
2
|
export interface BlockEditorProps {
|
|
3
3
|
historyLimit?: number;
|
|
4
|
+
rc?: {};
|
|
4
5
|
}
|
|
5
6
|
type __VLS_Props = BlockEditorProps;
|
|
6
7
|
export interface BlockEditorEmits {
|
|
7
|
-
|
|
8
|
+
save: [];
|
|
8
9
|
}
|
|
10
|
+
export interface BlockEditorSlots {
|
|
11
|
+
}
|
|
12
|
+
type __VLS_Slots = BlockEditorSlots;
|
|
9
13
|
type __VLS_ModelProps = {
|
|
10
14
|
modelValue: Block[];
|
|
11
15
|
};
|
|
12
16
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
13
|
-
declare const
|
|
17
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
14
18
|
undo: () => void;
|
|
15
19
|
redo: () => void;
|
|
16
20
|
canUndo: import("vue").ComputedRef<boolean>;
|
|
17
21
|
canRedo: import("vue").ComputedRef<boolean>;
|
|
18
22
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
|
-
"update:modelValue": (value: Block[]) => any;
|
|
20
|
-
} & {
|
|
21
23
|
save: () => any;
|
|
24
|
+
"update:modelValue": (value: Block[]) => any;
|
|
22
25
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
23
26
|
onSave?: (() => any) | undefined;
|
|
24
27
|
"onUpdate:modelValue"?: ((value: Block[]) => any) | undefined;
|
|
25
28
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
29
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
26
30
|
declare const _default: typeof __VLS_export;
|
|
27
31
|
export default _default;
|
|
32
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
33
|
+
new (): {
|
|
34
|
+
$slots: S;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import type { Block } from "../../types/index.js";
|
|
2
2
|
export interface BlockViewRendererProps {
|
|
3
3
|
blocks: Block[];
|
|
4
|
+
rc?: {
|
|
5
|
+
root?: string;
|
|
6
|
+
};
|
|
4
7
|
}
|
|
5
8
|
export interface BlockViewRendererEmits {
|
|
6
9
|
}
|
|
7
|
-
|
|
10
|
+
export interface BlockViewRendererSlots {
|
|
11
|
+
}
|
|
12
|
+
type __VLS_Slots = BlockViewRendererSlots;
|
|
13
|
+
declare const __VLS_base: import("vue").DefineComponent<BlockViewRendererProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BlockViewRendererProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
8
15
|
declare const _default: typeof __VLS_export;
|
|
9
16
|
export default _default;
|
|
17
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import {} from "vue";
|
|
3
3
|
import { getBlockRendererComponent } from "../../internal/blockMapper";
|
|
4
|
-
import { tv } from "
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
import { tv } from "../../internal/tv";
|
|
5
|
+
import { useRC } from "../../composables/useRC";
|
|
6
|
+
const { blocks, rc: rcProp } = defineProps({
|
|
7
|
+
blocks: { type: Array, required: true },
|
|
8
|
+
rc: { type: Object, required: false }
|
|
7
9
|
});
|
|
8
10
|
const emit = defineEmits([]);
|
|
11
|
+
const slots = defineSlots();
|
|
12
|
+
const { rc } = useRC("BlockViewRenderer", rcProp);
|
|
9
13
|
const blockViewRendererStyles = tv({
|
|
10
14
|
slots: {
|
|
11
15
|
root: "flex flex-col gap-lg"
|
|
@@ -27,7 +31,7 @@ const getComponent = (block) => {
|
|
|
27
31
|
</script>
|
|
28
32
|
|
|
29
33
|
<template>
|
|
30
|
-
<div :class="root()">
|
|
34
|
+
<div :class="root({ class: rc.root })">
|
|
31
35
|
<UEmpty
|
|
32
36
|
v-if="!blocks || blocks.length === 0"
|
|
33
37
|
variant="naked"
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import type { Block } from "../../types/index.js";
|
|
2
2
|
export interface BlockViewRendererProps {
|
|
3
3
|
blocks: Block[];
|
|
4
|
+
rc?: {
|
|
5
|
+
root?: string;
|
|
6
|
+
};
|
|
4
7
|
}
|
|
5
8
|
export interface BlockViewRendererEmits {
|
|
6
9
|
}
|
|
7
|
-
|
|
10
|
+
export interface BlockViewRendererSlots {
|
|
11
|
+
}
|
|
12
|
+
type __VLS_Slots = BlockViewRendererSlots;
|
|
13
|
+
declare const __VLS_base: import("vue").DefineComponent<BlockViewRendererProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BlockViewRendererProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
8
15
|
declare const _default: typeof __VLS_export;
|
|
9
16
|
export default _default;
|
|
17
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import { type RichTextContent } from "../../types/index.js";
|
|
2
2
|
export interface TextRendererProps {
|
|
3
3
|
content: RichTextContent;
|
|
4
|
+
rc?: {
|
|
5
|
+
root?: string;
|
|
6
|
+
};
|
|
4
7
|
}
|
|
5
8
|
export interface TextRendererEmits {
|
|
6
9
|
}
|
|
7
|
-
|
|
10
|
+
export interface TextRendererSlots {
|
|
11
|
+
}
|
|
12
|
+
type __VLS_Slots = TextRendererSlots;
|
|
13
|
+
declare const __VLS_base: import("vue").DefineComponent<TextRendererProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TextRendererProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
8
15
|
declare const _default: typeof __VLS_export;
|
|
9
16
|
export default _default;
|
|
17
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -4,14 +4,18 @@ import {
|
|
|
4
4
|
import TextNode from "../nodes/TextNode.vue";
|
|
5
5
|
import LinkNode from "../nodes/LinkNode.vue";
|
|
6
6
|
import PageMention from "../page/PageMention.vue";
|
|
7
|
-
import { tv } from "
|
|
7
|
+
import { tv } from "../../internal/tv";
|
|
8
|
+
import { useRC } from "../../composables/useRC";
|
|
8
9
|
defineOptions({
|
|
9
10
|
name: "TextRenderer"
|
|
10
11
|
});
|
|
11
|
-
const { content } = defineProps({
|
|
12
|
-
content: { type: Array, required: true }
|
|
12
|
+
const { content, rc: rcProp } = defineProps({
|
|
13
|
+
content: { type: Array, required: true },
|
|
14
|
+
rc: { type: Object, required: false }
|
|
13
15
|
});
|
|
14
16
|
const emit = defineEmits([]);
|
|
17
|
+
const slots = defineSlots();
|
|
18
|
+
const { rc } = useRC("TextRenderer", rcProp);
|
|
15
19
|
const textRendererStyles = tv({
|
|
16
20
|
slots: {
|
|
17
21
|
root: ""
|
|
@@ -59,7 +63,9 @@ const getProps = (item) => {
|
|
|
59
63
|
</script>
|
|
60
64
|
|
|
61
65
|
<template>
|
|
62
|
-
<
|
|
63
|
-
<
|
|
64
|
-
|
|
66
|
+
<div :class="root({ class: rc.root })">
|
|
67
|
+
<template v-for="item in content" :key="item.id">
|
|
68
|
+
<component :is="getTag(item)" v-bind="getProps(item)" />
|
|
69
|
+
</template>
|
|
70
|
+
</div>
|
|
65
71
|
</template>
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import { type RichTextContent } from "../../types/index.js";
|
|
2
2
|
export interface TextRendererProps {
|
|
3
3
|
content: RichTextContent;
|
|
4
|
+
rc?: {
|
|
5
|
+
root?: string;
|
|
6
|
+
};
|
|
4
7
|
}
|
|
5
8
|
export interface TextRendererEmits {
|
|
6
9
|
}
|
|
7
|
-
|
|
10
|
+
export interface TextRendererSlots {
|
|
11
|
+
}
|
|
12
|
+
type __VLS_Slots = TextRendererSlots;
|
|
13
|
+
declare const __VLS_base: import("vue").DefineComponent<TextRendererProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TextRendererProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
8
15
|
declare const _default: typeof __VLS_export;
|
|
9
16
|
export default _default;
|
|
17
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
import type { CalloutBlockProps } from "../../../types/index.js";
|
|
2
2
|
export interface CalloutBlockEditorProps extends CalloutBlockProps {
|
|
3
|
+
rc?: {
|
|
4
|
+
root?: string;
|
|
5
|
+
};
|
|
3
6
|
}
|
|
4
7
|
export interface CalloutBlockEditorEmits {
|
|
5
8
|
}
|
|
6
|
-
|
|
9
|
+
export interface CalloutBlockEditorSlots {
|
|
10
|
+
}
|
|
11
|
+
type __VLS_Slots = CalloutBlockEditorSlots;
|
|
12
|
+
declare const __VLS_base: import("vue").DefineComponent<CalloutBlockEditorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CalloutBlockEditorProps> & 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,12 +1,16 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { tv } from "
|
|
3
|
-
|
|
2
|
+
import { tv } from "../../../internal/tv";
|
|
3
|
+
import { useRC } from "~/src/runtime/composables";
|
|
4
|
+
const { variant, children, to, target, rc: rcProp } = defineProps({
|
|
5
|
+
rc: { type: Object, required: false },
|
|
4
6
|
variant: { type: String, required: true },
|
|
5
7
|
children: { type: Array, required: true },
|
|
6
8
|
to: { type: String, required: false },
|
|
7
9
|
target: { type: String, required: false }
|
|
8
10
|
});
|
|
9
11
|
const emit = defineEmits([]);
|
|
12
|
+
const slots = defineSlots();
|
|
13
|
+
const { rc } = useRC("CalloutBlockEditor", rcProp);
|
|
10
14
|
const calloutBlockEditorStyles = tv({
|
|
11
15
|
slots: {
|
|
12
16
|
root: ""
|
|
@@ -16,7 +20,9 @@ const { root } = calloutBlockEditorStyles();
|
|
|
16
20
|
</script>
|
|
17
21
|
|
|
18
22
|
<template>
|
|
19
|
-
<
|
|
20
|
-
<
|
|
21
|
-
|
|
23
|
+
<div :class="root({ class: rc.root })">
|
|
24
|
+
<RCCallout :variant="variant" :to="to" :target="target">
|
|
25
|
+
<RCBlockViewRenderer :blocks="children" />
|
|
26
|
+
</RCCallout>
|
|
27
|
+
</div>
|
|
22
28
|
</template>
|
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
import type { CalloutBlockProps } from "../../../types/index.js";
|
|
2
2
|
export interface CalloutBlockEditorProps extends CalloutBlockProps {
|
|
3
|
+
rc?: {
|
|
4
|
+
root?: string;
|
|
5
|
+
};
|
|
3
6
|
}
|
|
4
7
|
export interface CalloutBlockEditorEmits {
|
|
5
8
|
}
|
|
6
|
-
|
|
9
|
+
export interface CalloutBlockEditorSlots {
|
|
10
|
+
}
|
|
11
|
+
type __VLS_Slots = CalloutBlockEditorSlots;
|
|
12
|
+
declare const __VLS_base: import("vue").DefineComponent<CalloutBlockEditorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CalloutBlockEditorProps> & 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,8 +1,20 @@
|
|
|
1
1
|
import type { CardBlockProps } from "../../../types/index.js";
|
|
2
2
|
export interface CardBlockEditorProps extends CardBlockProps {
|
|
3
|
+
rc?: {
|
|
4
|
+
card?: string;
|
|
5
|
+
};
|
|
3
6
|
}
|
|
4
7
|
export interface CardBlockEditorEmits {
|
|
5
8
|
}
|
|
6
|
-
|
|
9
|
+
export interface CardBlockEditorSlots {
|
|
10
|
+
}
|
|
11
|
+
type __VLS_Slots = CardBlockEditorSlots;
|
|
12
|
+
declare const __VLS_base: import("vue").DefineComponent<CardBlockEditorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CardBlockEditorProps> & 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
|
+
};
|