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

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 (52) hide show
  1. package/fesm2022/core.mjs +374 -1796
  2. package/fesm2022/core.mjs.map +1 -1
  3. package/fesm2022/primitives/di.mjs +1 -1
  4. package/fesm2022/primitives/di.mjs.map +1 -1
  5. package/fesm2022/primitives/event-dispatch.mjs +2 -589
  6. package/fesm2022/primitives/event-dispatch.mjs.map +1 -1
  7. package/fesm2022/primitives/signals.mjs +18 -8
  8. package/fesm2022/primitives/signals.mjs.map +1 -1
  9. package/fesm2022/rxjs-interop.mjs +7 -32
  10. package/fesm2022/rxjs-interop.mjs.map +1 -1
  11. package/fesm2022/testing.mjs +119 -138
  12. package/fesm2022/testing.mjs.map +1 -1
  13. package/fesm2022/weak_ref-DrMdAIDh.mjs +12 -0
  14. package/fesm2022/weak_ref-DrMdAIDh.mjs.map +1 -0
  15. package/index.d.ts +14343 -15225
  16. package/navigation_types.d-u4EOrrdZ.d.ts +121 -0
  17. package/package.json +2 -2
  18. package/primitives/di/index.d.ts +42 -50
  19. package/primitives/event-dispatch/index.d.ts +205 -309
  20. package/primitives/signals/index.d.ts +158 -195
  21. package/rxjs-interop/index.d.ts +71 -91
  22. package/schematics/bundles/{apply_import_manager-e2a7fe5b.js → apply_import_manager-CyRT0UvU.js} +12 -16
  23. package/schematics/bundles/{checker-af521da6.js → checker-DF8ZaFW5.js} +3084 -1122
  24. package/schematics/bundles/cleanup-unused-imports.js +21 -27
  25. package/schematics/bundles/{compiler_host-5a29293c.js → compiler_host-Da636uJ8.js} +19 -23
  26. package/schematics/bundles/control-flow-migration.js +81 -38
  27. package/schematics/bundles/{imports-047fbbc8.js → imports-CIX-JgAN.js} +9 -14
  28. package/schematics/bundles/{index-1bef3025.js → index-DnkWgagp.js} +55 -59
  29. package/schematics/bundles/{index-ef1bffbb.js → index-vGJcp5M7.js} +4 -4
  30. package/schematics/bundles/inject-flags.js +181 -0
  31. package/schematics/bundles/inject-migration.js +121 -127
  32. package/schematics/bundles/{leading_space-f8944434.js → leading_space-D9nQ8UQC.js} +1 -1
  33. package/schematics/bundles/{migrate_ts_type_references-2a3e9e6b.js → migrate_ts_type_references-DtkOnnv0.js} +106 -111
  34. package/schematics/bundles/{ng_decorators-b0d8b324.js → ng_decorators-DznZ5jMl.js} +4 -8
  35. package/schematics/bundles/{nodes-7758dbf6.js → nodes-B16H9JUd.js} +2 -6
  36. package/schematics/bundles/output-migration.js +39 -45
  37. package/schematics/bundles/{program-a449f9bf.js → program-BZk27Ndu.js} +844 -2651
  38. package/schematics/bundles/{project_paths-17dc204d.js → project_paths-Jtbi76Bs.js} +25 -23
  39. package/schematics/bundles/{project_tsconfig_paths-b558633b.js → project_tsconfig_paths-CDVxT6Ov.js} +1 -1
  40. package/schematics/bundles/{property_name-ac18447e.js → property_name-BBwFuqMe.js} +3 -7
  41. package/schematics/bundles/route-lazy-loading.js +35 -41
  42. package/schematics/bundles/self-closing-tags-migration.js +19 -25
  43. package/schematics/bundles/signal-input-migration.js +60 -67
  44. package/schematics/bundles/signal-queries-migration.js +47 -54
  45. package/schematics/bundles/signals.js +9 -11
  46. package/schematics/bundles/standalone-migration.js +178 -184
  47. package/schematics/migrations.json +4 -15
  48. package/testing/index.d.ts +289 -469
  49. package/weak_ref.d-ttyj86RV.d.ts +9 -0
  50. package/schematics/bundles/explicit-standalone-flag.js +0 -184
  51. package/schematics/bundles/pending-tasks.js +0 -103
  52. package/schematics/bundles/provide-initializer.js +0 -186
