uniweb 0.79.1 → 0.79.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": "0.79.1",
3
+ "version": "0.79.2",
4
4
  "description": "Create structured Vite + React sites with content/code separation",
5
5
  "type": "module",
6
6
  "bin": {
@@ -41,17 +41,17 @@
41
41
  "js-yaml": "^4.1.0",
42
42
  "prompts": "^2.4.2",
43
43
  "tar": "^7.0.0",
44
- "@uniweb/kit": "^0.19.11",
45
- "@uniweb/schemas": "^0.9.2",
46
44
  "@uniweb/core": "^0.35.0",
45
+ "@uniweb/schemas": "^0.9.3",
46
+ "@uniweb/kit": "^0.19.11",
47
47
  "@uniweb/runtime": "^0.28.3",
48
48
  "@uniweb/content-writer": "^0.3.4",
49
49
  "@uniweb/semantic-parser": "^1.4.1"
50
50
  },
51
51
  "peerDependencies": {
52
+ "@uniweb/build": "^0.73.2",
52
53
  "@uniweb/content-reader": "^1.2.7",
53
- "@uniweb/semantic-parser": "^1.4.1",
54
- "@uniweb/build": "^0.73.1"
54
+ "@uniweb/semantic-parser": "^1.4.1"
55
55
  },
56
56
  "peerDependenciesMeta": {
57
57
  "@uniweb/build": {
@@ -1041,9 +1041,17 @@ function MyComponent({ content, params, block }) {
1041
1041
  }
1042
1042
  ```
1043
1043
 
1044
- Frontmatter becomes `params`, minus the keys the framework takes for itself: `type`, `id`, `hidden`, `query`, `fetch` (a `data:` key is refused — it was `query:`'s old name; `preset:` and `input:` are ignored with a warning). `props:` is the one that isn't dropped but merged *into* params.
1044
+ **Frontmatter becomes `params` — except the names framework keeps for itself.** Every section can be given these, whatever its type, and none of them reaches your component as a param. So **never declare one in `meta.js` `params:`** — a component that does never receives what an author writes.
1045
1045
 
1046
- **The section's own settings are not params either.** `theme`, `background`, `grid` and `vars` are framework's: it applies them — the color context and the background around your component, the section's theme and your component's CSS variables in the page stylesheet, the child layout through `ChildGrid` — so your component never receives them in `params`, and the build warns on a param declared with one of those names. When a component needs one for its own logic, it reads it from `block`: `useColorContext(block)` for the context (a light vs. dark logo, say), `<SectionBackground block={block} />` to draw the background itself, `<ChildGrid from={block} />` for the grid. Every other key is a param, declared or not; components ignore the ones they don't use.
1046
+ | in a section's frontmatter | what it is | a component reads it from |
1047
+ |---|---|---|
1048
+ | `type`, `id`, `hidden` | the section itself — its section type, its id, and a draft (`hidden: true`: left out of a published build, kept by `uniweb dev`) | — |
1049
+ | `query`, `fetch` | the section's data | `content.data`, under the keys its `meta.js` `data:` declares |
1050
+ | `theme`, `background`, `grid`, `vars` | the section's settings, which framework applies — the color context and the background around your component, the section's theme and your component's CSS variables in the page stylesheet, the child layout | `block`, when the component needs one for its own logic: `useColorContext(block)` for the context (a light vs. dark logo, say), `<SectionBackground block={block} />` to draw the background itself, `<ChildGrid from={block} />` for the grid |
1051
+ | `props` | params written as one map | `params` — its keys are merged in, one by one |
1052
+ | `data`, `preset`, `input` | nothing: `data:` is refused (it was `query:`'s old name); `preset:` and `input:` are ignored with a warning | — |
1053
+
1054
+ The build warns when `params:` declares any of them. A preset may still set `theme` or `background` — a preset's params are written into the section's frontmatter when an author starts a section from it, so `dark: { label: 'Dark', params: { theme: 'dark' } }` is a dark section. Every other key is a param, declared or not; components ignore the ones they don't use.
1047
1055
 
1048
1056
  ### Rendering content with Kit
1049
1057
 
@@ -2415,7 +2423,7 @@ For cases the factory doesn't cover, write handlers directly using `Loom`, `inst
2415
2423
 
2416
2424
  > **`instantiateContent` resolves `{placeholders}` in text nodes only** — not in link `href`s or other node/mark attributes. So `[{email}](mailto:{email})` fills the visible label but leaves the `mailto:` URL literal. For dynamic URLs, emit the value as plain text and let the component linkify it, or build the href in the handler yourself.
2417
2425
 
2418
- **Reserved frontmatter:** `source` and `where` are convention-level reserved fields — they flow to both `block.properties` (for handler access) and `params` (visible to components), consistent with `background` and `theme`. Components can ignore them. List them in `meta.js` params with descriptions so the editor and schema recognize them.
2426
+ **`source` and `where` are ordinary params** that the Loom handler reads — they reach both `block.properties` (for handler access) and `params` (visible to components). Components can ignore them. List them in `meta.js` params with descriptions so the editor and schema recognize them. (Unlike `theme` and `background`, which are the section's own settings and never reach `params` — see the table under *Frontmatter becomes `params`*.)
2419
2427
  <!-- /template:loom -->
2420
2428
 
2421
2429
  ---
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "generatedAt": "2026-09-28T21:05:39.664Z",
3
+ "generatedAt": "2026-09-28T23:00:27.056Z",
4
4
  "packages": {
5
5
  "@uniweb/api": {
6
6
  "version": "0.6.8",
@@ -10,7 +10,7 @@
10
10
  ]
11
11
  },
12
12
  "@uniweb/build": {
13
- "version": "0.73.1",
13
+ "version": "0.73.2",
14
14
  "path": "framework/build",
15
15
  "deps": [
16
16
  "@uniweb/content-reader",
@@ -97,7 +97,7 @@
97
97
  "deps": []
98
98
  },
99
99
  "@uniweb/schemas": {
100
- "version": "0.9.2",
100
+ "version": "0.9.3",
101
101
  "path": "framework/schemas",
102
102
  "deps": []
103
103
  },
@@ -14,7 +14,16 @@
14
14
  "#components/*": "./components/*",
15
15
  "#utils/*": "./utils/*"
16
16
  },
17
- "files": ["dist", "sections", "components", "layouts", "utils", "main.js", "styles.css", "_entry.generated.js"],
17
+ "files": [
18
+ "dist",
19
+ "sections",
20
+ "components",
21
+ "layouts",
22
+ "utils",
23
+ "main.js",
24
+ "styles.css",
25
+ "_entry.generated.js"
26
+ ],
18
27
  "scripts": {
19
28
  "dev": "vite",
20
29
  "build": "uniweb build",