rimelight-components 2.0.68 → 2.0.70
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 +12 -3
- package/dist/runtime/components/blocks/editor/ParagraphBlockEditor.d.vue.ts +1 -1
- package/dist/runtime/components/blocks/editor/ParagraphBlockEditor.vue +1 -1
- package/dist/runtime/components/blocks/editor/ParagraphBlockEditor.vue.d.ts +1 -1
- package/dist/runtime/utils/blockMapper.d.ts +0 -13
- package/dist/runtime/utils/blockMapper.js +5 -4
- 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.70";
|
|
8
8
|
const homepage = "https://rimelight.com/tools/rimelight-components";
|
|
9
9
|
|
|
10
10
|
const defaultOptions = {
|
|
@@ -215,7 +215,7 @@ const module$1 = defineNuxtModule().with({
|
|
|
215
215
|
return baseName.replace(/Renderer$/, "");
|
|
216
216
|
});
|
|
217
217
|
const blockRendererTemplate = addBlockMapTemplates(blockRendererNames);
|
|
218
|
-
nuxt.options.alias["#
|
|
218
|
+
nuxt.options.alias["#rimelight-block-renderer-map"] = blockRendererTemplate.dst;
|
|
219
219
|
const blockEditorFiles = readdirSync(
|
|
220
220
|
resolve("./runtime/components/blocks/editor")
|
|
221
221
|
).filter((name2) => name2.endsWith(".vue"));
|
|
@@ -224,7 +224,16 @@ const module$1 = defineNuxtModule().with({
|
|
|
224
224
|
return baseName.replace(/Editor$/, "");
|
|
225
225
|
});
|
|
226
226
|
const blockEditorTemplate = addEditorBlockMapTemplates(blockEditorNames);
|
|
227
|
-
nuxt.options.alias["#
|
|
227
|
+
nuxt.options.alias["#rimelight-block-editor-map"] = blockEditorTemplate.dst;
|
|
228
|
+
nuxt.hook("nitro:config", (nitroConfig) => {
|
|
229
|
+
nitroConfig.alias = nitroConfig.alias || {};
|
|
230
|
+
nitroConfig.alias["#rimelight-block-renderer-map"] = blockRendererTemplate.dst;
|
|
231
|
+
nitroConfig.alias["#rimelight-block-editor-map"] = blockEditorTemplate.dst;
|
|
232
|
+
});
|
|
233
|
+
nuxt.hook("prepare:types", ({ references }) => {
|
|
234
|
+
references.push({ path: blockRendererTemplate.dst });
|
|
235
|
+
references.push({ path: blockEditorTemplate.dst });
|
|
236
|
+
});
|
|
228
237
|
}
|
|
229
238
|
});
|
|
230
239
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { inject, ref, watch, onMounted, nextTick } from "vue";
|
|
3
|
-
import { richTextToHtml, parseHtmlToRichText } from "../../../utils
|
|
3
|
+
import { richTextToHtml, parseHtmlToRichText } from "../../../utils";
|
|
4
4
|
const editorApi = inject("block-editor-api");
|
|
5
5
|
const props = defineProps({
|
|
6
6
|
text: { type: Array, required: true },
|
|
@@ -1,17 +1,4 @@
|
|
|
1
1
|
import { type Component } from "vue";
|
|
2
2
|
import { type BlockType } from "../types";
|
|
3
|
-
/**
|
|
4
|
-
* Maps the block type string from the database to a dynamically imported Vue component.
|
|
5
|
-
*
|
|
6
|
-
* @param type The BlockType string from the content JSON (e.g., 'ParagraphBlock').
|
|
7
|
-
* @returns A lazily loaded Vue component reference, or undefined if not found.
|
|
8
|
-
*/
|
|
9
3
|
export declare const getBlockRendererComponent: (type: BlockType | string) => Component | undefined;
|
|
10
|
-
/**
|
|
11
|
-
* Maps the block type string from the database to a dynamically imported Vue component
|
|
12
|
-
* specifically for the editor view.
|
|
13
|
-
*
|
|
14
|
-
* @param type The BlockType string from the content JSON.
|
|
15
|
-
* @returns A lazily loaded Vue component reference, or undefined if not found.
|
|
16
|
-
*/
|
|
17
4
|
export declare const getBlockEditorComponent: (type: BlockType | string) => Component | undefined;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineAsyncComponent } from "vue";
|
|
2
|
-
import { BLOCK_RENDERER_COMPONENT_MAP } from "#
|
|
3
|
-
import { BLOCK_EDITOR_COMPONENT_MAP } from "#
|
|
2
|
+
import { BLOCK_RENDERER_COMPONENT_MAP } from "#rimelight-block-renderer-map";
|
|
3
|
+
import { BLOCK_EDITOR_COMPONENT_MAP } from "#rimelight-block-editor-map";
|
|
4
4
|
export const getBlockRendererComponent = (type) => {
|
|
5
5
|
const componentImporter = BLOCK_RENDERER_COMPONENT_MAP[type];
|
|
6
6
|
if (!componentImporter) {
|
|
7
7
|
console.warn(
|
|
8
|
-
`[BlockMapper] Block component not found for type: ${type}
|
|
8
|
+
`[BlockMapper] Block component not found for type: ${type}.`
|
|
9
9
|
);
|
|
10
10
|
return void 0;
|
|
11
11
|
}
|
|
@@ -15,10 +15,11 @@ export const getBlockRendererComponent = (type) => {
|
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
17
|
export const getBlockEditorComponent = (type) => {
|
|
18
|
+
if (import.meta.server) return void 0;
|
|
18
19
|
const componentImporter = BLOCK_EDITOR_COMPONENT_MAP[type];
|
|
19
20
|
if (!componentImporter) {
|
|
20
21
|
console.warn(
|
|
21
|
-
`[EditorBlockMapper] Editor block component not found for type: ${type}
|
|
22
|
+
`[EditorBlockMapper] Editor block component not found for type: ${type}.`
|
|
22
23
|
);
|
|
23
24
|
return void 0;
|
|
24
25
|
}
|