@uniweb/runtime 0.9.4 → 0.9.6
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/dist/app/_importmap/@uniweb-core.js +1 -1
- package/dist/app/assets/core-BI26Dvfl.js +133 -0
- package/dist/app/assets/{index-C2Sw5X24.js → index-C-EVgXSD.js} +18 -18
- package/dist/app/index.html +2 -2
- package/dist/app/manifest.json +3 -3
- package/dist/shims/uniweb-core.js +7 -0
- package/dist/ssr.js +12 -0
- package/dist/ssr.js.map +1 -1
- package/dist/worker-runtime.js +328 -89
- package/package.json +4 -3
- package/src/ssr-renderer.js +45 -0
- package/src/ssr.js +6 -1
- package/dist/app/_importmap/@uniweb-core.js.map +0 -1
- package/dist/app/_importmap/react-dom-server.js.map +0 -1
- package/dist/app/_importmap/react-dom.js.map +0 -1
- package/dist/app/_importmap/react-jsx-dev-runtime.js.map +0 -1
- package/dist/app/_importmap/react-jsx-runtime.js.map +0 -1
- package/dist/app/_importmap/react.js.map +0 -1
- package/dist/app/assets/_commonjsHelpers-CqkleIqs.js.map +0 -1
- package/dist/app/assets/_importmap_react-CrAkajDz.js.map +0 -1
- package/dist/app/assets/core-CSPVyulX.js +0 -133
- package/dist/app/assets/core-CSPVyulX.js.map +0 -1
- package/dist/app/assets/index-C2Sw5X24.js.map +0 -1
- package/dist/app/assets/index-CxUeIbEw.js.map +0 -1
- package/dist/app/assets/index-VvOM7xKK.js.map +0 -1
- package/dist/app/assets/jsx-runtime-0PlsXv6K.js.map +0 -1
package/dist/app/index.html
CHANGED
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
</script>
|
|
21
|
-
<script type="module" crossorigin src="/assets/index-
|
|
21
|
+
<script type="module" crossorigin src="/assets/index-C-EVgXSD.js"></script>
|
|
22
22
|
<link rel="modulepreload" crossorigin href="/assets/_commonjsHelpers-CqkleIqs.js">
|
|
23
23
|
<link rel="modulepreload" crossorigin href="/assets/jsx-runtime-0PlsXv6K.js">
|
|
24
24
|
<link rel="modulepreload" crossorigin href="/assets/index-CxUeIbEw.js">
|
|
25
25
|
<link rel="modulepreload" crossorigin href="/assets/_importmap_react-CrAkajDz.js">
|
|
26
26
|
<link rel="modulepreload" crossorigin href="/assets/index-VvOM7xKK.js">
|
|
27
|
-
<link rel="modulepreload" crossorigin href="/assets/core-
|
|
27
|
+
<link rel="modulepreload" crossorigin href="/assets/core-BI26Dvfl.js">
|
|
28
28
|
</head>
|
|
29
29
|
<body>
|
|
30
30
|
<div id="root"></div>
|
package/dist/app/manifest.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
3
|
-
"entry": "assets/index-
|
|
2
|
+
"version": "0.9.6",
|
|
3
|
+
"entry": "assets/index-C-EVgXSD.js",
|
|
4
4
|
"preloads": [
|
|
5
5
|
"assets/_commonjsHelpers-CqkleIqs.js",
|
|
6
6
|
"assets/index-VvOM7xKK.js",
|
|
7
7
|
"assets/index-CxUeIbEw.js",
|
|
8
8
|
"assets/_importmap_react-CrAkajDz.js",
|
|
9
9
|
"assets/jsx-runtime-0PlsXv6K.js",
|
|
10
|
-
"assets/core-
|
|
10
|
+
"assets/core-BI26Dvfl.js"
|
|
11
11
|
],
|
|
12
12
|
"importMap": {
|
|
13
13
|
"react": "_importmap/react.js",
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
const __ns = globalThis.__PLATFORM_UNIWEB_CORE
|
|
4
4
|
export default __ns?.default ?? __ns
|
|
5
5
|
export const Block = __ns.Block
|
|
6
|
+
export const DATA_DIR = __ns.DATA_DIR
|
|
7
|
+
export const DATA_URL_PREFIX = __ns.DATA_URL_PREFIX
|
|
6
8
|
export const DataStore = __ns.DataStore
|
|
7
9
|
export const EntityStore = __ns.EntityStore
|
|
8
10
|
export const FetcherDispatcher = __ns.FetcherDispatcher
|
|
@@ -11,16 +13,21 @@ export const Page = __ns.Page
|
|
|
11
13
|
export const Theme = __ns.Theme
|
|
12
14
|
export const Uniweb = __ns.Uniweb
|
|
13
15
|
export const Website = __ns.Website
|
|
16
|
+
export const collectionDataUrl = __ns.collectionDataUrl
|
|
17
|
+
export const collectionNameFromUrl = __ns.collectionNameFromUrl
|
|
14
18
|
export const createUniweb = __ns.createUniweb
|
|
15
19
|
export const deriveCacheKey = __ns.deriveCacheKey
|
|
16
20
|
export const evaluateWhere = __ns.evaluateWhere
|
|
17
21
|
export const getUniweb = __ns.getUniweb
|
|
18
22
|
export const hasDarkScheme = __ns.hasDarkScheme
|
|
23
|
+
export const isDataUrl = __ns.isDataUrl
|
|
19
24
|
export const isRichSchema = __ns.isRichSchema
|
|
20
25
|
export const isWildcardLanguages = __ns.isWildcardLanguages
|
|
21
26
|
export const listRequestStyleNames = __ns.listRequestStyleNames
|
|
22
27
|
export const matchWhere = __ns.matchWhere
|
|
23
28
|
export const normalizeLanguageList = __ns.normalizeLanguageList
|
|
29
|
+
export const normalizeSchema = __ns.normalizeSchema
|
|
30
|
+
export const recordDataUrl = __ns.recordDataUrl
|
|
24
31
|
export const resolveDefaultLocale = __ns.resolveDefaultLocale
|
|
25
32
|
export const resolvePublishableLocales = __ns.resolvePublishableLocales
|
|
26
33
|
export const resolveRequestStyle = __ns.resolveRequestStyle
|
package/dist/ssr.js
CHANGED
|
@@ -693,6 +693,9 @@ async function prefetchIcons(siteContent, uniweb, onProgress = () => {
|
|
|
693
693
|
siteContent._iconCache = Object.fromEntries(uniweb.iconCache);
|
|
694
694
|
}
|
|
695
695
|
}
|
|
696
|
+
function resolvePage(website, route) {
|
|
697
|
+
return website.getPage(route);
|
|
698
|
+
}
|
|
696
699
|
function classifyRenderError(err) {
|
|
697
700
|
const msg = err.message || "";
|
|
698
701
|
if (msg.includes("Invalid hook call") || msg.includes("useState") || msg.includes("useEffect")) {
|
|
@@ -714,6 +717,14 @@ function classifyRenderError(err) {
|
|
|
714
717
|
}
|
|
715
718
|
function renderPage(page, website) {
|
|
716
719
|
website.setActivePage(page.route);
|
|
720
|
+
if (page.hasContent?.() && page.getBodyBlocks().length === 0) {
|
|
721
|
+
return {
|
|
722
|
+
error: {
|
|
723
|
+
type: "content-not-loaded",
|
|
724
|
+
message: `page "${page.route}" declares content but has no loaded sections — its sections are not in the payload and this renderer does not fetch them`
|
|
725
|
+
}
|
|
726
|
+
};
|
|
727
|
+
}
|
|
717
728
|
const element = renderLayout(page, website);
|
|
718
729
|
let renderedContent;
|
|
719
730
|
try {
|
|
@@ -855,6 +866,7 @@ export {
|
|
|
855
866
|
renderBlocks,
|
|
856
867
|
renderLayout,
|
|
857
868
|
renderPage,
|
|
869
|
+
resolvePage,
|
|
858
870
|
sliceContentForLocale
|
|
859
871
|
};
|
|
860
872
|
//# sourceMappingURL=ssr.js.map
|