rimelight-components 2.0.40 → 2.0.42
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/blocks/editor/CalloutBlockEditor.vue +1 -1
- package/dist/runtime/components/blocks/editor/SectionBlockEditor.d.vue.ts +2 -2
- package/dist/runtime/components/blocks/editor/SectionBlockEditor.vue +14 -17
- package/dist/runtime/components/blocks/editor/SectionBlockEditor.vue.d.ts +2 -2
- package/dist/runtime/types/blocks.d.ts +10 -16
- package/package.json +1 -1
- /package/dist/runtime/components/renderers/{EditorBlockRenderer.d.vue.ts → BlockEditor.d.vue.ts} +0 -0
- /package/dist/runtime/components/renderers/{EditorBlockRenderer.vue → BlockEditor.vue} +0 -0
- /package/dist/runtime/components/renderers/{EditorBlockRenderer.vue.d.ts → BlockEditor.vue.d.ts} +0 -0
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { readdirSync } from 'node:fs';
|
|
|
4
4
|
import { basename } from 'node:path';
|
|
5
5
|
|
|
6
6
|
const name = "rimelight-components";
|
|
7
|
-
const version = "2.0.
|
|
7
|
+
const version = "2.0.42";
|
|
8
8
|
const homepage = "https://rimelight.com/tools/rimelight-components";
|
|
9
9
|
|
|
10
10
|
const defaultOptions = {
|
|
@@ -10,7 +10,7 @@ const { variant, children, to, target } = defineProps({
|
|
|
10
10
|
<template>
|
|
11
11
|
<div class="p-8 bg-error-500">
|
|
12
12
|
<RCCallout :variant="variant" :to="to" :target="target">
|
|
13
|
-
<
|
|
13
|
+
<RCBlockEditor :blocks="children" />
|
|
14
14
|
</RCCallout>
|
|
15
15
|
</div>
|
|
16
16
|
</template>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare const __VLS_export: import("vue").DefineComponent<
|
|
1
|
+
import type { SectionBlock } from "~~/src/runtime/types/blocks";
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<SectionBlock, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SectionBlock> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
3
|
declare const _default: typeof __VLS_export;
|
|
4
4
|
export default _default;
|
|
@@ -2,21 +2,18 @@
|
|
|
2
2
|
import { computed, inject } from "vue";
|
|
3
3
|
import { slugify } from "../../../utils";
|
|
4
4
|
const props = defineProps({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
title: { type: String, required: true },
|
|
9
|
-
description: { type: String, required: false },
|
|
10
|
-
children: { type: Array, required: true }
|
|
5
|
+
type: { type: String, required: true },
|
|
6
|
+
props: { type: Object, required: true },
|
|
7
|
+
id: { type: String, required: true }
|
|
11
8
|
});
|
|
12
|
-
const headingId = computed(() => props.title ? slugify(props.title) : void 0);
|
|
9
|
+
const headingId = computed(() => props.props.title ? slugify(props.props.title) : void 0);
|
|
13
10
|
const { removeBlock } = inject("blockEditorMutators", {
|
|
14
11
|
removeBlock: (id) => console.warn(`removeBlock not implemented for ${id}`)
|
|
15
12
|
});
|
|
16
13
|
const handleRemove = () => {
|
|
17
|
-
removeBlock(props.
|
|
14
|
+
removeBlock(props.id);
|
|
18
15
|
};
|
|
19
|
-
const childrenBlocks = computed(() => props.children || []);
|
|
16
|
+
const childrenBlocks = computed(() => props.props.children || []);
|
|
20
17
|
</script>
|
|
21
18
|
|
|
22
19
|
<template>
|
|
@@ -35,24 +32,24 @@ const childrenBlocks = computed(() => props.children || []);
|
|
|
35
32
|
</div>
|
|
36
33
|
|
|
37
34
|
<RCSection
|
|
38
|
-
:level="level"
|
|
39
|
-
:title="title"
|
|
40
|
-
:description="description"
|
|
35
|
+
:level="props.props.level"
|
|
36
|
+
:title="props.props.title"
|
|
37
|
+
:description="props.props.description"
|
|
41
38
|
:id="headingId"
|
|
42
39
|
is-editing
|
|
43
40
|
>
|
|
44
41
|
<template #title>
|
|
45
42
|
<input
|
|
46
|
-
:value="title"
|
|
47
|
-
:class="`text-${level === 1 ? '3xl' : 'xl'} pointer-events-auto w-full bg-transparent font-bold focus:outline-none`"
|
|
43
|
+
:value="props.props.title"
|
|
44
|
+
:class="`text-${props.props.level === 1 ? '3xl' : 'xl'} pointer-events-auto w-full bg-transparent font-bold focus:outline-none`"
|
|
48
45
|
placeholder="Enter section title..."
|
|
49
46
|
/>
|
|
50
47
|
</template>
|
|
51
48
|
|
|
52
49
|
<template #description>
|
|
53
50
|
<textarea
|
|
54
|
-
v-if="description !== void 0"
|
|
55
|
-
:value="description"
|
|
51
|
+
v-if="props.props.description !== void 0"
|
|
52
|
+
:value="props.props.description"
|
|
56
53
|
class="text-md pointer-events-auto w-full resize-none bg-transparent text-muted focus:outline-none"
|
|
57
54
|
placeholder="Optional description..."
|
|
58
55
|
rows="2"
|
|
@@ -60,7 +57,7 @@ const childrenBlocks = computed(() => props.children || []);
|
|
|
60
57
|
</template>
|
|
61
58
|
|
|
62
59
|
<div class="mt-4">
|
|
63
|
-
<
|
|
60
|
+
<RCBlockEditor :blocks="childrenBlocks" />
|
|
64
61
|
</div>
|
|
65
62
|
</RCSection>
|
|
66
63
|
</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare const __VLS_export: import("vue").DefineComponent<
|
|
1
|
+
import type { SectionBlock } from "~~/src/runtime/types/blocks";
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<SectionBlock, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SectionBlock> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
3
|
declare const _default: typeof __VLS_export;
|
|
4
4
|
export default _default;
|
|
@@ -11,7 +11,7 @@ export type BlockType = "SectionBlock" | "ParagraphBlock" | "CalloutBlock" | "Im
|
|
|
11
11
|
* Defines the common structure for any content block object.
|
|
12
12
|
* The 'type' must be one of the registered BlockType values.
|
|
13
13
|
*/
|
|
14
|
-
export interface
|
|
14
|
+
export interface BaseBlock {
|
|
15
15
|
id: string;
|
|
16
16
|
type: BlockType;
|
|
17
17
|
props: Record<string, any>;
|
|
@@ -22,12 +22,6 @@ export interface SectionBlockProps {
|
|
|
22
22
|
description?: string;
|
|
23
23
|
children: Block[];
|
|
24
24
|
}
|
|
25
|
-
export interface SectionBlockEditorProps extends SectionBlockProps {
|
|
26
|
-
/** A unique ID used by the editor to track, move, and delete the block. */
|
|
27
|
-
blockId: string;
|
|
28
|
-
/** Optional context for editor behavior (e.g., is the block currently focused). */
|
|
29
|
-
isFocused?: boolean;
|
|
30
|
-
}
|
|
31
25
|
export interface ParagraphBlockProps {
|
|
32
26
|
text: RichTextContent;
|
|
33
27
|
}
|
|
@@ -62,35 +56,35 @@ export interface CollapsibleCardBlockProps {
|
|
|
62
56
|
name?: string;
|
|
63
57
|
children: Block[];
|
|
64
58
|
}
|
|
65
|
-
export interface
|
|
59
|
+
export interface SectionBlock extends BaseBlock {
|
|
66
60
|
type: "SectionBlock";
|
|
67
61
|
props: SectionBlockProps;
|
|
68
62
|
}
|
|
69
|
-
export interface ParagraphContentBlock extends
|
|
63
|
+
export interface ParagraphContentBlock extends BaseBlock {
|
|
70
64
|
type: "ParagraphBlock";
|
|
71
65
|
props: ParagraphBlockProps;
|
|
72
66
|
}
|
|
73
|
-
export interface CalloutContentBlock extends
|
|
67
|
+
export interface CalloutContentBlock extends BaseBlock {
|
|
74
68
|
type: "CalloutBlock";
|
|
75
69
|
props: CalloutBlockProps;
|
|
76
70
|
}
|
|
77
|
-
export interface ImageContentBlock extends
|
|
71
|
+
export interface ImageContentBlock extends BaseBlock {
|
|
78
72
|
type: "ImageBlock";
|
|
79
73
|
props: ImageBlockProps;
|
|
80
74
|
}
|
|
81
|
-
export interface UnorderedListContentBlock extends
|
|
75
|
+
export interface UnorderedListContentBlock extends BaseBlock {
|
|
82
76
|
type: "UnorderedListBlock";
|
|
83
77
|
props: UnorderedListBlockProps;
|
|
84
78
|
}
|
|
85
|
-
export interface CardBlockContent extends
|
|
79
|
+
export interface CardBlockContent extends BaseBlock {
|
|
86
80
|
type: "CardBlock";
|
|
87
81
|
props: CardBlockProps;
|
|
88
82
|
}
|
|
89
|
-
export interface CollapsibleCardContentBlock extends
|
|
83
|
+
export interface CollapsibleCardContentBlock extends BaseBlock {
|
|
90
84
|
type: "CollapsibleCardBlock";
|
|
91
85
|
props: CollapsibleCardBlockProps;
|
|
92
86
|
}
|
|
93
|
-
export interface QuoteContentBlock extends
|
|
87
|
+
export interface QuoteContentBlock extends BaseBlock {
|
|
94
88
|
type: "QuoteBlock";
|
|
95
89
|
props: QuoteBlockProps;
|
|
96
90
|
}
|
|
@@ -98,7 +92,7 @@ export interface QuoteContentBlock extends BaseContentBlock {
|
|
|
98
92
|
* The full union type for a single block. This allows for type-checking the
|
|
99
93
|
* payload based on the block 'type'.
|
|
100
94
|
*/
|
|
101
|
-
export type Block =
|
|
95
|
+
export type Block = SectionBlock | ParagraphContentBlock | CalloutContentBlock | ImageContentBlock | QuoteContentBlock | UnorderedListContentBlock | CardBlockContent | CollapsibleCardContentBlock;
|
|
102
96
|
/**
|
|
103
97
|
* Text Rendering Components
|
|
104
98
|
*/
|
package/package.json
CHANGED
/package/dist/runtime/components/renderers/{EditorBlockRenderer.d.vue.ts → BlockEditor.d.vue.ts}
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/runtime/components/renderers/{EditorBlockRenderer.vue.d.ts → BlockEditor.vue.d.ts}
RENAMED
|
File without changes
|