@@ -1,23 +1,10 @@
1
1
  /**
2
- * @license Angular v20.0.0-next.1
2
+ * @license Angular v20.0.0-next.2
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
7
-
8
-
9
- /**
10
- * Records information about the action that should handle a given `Event`.
11
- */
12
- declare interface ActionInfo {
13
- name: string;
14
- element: Element;
15
- }
16
-
17
- declare type ActionInfoInternal = [name: string, element: Element];
18
-
19
-
20
- export declare const Attribute: {
7
+ declare const Attribute: {
21
8
  /**
22
9
  * The jsaction attribute defines a mapping of a DOM event to a
23
10
  * generic event (aka jsaction), to which the actual event handlers
@@ -34,45 +21,107 @@ export declare const Attribute: {
34
21
  };
35
22
 
36
23
  /**
37
- * Creates an `EarlyJsactionData`, adds events to it, and populates it on a nested object on
38
- * the window.
24
+ * Reads the jsaction parser cache for the given DOM element. If no cache is yet present,
25
+ * creates an empty one.
39
26
  */
40
- export declare function bootstrapAppScopedEarlyEventContract(container: HTMLElement, appId: string, bubbleEventTypes: string[], captureEventTypes: string[], dataContainer?: EarlyJsactionDataContainer): void;
41
-
42
- /** Clear the early event contract. */
43
- export declare function clearAppScopedEarlyEventContract(appId: string, dataContainer?: EarlyJsactionDataContainer): void;
44
-
45
- /** Clones an `EventInfo` */
46
- declare function cloneEventInfo(eventInfo: EventInfo): EventInfo;
27
+ declare function getDefaulted(element: Element): {
28
+ [key: string]: string | undefined;
29
+ };
47
30
 
48
31
  /**
49
- * Utility function for creating an `EventInfo`.
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.
50
45
  *
51
- * This should be used in compilation units that are less sensitive to code
52
- * size.
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.
53
55
  */
54
- declare function createEventInfo({ eventType, event, targetElement, container, timestamp, action, isReplay, a11yClickKey, }: {
56
+ declare interface EventInfo {
55
57
  eventType: string;
56
58
  event: Event;
57
59
  targetElement: Element;
58
- container: Element;
59
- timestamp: number;
60
- action?: ActionInfo;
61
- isReplay?: boolean;
62
- a11yClickKey?: boolean;
63
- }): EventInfo;
64
-
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
+ }
65
80
  /**
66
- * Utility function for creating an `EventInfo`.
81
+ * Utility class around an `EventInfo`.
67
82
  *
68
- * This can be used from code-size sensitive compilation units, as taking
69
- * parameters vs. an `Object` literal reduces code size.
83
+ * This should be used in compilation units that are less sensitive to code
84
+ * size.
70
85
  */
71
- declare function createEventInfoFromParameters(eventType: string, event: Event, targetElement: Element, container: Element, timestamp: number, action?: ActionInfoInternal, isReplay?: boolean, a11yClickKey?: boolean): EventInfo;
72
-
73
- /** A function that is called to handle events captured by the EventContract. */
74
- declare type Dispatcher = (eventInfo: eventInfoLib.EventInfo, globalDispatch?: boolean) => void;
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
+ }
75
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
+ }
76
125
  /**
77
126
  * Defines the early jsaction data types.
78
127
  */
@@ -91,13 +140,92 @@ declare interface EarlyJsactionData {
91
140
  c: HTMLElement;
92
141
  }
93
142
 
94
- export declare interface EarlyJsactionDataContainer {
95
- _ejsa?: EarlyJsactionData;
96
- _ejsas?: {
97
- [appId: string]: EarlyJsactionData | undefined;
98
- };
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;
99
178
  }
100
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;
101
229
  /**
102
230
  * EventContract intercepts events in the bubbling phase at the
103
231
  * boundary of a container element, and maps them to generic actions
@@ -112,7 +240,7 @@ export declare interface EarlyJsactionDataContainer {
112
240
  * events. (3) Invocation of handlers can be delayed and handlers can
113
241
  * be delay loaded in a generic way.
114
242
  */
