rimelight-components 2.0.40 → 2.0.41

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rimelight-components",
3
- "version": "2.0.40",
3
+ "version": "2.0.41",
4
4
  "docs": "https://rimelight.com/tools/rimelight-components",
5
5
  "configKey": "rimelightComponents",
6
6
  "compatibility": {
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.40";
7
+ const version = "2.0.41";
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
- <RCBlockRenderer :blocks="children" />
13
+ <RCBlockEditor :blocks="children" />
14
14
  </RCCallout>
15
15
  </div>
16
16
  </template>
@@ -1,4 +1,4 @@
1
- import type { SectionBlockEditorProps } from "~~/src/runtime/types/blocks";
2
- declare const __VLS_export: import("vue").DefineComponent<SectionBlockEditorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SectionBlockEditorProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
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
- blockId: { type: String, required: true },
6
- isFocused: { type: Boolean, required: false },
7
- level: { type: Number, required: true },
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.blockId);
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"
@@ -1,4 +1,4 @@
1
- import type { SectionBlockEditorProps } from "~~/src/runtime/types/blocks";
2
- declare const __VLS_export: import("vue").DefineComponent<SectionBlockEditorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SectionBlockEditorProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
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 BaseContentBlock {
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 SectionContentBlock extends BaseContentBlock {
59
+ export interface SectionBlock extends BaseBlock {
66
60
  type: "SectionBlock";
67
61
  props: SectionBlockProps;
68
62
  }
69
- export interface ParagraphContentBlock extends BaseContentBlock {
63
+ export interface ParagraphContentBlock extends BaseBlock {
70
64
  type: "ParagraphBlock";
71
65
  props: ParagraphBlockProps;
72
66
  }
73
- export interface CalloutContentBlock extends BaseContentBlock {
67
+ export interface CalloutContentBlock extends BaseBlock {
74
68
  type: "CalloutBlock";
75
69
  props: CalloutBlockProps;
76
70
  }
77
- export interface ImageContentBlock extends BaseContentBlock {
71
+ export interface ImageContentBlock extends BaseBlock {
78
72
  type: "ImageBlock";
79
73
  props: ImageBlockProps;
80
74
  }
81
- export interface UnorderedListContentBlock extends BaseContentBlock {
75
+ export interface UnorderedListContentBlock extends BaseBlock {
82
76
  type: "UnorderedListBlock";
83
77
  props: UnorderedListBlockProps;
84
78
  }
85
- export interface CardBlockContent extends BaseContentBlock {
79
+ export interface CardBlockContent extends BaseBlock {
86
80
  type: "CardBlock";
87
81
  props: CardBlockProps;
88
82
  }
89
- export interface CollapsibleCardContentBlock extends BaseContentBlock {
83
+ export interface CollapsibleCardContentBlock extends BaseBlock {
90
84
  type: "CollapsibleCardBlock";
91
85
  props: CollapsibleCardBlockProps;
92
86
  }
93
- export interface QuoteContentBlock extends BaseContentBlock {
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 = SectionContentBlock | ParagraphContentBlock | CalloutContentBlock | ImageContentBlock | QuoteContentBlock | UnorderedListContentBlock | CardBlockContent | CollapsibleCardContentBlock;
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rimelight-components",
3
3
  "description": "A component library by Rimelight Entertainment.",
4
- "version": "2.0.40",
4
+ "version": "2.0.41",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",