@absolutejs/absolute 0.19.0-beta.1130 → 0.19.0-beta.1131
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/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/src/vue/index.d.ts +1 -0
- package/dist/src/vue/teleports.d.ts +2 -0
- package/dist/vue/index.js +18 -7
- package/dist/vue/index.js.map +5 -4
- package/dist/vue/server.js +15 -6
- package/dist/vue/server.js.map +5 -4
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
|
-
// .angular-partial-tmp-
|
|
4
|
+
// .angular-partial-tmp-G4VWfM/src/core/streamingSlotRegistrar.ts
|
|
5
5
|
var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
|
|
6
6
|
var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
|
|
7
7
|
var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
|
-
// .angular-partial-tmp-
|
|
4
|
+
// .angular-partial-tmp-G4VWfM/src/core/streamingSlotRegistrar.ts
|
|
5
5
|
var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
|
|
6
6
|
var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
|
|
7
7
|
var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
|
|
@@ -48,7 +48,7 @@ var warnMissingStreamingSlotCollector = (primitiveName) => {
|
|
|
48
48
|
getWarningController()?.maybeWarn(primitiveName);
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
// .angular-partial-tmp-
|
|
51
|
+
// .angular-partial-tmp-G4VWfM/src/core/streamingSlotRegistry.ts
|
|
52
52
|
var STREAMING_SLOT_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotAsyncLocalStorage");
|
|
53
53
|
var isObjectRecord2 = (value) => Boolean(value) && typeof value === "object";
|
|
54
54
|
var isAsyncLocalStorage = (value) => isObjectRecord2(value) && ("getStore" in value) && typeof value.getStore === "function" && ("run" in value) && typeof value.run === "function";
|
package/dist/src/vue/index.d.ts
CHANGED
|
@@ -8,4 +8,5 @@ export { useIslandStore } from './useIslandStore';
|
|
|
8
8
|
export { Image } from './components/Image';
|
|
9
9
|
export { StreamSlot, SuspenseSlot } from './components';
|
|
10
10
|
export { useResource } from './useResource';
|
|
11
|
+
export { ABSOLUTE_TELEPORT_TARGET, ABSOLUTE_TELEPORT_TARGET_ID } from './teleports';
|
|
11
12
|
export type { Resource, ResourceFetcher, ResourceMutator, ResourceOptions, ResourceStart } from './useResource';
|
package/dist/vue/index.js
CHANGED
|
@@ -5068,6 +5068,10 @@ var resolveGeneratedVueModulePath = async (pagePath) => {
|
|
|
5068
5068
|
}
|
|
5069
5069
|
};
|
|
5070
5070
|
|
|
5071
|
+
// src/vue/teleports.ts
|
|
5072
|
+
var ABSOLUTE_TELEPORT_TARGET_ID = "absolute-teleports";
|
|
5073
|
+
var ABSOLUTE_TELEPORT_TARGET = `#${ABSOLUTE_TELEPORT_TARGET_ID}`;
|
|
5074
|
+
|
|
5071
5075
|
// src/vue/pageHandler.ts
|
|
5072
5076
|
var isRecord2 = (value) => typeof value === "object" && value !== null;
|
|
5073
5077
|
var isGenericVueComponent = (value) => typeof value === "function" || isRecord2(value);
|
|
@@ -5197,15 +5201,20 @@ var handleVuePageRequest = async (input) => {
|
|
|
5197
5201
|
status: 404
|
|
5198
5202
|
});
|
|
5199
5203
|
}
|
|
5204
|
+
const ssrContext = {};
|
|
5200
5205
|
const head = `<!DOCTYPE html><html>${resolvedHeadTag}<body><div id="root">`;
|
|
5201
5206
|
const ssrOnlyHmrShim = clientMode === "none" ? await getSsrOnlyHmrShim() : "";
|
|
5202
|
-
const
|
|
5207
|
+
const buildTail = () => {
|
|
5208
|
+
const teleports = ssrContext.teleports?.[ABSOLUTE_TELEPORT_TARGET] ?? "";
|
|
5209
|
+
const teleportHost = `<div id="${ABSOLUTE_TELEPORT_TARGET_ID}">${teleports}</div>`;
|
|
5210
|
+
return clientMode === "none" ? `</div>${teleportHost}${ssrOnlyHmrShim}</body></html>` : `</div>${teleportHost}<script>window.__INITIAL_PROPS__=${JSON.stringify(maybeProps ?? {})}</script><script type="module" src="${resolvedIndexPath}"></script></body></html>`;
|
|
5211
|
+
};
|
|
5203
5212
|
if (resolvedPage.hasSpaRoutes && clientMode === "auto") {
|
|
5204
|
-
return new Response(`${head}${
|
|
5213
|
+
return new Response(`${head}${buildTail()}`, {
|
|
5205
5214
|
headers: { "Content-Type": "text/html" }
|
|
5206
5215
|
});
|
|
5207
5216
|
}
|
|
5208
|
-
const bodyStream = renderToWebStream(app);
|
|
5217
|
+
const bodyStream = renderToWebStream(app, ssrContext);
|
|
5209
5218
|
const { firstChunk, reader } = await primeVueStream(bodyStream);
|
|
5210
5219
|
const stream = new ReadableStream({
|
|
5211
5220
|
start(controller) {
|
|
@@ -5214,12 +5223,12 @@ var handleVuePageRequest = async (input) => {
|
|
|
5214
5223
|
controller.enqueue(firstChunk.value);
|
|
5215
5224
|
}
|
|
5216
5225
|
if (firstChunk.done) {
|
|
5217
|
-
controller.enqueue(
|
|
5226
|
+
controller.enqueue(buildTail());
|
|
5218
5227
|
controller.close();
|
|
5219
5228
|
return;
|
|
5220
5229
|
}
|
|
5221
5230
|
const pumpLoop = () => {
|
|
5222
|
-
reader.read().then(({ done, value }) => done ? (controller.enqueue(
|
|
5231
|
+
reader.read().then(({ done, value }) => done ? (controller.enqueue(buildTail()), controller.close()) : (controller.enqueue(value), pumpLoop())).catch((err) => controller.error(err));
|
|
5223
5232
|
};
|
|
5224
5233
|
pumpLoop();
|
|
5225
5234
|
}
|
|
@@ -5703,8 +5712,10 @@ export {
|
|
|
5703
5712
|
SuspenseSlot,
|
|
5704
5713
|
StreamSlot,
|
|
5705
5714
|
Island,
|
|
5706
|
-
Image
|
|
5715
|
+
Image,
|
|
5716
|
+
ABSOLUTE_TELEPORT_TARGET_ID,
|
|
5717
|
+
ABSOLUTE_TELEPORT_TARGET
|
|
5707
5718
|
};
|
|
5708
5719
|
|
|
5709
|
-
//# debugId=
|
|
5720
|
+
//# debugId=6A1BBD6E34EDDB7064756E2164756E21
|
|
5710
5721
|
//# sourceMappingURL=index.js.map
|