@angular/core 20.0.0-next.2 → 20.0.0-next.4

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.
Files changed (56) hide show
  1. package/event_dispatcher.d-pVP0-wST.d.ts +345 -0
  2. package/fesm2022/core.mjs +614 -428
  3. package/fesm2022/core.mjs.map +1 -1
  4. package/fesm2022/injector-BlLwZ2sr.mjs +24 -0
  5. package/fesm2022/injector-BlLwZ2sr.mjs.map +1 -0
  6. package/fesm2022/primitives/di.mjs +5 -18
  7. package/fesm2022/primitives/di.mjs.map +1 -1
  8. package/fesm2022/primitives/event-dispatch.mjs +1 -1
  9. package/fesm2022/primitives/signals.mjs +4 -589
  10. package/fesm2022/primitives/signals.mjs.map +1 -1
  11. package/fesm2022/rxjs-interop.mjs +1 -8
  12. package/fesm2022/rxjs-interop.mjs.map +1 -1
  13. package/fesm2022/testing.mjs +2 -10
  14. package/fesm2022/testing.mjs.map +1 -1
  15. package/fesm2022/untracked-DkcXpNb_.mjs +620 -0
  16. package/fesm2022/untracked-DkcXpNb_.mjs.map +1 -0
  17. package/index.d.ts +7589 -7510
  18. package/{navigation_types.d-u4EOrrdZ.d.ts → navigation_types.d-DgDrF5rp.d.ts} +2 -2
  19. package/package.json +2 -2
  20. package/primitives/di/index.d.ts +25 -10
  21. package/primitives/event-dispatch/index.d.ts +5 -340
  22. package/primitives/signals/index.d.ts +5 -208
  23. package/rxjs-interop/index.d.ts +1 -10
  24. package/schematics/bundles/{apply_import_manager-CyRT0UvU.js → apply_import_manager-CeNv8GIG.js} +6 -6
  25. package/schematics/bundles/{checker-DF8ZaFW5.js → checker-k591b6WQ.js} +856 -180
  26. package/schematics/bundles/cleanup-unused-imports.js +42 -69
  27. package/schematics/bundles/{compiler_host-Da636uJ8.js → compiler_host-DwM3ugW3.js} +2 -2
  28. package/schematics/bundles/control-flow-migration.js +34 -13
  29. package/schematics/bundles/imports-CIX-JgAN.js +1 -1
  30. package/schematics/bundles/{program-BZk27Ndu.js → index-B4OAlHh8.js} +2234 -2097
  31. package/schematics/bundles/{index-DnkWgagp.js → index-BhELUmYx.js} +11 -11
  32. package/schematics/bundles/inject-flags.js +18 -52
  33. package/schematics/bundles/inject-migration.js +3 -3
  34. package/schematics/bundles/leading_space-D9nQ8UQC.js +1 -1
  35. package/schematics/bundles/{migrate_ts_type_references-DtkOnnv0.js → migrate_ts_type_references-Be0TNYen.js} +20 -20
  36. package/schematics/bundles/ng_decorators-DznZ5jMl.js +1 -1
  37. package/schematics/bundles/nodes-B16H9JUd.js +1 -1
  38. package/schematics/bundles/output-migration.js +62 -90
  39. package/schematics/bundles/project_tsconfig_paths-CDVxT6Ov.js +1 -1
  40. package/schematics/bundles/property_name-BBwFuqMe.js +1 -1
  41. package/schematics/bundles/route-lazy-loading.js +3 -3
  42. package/schematics/bundles/{project_paths-Jtbi76Bs.js → run_in_devkit-CkvEksWP.js} +262 -197
  43. package/schematics/bundles/self-closing-tags-migration.js +41 -71
  44. package/schematics/bundles/signal-input-migration.js +69 -97
  45. package/schematics/bundles/signal-queries-migration.js +80 -108
  46. package/schematics/bundles/signals.js +11 -11
  47. package/schematics/bundles/standalone-migration.js +8 -22
  48. package/schematics/bundles/symbol-VPWguRxr.js +25 -0
  49. package/schematics/bundles/test-bed-get.js +98 -0
  50. package/schematics/migrations.json +5 -0
  51. package/testing/index.d.ts +2 -4
  52. package/weak_ref.d-BZ7gyRag.d.ts +216 -0
  53. package/fesm2022/weak_ref-DrMdAIDh.mjs +0 -12
  54. package/fesm2022/weak_ref-DrMdAIDh.mjs.map +0 -1
  55. package/schematics/bundles/index-vGJcp5M7.js +0 -30
  56. package/weak_ref.d-ttyj86RV.d.ts +0 -9
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v20.0.0-next.2
2
+ * @license Angular v20.0.0-next.4
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -118,4 +118,4 @@ declare class NavigationDestination {
118
118
  getState(): unknown;
119
119
  }
