uniweb 0.8.24 → 0.8.26
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 +3 -3
- package/partials/agents.md +1 -1
- package/src/commands/build.js +2 -2
- package/src/commands/i18n.js +10 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uniweb",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.26",
|
|
4
4
|
"description": "Create structured Vite + React sites with content/code separation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
"prompts": "^2.4.2",
|
|
43
43
|
"tar": "^7.0.0",
|
|
44
44
|
"@uniweb/core": "0.5.15",
|
|
45
|
-
"@uniweb/runtime": "0.6.
|
|
45
|
+
"@uniweb/runtime": "0.6.21",
|
|
46
46
|
"@uniweb/kit": "0.7.16"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
+
"@uniweb/build": "0.8.25",
|
|
49
50
|
"@uniweb/content-reader": "1.1.4",
|
|
50
|
-
"@uniweb/build": "0.8.23",
|
|
51
51
|
"@uniweb/semantic-parser": "1.1.7"
|
|
52
52
|
},
|
|
53
53
|
"peerDependenciesMeta": {
|
package/partials/agents.md
CHANGED
|
@@ -1194,7 +1194,7 @@ export default function DocsLayout({ header, body, footer, left, right, params }
|
|
|
1194
1194
|
}
|
|
1195
1195
|
```
|
|
1196
1196
|
|
|
1197
|
-
**Layout meta.js** declares areas: `{ areas: ['header', 'footer', 'left'] }`. Area names are arbitrary.
|
|
1197
|
+
**Layout meta.js** declares areas and optional scroll behavior: `{ areas: ['header', 'footer', 'left'], scroll: 'self' }`. Area names are arbitrary. The `scroll` property controls how the runtime manages scroll restoration: not set = runtime manages on `window` (default), `'self'` = layout handles its own scrolling, or a CSS selector (e.g. `'main'`) = runtime manages scroll on that element.
|
|
1198
1198
|
|
|
1199
1199
|
**Layout content** — each layout has section files in `site/layout/`:
|
|
1200
1200
|
|
package/src/commands/build.js
CHANGED
|
@@ -266,8 +266,8 @@ async function generateLocalizedHtml(projectDir, i18nConfig) {
|
|
|
266
266
|
const localeContent = await readFile(localeContentPath, 'utf-8')
|
|
267
267
|
// Replace the inlined content if present
|
|
268
268
|
localeHtml = localeHtml.replace(
|
|
269
|
-
/<script
|
|
270
|
-
`<script
|
|
269
|
+
/<script[^>]*id="__SITE_CONTENT__"[^>]*>[\s\S]*?<\/script>/,
|
|
270
|
+
`<script type="application/json" id="__SITE_CONTENT__">${localeContent}</script>`
|
|
271
271
|
)
|
|
272
272
|
}
|
|
273
273
|
|
package/src/commands/i18n.js
CHANGED
|
@@ -841,6 +841,16 @@ async function runAudit(siteRoot, config, args) {
|
|
|
841
841
|
log(`\n${colors.dim}Run with --clean to remove stale entries.${colors.reset}`)
|
|
842
842
|
}
|
|
843
843
|
}
|
|
844
|
+
|
|
845
|
+
// Report entries that need inline tag updates
|
|
846
|
+
const needsTagsTotal = results.reduce((sum, r) => sum + (r.needsTags?.length || 0), 0)
|
|
847
|
+
if (needsTagsTotal > 0) {
|
|
848
|
+
log(`\n${colors.yellow}${needsTagsTotal} translation(s) have inline marks in the source but not in the translation.`)
|
|
849
|
+
log(`These translations won't preserve accent/span styling.${colors.reset}`)
|
|
850
|
+
if (!verbose) {
|
|
851
|
+
log(`${colors.dim}Run with --verbose to see which entries are affected.${colors.reset}`)
|
|
852
|
+
}
|
|
853
|
+
}
|
|
844
854
|
} catch (err) {
|
|
845
855
|
error(`Audit failed: ${err.message}`)
|
|
846
856
|
process.exit(1)
|