@absolutejs/absolute 0.19.0-beta.1023 → 0.19.0-beta.1024
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/browser.js +13 -17
- package/dist/angular/browser.js.map +3 -3
- package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/angular/index.js +595 -267
- package/dist/angular/index.js.map +11 -8
- package/dist/angular/server.js +577 -249
- package/dist/angular/server.js.map +11 -8
- package/dist/build.js +827 -735
- package/dist/build.js.map +11 -10
- package/dist/cli/config/server.js +49 -42
- package/dist/client/index.js +34 -20
- package/dist/client/index.js.map +6 -6
- package/dist/index.js +899 -800
- package/dist/index.js.map +12 -11
- package/dist/islands/index.js +416 -95
- package/dist/islands/index.js.map +10 -7
- package/dist/react/browser.js +13 -17
- package/dist/react/browser.js.map +3 -3
- package/dist/react/index.js +484 -156
- package/dist/react/index.js.map +12 -9
- package/dist/react/server.js +69 -62
- package/dist/react/server.js.map +5 -5
- package/dist/src/client/preserveIslandMarkup.d.ts +4 -1
- package/dist/src/core/angularServerModule.d.ts +1 -0
- package/dist/svelte/index.js +389 -61
- package/dist/svelte/index.js.map +11 -8
- package/dist/svelte/server.js +50 -43
- package/dist/svelte/server.js.map +3 -3
- package/dist/types/angular.d.ts +3 -0
- package/dist/types/globals.d.ts +0 -1
- package/dist/vue/browser.js +13 -17
- package/dist/vue/browser.js.map +3 -3
- package/dist/vue/index.js +477 -153
- package/dist/vue/index.js.map +12 -9
- package/dist/vue/server.js +50 -43
- package/dist/vue/server.js.map +3 -3
- package/package.json +1 -1
package/dist/svelte/server.js
CHANGED
|
@@ -2224,7 +2224,6 @@ var runWithStreamingSlotRegistry = async (task) => {
|
|
|
2224
2224
|
init_svelteServerModule();
|
|
2225
2225
|
|
|
2226
2226
|
// src/core/islandPageContext.ts
|
|
2227
|
-
init_constants();
|
|
2228
2227
|
var BOOTSTRAP_MANIFEST_KEY = "BootstrapClient";
|
|
2229
2228
|
var ISLAND_MARKER = 'data-island="true"';
|
|
2230
2229
|
var MANIFEST_MARKER = "__ABSOLUTE_MANIFEST__";
|
|
@@ -2345,61 +2344,69 @@ var pipeStreamWithHeadInjection = (stream, markup) => {
|
|
|
2345
2344
|
var pipeStreamWithIslandMarkerDetection = (stream, markup) => {
|
|
2346
2345
|
const encoder = new TextEncoder;
|
|
2347
2346
|
const decoder = new TextDecoder;
|
|
2348
|
-
const
|
|
2349
|
-
const
|
|
2350
|
-
if (
|
|
2351
|
-
controller.enqueue(encoder.encode(
|
|
2352
|
-
return { injected, pending: "" };
|
|
2347
|
+
const headLookbehind = CLOSING_HEAD_TAG.length - 1;
|
|
2348
|
+
const enqueue = (controller, text) => {
|
|
2349
|
+
if (text.length > 0) {
|
|
2350
|
+
controller.enqueue(encoder.encode(text));
|
|
2353
2351
|
}
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
const next = `${pending.slice(0, injectAt)}${markup}${pending.slice(injectAt)}`;
|
|
2359
|
-
controller.enqueue(encoder.encode(next));
|
|
2360
|
-
return { injected: true, pending: "" };
|
|
2352
|
+
};
|
|
2353
|
+
const processHolding = (controller, held) => {
|
|
2354
|
+
if (!held.includes(ISLAND_MARKER)) {
|
|
2355
|
+
return { held, injected: false, pending: "", sawHead: true };
|
|
2361
2356
|
}
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
pending: flushSafePendingText(controller, encoder, pending, lookbehind)
|
|
2365
|
-
};
|
|
2357
|
+
enqueue(controller, `${markup}${held}`);
|
|
2358
|
+
return { held: "", injected: true, pending: "", sawHead: true };
|
|
2366
2359
|
};
|
|
2367
|
-
const
|
|
2368
|
-
const
|
|
2369
|
-
if (
|
|
2370
|
-
|
|
2360
|
+
const processHead = (controller, pending) => {
|
|
2361
|
+
const headIndex = pending.indexOf(CLOSING_HEAD_TAG);
|
|
2362
|
+
if (headIndex < 0) {
|
|
2363
|
+
return {
|
|
2364
|
+
held: "",
|
|
2365
|
+
injected: false,
|
|
2366
|
+
pending: flushSafePendingText(controller, encoder, pending, headLookbehind),
|
|
2367
|
+
sawHead: false
|
|
2368
|
+
};
|
|
2371
2369
|
}
|
|
2372
|
-
controller.
|
|
2370
|
+
enqueue(controller, pending.slice(0, headIndex));
|
|
2371
|
+
return processHolding(controller, pending.slice(headIndex));
|
|
2373
2372
|
};
|
|
2374
|
-
const
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
return
|
|
2373
|
+
const processChunk = (controller, state, chunk) => {
|
|
2374
|
+
if (state.injected) {
|
|
2375
|
+
enqueue(controller, chunk);
|
|
2376
|
+
return state;
|
|
2378
2377
|
}
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
pending: processed.pending
|
|
2384
|
-
};
|
|
2378
|
+
if (!state.sawHead) {
|
|
2379
|
+
return processHead(controller, state.pending + chunk);
|
|
2380
|
+
}
|
|
2381
|
+
return processHolding(controller, state.held + chunk);
|
|
2385
2382
|
};
|
|
2386
|
-
const
|
|
2387
|
-
const
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2383
|
+
const finishMarkerStream = (controller, state) => {
|
|
2384
|
+
const tail = decoder.decode();
|
|
2385
|
+
const remainder = state.injected ? tail : (state.sawHead ? state.held : state.pending) + tail;
|
|
2386
|
+
enqueue(controller, remainder);
|
|
2387
|
+
controller.close();
|
|
2388
|
+
};
|
|
2389
|
+
const runMarkerLoop = (controller, reader) => {
|
|
2390
|
+
const consumeNext = async (state) => {
|
|
2391
|
+
const { done, value } = await readStreamChunk(reader);
|
|
2392
|
+
if (done || !value) {
|
|
2393
|
+
return state;
|
|
2392
2394
|
}
|
|
2393
|
-
return
|
|
2395
|
+
return consumeNext(processChunk(controller, state, streamChunkToString(value, decoder)));
|
|
2394
2396
|
};
|
|
2395
|
-
return
|
|
2397
|
+
return consumeNext({
|
|
2398
|
+
held: "",
|
|
2399
|
+
injected: false,
|
|
2400
|
+
pending: "",
|
|
2401
|
+
sawHead: false
|
|
2402
|
+
});
|
|
2396
2403
|
};
|
|
2397
2404
|
return new ReadableStream({
|
|
2398
2405
|
async start(controller) {
|
|
2399
2406
|
const reader = stream.getReader();
|
|
2400
2407
|
try {
|
|
2401
|
-
const
|
|
2402
|
-
|
|
2408
|
+
const finalState = await runMarkerLoop(controller, reader);
|
|
2409
|
+
finishMarkerStream(controller, finalState);
|
|
2403
2410
|
} catch (error) {
|
|
2404
2411
|
controller.error(error);
|
|
2405
2412
|
}
|
|
@@ -2985,5 +2992,5 @@ export {
|
|
|
2985
2992
|
handleSveltePageRequest
|
|
2986
2993
|
};
|
|
2987
2994
|
|
|
2988
|
-
//# debugId=
|
|
2995
|
+
//# debugId=200C89226B8C4C5764756E2164756E21
|
|
2989
2996
|
//# sourceMappingURL=server.js.map
|