120
120
 
121
- export { NavigateEvent as N, Navigation as a, NavigationCurrentEntryChangeEvent as b, NavigationHistoryEntry as c, type NavigationNavigateOptions as d, type NavigationOptions as e, type NavigationReloadOptions as f, type NavigationResult as g, NavigationTransition as h, type NavigationUpdateCurrentEntryOptions as i, type NavigationTypeString as j, type NavigationInterceptOptions as k, NavigationDestination as l };
121
+ export { Navigation as N, NavigationHistoryEntry as a, type NavigationNavigateOptions as b, type NavigationResult as c, type NavigationOptions as d, NavigateEvent as e, NavigationCurrentEntryChangeEvent as f, NavigationTransition as g, type NavigationUpdateCurrentEntryOptions as h, type NavigationReloadOptions as i, type NavigationTypeString as j, type NavigationInterceptOptions as k, NavigationDestination as l };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/core",
3
- "version": "20.0.0-next.2",
3
+ "version": "20.0.0-next.4",
4
4
  "description": "Angular - the core framework",
5
5
  "author": "angular",
6
6
  "license": "MIT",
@@ -46,7 +46,7 @@
46
46
  "tslib": "^2.3.0"
47
47
  },
48
48
  "peerDependencies": {
49
- "@angular/compiler": "20.0.0-next.2",
49
+ "@angular/compiler": "20.0.0-next.4",
50
50
  "rxjs": "^6.5.3 || ^7.4.0",
51
51
  "zone.js": "~0.15.0"
52
52
  },
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v20.0.0-next.2
2
+ * @license Angular v20.0.0-next.4
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -20,18 +20,32 @@ interface Type<T> extends Function {
20
20
  }
21
21
 
22
22
  /**
23
- * Information about how a type or `InjectionToken` interfaces with the DI system.
23
+ * Information about how a type or `InjectionToken` interfaces with the DI
24
+ * system. This describes:
24
25
  *
25
- * At a minimum, this includes a `factory` which defines how to create the given type `T`, possibly
26
- * requesting injection of other types if necessary.
26
+ * 1. *How* the type is provided
27
+ * The declaration must specify only one of the following:
28
+ * - A `value` which is a predefined instance of the type.
29
+ * - A `factory` which defines how to create the given type `T`, possibly
30
+ * requesting injection of other types if necessary.
31
+ * - Neither, in which case the type is expected to already be present in the
32
+ * injector hierarchy. This is used for internal use cases.
27
33
  *
28
- * Optionally, a `providedIn` parameter specifies that the given type belongs to a particular
29
- * `Injector`, `NgModule`, or a special scope (e.g. `'root'`). A value of `null` indicates
30
- * that the injectable does not belong to any scope.
34
+ * 2. *Where* the type is stored (if it is stored)
35
+ * - The `providedIn` parameter specifies which injector the type belongs to.
36
+ * - The `token` is used as the key to store the type in the injector.
31
37
  */
