uniweb 0.8.33 → 0.8.34
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 +6 -6
- package/partials/agents.md +17 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uniweb",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.34",
|
|
4
4
|
"description": "Create structured Vite + React sites with content/code separation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
"js-yaml": "^4.1.0",
|
|
42
42
|
"prompts": "^2.4.2",
|
|
43
43
|
"tar": "^7.0.0",
|
|
44
|
-
"@uniweb/
|
|
45
|
-
"@uniweb/
|
|
46
|
-
"@uniweb/
|
|
44
|
+
"@uniweb/runtime": "0.6.29",
|
|
45
|
+
"@uniweb/core": "0.5.19",
|
|
46
|
+
"@uniweb/kit": "0.7.22"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@uniweb/build": "0.8.32",
|
|
50
49
|
"@uniweb/content-reader": "1.1.4",
|
|
51
|
-
"@uniweb/semantic-parser": "1.1.
|
|
50
|
+
"@uniweb/semantic-parser": "1.1.9",
|
|
51
|
+
"@uniweb/build": "0.8.33"
|
|
52
52
|
},
|
|
53
53
|
"peerDependenciesMeta": {
|
|
54
54
|
"@uniweb/build": {
|
package/partials/agents.md
CHANGED
|
@@ -274,6 +274,23 @@ Programs offered │ content.items[1].paragraphs[0]
|
|
|
274
274
|
|
|
275
275
|
Without the `---`, `## 15,000+` would become `content.subtitle` instead of an item.
|
|
276
276
|
|
|
277
|
+
### Sequential content
|
|
278
|
+
|
|
279
|
+
`content.sequence` is the flat, ordered list of all elements before any grouping. Each element has a `type` (`heading`, `paragraph`, `image`, `codeBlock`, `dataBlock`, `list`, `link`, `divider`, `inset`, etc.) and type-specific fields. Use it when grouping isn't the right lens — for example, rendering prose in document order with `<Prose>`, or finding specific elements regardless of which group they ended up in:
|
|
280
|
+
|
|
281
|
+
```js
|
|
282
|
+
// All data blocks, regardless of heading groups
|
|
283
|
+
const allData = {}
|
|
284
|
+
for (const el of content.sequence) {
|
|
285
|
+
if (el.type === 'dataBlock') allData[el.tag] = el.data
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
// All headings in order
|
|
289
|
+
const headings = content.sequence.filter(e => e.type === 'heading')
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
The grouped fields (`title`, `paragraphs`, `items`, `data`) and the sequential view (`sequence`) are two interpretations of the same content. Grouped is better for structured layouts (cards, features). Sequential is better for prose rendering and for finding content without caring about group boundaries.
|
|
293
|
+
|
|
277
294
|
### Choosing how to model content
|
|
278
295
|
|
|
279
296
|
You have three layers. Most of the design skill is choosing between them:
|