115
- export declare class EventContract implements UnrenamedEventContract {
243
+ declare class EventContract implements UnrenamedEventContract {
116
244
  static MOUSE_SPECIAL_SUPPORT: boolean;
117
245
  private containerManager;
118
246
  /**
@@ -170,7 +298,7 @@ export declare class EventContract implements UnrenamedEventContract {
170
298
  * Replays all the early `EventInfo` objects, dispatching them through the normal
171
299
  * `EventContract` flow.
172
300
  */
173
- replayEarlyEventInfos(earlyEventInfos: eventInfoLib.EventInfo[]): void;
301
+ replayEarlyEventInfos(earlyEventInfos: EventInfo[]): void;
174
302
  /**
175
303
  * Returns all JSAction event types that have been registered for a given
176
304
  * browser event type.
@@ -204,50 +332,22 @@ export declare class EventContract implements UnrenamedEventContract {
204
332
  ecrd(dispatcher: Dispatcher, restriction: Restriction): void;
205
333
  }
206
334
 
207
- /**
208
- * A class representing a container node and all the event handlers
209
- * installed on it. Used so that handlers can be cleaned up if the
210
- * container is removed from the contract.
211
- */
212
- export declare class EventContractContainer implements EventContractContainerManager {
213
- readonly element: Element;
214
- /**
215
- * Array of event handlers and their corresponding event types that are
216
- * installed on this container.
217
- *
218
- */
219
- private handlerInfos;
220
- /**
221
- * @param element The container Element.
222
- */
223
- constructor(element: Element);
224
- /**
225
- * Installs the provided installer on the element owned by this container,
226
- * and maintains a reference to resulting handler in order to remove it
227
- * later if desired.
228
- */
229
- addEventListener(eventType: string, getHandler: (element: Element) => (event: Event) => void, passive?: boolean): void;
230
- /**
231
- * Removes all the handlers installed on this container.
232
- */
233
- cleanUp(): void;
234
- }
235
-
236
-
237
- /**
238
- * An `EventContractContainerManager` provides the common interface for managing
239
- * containers.
240
- */
241
- declare interface EventContractContainerManager {
242
- addEventListener(eventType: string, getHandler: (element: Element) => (event: Event) => void, passive?: boolean): void;
243
- cleanUp(): void;
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
+ }
244
345
  }
245
-
246
346
  /**
247
347
  * A dispatcher that uses browser-based `Event` semantics, for example bubbling, `stopPropagation`,
248
348
  * `currentTarget`, etc.
249
349
  */
250
- export declare class EventDispatcher {
350
+ declare class EventDispatcher {
251
351
  private readonly dispatchDelegate;
252
352
  private readonly clickModSupport;
253
353
  private readonly actionResolver;
@@ -260,242 +360,38 @@ export declare class EventDispatcher {
260
360
  /** Internal method that does basic disaptching. */
261
361
  private dispatchToDelegate;
262
362
  }
263
-
264
- /**
265
- * A function that handles an event dispatched from the browser.
266
- *
267
- * eventType: May differ from `event.type` if JSAction uses a
268
- * short-hand name or is patching over an non-bubbling event with a bubbling
269
- * variant.
270
- * event: The native browser event.
271
- * container: The container for this dispatch.
272
- */
273
- declare type EventHandler = (eventType: string, event: Event, container: Element) => void;
274
-
275
- /**
276
- * Records information for later handling of events. This type is
277
- * shared, and instances of it are passed, between the eventcontract
278
- * and the dispatcher jsbinary. Therefore, the fields of this type are
279
- * referenced by string literals rather than property literals
280
- * throughout the code.
281
- *
282
- * 'targetElement' is the element the action occurred on, 'actionElement'
283
- * is the element that has the jsaction handler.
284
- *
285
- * A null 'actionElement' identifies an EventInfo instance that didn't match a
286
- * jsaction attribute. This allows us to execute global event handlers with the
287
- * appropriate event type (including a11y clicks and custom events).
288
- * The declare portion of this interface creates a set of externs that make sure
289
- * renaming doesn't happen for EventInfo. This is important since EventInfo
290
- * is shared across multiple binaries.
291
- */
292
- declare interface EventInfo {
293
- eventType: string;
294
- event: Event;
295
- targetElement: Element;
296
- /** The element that is the container for this Event. */
297
- eic: Element;
298
- timeStamp: number;
299
- /**
300
- * The action parsed from the JSAction element.
301
- */
302
- eia?: ActionInfoInternal;
303
- /**
304
- * Whether this `Event` is a replay event, meaning no dispatcher was
305
- * installed when this `Event` was originally dispatched.
306
- */
307
- eirp?: boolean;
308
- /**
309
- * Whether this `Event` represents a `keydown` event that should be processed
310
- * as a `click`. Only used when a11y click events is on.
311
- */
312
- eiack?: boolean;
313
- /** Whether action resolution has already run on this `EventInfo`. */
314
- eir?: boolean;
315
- }
316
-
317
- declare namespace eventInfoLib {
318
- export {
319
- getEventType,
320
- setEventType,
321
- getEvent,
322
- setEvent,
323
- getTargetElement,
324
- setTargetElement,
325
- getContainer,
326
- setContainer,
327
- getTimestamp,
328
- setTimestamp,
329
- getAction,
330
- setAction,
331
- unsetAction,
332
- getActionName,
333
- getActionElement,
334
- getIsReplay,
335
- setIsReplay,
336
- getA11yClickKey,
337
- setA11yClickKey,
338
- getResolved,
339
- setResolved,
340
- cloneEventInfo,
341
- createEventInfoFromParameters,
342
- createEventInfo,
343
- ActionInfo,
344
- EventInfo,
345
- EventInfoWrapper
346
- }
347
- }
348
-
349
- /**
350
- * Utility class around an `EventInfo`.
351
- *
352
- * This should be used in compilation units that are less sensitive to code
353
- * size.
354
- */
355
- export declare class EventInfoWrapper {
356
- readonly eventInfo: EventInfo;
357
- constructor(eventInfo: EventInfo);
358
- getEventType(): string;
359
- setEventType(eventType: string): void;
360
- getEvent(): Event;
361
- setEvent(event: Event): void;
362
- getTargetElement(): Element;
363
- setTargetElement(targetElement: Element): void;
364
- getContainer(): Element;
365
- setContainer(container: Element): void;
366
- getTimestamp(): number;
367
- setTimestamp(timestamp: number): void;
368
- getAction(): {
369
- name: string;
370
- element: Element;
371
- } | undefined;
372
- setAction(action: ActionInfo | undefined): void;
373
- getIsReplay(): boolean | undefined;
374
- setIsReplay(replay: boolean): void;
375
- getResolved(): boolean | undefined;
376
- setResolved(resolved: boolean): void;
377
- clone(): EventInfoWrapper;
378
- }
379
-
380
- /** Extra event phases beyond what the browser provides. */
381
- export declare const EventPhase: {
382
- REPLAY: number;
383
- };
384
-
385
- /** Added for readability when accessing stable property names. */
386
- declare function getA11yClickKey(eventInfo: EventInfo): boolean | undefined;
387
-
388
- /** Added for readability when accessing stable property names. */
389
- declare function getAction(eventInfo: EventInfo): ActionInfoInternal | undefined;
390
-
391
363
  /**
392
- * Reads the jsaction parser cache for the given DOM element. If no cache is yet present,
393
- * creates an empty one.
364
+ * Registers deferred functionality for an EventContract and a Jsaction
365
+ * Dispatcher.
394
366
  */
395
- export declare function getActionCache(element: Element): {
396
- [key: string]: string | undefined;
397
- };
398
-
399
- /** Added for readability when accessing stable property names. */
400
- declare function getActionElement(actionInfo: ActionInfoInternal): Element;
401
-
402
- /** Added for readability when accessing stable property names. */
403
- declare function getActionName(actionInfo: ActionInfoInternal): string;
404
-
405
- /** Get the queued `EventInfo` objects that were dispatched before a dispatcher was registered. */
406
- export declare function getAppScopedQueuedEventInfos(appId: string, dataContainer?: EarlyJsactionDataContainer): EventInfo[];
407
-
408
- /** Added for readability when accessing stable property names. */
409
- declare function getContainer(eventInfo: EventInfo): Element;
410
-
411
- /** Added for readability when accessing stable property names. */
412
- declare function getEvent(eventInfo: EventInfo): Event;
413
-
414
- /** Added for readability when accessing stable property names. */
415
- declare function getEventType(eventInfo: EventInfo): string;
416
-
417
- /** Added for readability when accessing stable property names. */
418
- declare function getIsReplay(eventInfo: EventInfo): boolean | undefined;
419
-
420
- /** Added for readability when accessing stable property names. */
421
- declare function getResolved(eventInfo: EventInfo): boolean | undefined;
422
-
423
- /** Added for readability when accessing stable property names. */
424
- declare function getTargetElement(eventInfo: EventInfo): Element;
425
-
426
- /** Added for readability when accessing stable property names. */
427
- declare function getTimestamp(eventInfo: EventInfo): number;
367
+ declare function registerDispatcher(eventContract: UnrenamedEventContract, dispatcher: EventDispatcher): void;
428
368
 
429
369
  /**
430
370
  * Whether or not an event type should be registered in the capture phase.
431
371
  * @param eventType
432
372
  * @returns bool
433
373
  */
434
- export declare const isCaptureEventType: (eventType: string) => boolean;
435
-
374
+ declare const isCaptureEventType: (eventType: string) => boolean;
436
375
  /**
437
376
  * Whether or not an event type is registered in the early contract.
438
377
  */
439
- export declare const isEarlyEventType: (eventType: string) => boolean;
378
+ declare const isEarlyEventType: (eventType: string) => boolean;
440
379
 
441
380
  /**
442
- * Registers a dispatcher function on the `EarlyJsactionData` present on the nested object on the
443
- * window.
381
+ * Creates an `EarlyJsactionData`, adds events to it, and populates it on a nested object on
382
+ * the window.
444
383
  */
445
- export declare function registerAppScopedDispatcher(restriction: Restriction, appId: string, dispatcher: (eventInfo: EventInfo) => void, dataContainer?: EarlyJsactionDataContainer): void;
446
-
384
+ declare function bootstrapAppScopedEarlyEventContract(container: HTMLElement, appId: string, bubbleEventTypes: string[], captureEventTypes: string[], dataContainer?: EarlyJsactionDataContainer): void;
385
+ /** Get the queued `EventInfo` objects that were dispatched before a dispatcher was registered. */
386
+ declare function getAppScopedQueuedEventInfos(appId: string, dataContainer?: EarlyJsactionDataContainer): EventInfo[];
447
387
  /**
448
- * Registers deferred functionality for an EventContract and a Jsaction
449
- * Dispatcher.
388
+ * Registers a dispatcher function on the `EarlyJsactionData` present on the nested object on the
389
+ * window.
450
390
  */
451
- export declare function registerDispatcher(eventContract: UnrenamedEventContract, dispatcher: EventDispatcher): void;
452
-
391
+ declare function registerAppScopedDispatcher(restriction: Restriction, appId: string, dispatcher: (eventInfo: EventInfo) => void, dataContainer?: EarlyJsactionDataContainer): void;
453
392
  /** Removes all event listener handlers. */
454
- export declare function removeAllAppScopedEventListeners(appId: string, dataContainer?: EarlyJsactionDataContainer): void;
455
-
456
-
457
- /**
458
- * @fileoverview An enum to control who can call certain jsaction APIs.
459
- */
460
- declare enum Restriction {
461
- I_AM_THE_JSACTION_FRAMEWORK = 0
462
- }
463
-
464
- /** Added for readability when accessing stable property names. */
465
- declare function setA11yClickKey(eventInfo: EventInfo, a11yClickKey: boolean): void;
466
-
467
- /** Added for readability when accessing stable property names. */
468
- declare function setAction(eventInfo: EventInfo, actionName: string, actionElement: Element): void;
469
-
470
- /** Added for readability when accessing stable property names. */
471
- declare function setContainer(eventInfo: EventInfo, container: Element): void;
472
-
473
- /** Added for readability when accessing stable property names. */
474
- declare function setEvent(eventInfo: EventInfo, event: Event): void;
475
-
476
- /** Added for readability when accessing stable property names. */
477
- declare function setEventType(eventInfo: EventInfo, eventType: string): void;
478
-
479
- /** Added for readability when accessing stable property names. */
480
- declare function setIsReplay(eventInfo: EventInfo, replay: boolean): void;
481
-
482
- /** Added for readability when accessing stable property names. */
483
- declare function setResolved(eventInfo: EventInfo, resolved: boolean): void;
484
-
485
- /** Added for readability when accessing stable property names. */
486
- declare function setTargetElement(eventInfo: EventInfo, targetElement: Element): void;
487
-
488
- /** Added for readability when accessing stable property names. */
489
- declare function setTimestamp(eventInfo: EventInfo, timestamp: number): void;
490
-
491
- /**
492
- * The API of an EventContract that is safe to call from any compilation unit.
493
- */
494
- declare interface UnrenamedEventContract {
495
- ecrd(dispatcher: Dispatcher, restriction: Restriction): void;
496
- }
497
-
498
- /** Added for readability when accessing stable property names. */
499
- declare function unsetAction(eventInfo: EventInfo): void;
393
+ declare function removeAllAppScopedEventListeners(appId: string, dataContainer?: EarlyJsactionDataContainer): void;
394
+ /** Clear the early event contract. */
395
+ declare function clearAppScopedEarlyEventContract(appId: string, dataContainer?: EarlyJsactionDataContainer): void;
500
396
 
501
- export { }
397
+ export { Attribute, type EarlyJsactionDataContainer, EventContract, EventContractContainer, EventDispatcher, EventInfoWrapper, EventPhase, bootstrapAppScopedEarlyEventContract, clearAppScopedEarlyEventContract, getDefaulted as getActionCache, getAppScopedQueuedEventInfos, isCaptureEventType, isEarlyEventType, registerAppScopedDispatcher, registerDispatcher, removeAllAppScopedEventListeners };