rimelight-components 2.0.32 → 2.0.34
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 +13 -5
- 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.34";
|
|
8
8
|
const homepage = "https://rimelight.com/tools/rimelight-components";
|
|
9
9
|
|
|
10
10
|
const defaultOptions = {
|
|
@@ -55,7 +55,8 @@ function addBlockMapTemplates(blockNames) {
|
|
|
55
55
|
getContents: () => {
|
|
56
56
|
let content = "export const BLOCK_RENDERER_COMPONENT_MAP = {\n";
|
|
57
57
|
blockNames.forEach((name) => {
|
|
58
|
-
const
|
|
58
|
+
const fullComponentName = `${name}Renderer`;
|
|
59
|
+
const componentPath = `rimelight-components/components/blocks/renderer/${fullComponentName}.vue`;
|
|
59
60
|
content += ` '${name}': () => import('${componentPath}'),
|
|
60
61
|
`;
|
|
61
62
|
});
|
|
@@ -91,7 +92,8 @@ function addEditorBlockMapTemplates(blockNames) {
|
|
|
91
92
|
getContents: () => {
|
|
92
93
|
let content = "export const BLOCK_EDITOR_COMPONENT_MAP = {\n";
|
|
93
94
|
blockNames.forEach((name) => {
|
|
94
|
-
const
|
|
95
|
+
const fullComponentName = `${name}Editor`;
|
|
96
|
+
const componentPath = `rimelight-components/components/blocks/editor/${fullComponentName}.vue`;
|
|
95
97
|
content += ` '${name}': () => import('${componentPath}'),
|
|
96
98
|
`;
|
|
97
99
|
});
|
|
@@ -207,13 +209,19 @@ const module$1 = defineNuxtModule().with({
|
|
|
207
209
|
const blockRendererFiles = readdirSync(
|
|
208
210
|
resolve("./runtime/components/blocks/renderer")
|
|
209
211
|
).filter((name2) => name2.endsWith(".vue"));
|
|
210
|
-
const blockRendererNames = blockRendererFiles.map((file) =>
|
|
212
|
+
const blockRendererNames = blockRendererFiles.map((file) => {
|
|
213
|
+
const baseName = basename(file, ".vue");
|
|
214
|
+
return baseName.replace(/Renderer$/, "");
|
|
215
|
+
});
|
|
211
216
|
const blockRendererTemplate = addBlockMapTemplates(blockRendererNames);
|
|
212
217
|
nuxt.options.alias["#build/rimelight-blocks-renderer-map"] = blockRendererTemplate.dst;
|
|
213
218
|
const blockEditorFiles = readdirSync(
|
|
214
219
|
resolve("./runtime/components/blocks/editor")
|
|
215
220
|
).filter((name2) => name2.endsWith(".vue"));
|
|
216
|
-
const blockEditorNames = blockEditorFiles.map((file) =>
|
|
221
|
+
const blockEditorNames = blockEditorFiles.map((file) => {
|
|
222
|
+
const baseName = basename(file, ".vue");
|
|
223
|
+
return baseName.replace(/Editor$/, "");
|
|
224
|
+
});
|
|
217
225
|
const blockEditorTemplate = addEditorBlockMapTemplates(blockEditorNames);
|
|
218
226
|
nuxt.options.alias["#build/rimelight-blocks-editor-map"] = blockEditorTemplate.dst;
|
|
219
227
|
}
|