@angular/aria 22.0.0-next.8 → 22.0.0-rc.1

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 (54) hide show
  1. package/fesm2022/_accordion-chunk.mjs +11 -1
  2. package/fesm2022/_accordion-chunk.mjs.map +1 -1
  3. package/fesm2022/_click-event-manager-chunk.mjs +1 -1
  4. package/fesm2022/_deferred-content-chunk.mjs +6 -6
  5. package/fesm2022/_list-chunk.mjs +1 -1
  6. package/fesm2022/_list-navigation-chunk.mjs +1 -1
  7. package/fesm2022/_list-typeahead-chunk.mjs +1 -1
  8. package/fesm2022/_menu-chunk.mjs +27 -4
  9. package/fesm2022/_menu-chunk.mjs.map +1 -1
  10. package/fesm2022/_option-chunk.mjs +11 -1
  11. package/fesm2022/_option-chunk.mjs.map +1 -1
  12. package/fesm2022/_tabs-chunk.mjs +1 -1
  13. package/fesm2022/_toolbar-widget-group-chunk.mjs +10 -1
  14. package/fesm2022/_toolbar-widget-group-chunk.mjs.map +1 -1
  15. package/fesm2022/_tree-chunk.mjs +6 -1
  16. package/fesm2022/_tree-chunk.mjs.map +1 -1
  17. package/fesm2022/{_collection-chunk.mjs → _violations-chunk.mjs} +11 -2
  18. package/fesm2022/_violations-chunk.mjs.map +1 -0
  19. package/fesm2022/_widget-chunk.mjs +11 -1
  20. package/fesm2022/_widget-chunk.mjs.map +1 -1
  21. package/fesm2022/accordion.mjs +102 -48
  22. package/fesm2022/accordion.mjs.map +1 -1
  23. package/fesm2022/aria.mjs +1 -1
  24. package/fesm2022/aria.mjs.map +1 -1
  25. package/fesm2022/combobox.mjs +9 -9
  26. package/fesm2022/combobox.mjs.map +1 -1
  27. package/fesm2022/grid.mjs +20 -13
  28. package/fesm2022/grid.mjs.map +1 -1
  29. package/fesm2022/listbox.mjs +15 -17
  30. package/fesm2022/listbox.mjs.map +1 -1
  31. package/fesm2022/menu.mjs +79 -24
  32. package/fesm2022/menu.mjs.map +1 -1
  33. package/fesm2022/private.mjs +2 -2
  34. package/fesm2022/tabs.mjs +117 -54
  35. package/fesm2022/tabs.mjs.map +1 -1
  36. package/fesm2022/toolbar.mjs +31 -10
  37. package/fesm2022/toolbar.mjs.map +1 -1
  38. package/fesm2022/tree.mjs +18 -20
  39. package/fesm2022/tree.mjs.map +1 -1
  40. package/package.json +2 -2
  41. package/types/_accordion-chunk.d.ts +2 -0
  42. package/types/_grid-chunk.d.ts +2 -0
  43. package/types/_menu-chunk.d.ts +9 -1
  44. package/types/_toolbar-chunk.d.ts +2 -0
  45. package/types/accordion.d.ts +3 -5
  46. package/types/combobox.d.ts +26 -10
  47. package/types/grid.d.ts +0 -8
  48. package/types/listbox.d.ts +0 -4
  49. package/types/menu.d.ts +6 -12
  50. package/types/private.d.ts +4 -1
  51. package/types/tabs.d.ts +3 -11
  52. package/types/toolbar.d.ts +1 -6
  53. package/types/tree.d.ts +0 -6
  54. package/fesm2022/_collection-chunk.mjs.map +0 -1
@@ -21,8 +21,6 @@ import './_click-event-manager-chunk.js';
21
21
  * </li>
22
22
  * ```
23
23
  *
24
- * @developerPreview 21.0
25
- *
26
24
  * @see [Listbox](guide/aria/listbox)
27
25
  * @see [Autocomplete](guide/aria/autocomplete)
28
26
  * @see [Select](guide/aria/select)
@@ -72,8 +70,6 @@ declare class Option<V> implements OnInit, OnDestroy {
72
70
  * </ul>
73
71
  * ```
