@uniweb/core 1.6.6 → 1.6.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniweb/core",
3
- "version": "1.6.6",
3
+ "version": "1.6.7",
4
4
  "description": "Core classes for the Uniweb platform - Uniweb, Website, Page, Block",
5
5
  "type": "module",
6
6
  "exports": {
@@ -54,7 +54,7 @@
54
54
  },
55
55
  "dependencies": {
56
56
  "@uniweb/semantic-parser": "~1.13.2",
57
- "@uniweb/theming": "~1.3.0"
57
+ "@uniweb/theming": "~1.3.1"
58
58
  },
59
59
  "scripts": {
60
60
  "test": "vitest run"
package/src/block.js CHANGED
@@ -95,7 +95,8 @@ export default class Block {
95
95
  const blockConfig = blockData.params || blockData.config || {}
96
96
 
97
97
  // ⭐ THE SECTION'S OWN SETTINGS — the names framework reserves in its params
98
- // (`@uniweb/schemas/section`): `theme`, `background`, `grid`, `vars`, `fetch`, `sticky`.
98
+ // (`@uniweb/schemas/section`): `theme`, `background`, `grid`, `vars`, `fetch`, `sticky`,
99
+ // `underHeader`.
99
100
  // Framework applies each — the runtime paints the background and the color context around
100
101
  // the component and makes sticky the box that can stick, the page stylesheet applies the
101
102
  // section's theme and its component's variables, kit's `ChildGrid` lays out the child
package/src/website.js CHANGED
@@ -717,11 +717,21 @@ export default class Website {
717
717
  }
718
718
 
719
719
  /**
720
- * Set active page by route
721
- * @param {string} route
720
+ * Make a page the active one: the page on screen, which whatever adapts to the page reads — a
721
+ * header's next block, the language switcher, page state, a contents rail. A renderer hands in
722
+ * the Page it renders; a route is looked up.
723
+ *
724
+ * ⭐ By the Page, where the caller holds it. The site's not-found page has no route of its own
725
+ * (a parametric page can match `/404`), and a parametric page whose records are not held yet is
726
+ * made anew by each lookup, so a route could name another Page than the one rendered. ⛔ Until
727
+ * 2026-11-06 both renderers set it by route: the not-found page rendered with another page
728
+ * active, and a header read that page's opening section while the runtime laid the header over
729
+ * this one's.
730
+ *
731
+ * @param {Page|string} pageOrRoute
722
732
  */
723
- setActivePage(route) {
724
- const page = this.getPage(route)
733
+ setActivePage(pageOrRoute) {
734
+ const page = pageOrRoute instanceof Page ? pageOrRoute : this.getPage(pageOrRoute)
725
735
  if (page) {
726
736
  this.activePage = page
727
737
  }