32
38
  interface ɵɵInjectableDeclaration<T> {
33
39
  /**
34
- * Specifies that the given type belongs to a particular injector:
40
+ * Specifies that the given type belongs to a particular `Injector`,
41
+ * `NgModule`, or a special scope (e.g. `'root'`).
42
+ *
43
+ * `any` is deprecated and will be removed soon.
44
+ *
45
+ * A value of `null` indicates that the injectable does not belong to any
46
+ * scope, and won't be stored in any injector. For declarations with a
47
+ * factory, this will create a new instance of the type each time it is
48
+ * requested.
35
49
  */
36
50
  providedIn: Type<any> | 'root' | 'platform' | 'any' | null;
37
51
  /**
@@ -43,11 +57,11 @@ interface ɵɵInjectableDeclaration<T> {
43
57
  /**
44
58
  * Factory method to execute to create an instance of the injectable.
45
59
  */
46
- factory: (t?: Type<any>) => T;
60
+ factory?: (t?: Type<any>) => T;
47
61
  /**
48
62
  * In a case of no explicit injector, a location where the instance of the injectable is stored.
49
63
  */
50
- value: T | undefined;
64
+ value?: T;
51
65
  }
52
66
  /**
53
67
  * A `Type` which has a `ɵprov: ɵɵInjectableDeclaration` static field.
@@ -71,6 +85,7 @@ declare const NOT_FOUND: unique symbol;
71
85
  * hierarchy. Context can be attached below.
72
86
  */
73
87
  declare class NotFoundError extends Error {
88
+ readonly name: string;
74
89
  constructor(message: string);
75
90
  }
