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,9 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
export interface NewsletterSignupProps {
|
|
2
2
|
fieldLabel?: string;
|
|
3
3
|
description?: string;
|
|
4
4
|
placeholder?: string;
|
|
5
5
|
buttonLabel?: string;
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
rc?: {
|
|
7
|
+
group?: string;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export interface NewsletterSignupEmits {
|
|
11
|
+
}
|
|
12
|
+
export interface NewsletterSignupSlots {
|
|
13
|
+
}
|
|
14
|
+
type __VLS_Slots = NewsletterSignupSlots;
|
|
15
|
+
declare const __VLS_base: import("vue").DefineComponent<NewsletterSignupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NewsletterSignupProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
8
17
|
declare const _default: typeof __VLS_export;
|
|
9
18
|
export default _default;
|
|
19
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -1,21 +1,34 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { tv } from "../../utils/tv";
|
|
3
|
+
import { useRC } from "../../composables/useRC";
|
|
2
4
|
const {
|
|
3
5
|
fieldLabel = "Subscribe to our Newsletter",
|
|
4
6
|
description = "Stay updated on new posts and updates. Unsubscribe at any time.",
|
|
5
7
|
placeholder = "email@domain.com",
|
|
6
|
-
buttonLabel = "Subscribe"
|
|
8
|
+
buttonLabel = "Subscribe",
|
|
9
|
+
rc: rcProp
|
|
7
10
|
} = defineProps({
|
|
8
11
|
fieldLabel: { type: String, required: false },
|
|
9
12
|
description: { type: String, required: false },
|
|
10
13
|
placeholder: { type: String, required: false },
|
|
11
|
-
buttonLabel: { type: String, required: false }
|
|
14
|
+
buttonLabel: { type: String, required: false },
|
|
15
|
+
rc: { type: Object, required: false }
|
|
12
16
|
});
|
|
17
|
+
const emit = defineEmits([]);
|
|
18
|
+
const slots = defineSlots();
|
|
19
|
+
const { rc } = useRC("NewsletterSignup", rcProp);
|
|
20
|
+
const newsletterSignupStyles = tv({
|
|
21
|
+
slots: {
|
|
22
|
+
group: "pt-2"
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
const { group } = newsletterSignupStyles();
|
|
13
26
|
</script>
|
|
14
27
|
|
|
15
28
|
<template>
|
|
16
29
|
<UForm>
|
|
17
30
|
<UFormField name="email" :label="fieldLabel" :description="description">
|
|
18
|
-
<UFieldGroup class="
|
|
31
|
+
<UFieldGroup :class="group({ class: rc.group })">
|
|
19
32
|
<UInput type="email" :placeholder="placeholder" />
|
|
20
33
|
<UButton type="submit" :label="buttonLabel" />
|
|
21
34
|
</UFieldGroup>
|
|
@@ -1,9 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
export interface NewsletterSignupProps {
|
|
2
2
|
fieldLabel?: string;
|
|
3
3
|
description?: string;
|
|
4
4
|
placeholder?: string;
|
|
5
5
|
buttonLabel?: string;
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
rc?: {
|
|
7
|
+
group?: string;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export interface NewsletterSignupEmits {
|
|
11
|
+
}
|
|
12
|
+
export interface NewsletterSignupSlots {
|
|
13
|
+
}
|
|
14
|
+
type __VLS_Slots = NewsletterSignupSlots;
|
|
15
|
+
declare const __VLS_base: import("vue").DefineComponent<NewsletterSignupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NewsletterSignupProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
8
17
|
declare const _default: typeof __VLS_export;
|
|
9
18
|
export default _default;
|
|
19
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -1,10 +1,25 @@
|
|
|
1
|
-
interface
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
12
|
+
export interface ScrollToTopEmits {
|
|
13
|
+
}
|
|
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>;
|
|
9
19
|
declare const _default: typeof __VLS_export;
|
|
10
20
|
export default _default;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -1,9 +1,29 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { computed, onMounted, onUnmounted, ref } from "vue";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import { tv } from "../../utils/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 }
|
|
6
13
|
});
|
|
14
|
+
const emit = defineEmits([]);
|
|
15
|
+
const slots = defineSlots();
|
|
16
|
+
const { rc } = useRC("ScrollToTop", rcProp);
|
|
17
|
+
const scrollToTopStyles = tv({
|
|
18
|
+
slots: {
|
|
19
|
+
button: "fixed right-4 bottom-4 z-50 size-20 lg:size-16",
|
|
20
|
+
progressBase: "progress-circle-base size-full",
|
|
21
|
+
svg: "size-full",
|
|
22
|
+
iconContainer: "absolute inset-0 flex items-center justify-center text-center",
|
|
23
|
+
icon: "size-6 text-white"
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
const { button, progressBase, svg, iconContainer, icon } = scrollToTopStyles();
|
|
7
27
|
const scrollPercentage = ref(0);
|
|
8
28
|
const minScrollThreshold = 15;
|
|
9
29
|
const isVisible = computed(() => scrollPercentage.value >= minScrollThreshold);
|
|
@@ -41,7 +61,7 @@ const currentPercent = computed(
|
|
|
41
61
|
() => (scrollPercentage.value - 0) / 100 * 100
|
|
42
62
|
);
|
|
43
63
|
const percentageInPx = computed(() => `${percentPx}px`);
|
|
44
|
-
const durationInSeconds = computed(() => `${
|
|
64
|
+
const durationInSeconds = computed(() => `${duration}s`);
|
|
45
65
|
</script>
|
|
46
66
|
|
|
47
67
|
<template>
|
|
@@ -53,19 +73,15 @@ const durationInSeconds = computed(() => `${props.duration}s`);
|
|
|
53
73
|
leave-to-class="opacity-0"
|
|
54
74
|
>
|
|
55
75
|
<div v-if="isVisible">
|
|
56
|
-
<UButton
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
@click="scrollToTop"
|
|
60
|
-
>
|
|
61
|
-
<div class="progress-circle-base size-full">
|
|
62
|
-
<svg class="size-full" 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">
|
|
63
79
|
<circle
|
|
64
80
|
cx="50"
|
|
65
81
|
cy="50"
|
|
66
82
|
r="45"
|
|
67
83
|
fill="var(--color-primary-950)"
|
|
68
|
-
:stroke-width="
|
|
84
|
+
:stroke-width="circleStrokeWidth"
|
|
69
85
|
stroke-dashoffset="0"
|
|
70
86
|
stroke-linecap="round"
|
|
71
87
|
class="gauge-secondary-stroke opacity-100"
|
|
@@ -75,14 +91,14 @@ const durationInSeconds = computed(() => `${props.duration}s`);
|
|
|
75
91
|
cy="50"
|
|
76
92
|
r="45"
|
|
77
93
|
fill="transparent"
|
|
78
|
-
:stroke-width="
|
|
94
|
+
:stroke-width="circleStrokeWidth"
|
|
79
95
|
stroke-dashoffset="0"
|
|
80
96
|
stroke-linecap="round"
|
|
81
97
|
class="gauge-primary-stroke opacity-100"
|
|
82
98
|
/>
|
|
83
99
|
</svg>
|
|
84
|
-
<div class="
|
|
85
|
-
<UIcon name="lucide:arrow-up" class="
|
|
100
|
+
<div :class="iconContainer({ class: rc.iconContainer })">
|
|
101
|
+
<UIcon name="lucide:arrow-up" :class="icon({ class: rc.icon })" />
|
|
86
102
|
</div>
|
|
87
103
|
</div>
|
|
88
104
|
</UButton>
|
|
@@ -1,10 +1,25 @@
|
|
|
1
|
-
interface
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
12
|
+
export interface ScrollToTopEmits {
|
|
13
|
+
}
|
|
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>;
|
|
9
19
|
declare const _default: typeof __VLS_export;
|
|
10
20
|
export default _default;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
export interface BlockProps {
|
|
2
2
|
id: string;
|
|
3
3
|
type: string;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
4
|
+
rc?: {
|
|
5
|
+
root?: string;
|
|
6
|
+
menuContainer?: string;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export interface BlockEmits {
|
|
10
|
+
}
|
|
11
|
+
export interface BlockSlots {
|
|
12
|
+
default: (props: {}) => any;
|
|
13
|
+
}
|
|
14
|
+
type __VLS_Slots = BlockSlots;
|
|
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>;
|
|
10
16
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
17
|
declare const _default: typeof __VLS_export;
|
|
12
18
|
export default _default;
|
|
@@ -1,13 +1,26 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { inject,
|
|
2
|
+
import { inject, ref } from "vue";
|
|
3
|
+
import { tv } from "../../utils/tv";
|
|
4
|
+
import { useRC } from "../../composables/useRC";
|
|
5
|
+
const { id, type, rc: rcProp } = defineProps({
|
|
6
|
+
id: { type: String, required: true },
|
|
7
|
+
type: { type: String, required: true },
|
|
8
|
+
rc: { type: Object, required: false }
|
|
9
|
+
});
|
|
10
|
+
const emit = defineEmits([]);
|
|
11
|
+
const slots = defineSlots();
|
|
12
|
+
const { rc } = useRC("Block", rcProp);
|
|
13
|
+
const blockStyles = tv({
|
|
14
|
+
slots: {
|
|
15
|
+
root: "group relative pl-12 flex flex-row gap-xs",
|
|
16
|
+
menuContainer: "top-0 left-0 z-10 opacity-0 transition-opacity group-hover:opacity-100"
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const { root, menuContainer } = blockStyles();
|
|
3
20
|
const editorApi = inject("block-editor-api");
|
|
4
21
|
if (!editorApi) {
|
|
5
22
|
throw new Error("RCBlock must be used within a BlockEditor component");
|
|
6
23
|
}
|
|
7
|
-
const { id, type } = defineProps({
|
|
8
|
-
id: { type: String, required: true },
|
|
9
|
-
type: { type: String, required: true }
|
|
10
|
-
});
|
|
11
24
|
const onDelete = () => editorApi.removeBlock(id);
|
|
12
25
|
const onDuplicate = () => editorApi.duplicateBlock(id);
|
|
13
26
|
const onMoveUp = () => editorApi.moveBlock(id, -1);
|
|
@@ -54,8 +67,8 @@ const items = ref([
|
|
|
54
67
|
</script>
|
|
55
68
|
|
|
56
69
|
<template>
|
|
57
|
-
<div class="
|
|
58
|
-
<div class="
|
|
70
|
+
<div :class="root({ class: rc.root })">
|
|
71
|
+
<div :class="menuContainer({ class: rc.menuContainer })">
|
|
59
72
|
<UDropdownMenu :items="items">
|
|
60
73
|
<UButton icon="lucide:grip-vertical" variant="ghost" color="neutral" />
|
|
61
74
|
</UDropdownMenu>
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
export interface BlockProps {
|
|
2
2
|
id: string;
|
|
3
3
|
type: string;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
4
|
+
rc?: {
|
|
5
|
+
root?: string;
|
|
6
|
+
menuContainer?: string;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export interface BlockEmits {
|
|
10
|
+
}
|
|
11
|
+
export interface BlockSlots {
|
|
12
|
+
default: (props: {}) => any;
|
|
13
|
+
}
|
|
14
|
+
type __VLS_Slots = BlockSlots;
|
|
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>;
|
|
10
16
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
17
|
declare const _default: typeof __VLS_export;
|
|
12
18
|
export default _default;
|
|
@@ -1,7 +1,21 @@
|
|
|
1
1
|
import type { Block } from "../../types/index.js";
|
|
2
|
-
|
|
2
|
+
export interface BlockEditRendererProps {
|
|
3
3
|
blocks: Block[];
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
rc?: {
|
|
5
|
+
root?: string;
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
export interface BlockEditRendererEmits {
|
|
9
|
+
}
|
|
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>;
|
|
6
15
|
declare const _default: typeof __VLS_export;
|
|
7
16
|
export default _default;
|
|
17
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import {} from "vue";
|
|
3
3
|
import { getBlockEditorComponent } from "../../internal/blockMapper";
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import { tv } from "../../utils/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 }
|
|
6
9
|
});
|
|
10
|
+
const emit = defineEmits([]);
|
|
11
|
+
const slots = defineSlots();
|
|
12
|
+
const { rc } = useRC("BlockEditRenderer", rcProp);
|
|
13
|
+
const blockEditRendererStyles = tv({
|
|
14
|
+
slots: {
|
|
15
|
+
root: "flex flex-col gap-lg w-full"
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
const { root } = blockEditRendererStyles();
|
|
7
19
|
const getComponent = (block) => {
|
|
8
20
|
if (!block || !block.type || block.type.length === 0) {
|
|
9
21
|
console.error("Block object is missing the critical 'type' field.");
|
|
@@ -19,7 +31,7 @@ const getComponent = (block) => {
|
|
|
19
31
|
</script>
|
|
20
32
|
|
|
21
33
|
<template>
|
|
22
|
-
<div class="
|
|
34
|
+
<div :class="root({ class: rc.root })">
|
|
23
35
|
<UEmpty
|
|
24
36
|
v-if="!blocks || blocks.length === 0"
|
|
25
37
|
variant="naked"
|
|
@@ -1,7 +1,21 @@
|
|
|
1
1
|
import type { Block } from "../../types/index.js";
|
|
2
|
-
|
|
2
|
+
export interface BlockEditRendererProps {
|
|
3
3
|
blocks: Block[];
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
rc?: {
|
|
5
|
+
root?: string;
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
export interface BlockEditRendererEmits {
|
|
9
|
+
}
|
|
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>;
|
|
6
15
|
declare const _default: typeof __VLS_export;
|
|
7
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,11 +1,18 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { provide
|
|
2
|
+
import { provide } from "vue";
|
|
3
3
|
import { useBlockEditor } from "../../composables";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
import { tv } from "../../utils/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
|
});
|
|
10
|
+
const blocks = defineModel({ type: Array, ...{ required: true } });
|
|
8
11
|
const emit = defineEmits(["save"]);
|
|
12
|
+
const slots = defineSlots();
|
|
13
|
+
const { rc } = useRC("BlockEditor", rcProp);
|
|
14
|
+
const blockEditorStyles = tv({});
|
|
15
|
+
const {} = blockEditorStyles();
|
|
9
16
|
const {
|
|
10
17
|
removeBlock,
|
|
11
18
|
moveBlock,
|
|
@@ -29,37 +36,6 @@ provide("block-editor-api", {
|
|
|
29
36
|
redo
|
|
30
37
|
});
|
|
31
38
|
defineExpose({ undo, redo, canUndo, canRedo });
|
|
32
|
-
const handleSave = () => {
|
|
33
|
-
emit("save");
|
|
34
|
-
};
|
|
35
|
-
const showPreview = ref(false);
|
|
36
|
-
const gridClass = computed(() => ({
|
|
37
|
-
// The base grid: transitions enable smooth resizing
|
|
38
|
-
"grid transition-[grid-template-columns] duration-300 ease-out": true,
|
|
39
|
-
// When hidden, use a single column (Editor takes full width)
|
|
40
|
-
"grid-cols-1": !showPreview.value,
|
|
41
|
-
// When visible, use two equal columns (Editor + Preview)
|
|
42
|
-
"grid-cols-2 gap-xl": showPreview.value
|
|
43
|
-
}));
|
|
44
|
-
const editorPanelClass = computed(() => ({
|
|
45
|
-
// When preview is visible, both editor/preview share 1/2 span.
|
|
46
|
-
"col-span-1 w-full": showPreview.value,
|
|
47
|
-
// When preview is hidden, the editor uses the full grid space.
|
|
48
|
-
"col-span-2 w-full": !showPreview.value
|
|
49
|
-
}));
|
|
50
|
-
const togglePreview = () => {
|
|
51
|
-
showPreview.value = !showPreview.value;
|
|
52
|
-
};
|
|
53
|
-
const undoAction = () => {
|
|
54
|
-
if (canUndo.value) {
|
|
55
|
-
undo();
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
const redoAction = () => {
|
|
59
|
-
if (canRedo.value) {
|
|
60
|
-
redo();
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
39
|
</script>
|
|
64
40
|
|
|
65
41
|
<template>
|
|
@@ -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,7 +1,21 @@
|
|
|
1
1
|
import type { Block } from "../../types/index.js";
|
|
2
|
-
|
|
2
|
+
export interface BlockViewRendererProps {
|
|
3
3
|
blocks: Block[];
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
rc?: {
|
|
5
|
+
root?: string;
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
export interface BlockViewRendererEmits {
|
|
9
|
+
}
|
|
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>;
|
|
6
15
|
declare const _default: typeof __VLS_export;
|
|
7
16
|
export default _default;
|
|
17
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import {} from "vue";
|
|
3
3
|
import { getBlockRendererComponent } from "../../internal/blockMapper";
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import { tv } from "../../utils/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 }
|
|
6
9
|
});
|
|
10
|
+
const emit = defineEmits([]);
|
|
11
|
+
const slots = defineSlots();
|
|
12
|
+
const { rc } = useRC("BlockViewRenderer", rcProp);
|
|
13
|
+
const blockViewRendererStyles = tv({
|
|
14
|
+
slots: {
|
|
15
|
+
root: "flex flex-col gap-lg"
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
const { root } = blockViewRendererStyles();
|
|
7
19
|
const getComponent = (block) => {
|
|
8
20
|
if (!block || !block.type || block.type.length === 0) {
|
|
9
21
|
console.error("Block object is missing the critical 'type' field.");
|
|
@@ -19,7 +31,7 @@ const getComponent = (block) => {
|
|
|
19
31
|
</script>
|
|
20
32
|
|
|
21
33
|
<template>
|
|
22
|
-
<div class="
|
|
34
|
+
<div :class="root({ class: rc.root })">
|
|
23
35
|
<UEmpty
|
|
24
36
|
v-if="!blocks || blocks.length === 0"
|
|
25
37
|
variant="naked"
|
|
@@ -1,7 +1,21 @@
|
|
|
1
1
|
import type { Block } from "../../types/index.js";
|
|
2
|
-
|
|
2
|
+
export interface BlockViewRendererProps {
|
|
3
3
|
blocks: Block[];
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
rc?: {
|
|
5
|
+
root?: string;
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
export interface BlockViewRendererEmits {
|
|
9
|
+
}
|
|
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>;
|
|
6
15
|
declare const _default: typeof __VLS_export;
|
|
7
16
|
export default _default;
|
|
17
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|