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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rimelight-components",
3
- "version": "2.1.99",
3
+ "version": "2.1.100",
4
4
  "docs": "https://rimelight.com/tools/rimelight-components",
5
5
  "configKey": "rimelightComponents",
6
6
  "compatibility": {
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.99";
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
- id: version.pageId,
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: version.content?.blocks || version.blocks,
90
- properties: version.content?.properties,
91
- authorsIds: version.authorsIds
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
- id: version.pageId,
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: version.content?.blocks || version.blocks,
90
- properties: version.content?.properties,
91
- authorsIds: version.authorsIds
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rimelight-components",
3
- "version": "2.1.99",
3
+ "version": "2.1.100",
4
4
  "description": "A component library by Rimelight Entertainment.",
5
5
  "keywords": [
6
6
  "nuxt",