@absolutejs/absolute 0.19.0-beta.422 → 0.19.0-beta.423
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/angular/index.js +17 -6
- package/dist/angular/index.js.map +5 -5
- package/dist/index.js +14 -5
- package/dist/index.js.map +4 -4
- package/dist/react/index.js +14 -5
- package/dist/react/index.js.map +4 -4
- package/dist/src/core/responseEnhancers.d.ts +1 -1
- package/dist/src/utils/streamingSlots.d.ts +4 -3
- package/dist/svelte/index.js +14 -5
- package/dist/svelte/index.js.map +4 -4
- package/dist/vue/index.js +14 -5
- package/dist/vue/index.js.map +4 -4
- package/package.json +1 -1
package/dist/angular/index.js
CHANGED
|
@@ -180785,7 +180785,13 @@ var createSlotPatchStatement = (id, payload) => `(window.${STREAMING_RUNTIME_GLO
|
|
|
180785
180785
|
var createNonceAttr = (nonce) => nonce ? ` nonce="${nonce}"` : "";
|
|
180786
180786
|
var createStreamingSlotId = () => `${SLOT_ID_PREFIX}${Math.random().toString(36).slice(2, 10)}`;
|
|
180787
180787
|
var getStreamingSlotsRuntimeScript = () => getStreamSwapRuntimeScript();
|
|
180788
|
-
var renderStreamingSlotsRuntimeTag = (nonce) =>
|
|
180788
|
+
var renderStreamingSlotsRuntimeTag = (nonce, runtimePreludeScript) => {
|
|
180789
|
+
const runtimeBody = [
|
|
180790
|
+
runtimePreludeScript?.trim() ? runtimePreludeScript.trim() : "",
|
|
180791
|
+
getStreamingSlotsRuntimeScript()
|
|
180792
|
+
].filter(Boolean).join(";");
|
|
180793
|
+
return `<script${createNonceAttr(nonce)}>${escapeScriptContent(runtimeBody)}</script>`;
|
|
180794
|
+
};
|
|
180789
180795
|
var renderStreamingSlotPlaceholder = (id, fallbackHtml = "") => `<div id="${createSlotPlaceholderId(id)}" data-absolute-slot="true">${fallbackHtml}</div>`;
|
|
180790
180796
|
var renderStreamingSlotPatchTag = (id, payload, nonce) => `<script${createNonceAttr(nonce)}>${escapeScriptContent(createSlotPatchStatement(id, payload))}</script>`;
|
|
180791
180797
|
var injectHtmlIntoHead = (html, injection) => {
|
|
@@ -181090,8 +181096,8 @@ var streamOutOfOrderSlots = ({
|
|
|
181090
181096
|
}
|
|
181091
181097
|
});
|
|
181092
181098
|
};
|
|
181093
|
-
var injectStreamingRuntimeIntoStream = (stream, nonce, runtimePlacement = "head") => {
|
|
181094
|
-
const runtimeTag = renderStreamingSlotsRuntimeTag(nonce);
|
|
181099
|
+
var injectStreamingRuntimeIntoStream = (stream, nonce, runtimePlacement = "head", runtimePreludeScript) => {
|
|
181100
|
+
const runtimeTag = renderStreamingSlotsRuntimeTag(nonce, runtimePreludeScript);
|
|
181095
181101
|
const encoder = new TextEncoder;
|
|
181096
181102
|
const decoder = new TextDecoder;
|
|
181097
181103
|
const closingTag = runtimePlacement === "body" ? CLOSING_BODY_TAG : CLOSING_HEAD_TAG;
|
|
@@ -181148,6 +181154,7 @@ var appendStreamingSlotPatchesToStream = (stream, slots = [], {
|
|
|
181148
181154
|
onError,
|
|
181149
181155
|
onSlotMetric,
|
|
181150
181156
|
policy,
|
|
181157
|
+
runtimePreludeScript,
|
|
181151
181158
|
runtimePlacement = "head"
|
|
181152
181159
|
} = {}) => {
|
|
181153
181160
|
const resolvedPolicy = resolveStreamingSlotPolicy(policy);
|
|
@@ -181165,7 +181172,7 @@ var appendStreamingSlotPatchesToStream = (stream, slots = [], {
|
|
|
181165
181172
|
});
|
|
181166
181173
|
if (preparedSlots.length === 0)
|
|
181167
181174
|
return stream;
|
|
181168
|
-
const source = injectRuntime ? injectStreamingRuntimeIntoStream(stream, nonce, runtimePlacement) : stream;
|
|
181175
|
+
const source = injectRuntime ? injectStreamingRuntimeIntoStream(stream, nonce, runtimePlacement, runtimePreludeScript) : stream;
|
|
181169
181176
|
const encoder = new TextEncoder;
|
|
181170
181177
|
const decoder = new TextDecoder;
|
|
181171
181178
|
const reader = source.getReader();
|
|
@@ -181254,6 +181261,7 @@ var enhanceHtmlResponseWithStreamingSlots = (response, {
|
|
|
181254
181261
|
nonce,
|
|
181255
181262
|
onError,
|
|
181256
181263
|
runtimePlacement,
|
|
181264
|
+
runtimePreludeScript,
|
|
181257
181265
|
streamingSlots = [],
|
|
181258
181266
|
policy
|
|
181259
181267
|
} = {}) => {
|
|
@@ -181264,6 +181272,7 @@ var enhanceHtmlResponseWithStreamingSlots = (response, {
|
|
|
181264
181272
|
nonce,
|
|
181265
181273
|
onError,
|
|
181266
181274
|
policy,
|
|
181275
|
+
runtimePreludeScript,
|
|
181267
181276
|
runtimePlacement
|
|
181268
181277
|
});
|
|
181269
181278
|
return new Response(body, {
|
|
@@ -181910,7 +181919,9 @@ StreamSlotComponent = __legacyDecorateClassTS([
|
|
|
181910
181919
|
], StreamSlotComponent);
|
|
181911
181920
|
|
|
181912
181921
|
// src/angular/index.ts
|
|
181913
|
-
var handleAngularPageRequest2 = wrapPageHandlerWithStreamingSlots(handleAngularPageRequest
|
|
181922
|
+
var handleAngularPageRequest2 = wrapPageHandlerWithStreamingSlots(handleAngularPageRequest, {
|
|
181923
|
+
runtimePreludeScript: "window.__ABS_SLOT_HYDRATION_PENDING__ = true;"
|
|
181924
|
+
});
|
|
181914
181925
|
export {
|
|
181915
181926
|
renderIsland,
|
|
181916
181927
|
handleAngularPageRequest2 as handleAngularPageRequest,
|
|
@@ -181926,5 +181937,5 @@ export {
|
|
|
181926
181937
|
DeferErrorTemplateDirective
|
|
181927
181938
|
};
|
|
181928
181939
|
|
|
181929
|
-
//# debugId=
|
|
181940
|
+
//# debugId=F985A10B96E2618164756E2164756E21
|
|
181930
181941
|
//# sourceMappingURL=index.js.map
|