@uniweb/core 1.2.5 → 1.3.1

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.2.5",
3
+ "version": "1.3.1",
4
4
  "description": "Core classes for the Uniweb platform - Uniweb, Website, Page, Block",
5
5
  "type": "module",
6
6
  "exports": {
@@ -49,7 +49,7 @@
49
49
  "vitest": "^4.1.7"
50
50
  },
51
51
  "dependencies": {
52
- "@uniweb/semantic-parser": "~1.11.0",
52
+ "@uniweb/semantic-parser": "~1.12.2",
53
53
  "@uniweb/theming": "~1.2.0"
54
54
  },
55
55
  "scripts": {
@@ -35,8 +35,7 @@ export default class EntityStore {
35
35
  /**
36
36
  * The fetches that reach a block — `fetchLevels` (`./page-data.js`), the one rule, read
37
37
  * off this block's graph. ⛔ Do not spell the levels out here: every lane that has
38
- * needed this answer has written its own list, and each list has drifted
39
- * (`kb/framework/plans/what-a-page-needs.md`).
38
+ * needed this answer has written its own list, and each list has drifted.
40
39
  */
41
40
  _levels(block, route = this._route(block)) {
42
41
  const page = block.page
package/src/page-data.js CHANGED
@@ -22,9 +22,8 @@
22
22
  * dispatches. They differ in where an answer comes from and in nothing else, so a render cannot
23
23
  * look for something its fetch never asked for.
24
24
  *
25
- * *The copies this replaces, and what each of them got wrong:*
26
- * `kb/framework/plans/what-a-page-needs.md`. The import boundary that stops the next one:
27
- * `framework/_contracts/page-data-rule-boundary.test.js`.
25
+ * It replaces several copies of this rule, each of which got something wrong, and a
26
+ * contract test holds the import boundary that stops the next one.
28
27
  *
29
28
  * @module
30
29
  */
package/src/website.js CHANGED
@@ -798,17 +798,8 @@ export default class Website {
798
798
  * makeHref('/about') // → '/about' (passthrough)
799
799
  */
800
800
  makeHref(href) {
801
- if (!href) return href
802
-
803
- // Support both page: (current) and topic: (legacy) prefixes
804
- let withoutPrefix
805
- if (href.startsWith('page:')) {
806
- withoutPrefix = href.slice(5)
807
- } else if (href.startsWith('topic:')) {
808
- withoutPrefix = href.slice(6)
809
- } else {
810
- return href
811
- }
801
+ if (!href || !href.startsWith('page:')) return href
802
+ const withoutPrefix = href.slice(5)
812
803
 
813
804
  // Parse page reference: page:pageId#sectionId
814
805
  const [pageId, sectionId] = withoutPrefix.split('#')