74
72
  *
75
- * @developerPreview 21.0
76
- *
77
73
  * @see [Listbox](guide/aria/listbox)
78
74
  * @see [Autocomplete](guide/aria/autocomplete)
79
75
  * @see [Select](guide/aria/select)
package/types/menu.d.ts CHANGED
@@ -32,8 +32,6 @@ import './_list-navigation-chunk.js';
32
32
  * </div>
33
33
  * ```
34
34
  *
35
- * @developerPreview 21.0
36
- *
37
35
  * @see [Menu](guide/aria/menu)
38
36
  * @see [MenuBar](guide/aria/menubar)
39
37
  */
@@ -84,8 +82,6 @@ declare class MenuBar<V> implements OnDestroy {
84
82
  * </div>
85
83
  * ```
86
84
  *
87
- * @developerPreview 21.0
88
- *
89
85
  * @see [Menu](guide/aria/menu)
90
86
  * @see [MenuBar](guide/aria/menubar)
91
87
  */
@@ -102,6 +98,8 @@ declare class MenuItem<V> implements OnInit, OnDestroy {
102
98
  readonly disabled: _angular_core.InputSignal<boolean>;
103
99
  /** The search term associated with the menu item. */
104
100
  readonly searchTerm: _angular_core.ModelSignal<string>;
101
+ /** The role of the menu item. */
102
+ readonly role: _angular_core.InputSignal<"menuitem" | "menuitemradio" | "menuitemcheckbox">;
105
103
  /** A reference to the parent menu or menubar. */
106
104
  readonly parent: Menu<V> | MenuBar<V> | null;
107
105
  /** The submenu associated with the menu item. */
@@ -122,7 +120,7 @@ declare class MenuItem<V> implements OnInit, OnDestroy {
122
120
  /** Closes the submenu. */
123
121
  close(): void;
124
122
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<MenuItem<any>, never>;
125
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<MenuItem<any>, "[ngMenuItem]", ["ngMenuItem"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "searchTerm": { "alias": "searchTerm"; "required": false; "isSignal": true; }; "submenu": { "alias": "submenu"; "required": false; "isSignal": true; }; }, { "searchTerm": "searchTermChange"; }, never, never, true, never>;
123
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<MenuItem<any>, "[ngMenuItem]", ["ngMenuItem"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "searchTerm": { "alias": "searchTerm"; "required": false; "isSignal": true; }; "role": { "alias": "role"; "required": false; "isSignal": true; }; "submenu": { "alias": "submenu"; "required": false; "isSignal": true; }; }, { "searchTerm": "searchTermChange"; }, never, never, true, never>;
126
124
  }
127
125
 
128
126
  /**
@@ -147,8 +145,6 @@ declare class MenuItem<V> implements OnInit, OnDestroy {
147
145
  * </div>
148
146
  * ```
149
147
  *
150
- * @developerPreview 21.0
151
- *
152
148
  * @see [Menu](guide/aria/menu)
153
149
  * @see [MenuBar](guide/aria/menubar)
154
150
  */
@@ -175,6 +171,8 @@ declare class Menu<V> implements OnDestroy {
175
171
  readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
176
172
  /** A reference to the parent menu item or menu trigger. */
177
173
  readonly parent: _angular_core.WritableSignal<MenuTrigger<V> | MenuItem<V> | undefined>;
174
+ /** Whether the menu is soft disabled. */
175
+ readonly softDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
178
176
  /** The menu ui pattern instance. */
179
177
  readonly _pattern: MenuPattern<V>;
180
178
  /**
@@ -201,7 +199,7 @@ declare class Menu<V> implements OnDestroy {
201
199
  /** Closes the menu. */
202
200
  close(): void;
203
201
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<Menu<any>, never>;
204
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Menu<any>, "[ngMenu]", ["ngMenu"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; "typeaheadDelay": { "alias": "typeaheadDelay"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "expansionDelay": { "alias": "expansionDelay"; "required": false; "isSignal": true; }; }, { "itemSelected": "itemSelected"; }, never, never, true, [{ directive: typeof DeferredContentAware; inputs: { "preserveContent": "preserveContent"; }; outputs: {}; }]>;
202
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Menu<any>, "[ngMenu]", ["ngMenu"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; "typeaheadDelay": { "alias": "typeaheadDelay"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "softDisabled": { "alias": "softDisabled"; "required": false; "isSignal": true; }; "expansionDelay": { "alias": "expansionDelay"; "required": false; "isSignal": true; }; }, { "itemSelected": "itemSelected"; }, never, never, true, [{ directive: typeof DeferredContentAware; inputs: { "preserveContent": "preserveContent"; }; outputs: {}; }]>;
205
203
  }
206
204
 
207
205
  /**
@@ -220,8 +218,6 @@ declare class Menu<V> implements OnDestroy {
220
218
  * </div>
221
219
  * ```
222
220
  *
223
- * @developerPreview 21.0
224
- *
225
221
  * @see [Menu](guide/aria/menu)
226
222
  * @see [MenuBar](guide/aria/menubar)
227
223
  */
@@ -268,8 +264,6 @@ declare class MenuTrigger<V> {
268
264
  * </div>
269
265
  * ```
270
266
  *
271
- * @developerPreview 21.0
272
- *
273
267
  * @see [Menu](guide/aria/menu)
274
268
  * @see [MenuBar](guide/aria/menubar)
275
269
  */
@@ -22,6 +22,9 @@ import './_list-navigation-chunk.js';
22
22
  */
23
23
  declare function tabIndexTransform(v: string | number | undefined): number | undefined;
24
24
 
25
+ /** Logs each of the violations to the console as errors, optionally with the host element context. */
26
+ declare function reportViolations(violations: string[], element: Element): void;
27
+
25
28
  /** Represents the required inputs for a simple combobox. */
26
29
  interface ComboboxInputs extends ExpansionItem {
27
30
  /** Whether the combobox should always remain expanded. */
@@ -123,5 +126,5 @@ declare class ComboboxPopupPattern {
123
126
  onFocusout(event: FocusEvent): void;
124
127
  }
125
128
 
126
- export { ComboboxPattern, ComboboxPopupPattern, SignalLike, WritableSignalLike, tabIndexTransform };
129
+ export { ComboboxPattern, ComboboxPopupPattern, SignalLike, WritableSignalLike, reportViolations, tabIndexTransform };
127
130
  export type { ComboboxInputs, ComboboxPopupInputs };
package/types/tabs.d.ts CHANGED
@@ -21,8 +21,6 @@ import './_list-navigation-chunk.js';
21
21
  * </li>
22
22
  * ```
23
23
  *
24
- * @developerPreview 21.0
25
- *
26
24
  * @see [Tabs](guide/aria/tabs)
27
25
  */
28
26
  declare class Tab implements HasElement, OnInit, OnDestroy {
@@ -48,6 +46,7 @@ declare class Tab implements HasElement, OnInit, OnDestroy {
48
46
  readonly _pattern: TabPattern;
49
47
  /** Opens this tab panel. */
50
48
  open(): void;
49
+ constructor();
51
50
  ngOnInit(): void;
52
51
  ngOnDestroy(): void;
53
52
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<Tab, never>;
@@ -68,8 +67,6 @@ declare class Tab implements HasElement, OnInit, OnDestroy {
68
67
  * </ul>
69
68
  * ```
70
69
  *
71
- * @developerPreview 21.0
72
- *
73
70
  * @see [Tabs](guide/aria/tabs)
74
71
  */
75
72
  declare class TabList implements OnInit, OnDestroy {
@@ -139,8 +136,6 @@ declare class TabList implements OnInit, OnDestroy {
139
136
  * </div>
140
137
  * ```
141
138
  *
142
- * @developerPreview 21.0
143
- *
144
139
  * @see [Tabs](guide/aria/tabs)
145
140
  */
146
141
  declare class TabPanel implements OnInit, OnDestroy {
@@ -162,11 +157,12 @@ declare class TabPanel implements OnInit, OnDestroy {
162
157
  readonly visible: _angular_core.Signal<boolean>;
163
158
  /** The TabPanel UIPattern. */
164
159
  readonly _pattern: TabPanelPattern;
160
+ private readonly _tabContent;
165
161
  constructor();
166
162
  ngOnInit(): void;
167
163
  ngOnDestroy(): void;
168
164
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<TabPanel, never>;
169
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TabPanel, "[ngTabPanel]", ["ngTabPanel"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof DeferredContentAware; inputs: { "preserveContent": "preserveContent"; }; outputs: {}; }]>;
165
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TabPanel, "[ngTabPanel]", ["ngTabPanel"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; }, {}, ["_tabContent"], never, true, [{ directive: typeof DeferredContentAware; inputs: { "preserveContent": "preserveContent"; }; outputs: {}; }]>;
170
166
  }
171
167
 
172
168
  /**
@@ -196,8 +192,6 @@ declare class TabPanel implements OnInit, OnDestroy {
196
192
  * </div>
197
193
  * ```
198
194
  *
199
- * @developerPreview 21.0
200
- *
201
195
  * @see [Tabs](guide/aria/tabs)
202
196
  */
203
197
  declare class Tabs implements OnDestroy {
@@ -240,8 +234,6 @@ declare class Tabs implements OnDestroy {
240
234
  * </div>
241
235
  * ```
242
236
  *
243
- * @developerPreview 21.0
244
- *
245
237
  * @see [Tabs](guide/aria/tabs)
246
238
  */
247
239
  declare class TabContent {
@@ -10,8 +10,6 @@ import './_list-navigation-chunk.js';
10
10
  * A directive that groups toolbar widgets, used for more complex widgets like radio groups
11
11
  * that have their own internal navigation.
12
12
  *
13
- * @developerPreview 21.0
14
- *
15
13
  * @see [Toolbar](guide/aria/toolbar)
16
14
  */
17
15
  declare class ToolbarWidgetGroup<V> {
@@ -33,6 +31,7 @@ declare class ToolbarWidgetGroup<V> {
33
31
  readonly multi: _angular_core.InputSignalWithTransform<boolean, unknown>;
34
32
  /** The ToolbarWidgetGroup UIPattern. */
35
33
  readonly _pattern: ToolbarWidgetGroupPattern<ToolbarWidgetPattern<V>, V>;
34
+ constructor();
36
35
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ToolbarWidgetGroup<any>, never>;
37
36
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ToolbarWidgetGroup<any>, "[ngToolbarWidgetGroup]", ["ngToolbarWidgetGroup"], { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "multi": { "alias": "multi"; "required": false; "isSignal": true; }; }, {}, ["_widgets"], never, true, never>;
38
37
  }
@@ -50,8 +49,6 @@ declare class ToolbarWidgetGroup<V> {
50
49
  * </button>
51
50
  * ```
52
51
  *
53
- * @developerPreview 21.0
54
- *
55
52
  * @see [Toolbar](guide/aria/toolbar)
56
53
  */
57
54
  declare class ToolbarWidget<V> implements OnInit, OnDestroy {
@@ -104,8 +101,6 @@ declare class ToolbarWidget<V> implements OnInit, OnDestroy {
104
101
  * </div>
105
102
  * ```
106
103
  *
107
- * @developerPreview 21.0
108
- *
109
104
  * @see [Toolbar](guide/aria/toolbar)
110
105
  */
111
106
  declare class Toolbar<V> implements OnDestroy {
package/types/tree.d.ts CHANGED
@@ -28,8 +28,6 @@ import './_click-event-manager-chunk.js';
28
28
  * </li>
29
29
  * ```
30
30
  *
31
- * @developerPreview 21.0
32
- *
33
31
  * @see [Tree](guide/aria/tree)
34
32
  */
35
33
  declare class TreeItemGroup<V> implements OnInit, OnDestroy {
@@ -65,8 +63,6 @@ declare class TreeItemGroup<V> implements OnInit, OnDestroy {
65
63
  * Item Label
66
64
  * </li>
67
65
  * ```
68
- *
69
- * @developerPreview 21.0
70
66
  */
71
67
  declare class TreeItem<V> extends DeferredContentAware implements OnInit, OnDestroy, HasElement {
72
68
  /** A reference to the host element. */
@@ -146,8 +142,6 @@ declare class TreeItem<V> extends DeferredContentAware implements OnInit, OnDest
146
142
  * </ng-template>
147
143
  * ```
148
144
  *
149
- * @developerPreview 21.0
150
- *
151
145
  * @see [Tree](guide/aria/tree)
152
146
  */
153
147
  declare class Tree<V> implements OnDestroy {
@@ -1 +0,0 @@
1
- {"version":3,"file":"_collection-chunk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/private/behaviors/event-manager/event-manager.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/private/behaviors/event-manager/keyboard-event-manager.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/private/behaviors/signal-like/signal-like.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/private/utils/element.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/private/utils/collection.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\n/**\n * An event that supports modifier keys.\n *\n * Matches the native KeyboardEvent, MouseEvent, and TouchEvent.\n */\nexport interface EventWithModifiers extends Event {\n ctrlKey: boolean;\n shiftKey: boolean;\n altKey: boolean;\n metaKey: boolean;\n}\n\n/**\n * Options that are applicable to all event handlers.\n *\n * This library has not yet had a need for stopPropagationImmediate.\n */\nexport interface EventHandlerOptions {\n ignoreRepeat?: boolean;\n stopPropagation: boolean;\n preventDefault: boolean;\n}\n\n/** A basic event handler. */\nexport type EventHandler<T extends Event> = (event: T) => void;\n\n/** A function that determines whether an event is to be handled. */\nexport type EventMatcher<T extends Event> = (event: T) => boolean;\n\n/** A config that specifies how to handle a particular event. */\nexport interface EventHandlerConfig<T extends Event> extends EventHandlerOptions {\n matcher: EventMatcher<T>;\n handler: EventHandler<T>;\n}\n\n/** Bit flag representation of the possible modifier keys that can be present on an event. */\nexport enum Modifier {\n None = 0,\n Ctrl = 0b1,\n Shift = 0b10,\n Alt = 0b100,\n Meta = 0b1000,\n Any = 'Any',\n}\n\nexport type ModifierInputs = Modifier | Modifier[];\n\n/**\n * Abstract base class for all event managers.\n *\n * Event managers are designed to normalize how event handlers are authored and create a safety net\n * for common event handling gotchas like remembering to call preventDefault or stopPropagation.\n */\nexport abstract class EventManager<T extends Event> {\n protected configs: EventHandlerConfig<T>[] = [];\n abstract options: EventHandlerOptions;\n\n /** Runs the handlers that match with the given event. */\n handle(event: T): void {\n for (const config of this.configs) {\n if (config.matcher(event)) {\n config.handler(event);\n\n if (config.preventDefault) {\n event.preventDefault();\n }\n\n if (config.stopPropagation) {\n event.stopPropagation();\n }\n }\n }\n }\n\n /** Configures the event manager to handle specific events. (See subclasses for more). */\n abstract on(...args: [...unknown[]]): this;\n}\n\n/** Gets bit flag representation of the modifier keys present on the given event. */\nexport function getModifiers(event: EventWithModifiers): number {\n return (\n (+event.ctrlKey && Modifier.Ctrl) |\n (+event.shiftKey && Modifier.Shift) |\n (+event.altKey && Modifier.Alt) |\n (+event.metaKey && Modifier.Meta)\n );\n}\n\n/**\n * Checks if the given event has modifiers that are an exact match for any of the given modifier\n * flag combinations.\n */\nexport function hasModifiers(event: EventWithModifiers, modifiers: ModifierInputs): boolean {\n const eventModifiers = getModifiers(event);\n const modifiersList = Array.isArray(modifiers) ? modifiers : [modifiers];\n\n if (modifiersList.includes(Modifier.Any)) {\n return true;\n }\n\n return modifiersList.some(modifiers => eventModifiers === modifiers);\n}\n","/**\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 {SignalLike} from '../signal-like/signal-like';\nimport {\n EventHandler,\n EventHandlerOptions,\n EventManager,\n hasModifiers,\n ModifierInputs,\n Modifier,\n} from './event-manager';\n\n/**\n * Used to represent a keycode.\n *\n * This is used to match whether an events keycode should be handled. The ability to match using a\n * string, SignalLike, or Regexp gives us more flexibility when authoring event handlers.\n */\ntype KeyCode = string | SignalLike<string> | RegExp;\n\n/**\n * An event manager that is specialized for handling keyboard events. By default this manager stops\n * propagation and prevents default on all events it handles.\n */\nexport class KeyboardEventManager<T extends KeyboardEvent> extends EventManager<T> {\n readonly options: EventHandlerOptions = {\n ignoreRepeat: true,\n preventDefault: true,\n stopPropagation: true,\n };\n\n /** Configures this event manager to handle events with a specific key and no modifiers. */\n on(key: KeyCode, handler: EventHandler<T>, options?: Partial<EventHandlerOptions>): this;\n\n /** Configures this event manager to handle events with a specific modifer and key combination. */\n on(\n modifiers: ModifierInputs,\n key: KeyCode,\n handler: EventHandler<T>,\n options?: Partial<EventHandlerOptions>,\n ): this;\n\n on(...args: any[]) {\n const {modifiers, key, handler, options} = this._normalizeInputs(...args);\n\n this.configs.push({\n handler: handler,\n matcher: event => this._isMatch(event, key, modifiers, options),\n ...this.options,\n ...options,\n });\n\n return this;\n }\n\n private _normalizeInputs(...args: any[]) {\n const withModifiers = Array.isArray(args[0]) || args[0] in Modifier;\n const modifiers = withModifiers ? args[0] : Modifier.None;\n const key = withModifiers ? args[1] : args[0];\n const handler = withModifiers ? args[2] : args[1];\n const options = withModifiers ? args[3] : args[2];\n\n return {\n key: key as KeyCode,\n handler: handler as EventHandler<T>,\n modifiers: modifiers as ModifierInputs,\n options: (options ?? {}) as Partial<EventHandlerOptions>,\n };\n }\n\n private _isMatch(\n event: T,\n key: KeyCode,\n modifiers: ModifierInputs,\n options?: Partial<EventHandlerOptions>,\n ): boolean {\n if (!hasModifiers(event, modifiers)) {\n return false;\n }\n\n // Default is to ignore repeated key events unless explicitly set to false.\n if (event.repeat && options?.ignoreRepeat !== false) {\n return false;\n }\n\n if (key instanceof RegExp) {\n return key.test(event.key);\n }\n\n const keyStr = typeof key === 'string' ? key : key();\n return keyStr.toLowerCase() === event.key.toLowerCase();\n }\n}\n","/**\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 {\n createComputed,\n createLinkedSignal,\n createSignal,\n linkedSignalSetFn,\n linkedSignalUpdateFn,\n SIGNAL,\n untracked as primitiveUntracked,\n} from '@angular/core/primitives/signals';\n\nexport {primitiveUntracked as untracked};\n\nexport type SignalLike<T> = () => T;\n\nexport interface WritableSignalLike<T> extends SignalLike<T> {\n set(value: T): void;\n update(updateFn: (value: T) => T): void;\n asReadonly(): SignalLike<T>;\n}\n\n/** Converts a getter setter style signal to a WritableSignalLike. */\nexport function convertGetterSetterToWritableSignalLike<T>(\n getter: () => T,\n setter: (v: T) => void,\n): WritableSignalLike<T> {\n // tslint:disable-next-line:ban Have to use `Object.assign` to preserve the getter function.\n return Object.assign(getter, {\n set: setter,\n update: (updateCallback: (v: T) => T) => setter(updateCallback(getter())),\n asReadonly: () => getter,\n });\n}\n\nexport function computed<T>(computation: () => T): SignalLike<T> {\n const computed = createComputed(computation);\n computed[SIGNAL].debugName = '';\n return computed;\n}\n\nexport function signal<T>(initialValue: T): WritableSignalLike<T> {\n const [get, set, update] = createSignal(initialValue);\n get[SIGNAL].debugName = '';\n // tslint:disable-next-line:ban Have to use `Object.assign` to preserve the getter function.\n return Object.assign(get, {set, update, asReadonly: () => get});\n}\n\nexport function linkedSignal<T>(sourceFn: () => T): WritableSignalLike<T> {\n const getter = createLinkedSignal(sourceFn, s => s);\n getter[SIGNAL].debugName = '';\n // tslint:disable-next-line:ban Have to use `Object.assign` to preserve the getter function.\n return Object.assign(getter, {\n set: (v: T) => linkedSignalSetFn(getter[SIGNAL], v),\n update: (updater: (v: T) => T) => linkedSignalUpdateFn(getter[SIGNAL], updater),\n asReadonly: () => getter,\n });\n}\n","/**\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\nexport interface HasElement {\n element: HTMLElement;\n}\n\n/**\n * Sort directives by their document order.\n */\nexport function sortDirectives(a: HasElement, b: HasElement) {\n return (a.element.compareDocumentPosition(b.element) & Node.DOCUMENT_POSITION_PRECEDING) > 0\n ? 1\n : -1;\n}\n","/**\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 {signal, computed, Signal} from '@angular/core';\nimport {sortDirectives, HasElement} from './element';\n\n/**\n * A collection that lazily sorts its items based on their DOM position.\n * It uses manual registration and updates its order when items are added/removed\n * or when structural DOM changes are detected via MutationObserver.\n *\n * TODO(ok7sai): replace Mutation Observer with internal API.\n */\nexport class SortedCollection<T extends HasElement> {\n private readonly _items = signal<Set<T>>(new Set());\n private readonly _version = signal(0);\n private _observer?: MutationObserver;\n\n readonly orderedItems: Signal<T[]> = computed(() => {\n this._version(); // Track DOM changes\n const itemsArray = Array.from(this._items());\n return itemsArray.sort(sortDirectives);\n });\n\n register(item: T) {\n this._items.update(set => {\n const newSet = new Set(set);\n newSet.add(item);\n return newSet;\n });\n }\n\n unregister(item: T) {\n this._items.update(set => {\n const newSet = new Set(set);\n newSet.delete(item);\n return newSet;\n });\n }\n\n startObserving(element: HTMLElement) {\n if (this._observer) {\n this._observer.disconnect();\n }\n\n this._observer = new MutationObserver(mutations => {\n const hasStructuralChange = mutations.some(m => m.addedNodes.length || m.removedNodes.length);\n if (hasStructuralChange) {\n this._version.update(v => v + 1);\n }\n });\n\n this._observer.observe(element, {childList: true, subtree: true});\n }\n\n stopObserving() {\n this._observer?.disconnect();\n this._observer = undefined;\n }\n}\n"],"names":["Modifier","EventManager","configs","handle","event","config","matcher","handler","preventDefault","stopPropagation","getModifiers","ctrlKey","Ctrl","shiftKey","Shift","altKey","Alt","metaKey","Meta","hasModifiers","modifiers","eventModifiers","modifiersList","Array","isArray","includes","Any","some","KeyboardEventManager","options","ignoreRepeat","on","args","key","_normalizeInputs","push","_isMatch","withModifiers","None","repeat","RegExp","test","keyStr","toLowerCase","convertGetterSetterToWritableSignalLike","getter","setter","Object","assign","set","update","updateCallback","asReadonly","computed","computation","createComputed","SIGNAL","debugName","signal","initialValue","get","createSignal","linkedSignal","sourceFn","createLinkedSignal","s","v","linkedSignalSetFn","updater","linkedSignalUpdateFn","sortDirectives","a","b","element","compareDocumentPosition","Node","DOCUMENT_POSITION_PRECEDING","SortedCollection","_items","Set","_version","_observer","orderedItems","itemsArray","from","sort","register","item","newSet","add","unregister","delete","startObserving","disconnect","MutationObserver","mutations","hasStructuralChange","m","addedNodes","length","removedNodes","observe","childList","subtree","stopObserving","undefined"],"mappings":";;;IA4CYA;AAAZ,CAAA,UAAYA,QAAQ,EAAA;EAClBA,QAAA,CAAAA,QAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAQ;EACRA,QAAA,CAAAA,QAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAU;EACVA,QAAA,CAAAA,QAAA,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,OAAY;EACZA,QAAA,CAAAA,QAAA,CAAA,KAAA,CAAA,GAAA,CAAA,CAAA,GAAA,KAAW;EACXA,QAAA,CAAAA,QAAA,CAAA,M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