@absolutejs/absolute 0.19.0-beta.357 → 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.
@@ -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
+ };
@@ -1,3 +1,4 @@
1
+ import '@angular/compiler';
1
2
  import { Component, input } from '@angular/core';
2
3
  import { registerStreamingSlot } from './core/streamingSlotRegistry.js';
3
4
  import * as i0 from "@angular/core";
@@ -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=A8ABDEF09265813C64756E2164756E21
40990
+ //# debugId=D4DA4AFA0313825F64756E2164756E21
40990
40991
  //# sourceMappingURL=index.js.map