@uniweb/build 0.52.0 → 0.52.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniweb/build",
3
- "version": "0.52.0",
3
+ "version": "0.52.2",
4
4
  "description": "Build tooling for the Uniweb Component Web Platform",
5
5
  "type": "module",
6
6
  "exports": {
@@ -57,15 +57,15 @@
57
57
  "js-yaml": "^4.1.0",
58
58
  "sharp": "^0.35.3",
59
59
  "yaml": "^2.5.0",
60
- "@uniweb/content-reader": "^1.2.5",
61
- "@uniweb/schemas": "^0.2.13",
62
- "@uniweb/theming": "^0.1.15",
63
- "@uniweb/projections": "^0.7.2",
64
60
  "@uniweb/semantic-parser": "^1.4.0",
61
+ "@uniweb/schemas": "^0.2.14",
62
+ "@uniweb/theming": "^0.1.15",
63
+ "@uniweb/content-reader": "^1.2.5",
64
+ "@uniweb/projections": "^0.7.3",
65
65
  "@uniweb/content-writer": "^0.3.4"
66
66
  },
67
67
  "optionalDependencies": {
68
- "@uniweb/runtime": "^0.26.1"
68
+ "@uniweb/runtime": "^0.26.4"
69
69
  },
70
70
  "peerDependencies": {
71
71
  "vite": "^5.0.0 || ^6.0.0 || ^7.0.0",
@@ -74,7 +74,7 @@
74
74
  "@tailwindcss/vite": "^4.0.0",
75
75
  "@vitejs/plugin-react": "^4.0.0 || ^5.0.0",
76
76
  "vite-plugin-svgr": "^4.0.0",
77
- "@uniweb/core": "^0.29.2"
77
+ "@uniweb/core": "^0.29.4"
78
78
  },
79
79
  "peerDependenciesMeta": {
80
80
  "vite": {
@@ -44,6 +44,23 @@
44
44
  * `submit`, because the framework has no list of permitted names
45
45
  * (`core/src/services.js`).
46
46
  *
47
+ * ## ⛔ THE `tracking` ENTRY IS SLATED FOR REMOVAL — DO NOT EXTEND IT (decided 2026-09-15)
48
+ *
49
+ * ⭐ **Tracking renders nothing.** This field exists because a service with no
50
+ * surface to draw is invisible from outside — a search endpoint with no search
51
+ * box. But the runtime emits `page_view` / `outbound_click` / `section_view` for
52
+ * every foundation alike (`wireTracker`), so a foundation neither supplies nor
53
+ * withholds tracking, and under the three-state rule (*these and only these*)
54
+ * emitting it conditionally **asserts something false about every foundation that
55
+ * does not call these** — not a missing niche capability.
56
+ *
57
+ * ⛔ **So the gap is not a gap, and the obvious fixes are wrong:** `block.track()`
58
+ * (a `Website`-adjacent method in externalized core, invisible here) and
59
+ * `kit/src/hooks/useReadingDepth.js` (a second hook the module rule below never
60
+ * named) both emit custom events and derive nothing. **A matcher for either was
61
+ * considered and rejected.** The rule below and the name `tracking` both go; until
62
+ * they do, this paragraph is why nobody should widen them.
63
+ *
47
64
  * Two gates need help, and only two:
48
65
  *
49
66
  * - **`useTracker`** resolves nothing itself — it calls through to
package/src/prerender.js CHANGED
@@ -24,7 +24,7 @@ import {
24
24
  deriveCacheKey,
25
25
  evaluateQuery,
26
26
  } from '@uniweb/core'
27
- import { routePatternToRegex } from '@uniweb/core/route-match'
27
+ import { recordTitle, routePatternToRegex } from '@uniweb/core/route-match'
28
28
  import { executeFetch, mergeDataIntoContent, toFetchList } from './site/data-fetcher.js'
29
29
  import { shouldSplitContent } from './site/split-content.js'
30
30
  import { FONT_LINKS_MARKER } from './site/head-markers.js'
@@ -458,8 +458,11 @@ export function expandDynamicPages(pages, fetched, onProgress = () => {}, stats
458
458
  paramValue: binding.paramValue,
459
459
  }
460
460
 
461
- // Use item data for page metadata if available
462
- if (item.title) concretePage.title = item.title
461
+ // The record names the page by the rule the SPA and the search index read
462
+ // (`recordTitle`: `title`, `name`, then its handle). ⛔ Until 2026-09-14 this read
463
+ // `title` alone, so a person record's page kept the template's own title.
464
+ const title = recordTitle(item)
465
+ if (title) concretePage.title = title
463
466
  if (item.description || item.excerpt) concretePage.description = item.description || item.excerpt
464
467
 
465
468
  expandedPages.push(concretePage)
package/src/schema.js CHANGED
@@ -464,11 +464,27 @@ function hasEntryFile(dirPath, dirName) {
464
464
  * Create an implicit empty meta for a section type discovered without meta.js
465
465
  */
466
466
  function createImplicitMeta(name) {
467
- return { title: inferTitle(name) }
467
+ return { title: inferTitle(name), titleInferred: true }
468
468
  }
469
469
 
470
470
  /**
471
- * Build a component entry with title inference applied
471
+ * Build a component entry with title inference applied.
472
+ *
473
+ * ⭐ `titleInferred` SAYS THE TITLE IS OURS, NOT THE AUTHOR'S, and without it a
474
+ * consumer cannot tell. We fill `title` from the component name whenever
475
+ * `meta.js` declares none, so `title` is ALWAYS present — which means an editor
476
+ * showing section names has no way to know that `"Hero"` is a string the build
477
+ * invented rather than one a developer chose.
478
+ *
479
+ * ⛔ THAT DIFFERENCE DECIDES WHETHER THE NAME CAN BE TRANSLATED. An authored
480
+ * title is the foundation's own words and must be shown verbatim in every UI
481
+ * language. An inferred one is a placeholder, and a consumer that knows the
482
+ * section's `family` has a better string available — one it can localize. A
483
+ * foundation that never named its Hero would otherwise ship the English
484
+ * `"Hero"` to every author in the world.
485
+ *
486
+ * ⚖️ The build itself reads neither field. This is a statement ABOUT the title,
487
+ * for whoever renders it.
472
488
  */
473
489
  function buildComponentEntry(name, relativePath, meta) {
474
490
  const entry = {
@@ -479,6 +495,7 @@ function buildComponentEntry(name, relativePath, meta) {
479
495
  // Apply title inference if meta has no explicit title
480
496
  if (!entry.title) {
481
497
  entry.title = inferTitle(name)
498
+ entry.titleInferred = true
482
499
  }
483
500
  return entry
484
501
  }