uniweb 1.25.6 → 1.25.8

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.6",
3
+ "version": "1.25.8",
4
4
  "description": "Create structured Vite + React sites with content/code separation",
5
5
  "type": "module",
6
6
  "bin": {
@@ -41,13 +41,13 @@
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",
45
- "@uniweb/semantic-parser": "~1.13.2",
44
+ "@uniweb/content-writer": "~1.3.1",
46
45
  "@uniweb/schemas": "~1.6.7",
47
- "@uniweb/content-writer": "~1.3.1"
46
+ "@uniweb/core": "~1.6.1",
47
+ "@uniweb/semantic-parser": "~1.13.2"
48
48
  },
49
49
  "peerDependencies": {
50
- "@uniweb/build": "~1.14.3",
50
+ "@uniweb/build": "~1.14.4",
51
51
  "@uniweb/semantic-parser": "~1.13.2",
52
52
  "@uniweb/content-reader": "~1.5.8"
53
53
  },
@@ -127,7 +127,7 @@ Short codes: `lu` Lucide, `hi`/`hi2` Heroicons v1/v2, `fi` Feather, `pi` Phospho
127
127
  ![alt](./img.jpg){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. On a site a backend hosts, write them on an image in the flow. 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, … }`.
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
 
@@ -162,7 +162,7 @@ Three uses by info string: `yaml:`/`json:` data (parsed into `content.data.tag`,
162
162
 
163
163
  Two tags, not a tag plus a variant: a warning and a note are `md:warning` and `md:note`. The fence takes no params.
164
164
 
165
- A ` ```mermaid ` fence is a snippet that a foundation can draw as a diagram, with kit's `Mermaid` (foundation guide). Where it doesn't, or the diagram has a syntax error, the page shows it as code. Check by looking at the page: the build says nothing either way. ` ```mermaid:flow ` keeps the text at `content.data.flow`, for a section that declares `flow` and draws it.
165
+ A ` ```mermaid ` fence is a snippet that a foundation can draw as a diagram, with kit's `Mermaid` (foundation guide). Where it doesn't, or the diagram has a syntax error, the page shows it as code. Check by looking at the page: the build says nothing either way. ` ```mermaid:flow ` keeps the text at `content.data.flow`, for a section that declares `flow` and draws it. Leave colors out of a diagram and it takes the site's, in light and dark; a `fill` you set stays in both, and a pale one leaves its labels unreadable on a dark page.
166
166
 
167
167
  ### Math
168
168
 
@@ -116,7 +116,7 @@ export default {
116
116
 
117
117
  **`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
118
 
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, so a class that sets only its height needs `w-auto` too (`h-8 w-auto`), or the width stays the file's.
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
120
  - **`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
121
  - **`items: { label, content: {…} }`** says what each entry holds.
122
122
 
@@ -56,6 +56,8 @@ With `provider: endpoint`, `endpoint:` is **required** (no default): `_search` r
56
56
 
57
57
  **Results have one shape.** Always: `id`, `type` (`page` | `section` | `record`), `route`, `href`, `title`, `pageTitle`, `excerpt`, `snippetHtml`. Provider-optional (`null` when absent): `sectionId`, `anchor`, `description`, `component`, `snippetText`, `matches`, `group`, `item` (a record's fields). Guard optionals (`result.item?.image`). `snippetHtml` is HTML with `<mark>` — render through `SafeHtml`. A failing provider falls back to the local index when one exists, else returns no results with a console warning.
58
58
 
59
+ **Follow a result with `<Link to={result.href}>`.** `href` is a route with no language or base path in it, and `Link` adds both. Do the same for Enter by clicking the highlighted link: `window.location.href = result.href` or a bare `navigate(result.href)` sends a French reader to the English page, and the build says nothing. Where no `Link` can go, `resolveHref(href, website)` gives the whole address.
60
+
59
61
  ```jsx
60
62
  const { results, isLoading, query, isEnabled } = useSearch(website) // `query` is a debounced function
