@uniweb/runtime 1.1.15 → 1.1.16
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/ssr.js +8 -5
- package/dist/ssr.js.map +1 -1
- package/package.json +4 -4
- package/src/foundation-loader.js +5 -3
- package/src/isolate-api.js +6 -0
- package/src/setup.js +7 -1
- package/src/ssr-renderer.js +4 -12
- package/src/ssr.js +17 -0
package/dist/ssr.js
CHANGED
|
@@ -9,10 +9,13 @@ import { DEFAULT_ICON_BASE, iconUrl } from "@uniweb/core/icon-corpus";
|
|
|
9
9
|
import { buildTheme, FONT_LINKS_MARKER, buildSectionOverrides } from "@uniweb/theming";
|
|
10
10
|
import "@uniweb/core/services";
|
|
11
11
|
import "@uniweb/core/tracker";
|
|
12
|
+
import { escapeHtml } from "@uniweb/core/page-shell";
|
|
13
|
+
import { escapeHtml as escapeHtml2, foundationCssUrl, pageShell } from "@uniweb/core/page-shell";
|
|
12
14
|
import DataStore, { deriveCacheKey as deriveCacheKey$1 } from "@uniweb/core/datastore";
|
|
13
15
|
import { RESOLUTION_STATUS, carryQuery, localeOfPath, localeUrl, resolveRoute, routeIndex } from "@uniweb/core/resolve-route";
|
|
14
16
|
import { resolveFetchConfigs } from "@uniweb/core/fetch-config";
|
|
15
17
|
import { resolveRecordsService } from "@uniweb/core/records-service";
|
|
18
|
+
import { dataScript, jsonForScript } from "@uniweb/core/data-script";
|
|
16
19
|
function guaranteeItemStructure(item) {
|
|
17
20
|
return {
|
|
18
21
|
title: item.title || "",
|
|
@@ -772,10 +775,6 @@ function renderPage(page, website) {
|
|
|
772
775
|
const sectionOverrideCSS = buildSectionOverrides(page.getAllBlocks(), appearance);
|
|
773
776
|
return { renderedContent, sectionOverrideCSS };
|
|
774
777
|
}
|
|
775
|
-
function escapeHtml(str) {
|
|
776
|
-
if (!str) return "";
|
|
777
|
-
return String(str).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
778
|
-
}
|
|
779
778
|
function injectPageContent(html, renderedContent, page, options = {}) {
|
|
780
779
|
let result = html;
|
|
781
780
|
if (!result.includes('id="uniweb-appearance"')) {
|
|
@@ -1306,8 +1305,10 @@ export {
|
|
|
1306
1305
|
classifyRenderError,
|
|
1307
1306
|
collectSiteRecords,
|
|
1308
1307
|
createPageRenderer,
|
|
1309
|
-
|
|
1308
|
+
dataScript,
|
|
1309
|
+
escapeHtml2 as escapeHtml,
|
|
1310
1310
|
findPageForRoute,
|
|
1311
|
+
foundationCssUrl,
|
|
1311
1312
|
generate404Html,
|
|
1312
1313
|
getComponentDefaults,
|
|
1313
1314
|
getComponentMeta,
|
|
@@ -1317,9 +1318,11 @@ export {
|
|
|
1317
1318
|
initPrerender,
|
|
1318
1319
|
initPrerenderForLocale,
|
|
1319
1320
|
injectPageContent,
|
|
1321
|
+
jsonForScript,
|
|
1320
1322
|
loadPageData,
|
|
1321
1323
|
localeOfPath,
|
|
1322
1324
|
localeUrl,
|
|
1325
|
+
pageShell,
|
|
1323
1326
|
prefetchAndHydrate,
|
|
1324
1327
|
prefetchIcons,
|
|
1325
1328
|
prepareProps,
|