uniweb 0.8.23 → 0.8.25

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": "0.8.23",
3
+ "version": "0.8.25",
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/kit": "0.7.16",
46
- "@uniweb/runtime": "0.6.18"
45
+ "@uniweb/runtime": "0.6.20",
46
+ "@uniweb/kit": "0.7.16"
47
47
  },
48
48
  "peerDependencies": {
49
+ "@uniweb/build": "0.8.24",
49
50
  "@uniweb/content-reader": "1.1.4",
50
- "@uniweb/build": "0.8.22",
51
51
  "@uniweb/semantic-parser": "1.1.7"
52
52
  },
53
53
  "peerDependenciesMeta": {
@@ -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
 
@@ -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 id="__SITE_CONTENT__"[^>]*>[\s\S]*?<\/script>/,
270
- `<script id="__SITE_CONTENT__" type="application/json">${localeContent}</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