uniweb 1.22.0 → 1.22.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 +5 -5
- package/partials/agents.md +2 -2
- package/src/commands/build.js +17 -30
- package/src/framework-index.json +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uniweb",
|
|
3
|
-
"version": "1.22.
|
|
3
|
+
"version": "1.22.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.3.2",
|
|
42
42
|
"prompts": "^2.4.2",
|
|
43
43
|
"tar": "^7.5.21",
|
|
44
|
-
"@uniweb/
|
|
45
|
-
"@uniweb/content-writer": "~1.3.1",
|
|
44
|
+
"@uniweb/core": "~1.4.12",
|
|
46
45
|
"@uniweb/semantic-parser": "~1.13.0",
|
|
47
|
-
"@uniweb/
|
|
46
|
+
"@uniweb/schemas": "~1.6.5",
|
|
47
|
+
"@uniweb/content-writer": "~1.3.1"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"@uniweb/semantic-parser": "~1.13.0",
|
|
51
51
|
"@uniweb/content-reader": "~1.5.7",
|
|
52
|
-
"@uniweb/build": "~1.11.
|
|
52
|
+
"@uniweb/build": "~1.11.1"
|
|
53
53
|
},
|
|
54
54
|
"peerDependenciesMeta": {
|
|
55
55
|
"@uniweb/build": {
|
package/partials/agents.md
CHANGED
|
@@ -546,7 +546,7 @@ Optional attributes: `{size=20}`, `{color=red}`. Custom SVGs: ` 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.
|
|
552
552
|
|
|
@@ -3076,7 +3076,7 @@ These are **body only — no frontmatter**; params and config still come from th
|
|
|
3076
3076
|
|
|
3077
3077
|
**A tagged data block translates by the shape its key declares** in the component's `meta.js` `data:` — a data schema or an inline field map: its text fields, never an enum, a URL or a `translatable: false` field. A key declared `{}` leaves its blocks to a heuristic that offers any string whose field name and value don't look structural, so a `style: display-black` naming one of your component's looks gets translated too. Declare the shape of every block a translator will see — `{ name: 'string', style: { type: 'string', enum: [...] } }`.
|
|
3078
3078
|
|
|
3079
|
-
**An image translates by its alt text.** Words alone give it its alt text in that language and keep its file. A translation that is an image also names the file that language shows: `"2d093636": ""`. Name it with a `/` path, a file in `public
|
|
3079
|
+
**An image translates by its alt text.** Words alone give it its alt text in that language and keep its file. A translation that is an image also names the file that language shows: `"2d093636": ""`. Name it with a `/` path, a file in `public/`, and a build processes it as it does the page's own images; a `./` path has no page's folder to start from, and the build reports it. A caption or a video's `poster` can be given the same way. An image with no alt text has nothing to translate, so give every image one.
|
|
3080
3080
|
|
|
3081
3081
|
**Records translate in the same `extract` run**, into their own manifest at `locales/records/manifest.json` — keyed by the RECORD, so a record translated once is found by every query that returns it. A record whose query has a data schema translates exactly the fields the schema says are text — never an enum, a URL, a date, a number, a file, a reference or a `translatable: false` field — which are the fields a push carries in each language; mark a string that is a code or a key `translatable: false` and no translator is asked for it. An excerpt the build derives is re-derived from each language's body.
|
|
3082
3082
|
|
package/src/commands/build.js
CHANGED
|
@@ -69,10 +69,6 @@ import {
|
|
|
69
69
|
isExtensionPackage,
|
|
70
70
|
detectFoundationType
|
|
71
71
|
} from '@uniweb/build'
|
|
72
|
-
import {
|
|
73
|
-
resolveDefaultLocale,
|
|
74
|
-
normalizeLanguageList
|
|
75
|
-
} from '@uniweb/core/locale-config'
|
|
76
72
|
import { readSiteConfig } from '@uniweb/build/site'
|
|
77
73
|
import { workspacePackages } from '../utils/workspace-packages.js'
|
|
78
74
|
|
|
@@ -424,34 +420,25 @@ async function loadI18nConfig(projectDir, siteConfig = null) {
|
|
|
424
420
|
const localesDir = config.i18n?.localesDir || 'locales'
|
|
425
421
|
const localesPath = join(projectDir, localesDir)
|
|
426
422
|
|
|
427
|
-
//
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
//
|
|
432
|
-
//
|
|
433
|
-
//
|
|
434
|
-
//
|
|
435
|
-
//
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
}
|
|
423
|
+
// The site's locales (undefined/'*' → all available, array → specific), with
|
|
424
|
+
// two filters, by the rule the bundle uses to decide whose files to process
|
|
425
|
+
// (`localesToBuild`):
|
|
426
|
+
// - Publish: build outputs are visitor artifacts. With an explicit
|
|
427
|
+
// `publishLanguages:`, only listed locales get dist/{locale}/ content,
|
|
428
|
+
// per-locale HTML, hreflang, and translated collections. Draft locales
|
|
429
|
+
// stay previewable in dev, which doesn't run this path. Intersecting the
|
|
430
|
+
// DISK-resolved list also covers wildcard (`languages: '*'`) sites.
|
|
431
|
+
// - ⛔ The default locale is the root tree, not `dist/<default>/`. An explicit
|
|
432
|
+
// `languages: [en, fr]` resolves verbatim — default included — so the DECLARED
|
|
433
|
+
// form (the one the contract tells authors to use) minted a duplicate copy of
|
|
434
|
+
// every page, while the wildcard form did not. Dropping it keeps content,
|
|
435
|
+
// per-locale HTML and translated records agreeing on one set.
|
|
436
|
+
const { localesToBuild } = await import('@uniweb/build/i18n')
|
|
437
|
+
const { locales, skipped, defaultLocale } = localesToBuild(config, localesPath)
|
|
438
|
+
if (skipped.length > 0) {
|
|
439
|
+
info(`Skipping non-publishable locale(s): ${skipped.join(', ')} (not in publishLanguages)`)
|
|
445
440
|
}
|
|
446
441
|
|
|
447
|
-
// ⛔ The default locale is the root tree, not `dist/<default>/`. An explicit
|
|
448
|
-
// `languages: [en, fr]` resolves verbatim — default included — so the DECLARED
|
|
449
|
-
// form (the one the contract tells authors to use) minted a duplicate copy of
|
|
450
|
-
// every page, while the wildcard form did not. Dropping it here keeps content,
|
|
451
|
-
// per-locale HTML and translated records agreeing on one set.
|
|
452
|
-
const defaultLocale = resolveDefaultLocale(config)
|
|
453
|
-
locales = locales.filter((l) => l !== defaultLocale)
|
|
454
|
-
|
|
455
442
|
if (locales.length === 0) return null
|
|
456
443
|
|
|
457
444
|
return {
|
package/src/framework-index.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"generatedAt": "2026-10-
|
|
3
|
+
"generatedAt": "2026-10-29T02:26:03.448Z",
|
|
4
4
|
"packages": {
|
|
5
5
|
"@uniweb/api": {
|
|
6
6
|
"version": "1.6.5"
|
|
7
7
|
},
|
|
8
8
|
"@uniweb/build": {
|
|
9
|
-
"version": "1.11.
|
|
9
|
+
"version": "1.11.1"
|
|
10
10
|
},
|
|
11
11
|
"@uniweb/content-reader": {
|
|
12
12
|
"version": "1.5.7"
|