rimelight-components 2.0.54 → 2.0.55
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 -2
- package/dist/runtime/utils/page.d.ts +1 -2
- package/dist/runtime/utils/page.js +4 -16
- package/package.json +1 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { basename } from 'node:path';
|
|
|
5
5
|
export * from '../dist/runtime/types/index.js';
|
|
6
6
|
|
|
7
7
|
const name = "rimelight-components";
|
|
8
|
-
const version = "2.0.
|
|
8
|
+
const version = "2.0.55";
|
|
9
9
|
const homepage = "https://rimelight.com/tools/rimelight-components";
|
|
10
10
|
|
|
11
11
|
const defaultOptions = {
|
|
@@ -208,7 +208,6 @@ const module$1 = defineNuxtModule().with({
|
|
|
208
208
|
});
|
|
209
209
|
addImportsDir(resolve("./runtime/composables"));
|
|
210
210
|
addImportsDir(resolve("./runtime/utils"));
|
|
211
|
-
nuxt.options.alias["#rimelight"] = resolve("./runtime");
|
|
212
211
|
const blockRendererFiles = readdirSync(
|
|
213
212
|
resolve("./runtime/components/blocks/renderer")
|
|
214
213
|
).filter((name2) => name2.endsWith(".vue"));
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { Page
|
|
2
|
-
export declare function createPage(type: PageType, slug?: string): Page;
|
|
1
|
+
import type { Page } from "../types/pages.js";
|
|
3
2
|
/**
|
|
4
3
|
* Ensures an existing page has all the blocks currently defined in its template.
|
|
5
4
|
* Matches based on SectionBlock titles.
|
|
@@ -1,20 +1,8 @@
|
|
|
1
1
|
import { PAGE_TEMPLATES } from "../types/pageTemplates.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const blocks = templateFn ? templateFn() : [];
|
|
7
|
-
return {
|
|
8
|
-
id: uuidv7(),
|
|
9
|
-
slug,
|
|
10
|
-
type,
|
|
11
|
-
tags: [],
|
|
12
|
-
properties: {},
|
|
13
|
-
blocks,
|
|
14
|
-
createdAt: now,
|
|
15
|
-
updatedAt: now
|
|
16
|
-
};
|
|
17
|
-
}
|
|
2
|
+
const getLocalizedContent = (field, currentLocale) => {
|
|
3
|
+
if (!field) return "";
|
|
4
|
+
return field[currentLocale] || field["en"] || "";
|
|
5
|
+
};
|
|
18
6
|
export function syncTemplateBlocks(page) {
|
|
19
7
|
const templateFn = PAGE_TEMPLATES[page.type];
|
|
20
8
|
if (!templateFn) return page;
|