uniweb 1.25.7 → 1.25.9
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.25.
|
|
3
|
+
"version": "1.25.9",
|
|
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/core": "~1.6.1",
|
|
44
45
|
"@uniweb/schemas": "~1.6.7",
|
|
45
46
|
"@uniweb/content-writer": "~1.3.1",
|
|
46
|
-
"@uniweb/core": "~1.6.1",
|
|
47
47
|
"@uniweb/semantic-parser": "~1.13.2"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@uniweb/semantic-parser": "~1.13.2",
|
|
51
50
|
"@uniweb/content-reader": "~1.5.8",
|
|
52
|
-
"@uniweb/
|
|
51
|
+
"@uniweb/semantic-parser": "~1.13.2",
|
|
52
|
+
"@uniweb/build": "~1.14.4"
|
|
53
53
|
},
|
|
54
54
|
"peerDependenciesMeta": {
|
|
55
55
|
"@uniweb/build": {
|
|
@@ -127,7 +127,7 @@ Short codes: `lu` Lucide, `hi`/`hi2` Heroicons v1/v2, `fi` Feather, `pi` Phospho
|
|
|
127
127
|
{href=/products} clickable media: href + target ride along
|
|
128
128
|
```
|
|
129
129
|
|
|
130
|
-
Image attributes: `{width=800 height=600 loading=lazy fit=cover position=center author="Jane Doe"}`. `width` and `height` hold an image's place on the page while its file loads, so what's under it doesn't jump when it arrives; use the file's own size, and a stylesheet still scales it. A static build fills them in for a local file when you give neither
|
|
130
|
+
Image attributes: `{width=800 height=600 loading=lazy fit=cover position=center author="Jane Doe"}`. `width` and `height` hold an image's place on the page while its file loads, so what's under it doesn't jump when it arrives; use the file's own size, and a stylesheet still scales it. A static build fills them in for a local file when you give neither, and so does a backend-hosted site for a file it holds, so you write them only for an image at another address. In a PDF, only a width with a unit (`50%`, `10cm`) sizes an image. Video: `{poster=./thumb.jpg autoplay muted loop controls}` — name a poster; a static build makes one only when none is named and ffmpeg is installed, and `uniweb publish` sends only a named poster. A `{role=pdf}` document adds `{preview=./cover.jpg author=… description=…}` and arrives as `{ url, name, mime, size?, alt, caption, … }`.
|
|
131
131
|
|
|
132
132
|
**Section links:** `page:about#team` → `/about#section-team`; `page:/#features` → a homepage section. The id is the file name without its number (`2-features.md` → `features`) or `id:` in frontmatter.
|
|
133
133
|
|
|
@@ -69,6 +69,7 @@ Things you won't discover from exports:
|
|
|
69
69
|
|
|
70
70
|
- **`<Link>` takes `to` or `href`.** `to="page:about"` resolves a page id (survives moves) or a route, never a folder: the homepage is `page:/`, or `page:home` only when its `page.yml` says `id: home`. External URLs get `target="_blank"`; `reload` forces a full load.
|
|
71
71
|
- **A modal needs `<Overlay>`, not a bigger z-index.** Each layout area has its own `view-transition-name`, which makes it a stacking context; a `fixed` dialog inside one paints at its area's place in the stack, under the header/footer. `<Overlay onClose={close}>` renders into `document.body`, contains focus (moves it in, cycles Tab, marks the rest `inert`, returns it), handles Escape, scrim click, scroll lock; a dimmed scrim you override with `className` (`bg-transparent` removes it). `modal={false}` for a toast. Your dialog markup stays yours.
|
|
72
|
+
- **A word wider than its box breaks**, so a long heading can't pan a phone's page (`overflow-wrap: break-word`, in kit's base). What must stay whole in a narrow box says `whitespace-nowrap`: a big numeral, a figure, a number with its unit. Without it, `10 min` in a tight box comes out as `10 mi / n`.
|
|
72
73
|
- **Kit hooks are SSR-safe.** "document is not defined" → use the hook, don't add guards.
|
|
73
74
|
- **`cn()` drops an earlier `leading-*` when a `text-<size>` follows**, since Tailwind's size classes set line height too: `cn('leading-[1.1] text-4xl')` → `text-4xl`. Put the size first, or fold the leading into it (`text-[clamp(2rem,5vw,4rem)]/[1.1]`).
|
|
74
75
|
- **"3 of 12 pages didn't render"** means the build stopped, exit 1, because a section threw while rendering a page, and `dist/` isn't complete. It names the error, the section type and the pages. A section that only fails here reads something only a browser has; `uniweb dev` won't show that one.
|
|
@@ -116,7 +117,7 @@ export default {
|
|
|
116
117
|
|
|
117
118
|
**`content:`** names what the component reads, each as an author label with optional count: `title`, `pretitle`, `subtitle`, `paragraphs`, `links`, `lists`, `items`, `media`, `icons`, `documents`, `snippets`, `tables`, `math`, `quotes`, `sequence`. It is a description for the editor and for other agents, not a validation schema. Take what you expect — `content.paragraphs[0]` if you need one paragraph — and render every paragraph or every item only when showing them all is the point. A section may hold content the type never reads; don't enumerate it, validate it or react to it.
|
|
118
119
|
|
|
119
|
-
- **`media`** is an image, a video, or an embedded component. `media: { label, types: ['image'] }` narrows it; `image:`, `videos:`, `insets:` are the same slot narrowed to one type. Read `content.media` (author's order, each with `kind`) and render with `<Visual media={content.media} block={block} />`. `<Image>` would drop a diagram placed there; `<Media>` is a video player. An image's `width` and `height`, when it has them, reach the `<img>` as attributes,
|
|
120
|
+
- **`media`** is an image, a video, or an embedded component. `media: { label, types: ['image'] }` narrows it; `image:`, `videos:`, `insets:` are the same slot narrowed to one type. Read `content.media` (author's order, each with `kind`) and render with `<Visual media={content.media} block={block} />`. `<Image>` would drop a diagram placed there; `<Media>` is a video player. An image's `width` and `height`, when it has them, reach the `<img>` as attributes, through `<Visual>`, `<Image value={image} />`, `<Render>`, `<Prose>` and `<Article>`. So a class or a stylesheet rule that limits only its height needs `w-auto` too (`h-8 w-auto`, `max-h-16 w-auto`), or the width stays the file's. A section that draws its own `<img>` passes them itself where nothing else gives the picture a box: `<img src={image.url} alt={image.alt} width={image.width} height={image.height} />`. A row of logos at `h-10 w-auto` needs them, or each logo opens sideways as it loads, and so does a picture at `w-full`, or what's under it jumps; `h-full w-full object-cover` in a parent with its own shape holds its place without them.
|
|
120
121
|
- **`sequence`** says the component renders the whole section as written. `{ label, except: ['table', 'math'] }` names kinds it leaves out; `placement` the placements it lays out — `true` (all four, what `<Render>`/`<Prose>`/`<Article>` do), a list, or a map per kind. An editor offers an author only those.
|
|
121
122
|
- **`items: { label, content: {…} }`** says what each entry holds.
|
|
122
123
|
|
package/src/framework-index.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"generatedAt": "2026-11-
|
|
3
|
+
"generatedAt": "2026-11-02T21:40:17.162Z",
|
|
4
4
|
"packages": {
|
|
5
5
|
"@uniweb/api": {
|
|
6
6
|
"version": "1.6.9"
|
|
7
7
|
},
|
|
8
8
|
"@uniweb/build": {
|
|
9
|
-
"version": "1.14.
|
|
9
|
+
"version": "1.14.4"
|
|
10
10
|
},
|
|
11
11
|
"@uniweb/content-reader": {
|
|
12
12
|
"version": "1.5.8"
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"version": "1.0.8"
|
|
25
25
|
},
|
|
26
26
|
"@uniweb/kit": {
|
|
27
|
-
"version": "1.7.
|
|
27
|
+
"version": "1.7.4"
|
|
28
28
|
},
|
|
29
29
|
"@uniweb/loom": {
|
|
30
30
|
"version": "1.1.3"
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"version": "1.2.10"
|
|
37
37
|
},
|
|
38
38
|
"@uniweb/runtime": {
|
|
39
|
-
"version": "1.3.
|
|
39
|
+
"version": "1.3.14"
|
|
40
40
|
},
|
|
41
41
|
"@uniweb/scene": {
|
|
42
42
|
"version": "1.0.1"
|