uniweb 0.81.3 → 0.82.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 +9 -9
- package/partials/agents.md +5 -6
- package/src/commands/build.js +1 -7
- package/src/framework-index.json +11 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uniweb",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.82.1",
|
|
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/
|
|
45
|
-
"@uniweb/schemas": "^0.
|
|
46
|
-
"@uniweb/runtime": "^0.
|
|
47
|
-
"@uniweb/
|
|
48
|
-
"@uniweb/
|
|
49
|
-
"@uniweb/
|
|
44
|
+
"@uniweb/core": "^0.37.1",
|
|
45
|
+
"@uniweb/schemas": "^0.12.0",
|
|
46
|
+
"@uniweb/runtime": "^0.29.1",
|
|
47
|
+
"@uniweb/semantic-parser": "^1.5.1",
|
|
48
|
+
"@uniweb/kit": "^0.19.17",
|
|
49
|
+
"@uniweb/content-writer": "^0.3.4"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@uniweb/semantic-parser": "^1.5.1",
|
|
53
52
|
"@uniweb/content-reader": "^1.2.8",
|
|
54
|
-
"@uniweb/build": "^0.
|
|
53
|
+
"@uniweb/build": "^0.76.1",
|
|
54
|
+
"@uniweb/semantic-parser": "^1.5.1"
|
|
55
55
|
},
|
|
56
56
|
"peerDependenciesMeta": {
|
|
57
57
|
"@uniweb/build": {
|
package/partials/agents.md
CHANGED
|
@@ -892,9 +892,8 @@ Item frontmatter conventionally uses `title`, `date`, `tags`, `image`, `descript
|
|
|
892
892
|
---
|
|
893
893
|
brief:
|
|
894
894
|
title: Hello
|
|
895
|
-
date: 2026-05-01
|
|
896
|
-
body:
|
|
897
895
|
author: Ada
|
|
896
|
+
date: 2026-05-01
|
|
898
897
|
---
|
|
899
898
|
|
|
900
899
|
The body — the value of the schema's content field, `body.content`.
|
|
@@ -1762,7 +1761,7 @@ export default function DocsLayout({ header, body, footer, left, right, params }
|
|
|
1762
1761
|
|
|
1763
1762
|
Layouts are full components with their own `params` in `meta.js`, not just structural wrappers — a header height or sidebar width is a layout param.
|
|
1764
1763
|
|
|
1765
|
-
**Layout `meta.js`** declares areas and optional scroll behavior: `{ areas: ['header', 'footer', 'left'], scroll: 'self' }`. Area names are arbitrary. `scroll` controls scroll restoration: unset = runtime manages `window` (default), `'self'` = the layout scrolls itself, or a CSS selector (`'main'`) = runtime manages that element.
|
|
1764
|
+
**Layout `meta.js`** declares areas and optional scroll behavior: `{ areas: ['header', 'footer', 'left'], scroll: 'self' }`. Area names are arbitrary. `areas` tells an editor what to offer; a page renders the areas its site's `layout/` folder fills. `scroll` controls scroll restoration: unset = runtime manages `window` (default), `'self'` = the layout scrolls itself, or a CSS selector (`'main'`) = runtime manages that element.
|
|
1766
1765
|
|
|
1767
1766
|
Two optional keys tune how areas behave across a navigation. `transitions` renames or opts regions out of per-area view transitions (`{ left: null }`, or `false` for the whole layout). `layers` sets which area paints on top — every area is stacked above the body by default, so a fixed header works without declaring anything, but areas are equal to each other, so a layout whose chrome overlaps says which wins: `layers: { header: 2, left: 1 }`. Both take an object to override per region, or `false` to opt out. **A `z-index` inside an area cannot lift it past another area** — each area is its own stacking context — so reach for `layers` rather than a bigger number, and for `<Overlay>` when a modal needs to escape the area entirely.
|
|
1768
1767
|
|
|
@@ -1890,7 +1889,7 @@ function Article({ content, block }) {
|
|
|
1890
1889
|
|
|
1891
1890
|
When a record genuinely needs to be a single object, that's the foundation's job — read `[0]`, or reshape once with a `handlers.data` hook.
|
|
1892
1891
|
|
|
1893
|
-
**Declaring keys and schemas.** `meta.js` declares each `content.data` key the component receives, with its schema, in a single `data:` field — there is no separate `schemas:` key. Each value is a **named ref**, an **inline field map**, an **inline rich-form** (`{ fields: [...] }`, an editor form), or `{}` for a key with no schema (an external API's records). Refs resolve on disk at build time, never fetched: `@/name` (this foundation's `schemas/`), `@std/name` (shared standards, from `@uniweb/schemas`), `@org/name` (an org's own `@org/schemas` package). A schema
|
|
1892
|
+
**Declaring keys and schemas.** `meta.js` declares each `content.data` key the component receives, with its schema, in a single `data:` field — there is no separate `schemas:` key. Each value is a **named ref**, an **inline field map**, an **inline rich-form** (`{ fields: [...] }`, an editor form), or `{}` for a key with no schema (an external API's records). Refs resolve on disk at build time, never fetched: `@/name` (this foundation's `schemas/`), `@std/name` (shared standards, from `@uniweb/schemas`), `@org/name` (an org's own `@org/schemas` package). A schema drives the editor, checks your data (`uniweb validate`), and lets a fetch of another name fill the key — it fills no field: **a record reaches the component as it is**, so a field it lacks is absent, and what that renders as is your component's choice (`record.status ?? 'published'`). **A named schema declares no `default:`** — the build refuses one; a `default:` belongs only in an inline field map or form, where an editor pre-fills from it. ⛔ **Delivery was default-on until this change** — every fetched key reached every component, and `data:` was a hint; a component that reads a key it does not declare now receives nothing under it. `data: false` declares nothing, like no `data:`. Keys a foundation's handlers (or a shared hook) read go in `main.js` `data:`, in the same form, and every section receives them.
|
|
1894
1893
|
|
|
1895
1894
|
```js
|
|
1896
1895
|
// meta.js
|
|
@@ -1898,7 +1897,7 @@ export default {
|
|
|
1898
1897
|
data: {
|
|
1899
1898
|
articles: '@/article', // named ref (this foundation)
|
|
1900
1899
|
authors: '@std/person', // named ref (shared standard)
|
|
1901
|
-
pricing: { tier: { type: 'string'
|
|
1900
|
+
pricing: { tier: { type: 'string' } }, // inline field map
|
|
1902
1901
|
},
|
|
1903
1902
|
}
|
|
1904
1903
|
```
|
|
@@ -2415,7 +2414,7 @@ Content handlers are a transform layer between data assembly and the component,
|
|
|
2415
2414
|
| `content` | After the data handler | `(data, block)` | ProseMirror document, or null | Transform raw content (Loom instantiation, template expansion) |
|
|
2416
2415
|
| `props` | After parsing, defaults, and guarantees | `(content, params, block)` | `{ content, params }`, or null | Post-process the final shape before the component sees it |
|
|
2417
2416
|
|
|
2418
|
-
The `content` handler receives `block.parsedContent.data` — the section's declared keys, its foundation's `main.js` `data:` included, so **declare there every key a handler reads** — and reads raw ProseMirror from `block.rawContent`, returning a new ProseMirror document that the framework re-parses through the semantic parser. Returning `null` — or the same reference as `block.rawContent` — signals no change.
|
|
2417
|
+
The `content` handler receives `block.parsedContent.data` — the section's declared keys, its foundation's `main.js` `data:` included, so **declare there every key a handler reads** — and reads raw ProseMirror from `block.rawContent`, returning a new ProseMirror document that the framework re-parses through the semantic parser. Returning `null` — or the same reference as `block.rawContent` — signals no change. Anything that is not a document is ignored, with a warning once per handler: the first argument is the section's *data*, so a pass-through `(x) => x` returns the data, not the content.
|
|
2419
2418
|
|
|
2420
2419
|
> **`block.rawContent` may or may not be wrapped.** Unwrap it defensively — `const doc = block.rawContent?.doc ?? block.rawContent` — before passing it to `instantiateContent` / `instantiateRepeated`. This is the first thing a hand-written handler gets wrong.
|
|
2421
2420
|
|
package/src/commands/build.js
CHANGED
|
@@ -249,10 +249,7 @@ async function buildFoundation(projectDir, options = {}) {
|
|
|
249
249
|
log('')
|
|
250
250
|
log(`${colors.bright}Share with clients:${colors.reset}`)
|
|
251
251
|
log(
|
|
252
|
-
` ${colors.bright}uniweb
|
|
253
|
-
)
|
|
254
|
-
log(
|
|
255
|
-
` ${colors.bright}uniweb handoff <email>${colors.reset} Hand off a site to a client`
|
|
252
|
+
` ${colors.bright}uniweb register${colors.reset} Release your foundation to the catalog (alias: uniweb release)`
|
|
256
253
|
)
|
|
257
254
|
}
|
|
258
255
|
|
|
@@ -1026,9 +1023,6 @@ function showNextSteps(hasFoundations, hasSites) {
|
|
|
1026
1023
|
log(
|
|
1027
1024
|
` ${colors.bright}uniweb register${colors.reset} Release your foundation to the catalog (alias: uniweb release)`
|
|
1028
1025
|
)
|
|
1029
|
-
log(
|
|
1030
|
-
` ${colors.bright}uniweb handoff <email>${colors.reset} Hand off a site to a client`
|
|
1031
|
-
)
|
|
1032
1026
|
}
|
|
1033
1027
|
if (hasSites) {
|
|
1034
1028
|
log('')
|
package/src/framework-index.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"generatedAt": "2026-10-
|
|
3
|
+
"generatedAt": "2026-10-06T01:57:25.800Z",
|
|
4
4
|
"packages": {
|
|
5
5
|
"@uniweb/api": {
|
|
6
|
-
"version": "0.6.
|
|
6
|
+
"version": "0.6.10",
|
|
7
7
|
"path": "framework/api",
|
|
8
8
|
"deps": [
|
|
9
9
|
"@uniweb/core"
|
|
10
10
|
]
|
|
11
11
|
},
|
|
12
12
|
"@uniweb/build": {
|
|
13
|
-
"version": "0.
|
|
13
|
+
"version": "0.76.1",
|
|
14
14
|
"path": "framework/build",
|
|
15
15
|
"deps": [
|
|
16
16
|
"@uniweb/content-reader",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"deps": []
|
|
36
36
|
},
|
|
37
37
|
"@uniweb/core": {
|
|
38
|
-
"version": "0.
|
|
38
|
+
"version": "0.37.1",
|
|
39
39
|
"path": "framework/core",
|
|
40
40
|
"deps": [
|
|
41
41
|
"@uniweb/semantic-parser",
|
|
@@ -48,14 +48,14 @@
|
|
|
48
48
|
"deps": []
|
|
49
49
|
},
|
|
50
50
|
"@uniweb/icons": {
|
|
51
|
-
"version": "0.4.
|
|
51
|
+
"version": "0.4.28",
|
|
52
52
|
"path": "framework/icons",
|
|
53
53
|
"deps": [
|
|
54
54
|
"@uniweb/core"
|
|
55
55
|
]
|
|
56
56
|
},
|
|
57
57
|
"@uniweb/kit": {
|
|
58
|
-
"version": "0.19.
|
|
58
|
+
"version": "0.19.17",
|
|
59
59
|
"path": "framework/kit",
|
|
60
60
|
"deps": [
|
|
61
61
|
"@uniweb/core",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"deps": []
|
|
77
77
|
},
|
|
78
78
|
"@uniweb/projections": {
|
|
79
|
-
"version": "0.7.
|
|
79
|
+
"version": "0.7.14",
|
|
80
80
|
"path": "framework/projections",
|
|
81
81
|
"deps": [
|
|
82
82
|
"@uniweb/content-writer",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
]
|
|
85
85
|
},
|
|
86
86
|
"@uniweb/runtime": {
|
|
87
|
-
"version": "0.
|
|
87
|
+
"version": "0.29.1",
|
|
88
88
|
"path": "framework/runtime",
|
|
89
89
|
"deps": [
|
|
90
90
|
"@uniweb/core",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"deps": []
|
|
98
98
|
},
|
|
99
99
|
"@uniweb/schemas": {
|
|
100
|
-
"version": "0.
|
|
100
|
+
"version": "0.12.0",
|
|
101
101
|
"path": "framework/schemas",
|
|
102
102
|
"deps": []
|
|
103
103
|
},
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
"deps": []
|
|
118
118
|
},
|
|
119
119
|
"@uniweb/templates": {
|
|
120
|
-
"version": "0.17.
|
|
120
|
+
"version": "0.17.14",
|
|
121
121
|
"path": "framework/templates",
|
|
122
122
|
"deps": []
|
|
123
123
|
},
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
"deps": []
|
|
128
128
|
},
|
|
129
129
|
"@uniweb/unipress": {
|
|
130
|
-
"version": "0.10.
|
|
130
|
+
"version": "0.10.20",
|
|
131
131
|
"path": "framework/unipress",
|
|
132
132
|
"deps": [
|
|
133
133
|
"@uniweb/build",
|