61
63
  ```
@@ -109,7 +111,7 @@ The endpoint must accept the framework's batched `{ "events": [ … ] }` POST (`
109
111
  **A `scripts` entry is a URL and nothing else, so these can't be installed that way.** Each one's install runs inline lines; from a URL alone GA sends nothing and Tag Manager never gets its page-load event. A tag carrying an attribute the vendor reads (`data-domain`, `data-website-id`) has the same problem. What works depends on who builds the pages:
110
112
 
111
113
  - **The framework builds them** (`uniweb export`, `uniweb deploy --host=<adapter>`): the vendor's snippet goes in `head.html` next to `site.yml`, and the build adds it to every page's `<head>`. A `services.google` entry does nothing here.
112
- - **Uniweb Cloud builds them** (`uniweb publish`): `head.html` is kept and synced but **not applied**. For Google's two, name the ID and the host loads the tag from the next publish, free, with no code, on any foundation:
114
+ - **Uniweb Cloud builds them** (`uniweb publish`, or publishing from the app): `head.html` is kept and synced but **not applied**. For Google's two, name the ID and the host loads the tag from the next publish, free, with no code, on any foundation:
113
115
 
114
116
  ```yaml
115
117
  services:
@@ -117,7 +119,7 @@ The endpoint must accept the framework's batched `{ "events": [ … ] }` POST (`
117
119
  id: G-XXXXXXXXXX # or GTM-XXXXXXX, or a list of both
118
120
  ```
119
121
 
120
- The app's site settings don't offer this yet, so for a site someone edits only in the app, `uniweb clone` it, add the entry and `uniweb publish`. Leave `services.tracking.scripts` unset beside it — a site's own list replaces what the host states, so Google's tag would not load. `tracking: { enabled: false, consent: required }` beside it holds the tag until a visitor answers, and needs a component using `useTrackingConsent()`, or it never loads. Gate that component on the hook's `status`: `isTrackingEnabled()` is false here. Any other such vendor has to run from the foundation's code, so a site whose foundation you can't change can't add one — say so rather than writing a `head.html` that does nothing.
122
+ Someone who edits only in the app adds it there, with no terminal: the *Google Analytics and Tag Manager* card in the site's Settings, under Features, then a publish. It is this same entry: `uniweb pull` writes what the card holds into `site.yml`, its switch as `enabled: false`. Leave `services.tracking.scripts` unset beside it — a site's own list replaces what the host states, so Google's tag would not load. `tracking: { enabled: false, consent: required }` beside it holds the tag until a visitor answers, and needs a component using `useTrackingConsent()`, or it never loads. Gate that component on the hook's `status`: `isTrackingEnabled()` is false here. Any other such vendor has to run from the foundation's code, so a site whose foundation you can't change can't add one — say so rather than writing a `head.html` that does nothing.
121
123
 
122
124
  Either way, tell the person to check Realtime from a browser that doesn't block trackers: a visit from Brave, say, never reaches Google, which looks like a failed install. Google Analytics counts each page a visitor moves to through the browser-history setting, under Enhanced measurement in the data stream's settings, which a new stream has on.
123
125
 
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "generatedAt": "2026-11-02T19:27:56.253Z",
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.3"
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.3"
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.13"
39
+ "version": "1.3.14"
40
40
  },
41
41
  "@uniweb/scene": {
42
42
  "version": "1.0.1"
@@ -54,13 +54,13 @@
54
54
  "version": "1.1.2"
55
55
  },
56
56
  "@uniweb/templates": {
57
- "version": "1.2.3"
57
+ "version": "1.2.4"
58
58
  },
59
59
  "@uniweb/theming": {
60
60
  "version": "1.2.1"
61
61
  },
62
62
  "@uniweb/unipress": {
63
- "version": "1.1.30"
63
+ "version": "1.1.31"
64
64
  }
65
65
  },
66
66
  "templates": {