uniweb 0.79.2 → 0.79.3
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 +7 -7
- package/partials/agents.md +5 -3
- package/src/commands/doctor.js +19 -1
- package/src/framework-index.json +7 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uniweb",
|
|
3
|
-
"version": "0.79.
|
|
3
|
+
"version": "0.79.3",
|
|
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/content-writer": "^0.3.4",
|
|
44
45
|
"@uniweb/core": "^0.35.0",
|
|
45
|
-
"@uniweb/schemas": "^0.9.3",
|
|
46
|
-
"@uniweb/kit": "^0.19.11",
|
|
47
46
|
"@uniweb/runtime": "^0.28.3",
|
|
48
|
-
"@uniweb/
|
|
49
|
-
"@uniweb/
|
|
47
|
+
"@uniweb/kit": "^0.19.12",
|
|
48
|
+
"@uniweb/schemas": "^0.9.4",
|
|
49
|
+
"@uniweb/semantic-parser": "^1.5.0"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@uniweb/build": "^0.73.
|
|
52
|
+
"@uniweb/build": "^0.73.3",
|
|
53
53
|
"@uniweb/content-reader": "^1.2.7",
|
|
54
|
-
"@uniweb/semantic-parser": "^1.
|
|
54
|
+
"@uniweb/semantic-parser": "^1.5.0"
|
|
55
55
|
},
|
|
56
56
|
"peerDependenciesMeta": {
|
|
57
57
|
"@uniweb/build": {
|
package/partials/agents.md
CHANGED
|
@@ -366,6 +366,7 @@ content = {
|
|
|
366
366
|
images: [], // { src, alt, role, href }
|
|
367
367
|
icons: [], // { library, name, role }
|
|
368
368
|
videos: [], // { src, alt, role, poster, href }
|
|
369
|
+
documents: [], // { url, alt, caption, role: 'pdf', preview?, author?, description? } — from {role=pdf}
|
|
369
370
|
insets: [], // Inline @Component references — { refId }
|
|
370
371
|
lists: [], // [[{ paragraphs, links, lists, … }]] — each item is an object, not a string
|
|
371
372
|
quotes: [], // Blockquotes
|
|
@@ -524,12 +525,13 @@ Optional attributes: `{size=20}`, `{color=red}`. Custom SVGs: `{target=_blank} <!-- Open in new tab -->
|
|
526
527
|
[text](./file.pdf){download} <!-- Download -->
|
|
527
|
-
{role=banner} <!-- Role determines array: images, icons, or
|
|
528
|
+
{role=banner} <!-- Role determines array: images, icons, videos or documents -->
|
|
528
529
|
{role=video} <!-- → content.videos[], not content.images[] -->
|
|
530
|
+
{role=pdf} <!-- → content.documents[] — a file, drawn as a link -->
|
|
529
531
|
{href=/products} <!-- Clickable media: href + target ride along -->
|
|
530
532
|
```
|
|
531
533
|
|
|
532
|
-
Sizing and loading ride on the image: `{width=800 height=600 loading=lazy fit=cover position=center}`. A video adds `{poster=./thumb.jpg autoplay muted loop controls}`; a `{role=pdf}` document adds `{preview=./cover.jpg author=… description=…}`.
|
|
534
|
+
Sizing and loading ride on the image: `{width=800 height=600 loading=lazy fit=cover position=center}`. A video adds `{poster=./thumb.jpg autoplay muted loop controls}`; a `{role=pdf}` document adds `{preview=./cover.jpg author=… description=…}` and arrives in `content.documents` — declare it in `content:` as `documents`.
|
|
533
535
|
|
|
534
536
|
**Quote values containing spaces:** `{note="Ready to go"}`, not `{note=Ready to go}` — unquoted values end at the first space.
|
|
535
537
|
|
|
@@ -1098,7 +1100,7 @@ Names only — for signatures and props, read the package: it's on disk at `node
|
|
|
1098
1100
|
@import "@uniweb/kit/prose-tokens.css"; /* the plugin, wired to theme.yml */
|
|
1099
1101
|
```
|
|
1100
1102
|
|
|
1101
|
-
Nothing to install — the import brings the plugin with it. **Skip the import and prose is completely unstyled
|
|
1103
|
+
Nothing to install — the import brings the plugin with it. **Skip the import and prose is completely unstyled** — lists lose their bullets and numbers, and text its typography — while the markup looks right. The foundation build warns about it, and `uniweb doctor` flags it. Use **one** `prose` container per subtree — the `--tw-prose-*` variables are inherited, so a nested one silently resets them and the outer container goes on looking correct. The section that renders the document is usually the better owner; a layout should supply column width and padding.
|
|
1102
1104
|
|
|
1103
1105
|
**Documentation shells:** `useHeadings()` (the page's headings + the one being read, derived from content so it prerenders), `website.getBranchHierarchy({ route, for })` (the page tree for one branch). Kit ships no ready-made layout — a layout is your foundation's design; write it in `src/layouts/` and use these for the behaviour.
|
|
1104
1106
|
**Layout helpers:** `useGridLayout(columns, { gap })`, `useAccordion({ multiple, defaultOpen })`
|
package/src/commands/doctor.js
CHANGED
|
@@ -189,6 +189,24 @@ function loadSiteYml(dir) {
|
|
|
189
189
|
* `node_modules` — this answers "did the developer write this", so a match
|
|
190
190
|
* inside a dependency is the wrong answer.
|
|
191
191
|
*/
|
|
192
|
+
/**
|
|
193
|
+
* Does this foundation render kit's <Prose> or <Article> — under its own name or an alias?
|
|
194
|
+
*
|
|
195
|
+
* The JSX tag alone missed `import { Article as ArticleBody } from '@uniweb/kit'`, which
|
|
196
|
+
* renders `<ArticleBody>`: two official templates shipped that way with no prose styles
|
|
197
|
+
* until 2026-09-29. So the import counts too. (The foundation build checks the same thing
|
|
198
|
+
* from its module graph, which no alias can hide from.)
|
|
199
|
+
*
|
|
200
|
+
* @param {string} dir - the foundation's source directory
|
|
201
|
+
* @returns {boolean}
|
|
202
|
+
*/
|
|
203
|
+
export function rendersKitProse(dir) {
|
|
204
|
+
return (
|
|
205
|
+
sourceMatches(dir, /<(Prose|Article)\b/) ||
|
|
206
|
+
sourceMatches(dir, /import\s*\{[^}]*\b(Prose|Article)\b[^}]*\}\s*from\s*['"]@uniweb\/kit['"]/)
|
|
207
|
+
)
|
|
208
|
+
}
|
|
209
|
+
|
|
192
210
|
function sourceMatches(dir, pattern) {
|
|
193
211
|
let found = false
|
|
194
212
|
forEachSourceFile(dir, (text) => {
|
|
@@ -1217,8 +1235,8 @@ export async function doctor(args = []) {
|
|
|
1217
1235
|
|
|
1218
1236
|
// Does anything here actually ask for prose? Either the class in the
|
|
1219
1237
|
// stylesheet, or kit's components, which render it.
|
|
1238
|
+
const usesProseComponent = rendersKitProse(f.path)
|
|
1220
1239
|
const usesProseClass = /(^|[\s"'`])prose(\s|["'`]|$)/m.test(styles)
|
|
1221
|
-
const usesProseComponent = sourceMatches(f.path, /<(Prose|Article)\b/)
|
|
1222
1240
|
|
|
1223
1241
|
if (!usesProseClass && !usesProseComponent) continue
|
|
1224
1242
|
|
package/src/framework-index.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"generatedAt": "2026-09-
|
|
3
|
+
"generatedAt": "2026-09-29T17:52:46.126Z",
|
|
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.
|
|
13
|
+
"version": "0.73.3",
|
|
14
14
|
"path": "framework/build",
|
|
15
15
|
"deps": [
|
|
16
16
|
"@uniweb/content-reader",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
]
|
|
56
56
|
},
|
|
57
57
|
"@uniweb/kit": {
|
|
58
|
-
"version": "0.19.
|
|
58
|
+
"version": "0.19.12",
|
|
59
59
|
"path": "framework/kit",
|
|
60
60
|
"deps": [
|
|
61
61
|
"@uniweb/core",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"deps": []
|
|
72
72
|
},
|
|
73
73
|
"@uniweb/press": {
|
|
74
|
-
"version": "0.4.
|
|
74
|
+
"version": "0.4.18",
|
|
75
75
|
"path": "framework/press",
|
|
76
76
|
"deps": []
|
|
77
77
|
},
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"deps": []
|
|
98
98
|
},
|
|
99
99
|
"@uniweb/schemas": {
|
|
100
|
-
"version": "0.9.
|
|
100
|
+
"version": "0.9.4",
|
|
101
101
|
"path": "framework/schemas",
|
|
102
102
|
"deps": []
|
|
103
103
|
},
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"deps": []
|
|
108
108
|
},
|
|
109
109
|
"@uniweb/semantic-parser": {
|
|
110
|
-
"version": "1.
|
|
110
|
+
"version": "1.5.0",
|
|
111
111
|
"path": "framework/semantic-parser",
|
|
112
112
|
"deps": []
|
|
113
113
|
},
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
"deps": []
|
|
118
118
|
},
|
|
119
119
|
"@uniweb/templates": {
|
|
120
|
-
"version": "0.17.
|
|
120
|
+
"version": "0.17.8",
|
|
121
121
|
"path": "framework/templates",
|
|
122
122
|
"deps": []
|
|
123
123
|
},
|