@absolutejs/absolute 0.19.0-beta.375 → 0.19.0-beta.377

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.
@@ -180356,6 +180356,61 @@ var init_imageProcessing = __esm(() => {
180356
180356
  };
180357
180357
  });
180358
180358
 
180359
+ // src/core/streamingSlotRegistrar.ts
180360
+ var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
180361
+ var getRegistrarGlobal = () => globalThis;
180362
+ var setStreamingSlotRegistrar = (nextRegistrar) => {
180363
+ getRegistrarGlobal()[STREAMING_SLOT_REGISTRAR_KEY] = nextRegistrar;
180364
+ };
180365
+ var registerStreamingSlot = (slot) => {
180366
+ getRegistrarGlobal()[STREAMING_SLOT_REGISTRAR_KEY]?.(slot);
180367
+ };
180368
+
180369
+ // src/core/streamingSlotRegistry.ts
180370
+ var STREAMING_SLOT_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotAsyncLocalStorage");
180371
+ var getStorageGlobal = () => globalThis;
180372
+ var isServerRuntime = () => typeof process !== "undefined" && typeof process.versions?.node === "string";
180373
+ var ensureAsyncLocalStorage = async () => {
180374
+ const storageGlobal = getStorageGlobal();
180375
+ if (typeof storageGlobal[STREAMING_SLOT_STORAGE_KEY] !== "undefined") {
180376
+ return storageGlobal[STREAMING_SLOT_STORAGE_KEY];
180377
+ }
180378
+ if (!isServerRuntime()) {
180379
+ storageGlobal[STREAMING_SLOT_STORAGE_KEY] = null;
180380
+ return storageGlobal[STREAMING_SLOT_STORAGE_KEY];
180381
+ }
180382
+ const mod = await import("async_hooks");
180383
+ storageGlobal[STREAMING_SLOT_STORAGE_KEY] = new mod.AsyncLocalStorage;
180384
+ return storageGlobal[STREAMING_SLOT_STORAGE_KEY];
180385
+ };
180386
+ var registerStreamingSlot2 = (slot) => {
180387
+ const storage = getStorageGlobal()[STREAMING_SLOT_STORAGE_KEY];
180388
+ if (!storage)
180389
+ return;
180390
+ const store = storage.getStore();
180391
+ if (!store)
180392
+ return;
180393
+ store.set(slot.id, slot);
180394
+ };
180395
+ setStreamingSlotRegistrar(registerStreamingSlot2);
180396
+ var runWithStreamingSlotRegistry = async (task) => {
180397
+ const storage = await ensureAsyncLocalStorage();
180398
+ if (!storage) {
180399
+ return {
180400
+ result: await task(),
180401
+ slots: []
180402
+ };
180403
+ }
180404
+ return storage.run(new Map, async () => {
180405
+ const result = await task();
180406
+ const store = storage.getStore();
180407
+ return {
180408
+ result,
180409
+ slots: store ? [...store.values()] : []
180410
+ };
180411
+ });
180412
+ };
180413
+
180359
180414
  // src/angular/index.ts
180360
180415
  import"@angular/compiler";
180361
180416
 
@@ -180848,61 +180903,6 @@ var appendStreamingSlotPatchesToStream = (stream, slots = [], {
180848
180903
  });
180849
180904
  };
180850
180905
 
180851
- // src/core/streamingSlotRegistrar.ts
180852
- var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
180853
- var getRegistrarGlobal = () => globalThis;
180854
- var setStreamingSlotRegistrar = (nextRegistrar) => {
180855
- getRegistrarGlobal()[STREAMING_SLOT_REGISTRAR_KEY] = nextRegistrar;
180856
- };
180857
- var registerStreamingSlot = (slot) => {
180858
- getRegistrarGlobal()[STREAMING_SLOT_REGISTRAR_KEY]?.(slot);
180859
- };
180860
-
180861
- // src/core/streamingSlotRegistry.ts
180862
- var STREAMING_SLOT_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotAsyncLocalStorage");
180863
- var getStorageGlobal = () => globalThis;
180864
- var isServerRuntime = () => typeof process !== "undefined" && typeof process.versions?.node === "string";
180865
- var ensureAsyncLocalStorage = async () => {
180866
- const storageGlobal = getStorageGlobal();
180867
- if (typeof storageGlobal[STREAMING_SLOT_STORAGE_KEY] !== "undefined") {
180868
- return storageGlobal[STREAMING_SLOT_STORAGE_KEY];
180869
- }
180870
- if (!isServerRuntime()) {
180871
- storageGlobal[STREAMING_SLOT_STORAGE_KEY] = null;
180872
- return storageGlobal[STREAMING_SLOT_STORAGE_KEY];
180873
- }
180874
- const mod = await import("async_hooks");
180875
- storageGlobal[STREAMING_SLOT_STORAGE_KEY] = new mod.AsyncLocalStorage;
180876
- return storageGlobal[STREAMING_SLOT_STORAGE_KEY];
180877
- };
180878
- var registerStreamingSlot2 = (slot) => {
180879
- const storage = getStorageGlobal()[STREAMING_SLOT_STORAGE_KEY];
180880
- if (!storage)
180881
- return;
180882
- const store = storage.getStore();
180883
- if (!store)
180884
- return;
180885
- store.set(slot.id, slot);
180886
- };
180887
- setStreamingSlotRegistrar(registerStreamingSlot2);
180888
- var runWithStreamingSlotRegistry = async (task) => {
180889
- const storage = await ensureAsyncLocalStorage();
180890
- if (!storage) {
180891
- return {
180892
- result: await task(),
180893
- slots: []
180894
- };
180895
- }
180896
- return storage.run(new Map, async () => {
180897
- const result = await task();
180898
- const store = storage.getStore();
180899
- return {
180900
- result,
180901
- slots: store ? [...store.values()] : []
180902
- };
180903
- });
180904
- };
180905
-
180906
180906
  // src/core/responseEnhancers.ts
180907
180907
  var toResponse = async (responseLike) => await responseLike;
180908
180908
  var cloneHeaders = (response) => {
@@ -181390,5 +181390,5 @@ export {
181390
181390
  DeferSlotComponent
181391
181391
  };
181392
181392
 
181393
- //# debugId=9DA3BC0A14492E2164756E2164756E21
181393
+ //# debugId=80964D92CF8AE14B64756E2164756E21
181394
181394
  //# sourceMappingURL=index.js.map