@uniweb/core 1.4.11 → 1.4.12
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/src/page-shell-vectors.js +1 -0
- package/src/page-shell.js +4 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniweb/core",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.12",
|
|
4
4
|
"description": "Core classes for the Uniweb platform - Uniweb, Website, Page, Block",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"vitest": "^4.1.7"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@uniweb/
|
|
57
|
-
"@uniweb/
|
|
56
|
+
"@uniweb/semantic-parser": "~1.13.0",
|
|
57
|
+
"@uniweb/theming": "~1.2.1"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
|
60
60
|
"test": "vitest run"
|
|
@@ -27,6 +27,7 @@ export const PAGE_SHELL_VECTORS = [
|
|
|
27
27
|
config: {
|
|
28
28
|
name: `Café & "Co" <Ltd>'s`,
|
|
29
29
|
favicon: '/favicon.svg?v=2',
|
|
30
|
+
touchIcon: '/touch-icon.png?a="1"',
|
|
30
31
|
activeLocale: 'fr',
|
|
31
32
|
extensions: ['https://assets.test/effects/entry.js', { url: '/ext/charts/entry.js' }, null],
|
|
32
33
|
},
|
package/src/page-shell.js
CHANGED
|
@@ -80,8 +80,8 @@ const extensionUrl = (entry) => (typeof entry === 'string' ? entry : entry?.url)
|
|
|
80
80
|
*
|
|
81
81
|
* @param {Object} input
|
|
82
82
|
* @param {Object} input.content - one locale's content as the host stamped it: `config` (`name`,
|
|
83
|
-
* `favicon`, `activeLocale`, `extensions` — each extension's entry URL, in declared
|
|
84
|
-
* pages, and any `fetchedData`
|
|
83
|
+
* `favicon`, `touchIcon`, `activeLocale`, `extensions` — each extension's entry URL, in declared
|
|
84
|
+
* order), the pages, and any `fetchedData`
|
|
85
85
|
* @param {string} [input.route] - the served page's route as the content names it, so a split
|
|
86
86
|
* site's `__DATA__` carries that page's sections (`dataScript`)
|
|
87
87
|
* @param {{ url: string, cssUrl?: string }} input.foundation - the foundation's entry; its
|
|
@@ -113,6 +113,8 @@ export function pageShell({ content, route = null, foundation, runtime }) {
|
|
|
113
113
|
config.favicon
|
|
114
114
|
? `<link rel="icon"${faviconType(config.favicon) ? ` type="${faviconType(config.favicon)}"` : ''} href="${escapeHtml(config.favicon)}">`
|
|
115
115
|
: null,
|
|
116
|
+
// The icon iOS puts on a home screen and Safari on its start page — a PNG; neither uses an SVG favicon.
|
|
117
|
+
config.touchIcon ? `<link rel="apple-touch-icon" href="${escapeHtml(config.touchIcon)}">` : null,
|
|
116
118
|
cssUrl ? `<link rel="stylesheet" href="${escapeHtml(cssUrl)}">` : null,
|
|
117
119
|
// Before the module script and every preload: a browser reads an import map only ahead of them.
|
|
118
120
|
`<script type="importmap">${jsonForScript({ imports: importMap })}</script>`,
|