@angular/core
Advanced tools
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -400,11 +400,2 @@ * License: MIT | ||
| function untracked(nonReactiveReadsFn) { | ||
| const prevConsumer = setActiveConsumer(null); | ||
| try { | ||
| return nonReactiveReadsFn(); | ||
| } finally { | ||
| setActiveConsumer(prevConsumer); | ||
| } | ||
| } | ||
| const BASE_EFFECT_NODE = /* @__PURE__ */(() => ({ | ||
@@ -432,3 +423,3 @@ ...REACTIVE_NODE, | ||
| export { BASE_EFFECT_NODE, COMPUTING, ERRORED, REACTIVE_NODE, SIGNAL, SIGNAL_NODE, UNSET, consumerAfterComputation, consumerBeforeComputation, consumerDestroy, consumerMarkDirty, consumerPollProducersForChange, createComputed, createSignal, defaultEquals, finalizeConsumerAfterComputation, getActiveConsumer, isInNotificationPhase, isReactive, producerAccessed, producerIncrementEpoch, producerMarkClean, producerNotifyConsumers, producerUpdateValueVersion, producerUpdatesAllowed, resetConsumerBeforeComputation, runEffect, runPostProducerCreatedFn, runPostSignalSetFn, setActiveConsumer, setPostProducerCreatedFn, setPostSignalSetFn, setThrowInvalidWriteToSignalError, signalGetFn, signalSetFn, signalUpdateFn, untracked }; | ||
| export { BASE_EFFECT_NODE, COMPUTING, ERRORED, REACTIVE_NODE, SIGNAL, SIGNAL_NODE, UNSET, consumerAfterComputation, consumerBeforeComputation, consumerDestroy, consumerMarkDirty, consumerPollProducersForChange, createComputed, createSignal, defaultEquals, finalizeConsumerAfterComputation, getActiveConsumer, isInNotificationPhase, isReactive, producerAccessed, producerIncrementEpoch, producerMarkClean, producerNotifyConsumers, producerUpdateValueVersion, producerUpdatesAllowed, resetConsumerBeforeComputation, runEffect, runPostProducerCreatedFn, runPostSignalSetFn, setActiveConsumer, setPostProducerCreatedFn, setPostSignalSetFn, setThrowInvalidWriteToSignalError, signalGetFn, signalSetFn, signalUpdateFn }; | ||
| //# sourceMappingURL=_effect-chunk.mjs.map |
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -7,5 +7,5 @@ * License: MIT | ||
| import { inject, ErrorHandler, DestroyRef, RuntimeError, formatRuntimeError, signalAsReadonlyFn, assertInInjectionContext, Injector, effect, PendingTasks, untracked, signal } from './_untracked-chunk.mjs'; | ||
| import { inject, ErrorHandler, DestroyRef, RuntimeError, formatRuntimeError, signalAsReadonlyFn, assertInInjectionContext, Injector, effect, PendingTasks, signal } from './_effect-chunk2.mjs'; | ||
| import { setActiveConsumer, createComputed, SIGNAL } from './_effect-chunk.mjs'; | ||
| import { createLinkedSignal, linkedSignalSetFn, linkedSignalUpdateFn } from './_linked_signal-chunk.mjs'; | ||
| import { untracked as untracked$1, createLinkedSignal, linkedSignalSetFn, linkedSignalUpdateFn } from './_untracked-chunk.mjs'; | ||
@@ -65,2 +65,6 @@ class OutputEmitterRef { | ||
| function untracked(nonReactiveReadsFn) { | ||
| return untracked$1(nonReactiveReadsFn); | ||
| } | ||
| function computed(computation, options) { | ||
@@ -404,3 +408,3 @@ const getter = createComputed(computation, options?.equal); | ||
| export { OutputEmitterRef, ResourceImpl, ResourceValueError, computed, encapsulateResourceError, getOutputDestroyRef, linkedSignal, resource }; | ||
| export { OutputEmitterRef, ResourceImpl, ResourceValueError, computed, encapsulateResourceError, getOutputDestroyRef, linkedSignal, resource, untracked }; | ||
| //# sourceMappingURL=_resource-chunk.mjs.map |
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -774,3 +774,3 @@ * License: MIT | ||
| } | ||
| function registerAppScopedDispatcher(restriction, appId, dispatcher, dataContainer = window) { | ||
| function registerAppScopedDispatcher(appId, dispatcher, dataContainer = window) { | ||
| registerDispatcher(dataContainer._ejsas?.[appId], dispatcher); | ||
@@ -777,0 +777,0 @@ } |
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -8,4 +8,4 @@ * License: MIT | ||
| import { SIGNAL, consumerMarkDirty, REACTIVE_NODE, consumerDestroy, isInNotificationPhase, consumerPollProducersForChange, consumerBeforeComputation, consumerAfterComputation } from './_effect-chunk.mjs'; | ||
| export { BASE_EFFECT_NODE, SIGNAL_NODE, createComputed, createSignal, defaultEquals, finalizeConsumerAfterComputation, getActiveConsumer, isReactive, producerAccessed, producerIncrementEpoch, producerMarkClean, producerNotifyConsumers, producerUpdateValueVersion, producerUpdatesAllowed, resetConsumerBeforeComputation, runEffect, runPostProducerCreatedFn, runPostSignalSetFn, setActiveConsumer, setPostProducerCreatedFn, setPostSignalSetFn, setThrowInvalidWriteToSignalError, signalGetFn, signalSetFn, signalUpdateFn, untracked } from './_effect-chunk.mjs'; | ||
| export { createLinkedSignal, linkedSignalSetFn, linkedSignalUpdateFn } from './_linked_signal-chunk.mjs'; | ||
| export { BASE_EFFECT_NODE, SIGNAL_NODE, createComputed, createSignal, defaultEquals, finalizeConsumerAfterComputation, getActiveConsumer, isReactive, producerAccessed, producerIncrementEpoch, producerMarkClean, producerNotifyConsumers, producerUpdateValueVersion, producerUpdatesAllowed, resetConsumerBeforeComputation, runEffect, runPostProducerCreatedFn, runPostSignalSetFn, setActiveConsumer, setPostProducerCreatedFn, setPostSignalSetFn, setThrowInvalidWriteToSignalError, signalGetFn, signalSetFn, signalUpdateFn } from './_effect-chunk.mjs'; | ||
| export { createLinkedSignal, linkedSignalSetFn, linkedSignalUpdateFn, untracked } from './_untracked-chunk.mjs'; | ||
| export { setAlternateWeakRefImpl } from './_weak_ref-chunk.mjs'; | ||
@@ -12,0 +12,0 @@ |
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -9,4 +9,4 @@ * License: MIT | ||
| import { takeUntil } from 'rxjs/operators'; | ||
| import { assertInInjectionContext, inject, DestroyRef, RuntimeError, Injector, effect, untracked, assertNotInReactiveContext, signal, PendingTasks } from './_untracked-chunk.mjs'; | ||
| import { getOutputDestroyRef, computed, resource, encapsulateResourceError } from './_resource-chunk.mjs'; | ||
| import { assertInInjectionContext, inject, DestroyRef, RuntimeError, Injector, effect, assertNotInReactiveContext, signal, PendingTasks } from './_effect-chunk2.mjs'; | ||
| import { getOutputDestroyRef, untracked, computed, resource, encapsulateResourceError } from './_resource-chunk.mjs'; | ||
| import './_effect-chunk.mjs'; | ||
@@ -16,3 +16,3 @@ import './_not_found-chunk.mjs'; | ||
| import '@angular/core/primitives/di'; | ||
| import './_linked_signal-chunk.mjs'; | ||
| import './_untracked-chunk.mjs'; | ||
@@ -19,0 +19,0 @@ function takeUntilDestroyed(destroyRef) { |
+2
-2
| { | ||
| "name": "@angular/core", | ||
| "version": "21.2.0-next.1", | ||
| "version": "21.2.0-next.2", | ||
| "description": "Angular - the core framework", | ||
@@ -49,3 +49,3 @@ "author": "angular", | ||
| "peerDependencies": { | ||
| "@angular/compiler": "21.2.0-next.1", | ||
| "@angular/compiler": "21.2.0-next.2", | ||
| "rxjs": "^6.5.3 || ^7.4.0", | ||
@@ -52,0 +52,0 @@ "zone.js": "~0.15.0 || ~0.16.0" |
| 'use strict'; | ||
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -5,0 +5,0 @@ * License: MIT |
| 'use strict'; | ||
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -5,0 +5,0 @@ * License: MIT |
| 'use strict'; | ||
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -5,0 +5,0 @@ * License: MIT |
| 'use strict'; | ||
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -5,0 +5,0 @@ * License: MIT |
| 'use strict'; | ||
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -5,0 +5,0 @@ * License: MIT |
| 'use strict'; | ||
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -5,0 +5,0 @@ * License: MIT |
| 'use strict'; | ||
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -5,0 +5,0 @@ * License: MIT |
| 'use strict'; | ||
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -5,0 +5,0 @@ * License: MIT |
| 'use strict'; | ||
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -5,0 +5,0 @@ * License: MIT |
| 'use strict'; | ||
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -5,0 +5,0 @@ * License: MIT |
| 'use strict'; | ||
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -5,0 +5,0 @@ * License: MIT |
| 'use strict'; | ||
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -5,0 +5,0 @@ * License: MIT |
| 'use strict'; | ||
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -5,0 +5,0 @@ * License: MIT |
| 'use strict'; | ||
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -5,0 +5,0 @@ * License: MIT |
| 'use strict'; | ||
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -5,0 +5,0 @@ * License: MIT |
| 'use strict'; | ||
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -5,0 +5,0 @@ * License: MIT |
| 'use strict'; | ||
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -5,0 +5,0 @@ * License: MIT |
| 'use strict'; | ||
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -5,0 +5,0 @@ * License: MIT |
| 'use strict'; | ||
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -5,0 +5,0 @@ * License: MIT |
| 'use strict'; | ||
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -5,0 +5,0 @@ * License: MIT |
| 'use strict'; | ||
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -5,0 +5,0 @@ * License: MIT |
| 'use strict'; | ||
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -5,0 +5,0 @@ * License: MIT |
| 'use strict'; | ||
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -5,0 +5,0 @@ * License: MIT |
| 'use strict'; | ||
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -5,0 +5,0 @@ * License: MIT |
| 'use strict'; | ||
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -5,0 +5,0 @@ * License: MIT |
| 'use strict'; | ||
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -5,0 +5,0 @@ * License: MIT |
| 'use strict'; | ||
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -5,0 +5,0 @@ * License: MIT |
| 'use strict'; | ||
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -5,0 +5,0 @@ * License: MIT |
| 'use strict'; | ||
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -5,0 +5,0 @@ * License: MIT |
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -371,3 +371,3 @@ * License: MIT | ||
| export { EventContract, EventContractContainer, EventDispatcher, EventInfoWrapper, EventPhase, Restriction, registerDispatcher }; | ||
| export { EventContract, EventContractContainer, EventDispatcher, EventInfoWrapper, EventPhase, registerDispatcher }; | ||
| export type { EarlyJsactionDataContainer, EventInfo }; |
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -7,3 +7,3 @@ * License: MIT | ||
| import { EarlyJsactionDataContainer, EventInfo, Restriction } from './_event_dispatcher-chunk.js'; | ||
| import { EarlyJsactionDataContainer, EventInfo } from './_event_dispatcher-chunk.js'; | ||
| export { EventContract, EventContractContainer, EventDispatcher, EventInfoWrapper, EventPhase, registerDispatcher } from './_event_dispatcher-chunk.js'; | ||
@@ -57,3 +57,3 @@ | ||
| */ | ||
| declare function registerAppScopedDispatcher(restriction: Restriction, appId: string, dispatcher: (eventInfo: EventInfo) => void, dataContainer?: EarlyJsactionDataContainer): void; | ||
| declare function registerAppScopedDispatcher(appId: string, dispatcher: (eventInfo: EventInfo) => void, dataContainer?: EarlyJsactionDataContainer): void; | ||
| /** Removes all event listener handlers. */ | ||
@@ -60,0 +60,0 @@ declare function removeAllAppScopedEventListeners(appId: string, dataContainer?: EarlyJsactionDataContainer): void; |
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * @license Angular v21.2.0-next.2 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
| /** | ||
| * @license Angular v21.2.0-next.1 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
| * License: MIT | ||
| */ | ||
| import { SIGNAL, runPostProducerCreatedFn, producerUpdateValueVersion, signalSetFn, producerMarkClean, signalUpdateFn, REACTIVE_NODE, UNSET, defaultEquals, COMPUTING, consumerBeforeComputation, ERRORED, consumerAfterComputation, producerAccessed } from './_effect-chunk.mjs'; | ||
| function createLinkedSignal(sourceFn, computationFn, equalityFn) { | ||
| const node = Object.create(LINKED_SIGNAL_NODE); | ||
| node.source = sourceFn; | ||
| node.computation = computationFn; | ||
| if (equalityFn != undefined) { | ||
| node.equal = equalityFn; | ||
| } | ||
| const linkedSignalGetter = () => { | ||
| producerUpdateValueVersion(node); | ||
| producerAccessed(node); | ||
| if (node.value === ERRORED) { | ||
| throw node.error; | ||
| } | ||
| return node.value; | ||
| }; | ||
| const getter = linkedSignalGetter; | ||
| getter[SIGNAL] = node; | ||
| if (typeof ngDevMode !== 'undefined' && ngDevMode) { | ||
| const debugName = node.debugName ? ' (' + node.debugName + ')' : ''; | ||
| getter.toString = () => `[LinkedSignal${debugName}: ${String(node.value)}]`; | ||
| } | ||
| runPostProducerCreatedFn(node); | ||
| return getter; | ||
| } | ||
| function linkedSignalSetFn(node, newValue) { | ||
| producerUpdateValueVersion(node); | ||
| signalSetFn(node, newValue); | ||
| producerMarkClean(node); | ||
| } | ||
| function linkedSignalUpdateFn(node, updater) { | ||
| producerUpdateValueVersion(node); | ||
| signalUpdateFn(node, updater); | ||
| producerMarkClean(node); | ||
| } | ||
| const LINKED_SIGNAL_NODE = /* @__PURE__ */(() => { | ||
| return { | ||
| ...REACTIVE_NODE, | ||
| value: UNSET, | ||
| dirty: true, | ||
| error: null, | ||
| equal: defaultEquals, | ||
| kind: 'linkedSignal', | ||
| producerMustRecompute(node) { | ||
| return node.value === UNSET || node.value === COMPUTING; | ||
| }, | ||
| producerRecomputeValue(node) { | ||
| if (node.value === COMPUTING) { | ||
| throw new Error(typeof ngDevMode !== 'undefined' && ngDevMode ? 'Detected cycle in computations.' : ''); | ||
| } | ||
| const oldValue = node.value; | ||
| node.value = COMPUTING; | ||
| const prevConsumer = consumerBeforeComputation(node); | ||
| let newValue; | ||
| try { | ||
| const newSourceValue = node.source(); | ||
| const prev = oldValue === UNSET || oldValue === ERRORED ? undefined : { | ||
| source: node.sourceValue, | ||
| value: oldValue | ||
| }; | ||
| newValue = node.computation(newSourceValue, prev); | ||
| node.sourceValue = newSourceValue; | ||
| } catch (err) { | ||
| newValue = ERRORED; | ||
| node.error = err; | ||
| } finally { | ||
| consumerAfterComputation(node, prevConsumer); | ||
| } | ||
| if (oldValue !== UNSET && newValue !== ERRORED && node.equal(oldValue, newValue)) { | ||
| node.value = oldValue; | ||
| return; | ||
| } | ||
| node.value = newValue; | ||
| node.version++; | ||
| } | ||
| }; | ||
| })(); | ||
| export { createLinkedSignal, linkedSignalSetFn, linkedSignalUpdateFn }; | ||
| //# sourceMappingURL=_linked_signal-chunk.mjs.map |
| {"version":3,"file":"_linked_signal-chunk.mjs","sources":["../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/core/primitives/signals/src/linked_signal.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {COMPUTING, ERRORED, UNSET} from './computed';\nimport {defaultEquals, ValueEqualityFn} from './equality';\nimport {\n consumerAfterComputation,\n consumerBeforeComputation,\n producerAccessed,\n producerMarkClean,\n producerUpdateValueVersion,\n REACTIVE_NODE,\n ReactiveNode,\n runPostProducerCreatedFn,\n SIGNAL,\n} from './graph';\nimport {signalSetFn, signalUpdateFn} from './signal';\n\n// Required as the signals library is in a separate package, so we need to explicitly ensure the\n// global `ngDevMode` type is defined.\ndeclare const ngDevMode: boolean | undefined;\n\nexport type ComputationFn<S, D> = (source: S, previous?: PreviousValue<S, D>) => D;\nexport type PreviousValue<S, D> = {source: S; value: D};\n\nexport interface LinkedSignalNode<S, D> extends ReactiveNode {\n /**\n * Value of the source signal that was used to derive the computed value.\n */\n sourceValue: S;\n\n /**\n * Current state value, or one of the sentinel values (`UNSET`, `COMPUTING`,\n * `ERROR`).\n */\n value: D;\n\n /**\n * If `value` is `ERRORED`, the error caught from the last computation attempt which will\n * be re-thrown.\n */\n error: unknown;\n\n /**\n * The source function represents reactive dependency based on which the linked state is reset.\n */\n source: () => S;\n\n /**\n * The computation function which will produce a new value based on the source and, optionally - previous values.\n */\n computation: ComputationFn<S, D>;\n\n equal: ValueEqualityFn<D>;\n}\n\nexport type LinkedSignalGetter<S, D> = (() => D) & {\n [SIGNAL]: LinkedSignalNode<S, D>;\n};\n\nexport function createLinkedSignal<S, D>(\n sourceFn: () => S,\n computationFn: ComputationFn<S, D>,\n equalityFn?: ValueEqualityFn<D>,\n): LinkedSignalGetter<S, D> {\n const node: LinkedSignalNode<S, D> = Object.create(LINKED_SIGNAL_NODE);\n\n node.source = sourceFn;\n node.computation = computationFn;\n if (equalityFn != undefined) {\n node.equal = equalityFn;\n }\n\n const linkedSignalGetter = () => {\n // Check if the value needs updating before returning it.\n producerUpdateValueVersion(node);\n\n // Record that someone looked at this signal.\n producerAccessed(node);\n\n if (node.value === ERRORED) {\n throw node.error;\n }\n\n return node.value;\n };\n\n const getter = linkedSignalGetter as LinkedSignalGetter<S, D>;\n getter[SIGNAL] = node;\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n const debugName = node.debugName ? ' (' + node.debugName + ')' : '';\n getter.toString = () => `[LinkedSignal${debugName}: ${String(node.value)}]`;\n }\n\n runPostProducerCreatedFn(node);\n\n return getter;\n}\n\nexport function linkedSignalSetFn<S, D>(node: LinkedSignalNode<S, D>, newValue: D) {\n producerUpdateValueVersion(node);\n signalSetFn(node, newValue);\n producerMarkClean(node);\n}\n\nexport function linkedSignalUpdateFn<S, D>(\n node: LinkedSignalNode<S, D>,\n updater: (value: D) => D,\n): void {\n producerUpdateValueVersion(node);\n signalUpdateFn(node, updater);\n producerMarkClean(node);\n}\n\n// Note: Using an IIFE here to ensure that the spread assignment is not considered\n// a side-effect, ending up preserving `LINKED_SIGNAL_NODE` and `REACTIVE_NODE`.\n// TODO: remove when https://github.com/evanw/esbuild/issues/3392 is resolved.\nexport const LINKED_SIGNAL_NODE: object = /* @__PURE__ */ (() => {\n return {\n ...REACTIVE_NODE,\n value: UNSET,\n dirty: true,\n error: null,\n equal: defaultEquals,\n kind: 'linkedSignal',\n\n producerMustRecompute(node: LinkedSignalNode<unknown, unknown>): boolean {\n // Force a recomputation if there's no current value, or if the current value is in the\n // process of being calculated (which should throw an error).\n return node.value === UNSET || node.value === COMPUTING;\n },\n\n producerRecomputeValue(node: LinkedSignalNode<unknown, unknown>): void {\n if (node.value === COMPUTING) {\n // Our computation somehow led to a cyclic read of itself.\n throw new Error(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'Detected cycle in computations.' : '',\n );\n }\n\n const oldValue = node.value;\n node.value = COMPUTING;\n\n const prevConsumer = consumerBeforeComputation(node);\n let newValue: unknown;\n try {\n const newSourceValue = node.source();\n const prev =\n oldValue === UNSET || oldValue === ERRORED\n ? undefined\n : {\n source: node.sourceValue,\n value: oldValue,\n };\n newValue = node.computation(newSourceValue, prev);\n node.sourceValue = newSourceValue;\n } catch (err) {\n newValue = ERRORED;\n node.error = err;\n } finally {\n consumerAfterComputation(node, prevConsumer);\n }\n\n if (oldValue !== UNSET && newValue !== ERRORED && node.equal(oldValue, newValue)) {\n // No change to `valueVersion` - old and new values are\n // semantically equivalent.\n node.value = oldValue;\n return;\n }\n\n node.value = newValue;\n node.version++;\n },\n };\n})();\n"],"names":["createLinkedSignal","sourceFn","computationFn","equalityFn","node","Object","create","LINKED_SIGNAL_NODE","source","computation","undefined","equal","linkedSignalGetter","producerUpdateValueVersion","producerAccessed","value","ERRORED","error","getter","SIGNAL","ngDevMode","debugName","toString","String","runPostProducerCreatedFn","linkedSignalSetFn","newValue","signalSetFn","producerMarkClean","linkedSignalUpdateFn","updater","signalUpdateFn","REACTIVE_NODE","UNSET","dirty","defaultEquals","kind","producerMustRecompute","COMPUTING","producerRecomputeValue","Error","oldValue","prevConsumer","consumerBeforeComputation","newSourceValue","prev","sourceValue","err","consumerAfterComputation","version"],"mappings":"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"} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
6721080
-0.95%66357
-0.7%362
5.23%