uniweb 1.4.0 → 1.5.0

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.4.0",
3
+ "version": "1.5.0",
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.1.0",
42
42
  "prompts": "^2.4.2",
43
43
  "tar": "^7.0.0",
44
- "@uniweb/content-writer": "~1.1.0",
45
- "@uniweb/semantic-parser": "~1.6.0",
46
- "@uniweb/core": "~1.2.0",
47
- "@uniweb/schemas": "~1.2.0"
44
+ "@uniweb/content-writer": "~1.1.1",
45
+ "@uniweb/core": "~1.2.1",
46
+ "@uniweb/schemas": "~1.2.1",
47
+ "@uniweb/semantic-parser": "~1.7.0"
48
48
  },
49
49
  "peerDependencies": {
50
- "@uniweb/build": "~1.3.0",
51
- "@uniweb/content-reader": "~1.3.0",
52
- "@uniweb/semantic-parser": "~1.6.0"
50
+ "@uniweb/build": "~1.3.1",
51
+ "@uniweb/semantic-parser": "~1.7.0",
52
+ "@uniweb/content-reader": "~1.3.1"
53
53
  },
54
54
  "peerDependenciesMeta": {
55
55
  "@uniweb/build": {
@@ -376,7 +376,7 @@ content = {
376
376
  snippets: [], // Fenced code — [{ language, code }]
377
377
  data: {}, // Tagged blocks — ```yaml:tag / ```json:tag give the parsed value,
378
378
  // ```md:tag gives { items, sequence } (see Concept blocks)
379
- tables: [], // Only when present — [{ rows: [{ cells: [{ children, header, align }] }] }]
379
+ tables: [], // Only when present — [{ rows: [{ cells: [{ children, header, align }] }], attrs? }] — attrs: caption, id, placement, from the caption line
380
380
  headings: [], // Only from nested content (quote/list bodies) — a
381
381
  // section's headline never spills here
382
382
  items: [], // Each has the same flat structure — from headings after body content
@@ -534,7 +534,9 @@ Optional attributes: `{size=20}`, `{color=red}`. Custom SVGs: `![Logo](./logo.sv
534
534
  ![alt](./img.jpg){href=/products} <!-- Clickable media: href + target ride along -->
535
535
  ```
536
536
 
537
- 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` — `{ url, name, mime, size?, alt, caption, … }` — declare it in `content:` as `documents`.
537
+ 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`.
538
+
539
+ **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.
538
540
 
539
541
  **Quote values containing spaces:** `{note="Ready to go"}`, not `{note=Ready to go}` — unquoted values end at the first space.
540
542
 
@@ -1215,7 +1217,7 @@ export default {
1215
1217
  **`content:` names what the component reads**, each as a label for the author with an optional count (`'Cards [3-6]'`): `title`, `pretitle`, `subtitle`, `paragraphs`, `links`, `lists`, `items`, `media`, `icons`, `documents`, `snippets`, `tables`, `math`, `quotes`, `sequence`.
1216
1218
 
1217
1219
  - **`media` is an image, a video, or an embedded component.** `media: 'Hero media [1]'` takes any of the three; `media: { label, types: ['image'] }` narrows it; `image:`, `videos:` and `insets:` are the same slot narrowed to one type. Read it as `content.media` — the author's order, each item with its `kind` — and render it with `<Visual media={content.media} block={block} />`. Rendering the slot with `<Image>` drops a diagram an author placed there, and kit's `<Media>` is a video player.
1218
- - **`sequence`** says the component renders `content.sequence` — the whole section as written, headline included. `{ label, except: ['table', 'math'] }` names the kinds it leaves out.
1220
+ - **`sequence`** says the component renders `content.sequence` — the whole section as written, headline included. `{ label, except: ['table', 'math'] }` names the kinds it leaves out, and `placement` the placements it lays out — `true` for all four (what `<Render>`, `<Prose>` and `<Article>` do), a list (`['wide', 'full']`), or a map per kind (`{ image: ['left', 'right'], table: ['wide'] }`). A visual editor offers an author only those; declare none, and it offers none.
1219
1221
  - **`items: { label, content: { … } }`** says what each entry holds, in the same vocabulary.
1220
1222
  - The build warns on what it can't read, and refuses `visuals:` (declare `media`) and the `content:` element `data` (declare the block's tag in `data:`).
1221
1223
 
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "generatedAt": "2026-10-15T11:21:49.050Z",
3
+ "generatedAt": "2026-10-15T14:10:08.789Z",
4
4
  "packages": {
5
5
  "@uniweb/api": {
6
6
  "version": "1.2.3"
7
7
  },
8
8
  "@uniweb/build": {
9
- "version": "1.3.0"
9
+ "version": "1.3.1"
10
10
  },
11
11
  "@uniweb/content-reader": {
12
- "version": "1.3.0"
12
+ "version": "1.3.1"
13
13
  },
14
14
  "@uniweb/content-writer": {
15
- "version": "1.1.0"
15
+ "version": "1.1.1"
16
16
  },
17
17
  "@uniweb/core": {
18
- "version": "1.2.0"
18
+ "version": "1.2.1"
19
19
  },
20
20
  "@uniweb/frame-bridge": {
21
21
  "version": "1.0.2"
@@ -24,7 +24,7 @@
24
24
  "version": "1.0.3"
25
25
  },
26
26
  "@uniweb/kit": {
27
- "version": "1.2.1"
27
+ "version": "1.2.2"
28
28
  },
29
29
  "@uniweb/loom": {
30
30
  "version": "1.1.0"
@@ -36,31 +36,31 @@
36
36
  "version": "1.1.1"
37
37
  },
38
38
  "@uniweb/runtime": {
39
- "version": "1.1.1"
39
+ "version": "1.1.2"
40
40
  },
41
41
  "@uniweb/scene": {
42
42
  "version": "1.0.1"
43
43
  },
44
44
  "@uniweb/schemas": {
45
- "version": "1.2.0"
45
+ "version": "1.2.1"
46
46
  },
47
47
  "@uniweb/scholar": {
48
48
  "version": "1.1.0"
49
49
  },
50
50
  "@uniweb/semantic-parser": {
51
- "version": "1.6.0"
51
+ "version": "1.7.0"
52
52
  },
53
53
  "@uniweb/snapshot": {
54
54
  "version": "1.1.0"
55
55
  },
56
56
  "@uniweb/templates": {
57
- "version": "1.1.0"
57
+ "version": "1.1.1"
58
58
  },
59
59
  "@uniweb/theming": {
60
60
  "version": "1.2.0"
61
61
  },
62
62
  "@uniweb/unipress": {
63
- "version": "1.1.2"
63
+ "version": "1.1.3"
64
64
  }
65
65
  },
66
66
  "templates": {