76
91
  /**
@@ -1,9 +1,12 @@
1
1
  /**
2
- * @license Angular v20.0.0-next.2
2
+ * @license Angular v20.0.0-next.4
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
7
+ import { E as EarlyJsactionDataContainer, a as EventInfo, R as Restriction } from '../../event_dispatcher.d-pVP0-wST.js';
8
+ export { f as EventContract, b as EventContractContainer, c as EventDispatcher, e as EventInfoWrapper, d as EventPhase, r as registerDispatcher } from '../../event_dispatcher.d-pVP0-wST.js';
9
+
7
10
  declare const Attribute: {
8
11
  /**
9
12
  * The jsaction attribute defines a mapping of a DOM event to a
@@ -28,344 +31,6 @@ declare function getDefaulted(element: Element): {
28
31
  [key: string]: string | undefined;
29
32
  };
30
33
 
31
- /**
32
- * Records information about the action that should handle a given `Event`.
33
- */
34
- interface ActionInfo {
35
- name: string;
36
- element: Element;
37
- }
38
- type ActionInfoInternal = [name: string, element: Element];
39
- /**
40
- * Records information for later handling of events. This type is
41
- * shared, and instances of it are passed, between the eventcontract
42
- * and the dispatcher jsbinary. Therefore, the fields of this type are
43
- * referenced by string literals rather than property literals
44
- * throughout the code.
45
- *
46
- * 'targetElement' is the element the action occurred on, 'actionElement'
47
- * is the element that has the jsaction handler.
48
- *
49
- * A null 'actionElement' identifies an EventInfo instance that didn't match a
50
- * jsaction attribute. This allows us to execute global event handlers with the
51
- * appropriate event type (including a11y clicks and custom events).
52
- * The declare portion of this interface creates a set of externs that make sure
53
- * renaming doesn't happen for EventInfo. This is important since EventInfo
54
- * is shared across multiple binaries.
55
- */
56
- declare interface EventInfo {
57
- eventType: string;
58
- event: Event;
59
- targetElement: Element;
60
- /** The element that is the container for this Event. */
61
- eic: Element;
62
- timeStamp: number;
63
- /**
64
- * The action parsed from the JSAction element.
65
- */
66
- eia?: ActionInfoInternal;
67
- /**
68
- * Whether this `Event` is a replay event, meaning no dispatcher was
69
- * installed when this `Event` was originally dispatched.
70
- */
71
- eirp?: boolean;
72
- /**
73
- * Whether this `Event` represents a `keydown` event that should be processed
74
- * as a `click`. Only used when a11y click events is on.
75
- */
76
- eiack?: boolean;
77
- /** Whether action resolution has already run on this `EventInfo`. */
78
- eir?: boolean;
79
- }
80
- /**
81
- * Utility class around an `EventInfo`.
82
- *
83
- * This should be used in compilation units that are less sensitive to code
84
- * size.
85
- */
86
- declare class EventInfoWrapper {
87
- readonly eventInfo: EventInfo;
88
- constructor(eventInfo: EventInfo);
89
- getEventType(): string;
90
- setEventType(eventType: string): void;
91
- getEvent(): Event;
92
- setEvent(event: Event): void;
93
- getTargetElement(): Element;
94
- setTargetElement(targetElement: Element): void;
95
- getContainer(): Element;
96
- setContainer(container: Element): void;
97
- getTimestamp(): number;
98
- setTimestamp(timestamp: number): void;
99
- getAction(): {
100
- name: string;
101
- element: Element;
102
- } | undefined;
103
- setAction(action: ActionInfo | undefined): void;
104
- getIsReplay(): boolean | undefined;
105
- setIsReplay(replay: boolean): void;
106
- getResolved(): boolean | undefined;
107
- setResolved(resolved: boolean): void;
108
- clone(): EventInfoWrapper;
109
- }
110
-
111
- declare interface EarlyJsactionDataContainer {
112
- _ejsa?: EarlyJsactionData;
113
- _ejsas?: {
114
- [appId: string]: EarlyJsactionData | undefined;
115
- };
116
- }
117
- declare global {
118
- interface Window {
119
- _ejsa?: EarlyJsactionData;
120
- _ejsas?: {
121
- [appId: string]: EarlyJsactionData | undefined;
122
- };
123
- }
124
- }
125
- /**
126
- * Defines the early jsaction data types.
127
- */
128
- declare interface EarlyJsactionData {
129
- /** List used to keep track of the early JSAction event types. */
130
- et: string[];
131
- /** List used to keep track of the early JSAction capture event types. */
132
- etc: string[];
133
- /** Early JSAction handler for all events. */
134
- h: (event: Event) => void;
135
- /** Dispatcher handler. Initializes to populating `q`. */
136
- d: (eventInfo: EventInfo) => void;
137
- /** List used to push `EventInfo` objects if the dispatcher is not registered. */
138
- q: EventInfo[];
139
- /** Container for listening to events. */
140
- c: HTMLElement;
141
- }
142
-
143
- /**
144
- * An `EventContractContainerManager` provides the common interface for managing
145
- * containers.
146
- */
147
- interface EventContractContainerManager {
148
- addEventListener(eventType: string, getHandler: (element: Element) => (event: Event) => void, passive?: boolean): void;
149
- cleanUp(): void;
150
- }
151
- /**
152
- * A class representing a container node and all the event handlers
153
- * installed on it. Used so that handlers can be cleaned up if the
154
- * container is removed from the contract.
155
- */
156
- declare class EventContractContainer implements EventContractContainerManager {
157
- readonly element: Element;
158
- /**
159
- * Array of event handlers and their corresponding event types that are
160
- * installed on this container.
161
- *
162
- */
163
- private handlerInfos;
164
- /**
165
- * @param element The container Element.
166
- */
167
- constructor(element: Element);
168
- /**
169
- * Installs the provided installer on the element owned by this container,
170
- * and maintains a reference to resulting handler in order to remove it
171
- * later if desired.
172
- */
173
- addEventListener(eventType: string, getHandler: (element: Element) => (event: Event) => void, passive?: boolean): void;
174
- /**
175
- * Removes all the handlers installed on this container.
176
- */
177
- cleanUp(): void;
178
- }
179
-
180
- /**
181
- * @fileoverview An enum to control who can call certain jsaction APIs.
182
- */
183
- declare enum Restriction {
184
- I_AM_THE_JSACTION_FRAMEWORK = 0
185
- }
186
-
187
- /**
188
- * @fileoverview Implements the local event handling contract. This
189
- * allows DOM objects in a container that enters into this contract to
190
- * define event handlers which are executed in a local context.
191
- *
192
- * One EventContract instance can manage the contract for multiple
193
- * containers, which are added using the addContainer() method.
194
- *
195
- * Events can be registered using the addEvent() method.
196
- *
197
- * A Dispatcher is added using the registerDispatcher() method. Until there is
198
- * a dispatcher, events are queued. The idea is that the EventContract
199
- * class is inlined in the HTML of the top level page and instantiated
200
- * right after the start of <body>. The Dispatcher class is contained
201
- * in the external deferred js, and instantiated and registered with
202
- * EventContract when the external javascript in the page loads. The
203
- * external javascript will also register the jsaction handlers, which
204
- * then pick up the queued events at the time of registration.
205
- *
206
- * Since this class is meant to be inlined in the main page HTML, the
207
- * size of the binary compiled from this file MUST be kept as small as
208
- * possible and thus its dependencies to a minimum.
209
- */
210
-
211
- /**
212
- * The API of an EventContract that is safe to call from any compilation unit.
213
- */
214
- declare interface UnrenamedEventContract {
215
- ecrd(dispatcher: Dispatcher, restriction: Restriction): void;
216
- }
217
- /** A function that is called to handle events captured by the EventContract. */
218
- type Dispatcher = (eventInfo: EventInfo, globalDispatch?: boolean) => void;
219
- /**
220
- * A function that handles an event dispatched from the browser.
221
- *
222
- * eventType: May differ from `event.type` if JSAction uses a
223
- * short-hand name or is patching over an non-bubbling event with a bubbling
224
- * variant.
225
- * event: The native browser event.
226
- * container: The container for this dispatch.
227
- */
228
- type EventHandler = (eventType: string, event: Event, container: Element) => void;
229
- /**
230
- * EventContract intercepts events in the bubbling phase at the
231
- * boundary of a container element, and maps them to generic actions
232
- * which are specified using the custom jsaction attribute in
233
- * HTML. Behavior of the application is then specified in terms of
234
- * handler for such actions, cf. jsaction.Dispatcher in dispatcher.js.
235
- *
236
- * This has several benefits: (1) No DOM event handlers need to be
237
- * registered on the specific elements in the UI. (2) The set of
238
- * events that the application has to handle can be specified in terms
239
- * of the semantics of the application, rather than in terms of DOM
240
- * events. (3) Invocation of handlers can be delayed and handlers can
241
- * be delay loaded in a generic way.
242
- */
243
- declare class EventContract implements UnrenamedEventContract {
244
- static MOUSE_SPECIAL_SUPPORT: boolean;
245
- private containerManager;
246
- /**
247
- * The DOM events which this contract covers. Used to prevent double
248
- * registration of event types. The value of the map is the
249
- * internally created DOM event handler function that handles the
250
- * DOM events. See addEvent().
251
- *
252
- */
253
- private eventHandlers;
254
- private browserEventTypeToExtraEventTypes;
255
- /**
256
- * The dispatcher function. Events are passed to this function for
257
- * handling once it was set using the registerDispatcher() method. This is
258
- * done because the function is passed from another jsbinary, so passing the
259
- * instance and invoking the method here would require to leave the method
260
- * unobfuscated.
261
- */
262
- private dispatcher;
263
- /**
264
- * The list of suspended `EventInfo` that will be dispatched
265
- * as soon as the `Dispatcher` is registered.
266
- */
267
- private queuedEventInfos;
268
- constructor(containerManager: EventContractContainerManager);
269
- private handleEvent;
270
- /**
271
- * Handle an `EventInfo`.
272
- */
273
- private handleEventInfo;
274
- /**
275
- * Enables jsaction handlers to be called for the event type given by
276
- * name.
277
- *
278
- * If the event is already registered, this does nothing.
279
- *
280
- * @param prefixedEventType If supplied, this event is used in
281
- * the actual browser event registration instead of the name that is
282
- * exposed to jsaction. Use this if you e.g. want users to be able
283
- * to subscribe to jsaction="transitionEnd:foo" while the underlying
284
- * event is webkitTransitionEnd in one browser and mozTransitionEnd
285
- * in another.
286
- *
287
- * @param passive A boolean value that, if `true`, indicates that the event
288
- * handler will never call `preventDefault()`.
289
- */
290
- addEvent(eventType: string, prefixedEventType?: string, passive?: boolean): void;
291
- /**
292
- * Gets the queued early events and replay them using the appropriate handler
293
- * in the provided event contract. Once all the events are replayed, it cleans
294
- * up the early contract.
295
- */
296
- replayEarlyEvents(earlyJsactionData?: EarlyJsactionData | undefined): void;
297
- /**
298
- * Replays all the early `EventInfo` objects, dispatching them through the normal
299
- * `EventContract` flow.
300
- */
301
- replayEarlyEventInfos(earlyEventInfos: EventInfo[]): void;
302
- /**
303
- * Returns all JSAction event types that have been registered for a given
304
- * browser event type.
305
- */
306
- private getEventTypesForBrowserEventType;
307
- /**
308
- * Returns the event handler function for a given event type.
309
- */
310
- handler(eventType: string): EventHandler | undefined;
311
- /**
312
- * Cleans up the event contract. This resets all of the `EventContract`'s
313
- * internal state. Users are responsible for not using this `EventContract`
314
- * after it has been cleaned up.
315
- */
316
- cleanUp(): void;
317
- /**
318
- * Register a dispatcher function. Event info of each event mapped to
319
- * a jsaction is passed for handling to this callback. The queued
320
- * events are passed as well to the dispatcher for later replaying
321
- * once the dispatcher is registered. Clears the event queue to null.
322
- *
323
- * @param dispatcher The dispatcher function.
324
- * @param restriction
325
- */
326
- registerDispatcher(dispatcher: Dispatcher, restriction: Restriction): void;
327
- /**
328
- * Unrenamed alias for registerDispatcher. Necessary for any codebases that
329
- * split the `EventContract` and `Dispatcher` code into different compilation
330
- * units.
331
- */
332
- ecrd(dispatcher: Dispatcher, restriction: Restriction): void;
333
- }
334
-
335
- /** An internal symbol used to indicate whether propagation should be stopped or not. */
336
- declare const PROPAGATION_STOPPED_SYMBOL: unique symbol;
337
- /** Extra event phases beyond what the browser provides. */
338
- declare const EventPhase: {
339
- REPLAY: number;
340
- };
341
- declare global {
342
- interface Event {
343
- [PROPAGATION_STOPPED_SYMBOL]?: boolean;
344
- }
345
- }
346
- /**
347
- * A dispatcher that uses browser-based `Event` semantics, for example bubbling, `stopPropagation`,
348
- * `currentTarget`, etc.
349
- */
350
- declare class EventDispatcher {
351
- private readonly dispatchDelegate;
352
- private readonly clickModSupport;
353
- private readonly actionResolver;
354
- private readonly dispatcher;
355
- constructor(dispatchDelegate: (event: Event, actionName: string) => void, clickModSupport?: boolean);
356
- /**
357
- * The entrypoint for the `EventContract` dispatch.
358
- */
359
- dispatch(eventInfo: EventInfo): void;
360
- /** Internal method that does basic disaptching. */
361
- private dispatchToDelegate;
362
- }
363
- /**
364
- * Registers deferred functionality for an EventContract and a Jsaction
365
- * Dispatcher.
366
- */
367
- declare function registerDispatcher(eventContract: UnrenamedEventContract, dispatcher: EventDispatcher): void;
368
-
369
34
  /**
370
35
  * Whether or not an event type should be registered in the capture phase.
371
36
  * @param eventType
@@ -394,4 +59,4 @@ declare function removeAllAppScopedEventListeners(appId: string, dataContainer?:
394
59
  /** Clear the early event contract. */
395
60
  declare function clearAppScopedEarlyEventContract(appId: string, dataContainer?: EarlyJsactionDataContainer): void;
396
61
 
397
- export { Attribute, type EarlyJsactionDataContainer, EventContract, EventContractContainer, EventDispatcher, EventInfoWrapper, EventPhase, bootstrapAppScopedEarlyEventContract, clearAppScopedEarlyEventContract, getDefaulted as getActionCache, getAppScopedQueuedEventInfos, isCaptureEventType, isEarlyEventType, registerAppScopedDispatcher, registerDispatcher, removeAllAppScopedEventListeners };
62
+ export { Attribute, EarlyJsactionDataContainer, bootstrapAppScopedEarlyEventContract, clearAppScopedEarlyEventContract, getDefaulted as getActionCache, getAppScopedQueuedEventInfos, isCaptureEventType, isEarlyEventType, registerAppScopedDispatcher, removeAllAppScopedEventListeners };