@absolutejs/absolute 0.19.0-beta.962 → 0.19.0-beta.963

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.
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  var __require = import.meta.require;
3
3
 
4
- // .angular-partial-tmp-ejVs4Q/src/core/streamingSlotRegistrar.ts
4
+ // .angular-partial-tmp-sz98NP/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-ejVs4Q/src/core/streamingSlotRegistrar.ts
4
+ // .angular-partial-tmp-sz98NP/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-ejVs4Q/src/core/streamingSlotRegistry.ts
51
+ // .angular-partial-tmp-sz98NP/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";
@@ -14907,6 +14907,15 @@ var useResource = (fetcher, options = {}) => {
14907
14907
  }
14908
14908
  }
14909
14909
  };
14910
+ const mutate = (next) => {
14911
+ if (destroyed)
14912
+ return;
14913
+ cancel();
14914
+ error.set(null);
14915
+ loading.set(false);
14916
+ const resolved = typeof next === "function" ? next(data()) : next;
14917
+ data.set(resolved);
14918
+ };
14910
14919
  destroyRef.onDestroy(() => {
14911
14920
  destroyed = true;
14912
14921
  cancel();
@@ -14914,7 +14923,7 @@ var useResource = (fetcher, options = {}) => {
14914
14923
  if (options.immediate !== false) {
14915
14924
  refresh();
14916
14925
  }
14917
- return { cancel, data, error, loading, refresh };
14926
+ return { cancel, data, error, loading, mutate, refresh };
14918
14927
  };
14919
14928
  // src/angular/composables/useSubscription.ts
14920
14929
  import { DestroyRef as DestroyRef2, inject as inject2 } from "@angular/core";
@@ -15369,5 +15378,5 @@ export {
15369
15378
  ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER
15370
15379
  };
15371
15380
 
15372
- //# debugId=3A256F17E39BD18164756E2164756E21
15381
+ //# debugId=D2DC5A8B92142CFA64756E2164756E21
15373
15382
  //# sourceMappingURL=index.js.map