@uniweb/core 0.32.1 → 0.32.2

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 +1 -1
  2. package/src/block.js +16 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniweb/core",
3
- "version": "0.32.1",
3
+ "version": "0.32.2",
4
4
  "description": "Core classes for the Uniweb platform - Uniweb, Website, Page, Block",
5
5
  "type": "module",
6
6
  "exports": {
package/src/block.js CHANGED
@@ -105,6 +105,16 @@ export default class Block {
105
105
  this.properties = { ...this.properties, theme: this.themeName }
106
106
  }
107
107
 
108
+ // `grid` rides in the section's params, as every key the author writes does — so it
109
+ // travels and round-trips with no field of its own — but the NAME is framework's:
110
+ // it is lifted to `block.grid` below and a component never receives it as a param.
111
+ let gridParam = null
112
+ if (Object.hasOwn(this.properties, 'grid')) {
113
+ const { grid, ...rest } = this.properties
114
+ gridParam = grid
115
+ this.properties = rest
116
+ }
117
+
108
118
  // Extract background from params into standardOptions
109
119
  // Content authors set background in section frontmatter; the runtime
110
120
  // reads it from standardOptions to render the Background component.
@@ -175,8 +185,12 @@ export default class Block {
175
185
  // `grid:` section key [Diego, 2026-09-27]: `3` (equal columns) or `'40/60'`
176
186
  // (relative widths). Carried as written; kit's `ChildGrid` lays the children out
177
187
  // from it (`@uniweb/schemas/grid`). A section key, never a param: a component
178
- // declares the layouts it offers in `meta.js` `children.grid`.
179
- this.grid = blockData.grid ?? null
188
+ // declares the layouts it offers in `meta.js` `children.grid`, and does not see
189
+ // `grid` among its params (above).
190
+ // ⭐ It is read from the params, where it is stored and synced — no field of its
191
+ // own, so no store has to declare one. `blockData.grid` is `@uniweb/build@0.67.0`'s
192
+ // spelling, which carried it beside the params for a few hours on 2026-09-27.
193
+ this.grid = gridParam ?? blockData.grid ?? null
180
194
 
181
195
  // Data loading state — set by BlockRenderer when a runtime fetch is in progress
182
196
  // Components check this to show loading UI (spinners, skeletons)