uniweb 1.19.0 → 1.19.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",
3
- "version": "1.19.0",
3
+ "version": "1.19.2",
4
4
  "description": "Create structured Vite + React sites with content/code separation",
5
5
  "type": "module",
6
6
  "bin": {
@@ -41,13 +41,13 @@
41
41
  "js-yaml": "^4.1.0",
42
42
  "prompts": "^2.4.2",
43
43
  "tar": "^7.0.0",
44
+ "@uniweb/core": "~1.4.6",
44
45
  "@uniweb/content-writer": "~1.3.0",
45
- "@uniweb/core": "~1.4.5",
46
46
  "@uniweb/schemas": "~1.6.5",
47
47
  "@uniweb/semantic-parser": "~1.13.0"
48
48
  },
49
49
  "peerDependencies": {
50
- "@uniweb/build": "~1.9.0",
50
+ "@uniweb/build": "~1.9.1",
51
51
  "@uniweb/content-reader": "~1.5.6",
52
52
  "@uniweb/semantic-parser": "~1.13.0"
53
53
  },
@@ -660,6 +660,9 @@ background: primary-900 # Palette token (bare n
660
660
  background: # Object form for more control
661
661
  image: { src: /img.jpg, position: center top }
662
662
  overlay: { enabled: true, type: dark, opacity: 0.5 }
663
+
664
+ background:
665
+ video: { src: /videos/hero.mp4, poster: /images/hero.jpg } # the poster shows until the video plays
663
666
  ```
664
667
 
665
668
  Components that render their own background declare `background: 'self'` in `meta.js`, and the runtime then draws none; to draw the author's background themselves they render kit's `<SectionBackground block={block} />`.
@@ -1874,7 +1877,7 @@ const page = website.activePage
1874
1877
  | `block.themeName` | `"light"`, `"medium"`, `"dark"` |
1875
1878
  | `block.stableId` / `block.key` | Stable ID from filename or `id:` / unique key across pages — use as React key |
1876
1879
  | `block.path` | Page route this block belongs to |
1877
- | `block.dataLoading` | True while declared data is still resolving |
1880
+ | `block.dataLoading` | True while declared data is still resolving — also on a pre-rendered page, for data the browser fetches, so the loading state is what that page first shows |
1878
1881
  | `block.dataError` | `{ <key>: message }` when the fetch filling a declared key FAILED, else `null`. A failed key is `null` in `content.data` — never `[]`, which means "no records" |
1879
1882
 
1880
1883
  ```jsx
@@ -1959,7 +1962,7 @@ fetch:
1959
1962
 
1960
1963
  **Lean lists.** A list carries each record's brief, so heavy parts belong in a section of their own — `@std/article`'s body is `body` — and never ride a list. A section that shows them declares its key `whole: true`; elsewhere components fetch the whole record on demand with `useWholeRecord(record, { query })`, which returns it as stored — `full.body.content`. Every file-based record gets its own file, `/data/<name>/<name of the record>.json`. An external query's whole record comes from its `record:` request, below. (`deferred:` is removed — the build stops on it.) The hook is safe to call on any query: when the query has no separate source for one record it returns the record you passed in.
1961
1964
 
1962
- **Component-side fetching.** When a component genuinely needs to fetch on its own (a search box, "load more", a lazy popover), use the kit hooks — `useFetched`, `useCacheEntry`, `useWholeRecord`. They share the framework's cache and dispatcher with declarative fetches; same-key requests dedupe automatically.
1965
+ **Component-side fetching.** When a component genuinely needs to fetch on its own (a search box, "load more", a lazy popover), use the kit hooks — `useFetched`, `useCacheEntry`, `useWholeRecord`. They share the framework's cache and dispatcher with declarative fetches; same-key requests dedupe automatically. On a pre-rendered page a hook's first render finds only what that page's own data holds — a declared key's answer, or its page's or the site's `fetch:`. Anything else is pre-rendered as the hook's loading state and fetched by the browser after it loads, so declare a key (`data:` in `meta.js`) for whatever a page must show without JavaScript.
1963
1966
 
1964
1967
  **Validate before shipping.** `uniweb validate` checks file-based data against your declared schemas — missing required fields, type/enum/format mismatches, nested fields. A violation fails it (`--lax` only reports); it checks every record file in `records/`, and `push` / `publish` refuse the same findings before sending anything. Distinct from `uniweb doctor` (project structure): `validate` checks your *data* against the schemas you *declared*. External queries (`url:`) are reported as deferred — their data isn't in the project; the value of a `ref`/`options` field is not checked against the entity it names.
1965
1968
 
@@ -588,6 +588,9 @@ function resolveFoundationDir(projectDir, siteConfig) {
588
588
  * (dist/assets/), or static-host extras (sitemap, robots, search-index,
589
589
  * _pages/*) — `publish` reads none of them. ⛔ *It processed media into
590
590
  * dist/assets/ — WebP copies, video posters, PDF thumbnails — until 2026-10-19.*
591
+ * ⚠️ Except each extra language's `dist/<lang>/search-index.json`: the
592
+ * `buildLocalizedContent` step below writes one on this lane too, and nothing
593
+ * reads it (measured 2026-10-25).
591
594
  *
592
595
  * The `buildLocalizedContent` step is the same call bundle mode makes
593
596
  * post-vite, so multi-locale sites get identical per-locale outputs in
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "generatedAt": "2026-10-25T15:30:53.604Z",
3
+ "generatedAt": "2026-10-25T19:16:49.028Z",
4
4
  "packages": {
5
5
  "@uniweb/api": {
6
6
  "version": "1.6.4"
7
7
  },
8
8
  "@uniweb/build": {
9
- "version": "1.9.0"
9
+ "version": "1.9.1"
10
10
  },
11
11
  "@uniweb/content-reader": {
12
12
  "version": "1.5.6"
@@ -15,7 +15,7 @@
15
15
  "version": "1.3.0"
16
16
  },
17
17
  "@uniweb/core": {
18
- "version": "1.4.5"
18
+ "version": "1.4.6"
19
19
  },
20
20
  "@uniweb/frame-bridge": {
21
21
  "version": "1.0.2"
@@ -36,7 +36,7 @@
36
36
  "version": "1.2.0"
37
37
  },
38
38
  "@uniweb/runtime": {
39
- "version": "1.2.0"
39
+ "version": "1.2.2"
40
40
  },
41
41
  "@uniweb/scene": {
42
42
  "version": "1.0.1"