uniweb 1.24.18 → 1.24.19
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.24.
|
|
3
|
+
"version": "1.24.19",
|
|
4
4
|
"description": "Create structured Vite + React sites with content/code separation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -41,15 +41,15 @@
|
|
|
41
41
|
"js-yaml": "^4.3.2",
|
|
42
42
|
"prompts": "^2.4.2",
|
|
43
43
|
"tar": "^7.5.21",
|
|
44
|
+
"@uniweb/content-writer": "~1.3.1",
|
|
44
45
|
"@uniweb/core": "~1.5.2",
|
|
45
46
|
"@uniweb/semantic-parser": "~1.13.2",
|
|
46
|
-
"@uniweb/schemas": "~1.6.7"
|
|
47
|
-
"@uniweb/content-writer": "~1.3.1"
|
|
47
|
+
"@uniweb/schemas": "~1.6.7"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@uniweb/build": "~1.13.
|
|
51
|
-
"@uniweb/
|
|
52
|
-
"@uniweb/
|
|
50
|
+
"@uniweb/build": "~1.13.11",
|
|
51
|
+
"@uniweb/content-reader": "~1.5.8",
|
|
52
|
+
"@uniweb/semantic-parser": "~1.13.2"
|
|
53
53
|
},
|
|
54
54
|
"peerDependenciesMeta": {
|
|
55
55
|
"@uniweb/build": {
|
package/partials/agents.md
CHANGED
|
@@ -552,7 +552,7 @@ A link to a section names its page and its id: `page:about#team` goes to `/about
|
|
|
552
552
|
|
|
553
553
|
Sizing and loading ride on the image: `{width=800 height=600 loading=lazy fit=cover position=center}`, and its credit as `{author="Jane Doe"}`. 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` — `{ url, name, mime, size?, alt, caption, … }` — declare it in `content:` as `documents`. Name a video's poster: a static build makes one from the video only when none is named and ffmpeg is installed, and `uniweb publish` sends only the poster you name.
|
|
554
554
|
|
|
555
|
-
**Where media lives.** `./x` names a file beside the page, `/x` a file in `public/`, and both reach a static build and a site published with Uniweb. Keep a page's media beside it, and
|
|
555
|
+
**Where media lives.** `./x` names a file beside the page, `/x` a file in `public/`, and both reach a static build and a site published with Uniweb. Keep a page's media beside it, and in `public/` what belongs to the whole site: the favicon, fonts. Only a static host gives a file a fixed address, at the site root. A site published with Uniweb serves a file that something names from an address the upload gives it, and nothing at `/x`, so for a file other sites or scripts fetch by URL, keep it somewhere with its own address and add a page whose `redirect:` goes there. A static build copies `public/` whole and adds its own copy of each file a page names there, so a video only a page shows is in `dist/` twice from `public/` and once from beside the page. `uniweb push` uploads a file beside a page wherever the page is, in a folder `paths:` mounts too; a file outside the site and the folders it mounts is not uploaded, so put that in `public/`. A site has no `assets/` folder for media: a build stops on a `/x` only `assets/` holds.
|
|
556
556
|
|
|
557
557
|
**Placement — where a block sits in a section rendered in order.** `{placement=left}` (or `right`, `wide`, `full`) on an image or a video; a table takes it on its **caption line**, the paragraph after the table, after a blank line — `: Plans and prices {placement=wide #tbl-plans}`, which also gives the table a caption and a cross-reference id. It is the author's intent, not a size: kit's `<Render>`, `<Prose>` and `<Article>` lay all four out (`data-placement`, styled by `prose-tokens.css`), and any other component ignores it. A section type says which it honours in `meta.js` — `sequence: { label, placement: true }` — and the build warns when a file asks for one its type does not offer.
|
|
558
558
|
|
|
@@ -1613,6 +1613,8 @@ The build auto-adds preconnect hints for imports, emits `@font-face` + preload f
|
|
|
1613
1613
|
}
|
|
1614
1614
|
```
|
|
1615
1615
|
|
|
1616
|
+
**Name every folder that writes classes.** The foundation's own build finds them all, but a site build and `uniweb dev` read only what these lines name, so a class in a folder left out is in one CSS and missing from the other. `uniweb dev`, a site build and `uniweb doctor` (`unread-folder`) give the line to add.
|
|
1617
|
+
|
|
1616
1618
|
Semantic tokens come from `theme-tokens.css` (populated from `theme.yml`). It also tells Tailwind to read kit's source, so kit's own classes reach your CSS wherever your package manager put kit. A foundation that skips the import names kit itself, by where kit is: `./node_modules/@uniweb/kit/src/**` under pnpm, `../node_modules/@uniweb/kit/src/**` under npm. Use `@theme` only for values tokens don't cover. **Custom CSS is expected alongside Tailwind** — shadow systems, border hierarchies, gradients, glassmorphism. Tailwind handles layout; tokens handle context; `styles.css` handles everything else.
|
|
1617
1619
|
|
|
1618
1620
|
**Tokens are a floor, not a ceiling.** They solve context adaptation — the hard problem. A great foundation adds design vocabulary on top:
|
|
@@ -3179,7 +3181,7 @@ Loud failures:
|
|
|
3179
3181
|
|
|
3180
3182
|
**Component not appearing** — verify `meta.js` exists; check for `hidden: true`; rebuild the foundation.
|
|
3181
3183
|
|
|
3182
|
-
**Styles not applying** — verify `@source` in `styles.css` includes your component paths.
|
|
3184
|
+
**Styles not applying** — verify `@source` in `styles.css` includes your component paths; `uniweb doctor` names a folder it misses.
|
|
3183
3185
|
|
|
3184
3186
|
**Prerender warnings about hooks** — components with `useState`/`useEffect` show SSG warnings during build in local symlinked mode. Expected and harmless.
|
|
3185
3187
|
|
package/src/backend/site-sync.js
CHANGED
|
@@ -1121,9 +1121,11 @@ export function commitSiteContent(siteDir, { message }) {
|
|
|
1121
1121
|
* @param {string[]} [o.released] - what the release wrote into local code (`filesAReleaseWrites`)
|
|
1122
1122
|
* @param {string[]} [o.only] - these files alone, for a pull or a publish's record: what else
|
|
1123
1123
|
* differs under the site is the person's, not a push's
|
|
1124
|
+
* @param {boolean} [o.published] - this is a publish's record, the step after its push's write-backs.
|
|
1125
|
+
* It says so, since a log can't otherwise tell the two commits of one publish apart
|
|
1124
1126
|
* @returns {{ commit: string, paths: string[] } | { error: string } | null}
|
|
1125
1127
|
*/
|
|
1126
|
-
export function commitWriteBacks(siteDir, backend, { complete = false, released = [], only = null } = {}) {
|
|
1128
|
+
export function commitWriteBacks(siteDir, backend, { complete = false, released = [], only = null, published = false } = {}) {
|
|
1127
1129
|
const repo = repoOf(siteDir)
|
|
1128
1130
|
if (!repo?.head || mergeInProgress(repo)) return null
|
|
1129
1131
|
let host = 'backend'
|
|
@@ -1144,8 +1146,9 @@ export function commitWriteBacks(siteDir, backend, { complete = false, released
|
|
|
1144
1146
|
const site = readBackendState(siteDir, backend).site?.uuid
|
|
1145
1147
|
// In a repo of several sites, the log says which one moved.
|
|
1146
1148
|
const named = repo.prefix ? repo.prefix.replace(/\/$/, '') : 'the site'
|
|
1149
|
+
const subject = published ? `Record the publish of ${named} on ${backend}` : `Record what ${backend} gave ${named}`
|
|
1147
1150
|
const made = commitRoots(repo, only || [...sentRoots(siteDir), SYNC_STORE_FILE, ...released], {
|
|
1148
|
-
message:
|
|
1151
|
+
message: `${subject}${site ? `\n\n${RECORDED_TRAILER}: ${backend} ${site}` : ''}`,
|
|
1149
1152
|
identity
|
|
1150
1153
|
})
|
|
1151
1154
|
if (made && complete) writeSyncPoint(siteDir, backend, made.commit)
|
package/src/commands/doctor.js
CHANGED
|
@@ -833,6 +833,22 @@ export async function checkStaleSources({ foundationName, srcDir, issues }) {
|
|
|
833
833
|
log(` Paths are relative to styles.css.`)
|
|
834
834
|
}
|
|
835
835
|
|
|
836
|
+
/**
|
|
837
|
+
* Code in a foundation that writes classes no `@source` reads (`unreadFolders`, `@uniweb/build`).
|
|
838
|
+
* Loaded here for the same reason. A project a template or an older scaffold started keeps its
|
|
839
|
+
* stylesheet through `uniweb update`, so this is how it hears.
|
|
840
|
+
*/
|
|
841
|
+
export async function checkUnreadFolders({ foundationName, srcDir, issues }) {
|
|
842
|
+
const { unreadFolders } = await import('@uniweb/build')
|
|
843
|
+
const unread = unreadFolders?.(join(srcDir, 'styles.css')) || []
|
|
844
|
+
if (unread.length === 0) return
|
|
845
|
+
const id = 'unread-folder'
|
|
846
|
+
issues.push({ id, type: 'warn', foundation: foundationName, message: `${foundationName} writes classes where styles.css names no @source` })
|
|
847
|
+
warn(`[${id}] ${foundationName} writes classes where styles.css names no @source, so a site build and \`uniweb dev\` miss any class only used there`)
|
|
848
|
+
log(` Add to styles.css:`)
|
|
849
|
+
for (const { line } of unread) log(` ${line}`)
|
|
850
|
+
}
|
|
851
|
+
|
|
836
852
|
/**
|
|
837
853
|
* Source with its comments removed.
|
|
838
854
|
*
|
|
@@ -1772,6 +1788,7 @@ async function runDoctor(args = []) {
|
|
|
1772
1788
|
// only there. The build says so too; here it reaches `uniweb status`.
|
|
1773
1789
|
for (const f of foundations) {
|
|
1774
1790
|
await checkStaleSources({ foundationName: f.name, srcDir: resolveFoundationSrcPath(f.path), issues })
|
|
1791
|
+
await checkUnreadFolders({ foundationName: f.name, srcDir: resolveFoundationSrcPath(f.path), issues })
|
|
1775
1792
|
}
|
|
1776
1793
|
|
|
1777
1794
|
// A modifier kit's prose layer does not have — `prose-slate`, `prose-invert`
|
package/src/commands/publish.js
CHANGED
|
@@ -1131,7 +1131,7 @@ export async function publish(args = []) {
|
|
|
1131
1131
|
// ⭐ The record is committed, as what a push writes is. ⛔ Until 2026-10-30 every publish left
|
|
1132
1132
|
// `deploy.yml` changed, so a tree a person had committed was never clean after one.
|
|
1133
1133
|
if (recordAtRest && saveDeploys) {
|
|
1134
|
-
const recorded = commitWriteBacks(siteDir, client.origin, { only: ['deploy.yml'] })
|
|
1134
|
+
const recorded = commitWriteBacks(siteDir, client.origin, { only: ['deploy.yml'], published: true })
|
|
1135
1135
|
if (recorded?.error) reportWriteBacks(recorded, { note: say.dim })
|
|
1136
1136
|
}
|
|
1137
1137
|
|
package/src/framework-index.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"generatedAt": "2026-11-
|
|
3
|
+
"generatedAt": "2026-11-01T14:58:36.360Z",
|
|
4
4
|
"packages": {
|
|
5
5
|
"@uniweb/api": {
|
|
6
6
|
"version": "1.6.7"
|
|
7
7
|
},
|
|
8
8
|
"@uniweb/build": {
|
|
9
|
-
"version": "1.13.
|
|
9
|
+
"version": "1.13.11"
|
|
10
10
|
},
|
|
11
11
|
"@uniweb/content-reader": {
|
|
12
12
|
"version": "1.5.8"
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"version": "1.0.7"
|
|
25
25
|
},
|
|
26
26
|
"@uniweb/kit": {
|
|
27
|
-
"version": "1.6.
|
|
27
|
+
"version": "1.6.14"
|
|
28
28
|
},
|
|
29
29
|
"@uniweb/loom": {
|
|
30
30
|
"version": "1.1.2"
|
|
@@ -54,13 +54,13 @@
|
|
|
54
54
|
"version": "1.1.2"
|
|
55
55
|
},
|
|
56
56
|
"@uniweb/templates": {
|
|
57
|
-
"version": "1.1.
|
|
57
|
+
"version": "1.1.13"
|
|
58
58
|
},
|
|
59
59
|
"@uniweb/theming": {
|
|
60
60
|
"version": "1.2.1"
|
|
61
61
|
},
|
|
62
62
|
"@uniweb/unipress": {
|
|
63
|
-
"version": "1.1.
|
|
63
|
+
"version": "1.1.24"
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
"templates": {
|