@absolutejs/absolute 0.19.0-beta.356 → 0.19.0-beta.358
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/streamingSlotRegistry.js +46 -0
- package/dist/angular/components/stream-slot.component.js +1 -0
- package/dist/angular/index.js +2 -1
- package/dist/angular/index.js.map +3 -3
- package/dist/src/angular/components/stream-slot.component.d.ts +1 -0
- package/package.json +308 -308
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var __require = import.meta.require;
|
|
3
|
+
|
|
4
|
+
// .angular-partial-tmp/src/core/streamingSlotRegistry.ts
|
|
5
|
+
var asyncLocalStorage;
|
|
6
|
+
var isServerRuntime = () => typeof process !== "undefined" && typeof process.versions?.node === "string";
|
|
7
|
+
var ensureAsyncLocalStorage = async () => {
|
|
8
|
+
if (typeof asyncLocalStorage !== "undefined")
|
|
9
|
+
return asyncLocalStorage;
|
|
10
|
+
if (!isServerRuntime()) {
|
|
11
|
+
asyncLocalStorage = null;
|
|
12
|
+
return asyncLocalStorage;
|
|
13
|
+
}
|
|
14
|
+
const mod = await import("async_hooks");
|
|
15
|
+
asyncLocalStorage = new mod.AsyncLocalStorage;
|
|
16
|
+
return asyncLocalStorage;
|
|
17
|
+
};
|
|
18
|
+
var registerStreamingSlot = (slot) => {
|
|
19
|
+
if (!asyncLocalStorage)
|
|
20
|
+
return;
|
|
21
|
+
const store = asyncLocalStorage.getStore();
|
|
22
|
+
if (!store)
|
|
23
|
+
return;
|
|
24
|
+
store.set(slot.id, slot);
|
|
25
|
+
};
|
|
26
|
+
var runWithStreamingSlotRegistry = async (task) => {
|
|
27
|
+
const storage = await ensureAsyncLocalStorage();
|
|
28
|
+
if (!storage) {
|
|
29
|
+
return {
|
|
30
|
+
result: await task(),
|
|
31
|
+
slots: []
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
return storage.run(new Map, async () => {
|
|
35
|
+
const result = await task();
|
|
36
|
+
const store = storage.getStore();
|
|
37
|
+
return {
|
|
38
|
+
result,
|
|
39
|
+
slots: store ? [...store.values()] : []
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
export {
|
|
44
|
+
runWithStreamingSlotRegistry,
|
|
45
|
+
registerStreamingSlot
|
|
46
|
+
};
|
package/dist/angular/index.js
CHANGED
|
@@ -40757,6 +40757,7 @@ var renderIsland = (props) => renderIslandMarkup(requireCurrentIslandRegistry(),
|
|
|
40757
40757
|
import { Component as Component5, computed, input as input2 } from "@angular/core";
|
|
40758
40758
|
|
|
40759
40759
|
// src/angular/components/stream-slot.component.ts
|
|
40760
|
+
init_compiler();
|
|
40760
40761
|
import { Component as Component4, input } from "@angular/core";
|
|
40761
40762
|
class StreamSlotComponent {
|
|
40762
40763
|
className = input();
|
|
@@ -40986,5 +40987,5 @@ export {
|
|
|
40986
40987
|
DeferSlotComponent
|
|
40987
40988
|
};
|
|
40988
40989
|
|
|
40989
|
-
//# debugId=
|
|
40990
|
+
//# debugId=D4DA4AFA0313825F64756E2164756E21
|
|
40990
40991
|
//# sourceMappingURL=index.js.map
|