uniweb 1.7.0 → 1.7.1

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.7.0",
3
+ "version": "1.7.1",
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.2",
45
44
  "@uniweb/core": "~1.2.2",
45
+ "@uniweb/semantic-parser": "~1.8.1",
46
46
  "@uniweb/schemas": "~1.3.0",
47
- "@uniweb/semantic-parser": "~1.8.1"
47
+ "@uniweb/content-writer": "~1.1.2"
48
48
  },
49
49
  "peerDependencies": {
50
- "@uniweb/build": "~1.3.5",
50
+ "@uniweb/semantic-parser": "~1.8.1",
51
51
  "@uniweb/content-reader": "~1.4.0",
52
- "@uniweb/semantic-parser": "~1.8.1"
52
+ "@uniweb/build": "~1.3.6"
53
53
  },
54
54
  "peerDependenciesMeta": {
55
55
  "@uniweb/build": {
@@ -2525,7 +2525,8 @@ const sessions = entity?.hydrated?.items.filter((item) => item.section === 'sess
2525
2525
  ⛔ **Name a type by its full name, `@scope/name`** — the scope your foundation registered
2526
2526
  under (`@acme/track`). `@/track` is right in `meta.js` and `queries.yml`, where the build and
2527
2527
  `push` qualify it for you, but a `schema` you hand `@uniweb/api` goes to the backend as written,
2528
- and the backend matches the exact name: `@/track` is a `404`.
2528
+ and the backend matches the exact name — so the package refuses `@/track` before sending it
2529
+ (`kind: 'invalid'`), and its mock refuses a seed that names one.
2529
2530
 
2530
2531
  ⛔ **What a member wrote is text.** Render a field as `{record.brief.name}` or `<PlainText text={…} />` — never `<P text>`, `<H1>`–`<H6>` or `SafeHtml`, which render HTML: a member who typed `<img src=x onerror=…>` would run it as whoever views the page. A rich-text field (a ProseMirror document) renders through kit's `Render`, which escapes its text.
2531
2532
 
@@ -2692,7 +2693,7 @@ it, and takes it back. An instructor enrolling students in a course is this; nam
2692
2693
  your solution does ("enrolled", "course staff"):
2693
2694
 
2694
2695
  ```jsx
2695
- const { status, grants, grant, revoke, working } = useAccess({ schema: '@/course', uuid: course.uuid })
2696
+ const { status, grants, grant, revoke, working } = useAccess({ schema: '@acme/course', uuid: course.uuid })
2696
2697
  // status 'ready' for whoever administers it; 'forbidden' for everyone else — draw nothing
2697
2698
  // grants: [{ account_id, permission, account: { handle, uuid, … }, … }]
2698
2699
  await grant({ handle: 'sam' }, 'read') // or an account id: a candidate, a grant's account, an owner_id
@@ -2716,7 +2717,7 @@ viewer is placed in:
2716
2717
 
2717
2718
  ```jsx
2718
2719
  const { units } = useUnits() // [{ unit, id, handle?, name?, parent?, depth, primary }]
2719
- await createEntity({ schema: '@/submission', unit: course.unit, items: [...] })
2720
+ await createEntity({ schema: '@acme/submission', unit: course.unit, items: [...] })
2720
2721
  ```
2721
2722
 
2722
2723
  Landing decides where an entry is, not who may open it.
@@ -2973,7 +2974,7 @@ uniweb build # merges translations, emits dist/es/, dist/fr/
2973
2974
 
2974
2975
  Running `extract` before a build is the usual first mistake — it reads the compiled content, so a stale build yields a stale manifest. After content changes, `uniweb i18n sync` updates the manifest and `init` refreshes the language files; `status` and `audit` report coverage and stale entries.
2975
2976
 
2976
- **A value is inline Markdown.** A sentence's links and bold go into its translation — `"Voir [Rôles](page:docs/roles)."` — or it renders without them, and coverage still counts it; `uniweb i18n status` lists these under *Loses markup*. A **button** — a line that is only a link — is the exception: translate its label alone and it keeps its link and options (`{role=primary}`). Buttons on consecutive lines are one string; give one label per line (`"Créer un groupe\nEn savoir plus"`).
2977
+ **A value is inline Markdown.** A sentence's links and bold go into its translation — `"Voir [Rôles](page:docs/roles)."` — or it renders without them, and coverage still counts it; `uniweb i18n status` lists these under *Loses markup*. A **button** — a line that is only a link — is the exception: translate its label alone and it keeps its link and options (`{role=primary}`). Buttons on consecutive lines are one string; give one label per line (`"Créer un groupe\nEn savoir plus"`). A link belongs to the place whose source has one: the same words are one string wherever they appear, so where they appear without a link — a heading, a page title, a data block's plain string — the translation's link is left off and its words kept.
2977
2978
 
2978
2979
  **Two mechanisms.** *Hash-based strings* (the default) — `locales/{locale}.json` maps content hash → translation, so structure stays identical across languages. When one source string needs different translations depending on where it appears, the value takes an override form:
2979
2980
 
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "generatedAt": "2026-10-16T22:49:32.412Z",
3
+ "generatedAt": "2026-10-17T02:22:18.325Z",
4
4
  "packages": {
5
5
  "@uniweb/api": {
6
- "version": "1.2.5"
6
+ "version": "1.3.0"
7
7
  },
8
8
  "@uniweb/build": {
9
- "version": "1.3.5"
9
+ "version": "1.3.6"
10
10
  },
11
11
  "@uniweb/content-reader": {
12
12
  "version": "1.4.0"