@uniweb/build 0.6.6 → 0.6.8

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/prerender.js +16 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniweb/build",
3
- "version": "0.6.6",
3
+ "version": "0.6.8",
4
4
  "description": "Build tooling for the Uniweb Component Web Platform",
5
5
  "type": "module",
6
6
  "exports": {
@@ -51,7 +51,7 @@
51
51
  },
52
52
  "optionalDependencies": {
53
53
  "@uniweb/schemas": "0.2.1",
54
- "@uniweb/runtime": "0.5.15",
54
+ "@uniweb/runtime": "0.5.16",
55
55
  "@uniweb/content-reader": "1.1.2"
56
56
  },
57
57
  "peerDependencies": {
package/src/prerender.js CHANGED
@@ -502,6 +502,22 @@ function renderBlock(block) {
502
502
  ...block.properties,
503
503
  }
504
504
 
505
+ // Resolve inherited entity data (mirrors BlockRenderer.jsx)
506
+ // EntityStore walks page/site hierarchy to find data matching meta.inheritData
507
+ const entityStore = block.website?.entityStore
508
+ if (entityStore) {
509
+ const resolved = entityStore.resolve(block, meta)
510
+ if (resolved.status === 'ready' && resolved.data) {
511
+ const merged = { ...content.data }
512
+ for (const key of Object.keys(resolved.data)) {
513
+ if (merged[key] === undefined) {
514
+ merged[key] = resolved.data[key]
515
+ }
516
+ }
517
+ content.data = merged
518
+ }
519
+ }
520
+
505
521
  // Background handling (mirrors BlockRenderer.jsx)
506
522
  const { background, ...wrapperProps } = getWrapperProps(block)
507
523