uniweb 1.25.8 → 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.8",
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/content-writer": "~1.3.1",
45
- "@uniweb/schemas": "~1.6.7",
46
44
  "@uniweb/core": "~1.6.1",
45
+ "@uniweb/schemas": "~1.6.7",
46
+ "@uniweb/content-writer": "~1.3.1",
47
47
  "@uniweb/semantic-parser": "~1.13.2"
48
48
  },
49
49
  "peerDependencies": {
50
- "@uniweb/build": "~1.14.4",
50
+ "@uniweb/content-reader": "~1.5.8",
51
51
  "@uniweb/semantic-parser": "~1.13.2",
52
- "@uniweb/content-reader": "~1.5.8"
52
+ "@uniweb/build": "~1.14.4"
53
53
  },
54
54
  "peerDependenciesMeta": {
55
55
  "@uniweb/build": {
@@ -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, 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.
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