rimelight-components 2.0.37 → 2.0.39
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 +7 -7
- package/dist/runtime/components/blocks/editor/CalloutBlockEditor.d.vue.ts +4 -0
- package/dist/runtime/components/blocks/editor/CalloutBlockEditor.vue +16 -0
- package/dist/runtime/components/blocks/editor/CalloutBlockEditor.vue.d.ts +4 -0
- package/dist/runtime/utils/blockMapper.d.ts +1 -1
- package/package.json +1 -1
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.39";
|
|
8
8
|
const homepage = "https://rimelight.com/tools/rimelight-components";
|
|
9
9
|
|
|
10
10
|
const defaultOptions = {
|
|
@@ -51,7 +51,7 @@ const defaultOptions = {
|
|
|
51
51
|
|
|
52
52
|
function addBlockMapTemplates(blockNames) {
|
|
53
53
|
const template = addTemplate({
|
|
54
|
-
filename: "rimelight-
|
|
54
|
+
filename: "rimelight-block-renderer-map.mjs",
|
|
55
55
|
getContents: () => {
|
|
56
56
|
let content = "export const BLOCK_RENDERER_COMPONENT_MAP = {\n";
|
|
57
57
|
blockNames.forEach((name) => {
|
|
@@ -66,7 +66,7 @@ function addBlockMapTemplates(blockNames) {
|
|
|
66
66
|
write: true
|
|
67
67
|
});
|
|
68
68
|
addTemplate({
|
|
69
|
-
filename: "rimelight-
|
|
69
|
+
filename: "rimelight-block-renderer-map.d.ts",
|
|
70
70
|
getContents: () => {
|
|
71
71
|
const componentImporterType = '() => Promise<{ default: import("vue").Component }>';
|
|
72
72
|
let content = `// Generated by rimelight-components Nuxt Module
|
|
@@ -88,7 +88,7 @@ function addBlockMapTemplates(blockNames) {
|
|
|
88
88
|
function addEditorBlockMapTemplates(blockNames) {
|
|
89
89
|
const componentImporterType = '() => Promise<{ default: import("vue").Component }>';
|
|
90
90
|
const template = addTemplate({
|
|
91
|
-
filename: "rimelight-editor-
|
|
91
|
+
filename: "rimelight-block-editor-map.mjs",
|
|
92
92
|
getContents: () => {
|
|
93
93
|
let content = "export const BLOCK_EDITOR_COMPONENT_MAP = {\n";
|
|
94
94
|
blockNames.forEach((name) => {
|
|
@@ -103,7 +103,7 @@ function addEditorBlockMapTemplates(blockNames) {
|
|
|
103
103
|
write: true
|
|
104
104
|
});
|
|
105
105
|
addTemplate({
|
|
106
|
-
filename: "rimelight-editor-
|
|
106
|
+
filename: "rimelight-block-editor-map.d.ts",
|
|
107
107
|
getContents: () => {
|
|
108
108
|
let content = `// Generated by rimelight-components Nuxt Module
|
|
109
109
|
`;
|
|
@@ -214,7 +214,7 @@ const module$1 = defineNuxtModule().with({
|
|
|
214
214
|
return baseName.replace(/Renderer$/, "");
|
|
215
215
|
});
|
|
216
216
|
const blockRendererTemplate = addBlockMapTemplates(blockRendererNames);
|
|
217
|
-
nuxt.options.alias["#build/rimelight-
|
|
217
|
+
nuxt.options.alias["#build/rimelight-block-renderer-map"] = blockRendererTemplate.dst;
|
|
218
218
|
const blockEditorFiles = readdirSync(
|
|
219
219
|
resolve("./runtime/components/blocks/editor")
|
|
220
220
|
).filter((name2) => name2.endsWith(".vue"));
|
|
@@ -223,7 +223,7 @@ const module$1 = defineNuxtModule().with({
|
|
|
223
223
|
return baseName.replace(/Editor$/, "");
|
|
224
224
|
});
|
|
225
225
|
const blockEditorTemplate = addEditorBlockMapTemplates(blockEditorNames);
|
|
226
|
-
nuxt.options.alias["#build/rimelight-
|
|
226
|
+
nuxt.options.alias["#build/rimelight-block-editor-map"] = blockEditorTemplate.dst;
|
|
227
227
|
}
|
|
228
228
|
});
|
|
229
229
|
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { CalloutBlockProps } from "~~/src/runtime/types/blocks";
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<CalloutBlockProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CalloutBlockProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
const { variant, children, to, target } = defineProps({
|
|
3
|
+
variant: { type: String, required: true },
|
|
4
|
+
children: { type: Array, required: true },
|
|
5
|
+
to: { type: String, required: false },
|
|
6
|
+
target: { type: String, required: false }
|
|
7
|
+
});
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<div class="p-8 bg-error-500">
|
|
12
|
+
<RCCallout :variant="variant" :to="to" :target="target">
|
|
13
|
+
<RCBlockRenderer :blocks="children" />
|
|
14
|
+
</RCCallout>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { CalloutBlockProps } from "~~/src/runtime/types/blocks";
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<CalloutBlockProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CalloutBlockProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
@@ -11,7 +11,7 @@ export declare const getBlockRendererComponent: (type: BlockType | string) => Co
|
|
|
11
11
|
* Maps the block type string from the database to a dynamically imported Vue component
|
|
12
12
|
* specifically for the editor view.
|
|
13
13
|
*
|
|
14
|
-
* @param type The BlockType string from the content JSON
|
|
14
|
+
* @param type The BlockType string from the content JSON.
|
|
15
15
|
* @returns A lazily loaded Vue component reference, or undefined if not found.
|
|
16
16
|
*/
|
|
17
17
|
export declare const getBlockEditorComponent: (type: BlockType | string) => Component | undefined;
|