rimelight-components 2.1.99 → 2.1.100
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 -1
- package/dist/runtime/utils/page.js +10 -4
- package/dist/runtime/utils/page.mjs +10 -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.1.
|
|
7
|
+
const version = "2.1.100";
|
|
8
8
|
const homepage = "https://rimelight.com/tools/rimelight-components";
|
|
9
9
|
|
|
10
10
|
const defaultOptions = {
|
|
@@ -82,12 +82,18 @@ export function syncPageWithDefinition(page, definition) {
|
|
|
82
82
|
return page;
|
|
83
83
|
}
|
|
84
84
|
export function convertVersionToPage(version) {
|
|
85
|
+
const blocks = version.content?.blocks || version.blocks || [];
|
|
86
|
+
const properties = version.content?.properties || version.properties;
|
|
85
87
|
return {
|
|
86
88
|
...version,
|
|
87
|
-
|
|
89
|
+
// Use the pageId if available as this is a version OF a page,
|
|
90
|
+
// but fall back to id if pageId is missing (e.g. if type is just BasePage)
|
|
91
|
+
// However, version.id is the version's ID. version.pageId is the page's ID.
|
|
92
|
+
id: version.pageId || version.id,
|
|
88
93
|
type: version.type,
|
|
89
|
-
blocks:
|
|
90
|
-
|
|
91
|
-
|
|
94
|
+
blocks: JSON.parse(JSON.stringify(blocks)),
|
|
95
|
+
// Deep copy to avoid reference issues
|
|
96
|
+
properties: properties ? JSON.parse(JSON.stringify(properties)) : {},
|
|
97
|
+
authorsIds: version.authorsIds || []
|
|
92
98
|
};
|
|
93
99
|
}
|
|
@@ -82,12 +82,18 @@ export function syncPageWithDefinition(page, definition) {
|
|
|
82
82
|
return page;
|
|
83
83
|
}
|
|
84
84
|
export function convertVersionToPage(version) {
|
|
85
|
+
const blocks = version.content?.blocks || version.blocks || [];
|
|
86
|
+
const properties = version.content?.properties || version.properties;
|
|
85
87
|
return {
|
|
86
88
|
...version,
|
|
87
|
-
|
|
89
|
+
// Use the pageId if available as this is a version OF a page,
|
|
90
|
+
// but fall back to id if pageId is missing (e.g. if type is just BasePage)
|
|
91
|
+
// However, version.id is the version's ID. version.pageId is the page's ID.
|
|
92
|
+
id: version.pageId || version.id,
|
|
88
93
|
type: version.type,
|
|
89
|
-
blocks:
|
|
90
|
-
|
|
91
|
-
|
|
94
|
+
blocks: JSON.parse(JSON.stringify(blocks)),
|
|
95
|
+
// Deep copy to avoid reference issues
|
|
96
|
+
properties: properties ? JSON.parse(JSON.stringify(properties)) : {},
|
|
97
|
+
authorsIds: version.authorsIds || []
|
|
92
98
|
};
|
|
93
99
|
}
|