@genesislcap/foundation-utils 15.64.1-alpha-ddbd4ead05.0 → 15.64.1-alpha-2000def28d.0

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.
@@ -458,186 +458,60 @@
458
458
  },
459
459
  {
460
460
  "kind": "javascript-module",
461
- "path": "src/design-system/design-system.ts",
462
- "declarations": [
463
- {
464
- "kind": "function",
465
- "name": "assureDesignSystem",
466
- "return": {
467
- "type": {
468
- "text": "DesignSystemModule"
469
- }
470
- },
471
- "parameters": [
472
- {
473
- "name": "module",
474
- "type": {
475
- "text": "DesignSystemModule"
476
- }
477
- }
478
- ],
479
- "description": "assureDesignSystem.",
480
- "privacy": "public"
481
- },
482
- {
483
- "kind": "function",
484
- "name": "getCurrentDesignSystem",
485
- "return": {
486
- "type": {
487
- "text": ""
488
- }
489
- },
490
- "parameters": [
491
- {
492
- "name": "element",
493
- "type": {
494
- "text": "HTMLElement"
495
- },
496
- "description": "The starting HTML element"
497
- },
498
- {
499
- "name": "fallbackPrefix",
500
- "type": {
501
- "text": "string"
502
- },
503
- "description": "The prefix to fallback to if the provider is not available"
504
- }
505
- ],
506
- "description": "Get the current design system provider element and prefix by checking available providers.\nIf no provider is found, falls back to the provided prefix.",
507
- "privacy": "public"
508
- },
509
- {
510
- "kind": "function",
511
- "name": "getCurrentDesignSystemPrefix",
512
- "return": {
513
- "type": {
514
- "text": ""
515
- }
516
- },
517
- "parameters": [
518
- {
519
- "name": "element",
520
- "type": {
521
- "text": "HTMLElement"
522
- },
523
- "description": "The starting HTML element"
524
- },
525
- {
526
- "name": "fallbackPrefix",
527
- "type": {
528
- "text": "string"
529
- },
530
- "description": "The prefix to fallback to if the provider is not available"
531
- }
532
- ],
533
- "description": "Get the current design system prefix by checking available providers.\nIf no provider is found, falls back to the provided prefix.",
534
- "privacy": "public"
535
- }
536
- ],
461
+ "path": "src/decorators/index.ts",
462
+ "declarations": [],
537
463
  "exports": [
538
464
  {
539
465
  "kind": "js",
540
- "name": "assureDesignSystem",
541
- "declaration": {
542
- "name": "assureDesignSystem",
543
- "module": "src/design-system/design-system.ts"
544
- }
545
- },
546
- {
547
- "kind": "js",
548
- "name": "getCurrentDesignSystem",
549
- "declaration": {
550
- "name": "getCurrentDesignSystem",
551
- "module": "src/design-system/design-system.ts"
552
- }
553
- },
554
- {
555
- "kind": "js",
556
- "name": "getCurrentDesignSystemPrefix",
466
+ "name": "*",
557
467
  "declaration": {
558
- "name": "getCurrentDesignSystemPrefix",
559
- "module": "src/design-system/design-system.ts"
468
+ "name": "*",
469
+ "package": "./renderOnChange"
560
470
  }
561
471
  }
562
472
  ]
563
473
  },
564
474
  {
565
475
  "kind": "javascript-module",
566
- "path": "src/design-system/editable-elements.ts",
476
+ "path": "src/decorators/renderOnChange.ts",
567
477
  "declarations": [
568
- {
569
- "kind": "variable",
570
- "name": "BASE_EDITABLE_ELEMENT_SELECTORS",
571
- "type": {
572
- "text": "[\n ...NATIVE_EDITABLE_ELEMENT_SELECTORS,\n ...CONTENT_EDITABLE_SELECTORS,\n ...ARIA_EDITABLE_ROLE_SELECTORS,\n]"
573
- },
574
- "default": "[\n ...NATIVE_EDITABLE_ELEMENT_SELECTORS,\n ...CONTENT_EDITABLE_SELECTORS,\n ...ARIA_EDITABLE_ROLE_SELECTORS,\n]",
575
- "description": "Base selectors treated as editable context regardless of design system.\nIncludes native controls, contenteditable, and ARIA-editable roles."
576
- },
577
- {
578
- "kind": "variable",
579
- "name": "DESIGN_SYSTEM_EDITABLE_ELEMENT_SELECTORS",
580
- "type": {
581
- "text": "Record<\n EditableDesignSystemPrefix,\n readonly string[]\n>"
582
- },
583
- "default": "{\n rapid: buildDesignSystemEditableSelectors('rapid'),\n zero: buildDesignSystemEditableSelectors('zero'),\n}",
584
- "description": "Design-system specific editable host selectors."
585
- },
586
478
  {
587
479
  "kind": "function",
588
- "name": "buildEditableElementSelector",
589
- "return": {
590
- "type": {
591
- "text": "string"
592
- }
593
- },
480
+ "name": "renderOnChange",
594
481
  "parameters": [
595
482
  {
596
- "name": "designSystems",
483
+ "name": "target",
597
484
  "type": {
598
- "text": "readonly EditableDesignSystemPrefix[]"
599
- }
485
+ "text": "FASTElement & { render(): void }"
486
+ },
487
+ "description": "The target to define the property change handler on."
600
488
  },
601
489
  {
602
- "name": "customEditableSelectors",
603
- "default": "[]",
490
+ "name": "name",
604
491
  "type": {
605
- "text": "readonly string[]"
606
- }
492
+ "text": "string"
493
+ },
494
+ "description": "The property name."
607
495
  }
608
- ]
496
+ ],
497
+ "description": "Defines a property changed handler that calls a render() method on the target as an internal observation enhancement.",
498
+ "privacy": "public"
609
499
  }
610
500
  ],
611
501
  "exports": [
612
502
  {
613
503
  "kind": "js",
614
- "name": "BASE_EDITABLE_ELEMENT_SELECTORS",
615
- "declaration": {
616
- "name": "BASE_EDITABLE_ELEMENT_SELECTORS",
617
- "module": "src/design-system/editable-elements.ts"
618
- }
619
- },
620
- {
621
- "kind": "js",
622
- "name": "DESIGN_SYSTEM_EDITABLE_ELEMENT_SELECTORS",
623
- "declaration": {
624
- "name": "DESIGN_SYSTEM_EDITABLE_ELEMENT_SELECTORS",
625
- "module": "src/design-system/editable-elements.ts"
626
- }
627
- },
628
- {
629
- "kind": "js",
630
- "name": "buildEditableElementSelector",
504
+ "name": "renderOnChange",
631
505
  "declaration": {
632
- "name": "buildEditableElementSelector",
633
- "module": "src/design-system/editable-elements.ts"
506
+ "name": "renderOnChange",
507
+ "module": "src/decorators/renderOnChange.ts"
634
508
  }
635
509
  }
636
510
  ]
637
511
  },
638
512
  {
639
513
  "kind": "javascript-module",
640
- "path": "src/design-system/index.ts",
514
+ "path": "src/directives/index.ts",
641
515
  "declarations": [],
642
516
  "exports": [
643
517
  {
@@ -645,7 +519,7 @@
645
519
  "name": "*",
646
520
  "declaration": {
647
521
  "name": "*",
648
- "package": "./design-system"
522
+ "package": "./sync"
649
523
  }
650
524
  },
651
525
  {
@@ -653,14 +527,14 @@
653
527
  "name": "*",
654
528
  "declaration": {
655
529
  "name": "*",
656
- "package": "./editable-elements"
530
+ "package": "./when-else"
657
531
  }
658
532
  }
659
533
  ]
660
534
  },
661
535
  {
662
536
  "kind": "javascript-module",
663
- "path": "src/directives/index.ts",
537
+ "path": "src/encoding/index.ts",
664
538
  "declarations": [],
665
539
  "exports": [
666
540
  {
@@ -668,15 +542,7 @@
668
542
  "name": "*",
669
543
  "declaration": {
670
544
  "name": "*",
671
- "package": "./sync"
672
- }
673
- },
674
- {
675
- "kind": "js",
676
- "name": "*",
677
- "declaration": {
678
- "name": "*",
679
- "package": "./when-else"
545
+ "package": "./base64"
680
546
  }
681
547
  }
682
548
  ]
@@ -1182,68 +1048,238 @@
1182
1048
  },
1183
1049
  {
1184
1050
  "kind": "javascript-module",
1185
- "path": "src/encoding/index.ts",
1186
- "declarations": [],
1051
+ "path": "src/design-system/design-system.ts",
1052
+ "declarations": [
1053
+ {
1054
+ "kind": "function",
1055
+ "name": "assureDesignSystem",
1056
+ "return": {
1057
+ "type": {
1058
+ "text": "DesignSystemModule"
1059
+ }
1060
+ },
1061
+ "parameters": [
1062
+ {
1063
+ "name": "module",
1064
+ "type": {
1065
+ "text": "DesignSystemModule"
1066
+ }
1067
+ }
1068
+ ],
1069
+ "description": "assureDesignSystem.",
1070
+ "privacy": "public"
1071
+ },
1072
+ {
1073
+ "kind": "function",
1074
+ "name": "getCurrentDesignSystem",
1075
+ "return": {
1076
+ "type": {
1077
+ "text": ""
1078
+ }
1079
+ },
1080
+ "parameters": [
1081
+ {
1082
+ "name": "element",
1083
+ "type": {
1084
+ "text": "HTMLElement"
1085
+ },
1086
+ "description": "The starting HTML element"
1087
+ },
1088
+ {
1089
+ "name": "fallbackPrefix",
1090
+ "type": {
1091
+ "text": "string"
1092
+ },
1093
+ "description": "The prefix to fallback to if the provider is not available"
1094
+ }
1095
+ ],
1096
+ "description": "Get the current design system provider element and prefix by checking available providers.\nIf no provider is found, falls back to the provided prefix.",
1097
+ "privacy": "public"
1098
+ },
1099
+ {
1100
+ "kind": "function",
1101
+ "name": "getCurrentDesignSystemPrefix",
1102
+ "return": {
1103
+ "type": {
1104
+ "text": ""
1105
+ }
1106
+ },
1107
+ "parameters": [
1108
+ {
1109
+ "name": "element",
1110
+ "type": {
1111
+ "text": "HTMLElement"
1112
+ },
1113
+ "description": "The starting HTML element"
1114
+ },
1115
+ {
1116
+ "name": "fallbackPrefix",
1117
+ "type": {
1118
+ "text": "string"
1119
+ },
1120
+ "description": "The prefix to fallback to if the provider is not available"
1121
+ }
1122
+ ],
1123
+ "description": "Get the current design system prefix by checking available providers.\nIf no provider is found, falls back to the provided prefix.",
1124
+ "privacy": "public"
1125
+ }
1126
+ ],
1187
1127
  "exports": [
1188
1128
  {
1189
1129
  "kind": "js",
1190
- "name": "*",
1130
+ "name": "assureDesignSystem",
1191
1131
  "declaration": {
1192
- "name": "*",
1193
- "package": "./base64"
1132
+ "name": "assureDesignSystem",
1133
+ "module": "src/design-system/design-system.ts"
1194
1134
  }
1195
- }
1196
- ]
1197
- },
1198
- {
1199
- "kind": "javascript-module",
1200
- "path": "src/decorators/index.ts",
1201
- "declarations": [],
1202
- "exports": [
1135
+ },
1203
1136
  {
1204
1137
  "kind": "js",
1205
- "name": "*",
1138
+ "name": "getCurrentDesignSystem",
1206
1139
  "declaration": {
1207
- "name": "*",
1208
- "package": "./renderOnChange"
1140
+ "name": "getCurrentDesignSystem",
1141
+ "module": "src/design-system/design-system.ts"
1142
+ }
1143
+ },
1144
+ {
1145
+ "kind": "js",
1146
+ "name": "getCurrentDesignSystemPrefix",
1147
+ "declaration": {
1148
+ "name": "getCurrentDesignSystemPrefix",
1149
+ "module": "src/design-system/design-system.ts"
1209
1150
  }
1210
1151
  }
1211
1152
  ]
1212
1153
  },
1213
1154
  {
1214
1155
  "kind": "javascript-module",
1215
- "path": "src/decorators/renderOnChange.ts",
1156
+ "path": "src/design-system/editable-elements.ts",
1216
1157
  "declarations": [
1158
+ {
1159
+ "kind": "variable",
1160
+ "name": "BASE_EDITABLE_ELEMENT_SELECTORS",
1161
+ "type": {
1162
+ "text": "[\n ...NATIVE_EDITABLE_ELEMENT_SELECTORS,\n ...CONTENT_EDITABLE_SELECTORS,\n ...ARIA_EDITABLE_ROLE_SELECTORS,\n]"
1163
+ },
1164
+ "default": "[\n ...NATIVE_EDITABLE_ELEMENT_SELECTORS,\n ...CONTENT_EDITABLE_SELECTORS,\n ...ARIA_EDITABLE_ROLE_SELECTORS,\n]",
1165
+ "description": "Base selectors treated as editable context regardless of design system.\nIncludes native controls, contenteditable, and ARIA-editable roles."
1166
+ },
1167
+ {
1168
+ "kind": "variable",
1169
+ "name": "DESIGN_SYSTEM_EDITABLE_ELEMENT_SELECTORS",
1170
+ "type": {
1171
+ "text": "Record<\n EditableDesignSystemPrefix,\n readonly string[]\n>"
1172
+ },
1173
+ "default": "{\n rapid: buildDesignSystemEditableSelectors('rapid'),\n zero: buildDesignSystemEditableSelectors('zero'),\n}",
1174
+ "description": "Design-system specific editable host selectors."
1175
+ },
1217
1176
  {
1218
1177
  "kind": "function",
1219
- "name": "renderOnChange",
1178
+ "name": "buildEditableElementSelector",
1179
+ "return": {
1180
+ "type": {
1181
+ "text": "string"
1182
+ }
1183
+ },
1220
1184
  "parameters": [
1221
1185
  {
1222
- "name": "target",
1186
+ "name": "designSystems",
1223
1187
  "type": {
1224
- "text": "FASTElement & { render(): void }"
1188
+ "text": "readonly EditableDesignSystemPrefix[]"
1189
+ }
1190
+ },
1191
+ {
1192
+ "name": "customEditableSelectors",
1193
+ "default": "[]",
1194
+ "type": {
1195
+ "text": "readonly string[]"
1196
+ }
1197
+ }
1198
+ ]
1199
+ },
1200
+ {
1201
+ "kind": "function",
1202
+ "name": "isEditableKeyboardEvent",
1203
+ "return": {
1204
+ "type": {
1205
+ "text": "boolean"
1206
+ }
1207
+ },
1208
+ "parameters": [
1209
+ {
1210
+ "name": "event",
1211
+ "type": {
1212
+ "text": "KeyboardEvent"
1225
1213
  },
1226
- "description": "The target to define the property change handler on."
1214
+ "description": "The keyboard event."
1227
1215
  },
1228
1216
  {
1229
- "name": "name",
1217
+ "name": "editableSelector",
1218
+ "default": "DEFAULT_EDITABLE_ELEMENT_SELECTOR",
1230
1219
  "type": {
1231
1220
  "text": "string"
1232
1221
  },
1233
- "description": "The property name."
1222
+ "description": "CSS selector for editable elements. Defaults to the base selectors plus\nrapid editable hosts."
1234
1223
  }
1235
1224
  ],
1236
- "description": "Defines a property changed handler that calls a render() method on the target as an internal observation enhancement.",
1225
+ "description": "Whether a keyboard event comes from an editable element, i.e. the user is typing.",
1237
1226
  "privacy": "public"
1238
1227
  }
1239
1228
  ],
1240
1229
  "exports": [
1241
1230
  {
1242
1231
  "kind": "js",
1243
- "name": "renderOnChange",
1232
+ "name": "BASE_EDITABLE_ELEMENT_SELECTORS",
1244
1233
  "declaration": {
1245
- "name": "renderOnChange",
1246
- "module": "src/decorators/renderOnChange.ts"
1234
+ "name": "BASE_EDITABLE_ELEMENT_SELECTORS",
1235
+ "module": "src/design-system/editable-elements.ts"
1236
+ }
1237
+ },
1238
+ {
1239
+ "kind": "js",
1240
+ "name": "DESIGN_SYSTEM_EDITABLE_ELEMENT_SELECTORS",
1241
+ "declaration": {
1242
+ "name": "DESIGN_SYSTEM_EDITABLE_ELEMENT_SELECTORS",
1243
+ "module": "src/design-system/editable-elements.ts"
1244
+ }
1245
+ },
1246
+ {
1247
+ "kind": "js",
1248
+ "name": "buildEditableElementSelector",
1249
+ "declaration": {
1250
+ "name": "buildEditableElementSelector",
1251
+ "module": "src/design-system/editable-elements.ts"
1252
+ }
1253
+ },
1254
+ {
1255
+ "kind": "js",
1256
+ "name": "isEditableKeyboardEvent",
1257
+ "declaration": {
1258
+ "name": "isEditableKeyboardEvent",
1259
+ "module": "src/design-system/editable-elements.ts"
1260
+ }
1261
+ }
1262
+ ]
1263
+ },
1264
+ {
1265
+ "kind": "javascript-module",
1266
+ "path": "src/design-system/index.ts",
1267
+ "declarations": [],
1268
+ "exports": [
1269
+ {
1270
+ "kind": "js",
1271
+ "name": "*",
1272
+ "declaration": {
1273
+ "name": "*",
1274
+ "package": "./design-system"
1275
+ }
1276
+ },
1277
+ {
1278
+ "kind": "js",
1279
+ "name": "*",
1280
+ "declaration": {
1281
+ "name": "*",
1282
+ "package": "./editable-elements"
1247
1283
  }
1248
1284
  }
1249
1285
  ]
@@ -3301,6 +3337,24 @@
3301
3337
  }
3302
3338
  }
3303
3339
  ]
3340
+ },
3341
+ {
3342
+ "kind": "method",
3343
+ "name": "getEventElement",
3344
+ "privacy": "private",
3345
+ "return": {
3346
+ "type": {
3347
+ "text": "Element | null"
3348
+ }
3349
+ },
3350
+ "parameters": [
3351
+ {
3352
+ "name": "event",
3353
+ "type": {
3354
+ "text": "KeyboardEvent"
3355
+ }
3356
+ }
3357
+ ]
3304
3358
  }
3305
3359
  ],
3306
3360
  "superclass": {
@@ -3809,23 +3863,6 @@
3809
3863
  }
3810
3864
  }
3811
3865
  },
3812
- {
3813
- "kind": "method",
3814
- "name": "isEditableContext",
3815
- "return": {
3816
- "type": {
3817
- "text": "boolean"
3818
- }
3819
- },
3820
- "parameters": [
3821
- {
3822
- "name": "event",
3823
- "type": {
3824
- "text": "KeyboardEvent"
3825
- }
3826
- }
3827
- ]
3828
- },
3829
3866
  {
3830
3867
  "kind": "method",
3831
3868
  "name": "configureBlockedMessages",
@@ -9,4 +9,16 @@ export declare const BASE_EDITABLE_ELEMENT_SELECTORS: readonly ["input", "textar
9
9
  */
10
10
  export declare const DESIGN_SYSTEM_EDITABLE_ELEMENT_SELECTORS: Record<EditableDesignSystemPrefix, readonly string[]>;
11
11
  export declare function buildEditableElementSelector(designSystems: readonly EditableDesignSystemPrefix[], customEditableSelectors?: readonly string[]): string;
12
+ /**
13
+ * Whether a keyboard event comes from an editable element, i.e. the user is typing.
14
+ * @remarks Checks the innermost event target (through shadow roots), then the deep active element.
15
+ * An element counts as editable when it is `contenteditable` or matches / is nested in an element
16
+ * matching `editableSelector`. Pass `shortcutManager.getEditableSelector()` to use the selector
17
+ * configured via `configureEditableContext`.
18
+ * @param event - The keyboard event.
19
+ * @param editableSelector - CSS selector for editable elements. Defaults to the base selectors plus
20
+ * rapid editable hosts.
21
+ * @public
22
+ */
23
+ export declare function isEditableKeyboardEvent(event: KeyboardEvent, editableSelector?: string): boolean;
12
24
  //# sourceMappingURL=editable-elements.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"editable-elements.d.ts","sourceRoot":"","sources":["../../../src/design-system/editable-elements.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,0BAA0B,GAAG,OAAO,GAAG,MAAM,CAAC;AAW1D;;;GAGG;AACH,eAAO,MAAM,+BAA+B,uKAIlC,CAAC;AAMX;;GAEG;AACH,eAAO,MAAM,wCAAwC,EAAE,MAAM,CAC3D,0BAA0B,EAC1B,SAAS,MAAM,EAAE,CAIlB,CAAC;AAEF,wBAAgB,4BAA4B,CAC1C,aAAa,EAAE,SAAS,0BAA0B,EAAE,EACpD,uBAAuB,GAAE,SAAS,MAAM,EAAO,GAC9C,MAAM,CASR"}
1
+ {"version":3,"file":"editable-elements.d.ts","sourceRoot":"","sources":["../../../src/design-system/editable-elements.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,0BAA0B,GAAG,OAAO,GAAG,MAAM,CAAC;AAW1D;;;GAGG;AACH,eAAO,MAAM,+BAA+B,uKAIlC,CAAC;AAMX;;GAEG;AACH,eAAO,MAAM,wCAAwC,EAAE,MAAM,CAC3D,0BAA0B,EAC1B,SAAS,MAAM,EAAE,CAIlB,CAAC;AAEF,wBAAgB,4BAA4B,CAC1C,aAAa,EAAE,SAAS,0BAA0B,EAAE,EACpD,uBAAuB,GAAE,SAAS,MAAM,EAAO,GAC9C,MAAM,CASR;AAsCD;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,aAAa,EACpB,gBAAgB,GAAE,MAA0C,GAC3D,OAAO,CAKT"}
@@ -4,20 +4,4 @@
4
4
  * @public
5
5
  */
6
6
  export declare function extractKeyFromCode(code: string): string;
7
- /**
8
- * Resolves the innermost element the keyboard event originated from, looking through shadow roots.
9
- * @internal
10
- */
11
- export declare function getEventElement(event: KeyboardEvent): Element | null;
12
- /**
13
- * Walks `document.activeElement` through nested shadow roots to the deepest focused element.
14
- * @internal
15
- */
16
- export declare function getDeepActiveElement(): Element | null;
17
- /**
18
- * Whether the element is editable for shortcut purposes: `contenteditable`, or matching / nested in
19
- * an element matching the editable selector.
20
- * @internal
21
- */
22
- export declare function isEditableElement(element: Element | null, editableSelector: string): boolean;
23
7
  //# sourceMappingURL=shortcut-keyboard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"shortcut-keyboard.d.ts","sourceRoot":"","sources":["../../../src/shortcut-manager/shortcut-keyboard.ts"],"names":[],"mappings":"AAmCA;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAiBvD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,GAAG,IAAI,CAIpE;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,GAAG,IAAI,CAMrD;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,EAAE,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAc5F"}
1
+ {"version":3,"file":"shortcut-keyboard.d.ts","sourceRoot":"","sources":["../../../src/shortcut-manager/shortcut-keyboard.ts"],"names":[],"mappings":"AA8BA;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAiBvD"}
@@ -14,5 +14,6 @@ export declare class FoundationShortcutListener extends FASTElement {
14
14
  private addKeyListener;
15
15
  private removeKeyListener;
16
16
  private handleKeyDown;
17
+ private getEventElement;
17
18
  }
18
19
  //# sourceMappingURL=shortcut-listener.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"shortcut-listener.d.ts","sourceRoot":"","sources":["../../../src/shortcut-manager/shortcut-listener.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAIrE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;GAIG;AACH,qBAGa,0BAA2B,SAAQ,WAAW;IAChC,eAAe,EAAE,eAAe,CAAC;IAE1D,OAAO,CAAC,WAAW,CAAiD;IACpE,OAAO,CAAC,WAAW,CAAS;IAE5B,iBAAiB;IAKjB,oBAAoB;IAKpB,OAAO,CAAC,cAAc;IAQtB,OAAO,CAAC,iBAAiB;IAQzB,OAAO,CAAC,aAAa;CA2CtB"}
1
+ {"version":3,"file":"shortcut-listener.d.ts","sourceRoot":"","sources":["../../../src/shortcut-manager/shortcut-listener.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAKrE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;GAIG;AACH,qBAGa,0BAA2B,SAAQ,WAAW;IAChC,eAAe,EAAE,eAAe,CAAC;IAE1D,OAAO,CAAC,WAAW,CAAiD;IACpE,OAAO,CAAC,WAAW,CAAS;IAE5B,iBAAiB;IAKjB,oBAAoB;IAKpB,OAAO,CAAC,cAAc;IAQtB,OAAO,CAAC,iBAAiB;IAQzB,OAAO,CAAC,aAAa;IA6CrB,OAAO,CAAC,eAAe;CAKxB"}
@@ -119,12 +119,6 @@ export interface ShortcutManager {
119
119
  configureEditableContext(config?: ShortcutEditableContextConfig): void;
120
120
  getEditableContextConfig(): Required<ShortcutEditableContextConfig>;
121
121
  getEditableSelector(): string;
122
- /**
123
- * Whether the event's target, or the deep active element, is editable for shortcut purposes.
124
- * Uses the selector from `configureEditableContext` / `getEditableSelector`.
125
- * @public
126
- */
127
- isEditableContext(event: KeyboardEvent): boolean;
128
122
  configureBlockedMessages(config?: ShortcutBlockedMessageConfig): void;
129
123
  getBlockedMessages(): Required<ShortcutBlockedMessageConfig>;
130
124
  }
@@ -168,7 +162,6 @@ export declare class DefaultShortcutManager implements ShortcutManager {
168
162
  configureEditableContext(config?: ShortcutEditableContextConfig): void;
169
163
  getEditableContextConfig(): Required<ShortcutEditableContextConfig>;
170
164
  getEditableSelector(): string;
171
- isEditableContext(event: KeyboardEvent): boolean;
172
165
  configureBlockedMessages(config?: ShortcutBlockedMessageConfig): void;
173
166
  getBlockedMessages(): Required<ShortcutBlockedMessageConfig>;
174
167
  pause(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"shortcut-manager.d.ts","sourceRoot":"","sources":["../../../src/shortcut-manager/shortcut-manager.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AACnD,OAAO,EAEL,0BAA0B,EAC3B,MAAM,oCAAoC,CAAC;AAG5C,OAAO,EACL,sBAAsB,EAOvB,MAAM,mBAAmB,CAAC;AAG3B;;;KAGK;AACL,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG,0BAA0B,CAAC;AAEpE,MAAM,MAAM,6BAA6B,GAAG;IAC1C;;;OAGG;IACH,aAAa,CAAC,EAAE,0BAA0B,EAAE,CAAC;IAC7C;;;OAGG;IACH,uBAAuB,CAAC,EAAE,MAAM,EAAE,CAAC;CACpC,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IACzC,cAAc,CAAC,EAAE,sBAAsB,CAAC;IACxC,YAAY,CAAC,EAAE,sBAAsB,CAAC;IACtC,aAAa,CAAC,EAAE,sBAAsB,CAAC;IACvC,mBAAmB,CAAC,EAAE,sBAAsB,CAAC;IAC7C,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC,CAAC;AA0BF;;;GAGG;AACH,MAAM,WAAW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IAAI,MAAM,EAAE;IAIvB,wBAAwB,IAAI,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;IAIxE,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAMtC,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAKvC,gBAAgB,IAAI,MAAM,GAAG,SAAS;IAItC,kBAAkB,IAAI,IAAI;IAI1B,sBAAsB,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,uBAAuB,GAAG,OAAO,GAAG,IAAI;IAIxF,wBAAwB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAI1C,oBAAoB,IAAI,IAAI;IAI5B,wBAAwB,CAAC,MAAM,GAAE,6BAAkC,GAAG,IAAI;IAyB1E,wBAAwB,IAAI,QAAQ,CAAC,6BAA6B,CAAC;IAOnE,mBAAmB,IAAI,MAAM;IAI7B,wBAAwB,CAAC,MAAM,GAAE,4BAAiC,GAAG,IAAI;IAgCzE,kBAAkB,IAAI,QAAQ,CAAC,4BAA4B,CAAC;IAI5D,KAAK,IAAI,IAAI;IAIb,MAAM,IAAI,IAAI;IAId;;;OAGG;IACH,OAAO,CAAC,2BAA2B;IAYnC,OAAO,CAAC,uBAAuB;IAkB/B,OAAO,CAAC,gBAAgB;IAOxB,OAAO,CAAC,kBAAkB;IAiB1B,OAAO,CAAC,uBAAuB;IAY/B,OAAO,CAAC,uBAAuB;CAMhC;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,uEAE3B,CAAC"}
@@ -28,3 +28,46 @@ export function buildEditableElementSelector(designSystems, customEditableSelect
28
28
  const customSelectors = customEditableSelectors.filter(Boolean);
29
29
  return Array.from(new Set([...BASE_EDITABLE_ELEMENT_SELECTORS, ...designSystemSelectors, ...customSelectors])).join(',');
30
30
  }
31
+ const DEFAULT_EDITABLE_ELEMENT_SELECTOR = buildEditableElementSelector(['rapid']);
32
+ const ELEMENT_NODE = 1;
33
+ const isElement = (value) => (value === null || value === void 0 ? void 0 : value.nodeType) === ELEMENT_NODE;
34
+ function getEventElement(event) {
35
+ var _a, _b, _c;
36
+ const path = (_b = (_a = event.composedPath) === null || _a === void 0 ? void 0 : _a.call(event)) !== null && _b !== void 0 ? _b : [];
37
+ return (_c = path.find(isElement)) !== null && _c !== void 0 ? _c : (isElement(event.target) ? event.target : null);
38
+ }
39
+ function getDeepActiveElement() {
40
+ var _a, _b;
41
+ let active = (_a = document.activeElement) !== null && _a !== void 0 ? _a : null;
42
+ while ((_b = active === null || active === void 0 ? void 0 : active.shadowRoot) === null || _b === void 0 ? void 0 : _b.activeElement) {
43
+ active = active.shadowRoot.activeElement;
44
+ }
45
+ return active;
46
+ }
47
+ const isEditableAttributeValue = (value) => value !== null && value.toLowerCase() !== 'false';
48
+ function isEditableElement(element, editableSelector) {
49
+ if (!element)
50
+ return false;
51
+ if (isEditableAttributeValue(element.getAttribute('contenteditable')) ||
52
+ element.isContentEditable) {
53
+ return true;
54
+ }
55
+ if (!editableSelector)
56
+ return false;
57
+ return element.matches(editableSelector) || !!element.closest(editableSelector);
58
+ }
59
+ /**
60
+ * Whether a keyboard event comes from an editable element, i.e. the user is typing.
61
+ * @remarks Checks the innermost event target (through shadow roots), then the deep active element.
62
+ * An element counts as editable when it is `contenteditable` or matches / is nested in an element
63
+ * matching `editableSelector`. Pass `shortcutManager.getEditableSelector()` to use the selector
64
+ * configured via `configureEditableContext`.
65
+ * @param event - The keyboard event.
66
+ * @param editableSelector - CSS selector for editable elements. Defaults to the base selectors plus
67
+ * rapid editable hosts.
68
+ * @public
69
+ */
70
+ export function isEditableKeyboardEvent(event, editableSelector = DEFAULT_EDITABLE_ELEMENT_SELECTOR) {
71
+ return (isEditableElement(getEventElement(event), editableSelector) ||
72
+ isEditableElement(getDeepActiveElement(), editableSelector));
73
+ }
@@ -1,5 +1,3 @@
1
- const ELEMENT_NODE = 1;
2
- const isElement = (value) => (value === null || value === void 0 ? void 0 : value.nodeType) === ELEMENT_NODE;
3
1
  const specialKeyMap = {
4
2
  Space: 'space',
5
3
  Enter: 'enter',
@@ -49,42 +47,3 @@ export function extractKeyFromCode(code) {
49
47
  // Handle special keys with direct mapping
50
48
  return specialKeyMap[code] || code.toLowerCase();
51
49
  }
52
- /**
53
- * Resolves the innermost element the keyboard event originated from, looking through shadow roots.
54
- * @internal
55
- */
56
- export function getEventElement(event) {
57
- var _a, _b;
58
- const path = (_b = (_a = event.composedPath) === null || _a === void 0 ? void 0 : _a.call(event)) !== null && _b !== void 0 ? _b : [];
59
- const fromPath = path.find(isElement);
60
- return fromPath !== null && fromPath !== void 0 ? fromPath : (isElement(event.target) ? event.target : null);
61
- }
62
- /**
63
- * Walks `document.activeElement` through nested shadow roots to the deepest focused element.
64
- * @internal
65
- */
66
- export function getDeepActiveElement() {
67
- var _a, _b;
68
- let active = (_a = document.activeElement) !== null && _a !== void 0 ? _a : null;
69
- while ((_b = active === null || active === void 0 ? void 0 : active.shadowRoot) === null || _b === void 0 ? void 0 : _b.activeElement) {
70
- active = active.shadowRoot.activeElement;
71
- }
72
- return active;
73
- }
74
- /**
75
- * Whether the element is editable for shortcut purposes: `contenteditable`, or matching / nested in
76
- * an element matching the editable selector.
77
- * @internal
78
- */
79
- export function isEditableElement(element, editableSelector) {
80
- if (!element)
81
- return false;
82
- const isEditableContent = (value) => value !== null && value !== undefined && value.toLowerCase() !== 'false';
83
- if (isEditableContent(element.getAttribute('contenteditable')) ||
84
- element.isContentEditable) {
85
- return true;
86
- }
87
- if (!editableSelector)
88
- return false;
89
- return element.matches(editableSelector) || !!element.closest(editableSelector);
90
- }
@@ -1,8 +1,9 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { customElement, FASTElement } from '@microsoft/fast-element';
3
3
  import { inject } from '@microsoft/fast-foundation';
4
+ import { isEditableKeyboardEvent } from '../design-system/editable-elements';
4
5
  import { emitShortcutBlockedEvent } from './shortcut-events';
5
- import { extractKeyFromCode, getEventElement } from './shortcut-keyboard';
6
+ import { extractKeyFromCode } from './shortcut-keyboard';
6
7
  import { ShortcutManager } from './shortcut-manager';
7
8
  /**
8
9
  * A custom element that listens for keyboard shortcuts.
@@ -41,7 +42,8 @@ let FoundationShortcutListener = class FoundationShortcutListener extends FASTEl
41
42
  var _a, _b;
42
43
  const manager = this.shortcutManager;
43
44
  const blockedMessages = manager.getBlockedMessages();
44
- const eventTarget = (_a = getEventElement(event)) !== null && _a !== void 0 ? _a : this;
45
+ const editableSelector = manager.getEditableSelector();
46
+ const eventTarget = (_a = this.getEventElement(event)) !== null && _a !== void 0 ? _a : this;
45
47
  const hasModifier = event.ctrlKey || event.altKey || event.shiftKey || event.metaKey;
46
48
  // Extract key from event.code with proper mapping for all key types
47
49
  const key = extractKeyFromCode(event.code);
@@ -50,7 +52,7 @@ let FoundationShortcutListener = class FoundationShortcutListener extends FASTEl
50
52
  return;
51
53
  }
52
54
  // Don't handle shortcuts while user is typing in editable fields.
53
- if (manager.isEditableContext(event)) {
55
+ if (isEditableKeyboardEvent(event, editableSelector)) {
54
56
  if (hasModifier && shortcut.emitBlockedEvent !== false) {
55
57
  emitShortcutBlockedEvent({
56
58
  shortcutId: shortcut.id,
@@ -67,6 +69,12 @@ let FoundationShortcutListener = class FoundationShortcutListener extends FASTEl
67
69
  manager.executeShortcut(shortcut.id, eventTarget);
68
70
  }
69
71
  }
72
+ getEventElement(event) {
73
+ var _a, _b, _c;
74
+ const path = (_b = (_a = event.composedPath) === null || _a === void 0 ? void 0 : _a.call(event)) !== null && _b !== void 0 ? _b : [];
75
+ const fromPath = path.find((entry) => entry instanceof Element);
76
+ return (_c = fromPath !== null && fromPath !== void 0 ? fromPath : event.target) !== null && _c !== void 0 ? _c : null;
77
+ }
70
78
  };
71
79
  __decorate([
72
80
  inject(ShortcutManager)
@@ -4,7 +4,6 @@ import { buildEditableElementSelector, } from '../design-system/editable-element
4
4
  import { logger } from '../utils';
5
5
  import { OperatingSystemUtils } from '../utils/os-platform';
6
6
  import { SHORTCUT_BLOCKED_DEFAULT_MESSAGE, SHORTCUT_BLOCKED_DEFAULT_TITLE, SHORTCUT_BLOCKED_INPUT_MESSAGE, SHORTCUT_BLOCKED_ELEMENT_FOCUS_MESSAGE, SHORTCUT_BLOCKED_PAUSED_MESSAGE, emitShortcutBlockedEvent, } from './shortcut-events';
7
- import { getDeepActiveElement, getEventElement, isEditableElement } from './shortcut-keyboard';
8
7
  const DEFAULT_SHORTCUT_EDITABLE_CONTEXT_CONFIG = {
9
8
  designSystems: ['rapid'],
10
9
  customEditableSelectors: [],
@@ -324,14 +323,6 @@ export class DefaultShortcutManager {
324
323
  getEditableSelector() {
325
324
  return this.editableSelector;
326
325
  }
327
- isEditableContext(event) {
328
- const editableSelector = this.getEditableSelector();
329
- const eventElement = getEventElement(event);
330
- if (eventElement && isEditableElement(eventElement, editableSelector)) {
331
- return true;
332
- }
333
- return isEditableElement(getDeepActiveElement(), editableSelector);
334
- }
335
326
  configureBlockedMessages(config = {}) {
336
327
  var _a;
337
328
  const normalizeBlockedMessage = (message, fallback) => {
@@ -393,10 +384,7 @@ export class DefaultShortcutManager {
393
384
  }
394
385
  getExecutionStatus(shortcut) {
395
386
  if (this.isPaused) {
396
- return {
397
- disabled: true,
398
- tooltip: this.blockedMessageConfig.pausedMessage.text,
399
- };
387
+ return { disabled: true, tooltip: this.blockedMessageConfig.pausedMessage.text };
400
388
  }
401
389
  const guardStatus = this.getExecutionGuardStatus();
402
390
  if (guardStatus.disabled) {
@@ -3636,55 +3636,6 @@
3636
3636
  "isAbstract": false,
3637
3637
  "name": "getShortcutsByContextMap"
3638
3638
  },
3639
- {
3640
- "kind": "Method",
3641
- "canonicalReference": "@genesislcap/foundation-utils!DefaultShortcutManager#isEditableContext:member(1)",
3642
- "docComment": "",
3643
- "excerptTokens": [
3644
- {
3645
- "kind": "Content",
3646
- "text": "isEditableContext(event: "
3647
- },
3648
- {
3649
- "kind": "Reference",
3650
- "text": "KeyboardEvent",
3651
- "canonicalReference": "!KeyboardEvent:interface"
3652
- },
3653
- {
3654
- "kind": "Content",
3655
- "text": "): "
3656
- },
3657
- {
3658
- "kind": "Content",
3659
- "text": "boolean"
3660
- },
3661
- {
3662
- "kind": "Content",
3663
- "text": ";"
3664
- }
3665
- ],
3666
- "isStatic": false,
3667
- "returnTypeTokenRange": {
3668
- "startIndex": 3,
3669
- "endIndex": 4
3670
- },
3671
- "releaseTag": "Public",
3672
- "isProtected": false,
3673
- "overloadIndex": 1,
3674
- "parameters": [
3675
- {
3676
- "parameterName": "event",
3677
- "parameterTypeTokenRange": {
3678
- "startIndex": 1,
3679
- "endIndex": 2
3680
- },
3681
- "isOptional": false
3682
- }
3683
- ],
3684
- "isOptional": false,
3685
- "isAbstract": false,
3686
- "name": "isEditableContext"
3687
- },
3688
3639
  {
3689
3640
  "kind": "Property",
3690
3641
  "canonicalReference": "@genesislcap/foundation-utils!DefaultShortcutManager#isPaused:member",
@@ -10228,6 +10179,68 @@
10228
10179
  "parameters": [],
10229
10180
  "name": "isDev"
10230
10181
  },
10182
+ {
10183
+ "kind": "Function",
10184
+ "canonicalReference": "@genesislcap/foundation-utils!isEditableKeyboardEvent:function(1)",
10185
+ "docComment": "/**\n * Whether a keyboard event comes from an editable element, i.e. the user is typing.\n *\n * @remarks\n *\n * Checks the innermost event target (through shadow roots), then the deep active element. An element counts as editable when it is `contenteditable` or matches / is nested in an element matching `editableSelector`. Pass `shortcutManager.getEditableSelector()` to use the selector configured via `configureEditableContext`.\n *\n * @param event - The keyboard event.\n *\n * @param editableSelector - CSS selector for editable elements. Defaults to the base selectors plus rapid editable hosts.\n *\n * @public\n */\n",
10186
+ "excerptTokens": [
10187
+ {
10188
+ "kind": "Content",
10189
+ "text": "export declare function isEditableKeyboardEvent(event: "
10190
+ },
10191
+ {
10192
+ "kind": "Reference",
10193
+ "text": "KeyboardEvent",
10194
+ "canonicalReference": "!KeyboardEvent:interface"
10195
+ },
10196
+ {
10197
+ "kind": "Content",
10198
+ "text": ", editableSelector?: "
10199
+ },
10200
+ {
10201
+ "kind": "Content",
10202
+ "text": "string"
10203
+ },
10204
+ {
10205
+ "kind": "Content",
10206
+ "text": "): "
10207
+ },
10208
+ {
10209
+ "kind": "Content",
10210
+ "text": "boolean"
10211
+ },
10212
+ {
10213
+ "kind": "Content",
10214
+ "text": ";"
10215
+ }
10216
+ ],
10217
+ "fileUrlPath": "src/design-system/editable-elements.ts",
10218
+ "returnTypeTokenRange": {
10219
+ "startIndex": 5,
10220
+ "endIndex": 6
10221
+ },
10222
+ "releaseTag": "Public",
10223
+ "overloadIndex": 1,
10224
+ "parameters": [
10225
+ {
10226
+ "parameterName": "event",
10227
+ "parameterTypeTokenRange": {
10228
+ "startIndex": 1,
10229
+ "endIndex": 2
10230
+ },
10231
+ "isOptional": false
10232
+ },
10233
+ {
10234
+ "parameterName": "editableSelector",
10235
+ "parameterTypeTokenRange": {
10236
+ "startIndex": 3,
10237
+ "endIndex": 4
10238
+ },
10239
+ "isOptional": true
10240
+ }
10241
+ ],
10242
+ "name": "isEditableKeyboardEvent"
10243
+ },
10231
10244
  {
10232
10245
  "kind": "Function",
10233
10246
  "canonicalReference": "@genesislcap/foundation-utils!isFeatureActivated:function(1)",
@@ -21623,52 +21636,6 @@
21623
21636
  "parameters": [],
21624
21637
  "name": "getShortcutsByContextMap"
21625
21638
  },
21626
- {
21627
- "kind": "MethodSignature",
21628
- "canonicalReference": "@genesislcap/foundation-utils!ShortcutManager#isEditableContext:member(1)",
21629
- "docComment": "/**\n * Whether the event's target, or the deep active element, is editable for shortcut purposes. Uses the selector from `configureEditableContext` / `getEditableSelector`.\n *\n * @public\n */\n",
21630
- "excerptTokens": [
21631
- {
21632
- "kind": "Content",
21633
- "text": "isEditableContext(event: "
21634
- },
21635
- {
21636
- "kind": "Reference",
21637
- "text": "KeyboardEvent",
21638
- "canonicalReference": "!KeyboardEvent:interface"
21639
- },
21640
- {
21641
- "kind": "Content",
21642
- "text": "): "
21643
- },
21644
- {
21645
- "kind": "Content",
21646
- "text": "boolean"
21647
- },
21648
- {
21649
- "kind": "Content",
21650
- "text": ";"
21651
- }
21652
- ],
21653
- "isOptional": false,
21654
- "returnTypeTokenRange": {
21655
- "startIndex": 3,
21656
- "endIndex": 4
21657
- },
21658
- "releaseTag": "Public",
21659
- "overloadIndex": 1,
21660
- "parameters": [
21661
- {
21662
- "parameterName": "event",
21663
- "parameterTypeTokenRange": {
21664
- "startIndex": 1,
21665
- "endIndex": 2
21666
- },
21667
- "isOptional": false
21668
- }
21669
- ],
21670
- "name": "isEditableContext"
21671
- },
21672
21639
  {
21673
21640
  "kind": "PropertySignature",
21674
21641
  "canonicalReference": "@genesislcap/foundation-utils!ShortcutManager#isPaused:member",
@@ -456,7 +456,6 @@ export declare class DefaultShortcutManager implements ShortcutManager {
456
456
  configureEditableContext(config?: ShortcutEditableContextConfig): void;
457
457
  getEditableContextConfig(): Required<ShortcutEditableContextConfig>;
458
458
  getEditableSelector(): string;
459
- isEditableContext(event: KeyboardEvent): boolean;
460
459
  configureBlockedMessages(config?: ShortcutBlockedMessageConfig): void;
461
460
  getBlockedMessages(): Required<ShortcutBlockedMessageConfig>;
462
461
  pause(): void;
@@ -864,6 +863,7 @@ export declare class FoundationShortcutListener extends FASTElement {
864
863
  private addKeyListener;
865
864
  private removeKeyListener;
866
865
  private handleKeyDown;
866
+ private getEventElement;
867
867
  }
868
868
 
869
869
  /** @public */
@@ -1115,6 +1115,19 @@ export declare const inSymphonyDesktop: () => boolean;
1115
1115
  */
1116
1116
  export declare const isDev: () => boolean;
1117
1117
 
1118
+ /**
1119
+ * Whether a keyboard event comes from an editable element, i.e. the user is typing.
1120
+ * @remarks Checks the innermost event target (through shadow roots), then the deep active element.
1121
+ * An element counts as editable when it is `contenteditable` or matches / is nested in an element
1122
+ * matching `editableSelector`. Pass `shortcutManager.getEditableSelector()` to use the selector
1123
+ * configured via `configureEditableContext`.
1124
+ * @param event - The keyboard event.
1125
+ * @param editableSelector - CSS selector for editable elements. Defaults to the base selectors plus
1126
+ * rapid editable hosts.
1127
+ * @public
1128
+ */
1129
+ export declare function isEditableKeyboardEvent(event: KeyboardEvent, editableSelector?: string): boolean;
1130
+
1118
1131
  /**
1119
1132
  * Returns true when `feature.<name>` is present in the current URL query string.
1120
1133
  * @public
@@ -2732,12 +2745,6 @@ export declare interface ShortcutManager {
2732
2745
  configureEditableContext(config?: ShortcutEditableContextConfig): void;
2733
2746
  getEditableContextConfig(): Required<ShortcutEditableContextConfig>;
2734
2747
  getEditableSelector(): string;
2735
- /**
2736
- * Whether the event's target, or the deep active element, is editable for shortcut purposes.
2737
- * Uses the selector from `configureEditableContext` / `getEditableSelector`.
2738
- * @public
2739
- */
2740
- isEditableContext(event: KeyboardEvent): boolean;
2741
2748
  configureBlockedMessages(config?: ShortcutBlockedMessageConfig): void;
2742
2749
  getBlockedMessages(): Required<ShortcutBlockedMessageConfig>;
2743
2750
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-utils",
3
3
  "description": "Genesis Foundation Utils",
4
- "version": "15.64.1-alpha-ddbd4ead05.0",
4
+ "version": "15.64.1-alpha-2000def28d.0",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -29,17 +29,17 @@
29
29
  }
30
30
  },
31
31
  "devDependencies": {
32
- "@genesislcap/foundation-testing": "15.64.1-alpha-ddbd4ead05.0",
33
- "@genesislcap/genx": "15.64.1-alpha-ddbd4ead05.0",
34
- "@genesislcap/ts-builder": "15.64.1-alpha-ddbd4ead05.0",
35
- "@genesislcap/uvu-playwright-builder": "15.64.1-alpha-ddbd4ead05.0",
36
- "@genesislcap/vite-builder": "15.64.1-alpha-ddbd4ead05.0",
37
- "@genesislcap/webpack-builder": "15.64.1-alpha-ddbd4ead05.0",
32
+ "@genesislcap/foundation-testing": "15.64.1-alpha-2000def28d.0",
33
+ "@genesislcap/genx": "15.64.1-alpha-2000def28d.0",
34
+ "@genesislcap/ts-builder": "15.64.1-alpha-2000def28d.0",
35
+ "@genesislcap/uvu-playwright-builder": "15.64.1-alpha-2000def28d.0",
36
+ "@genesislcap/vite-builder": "15.64.1-alpha-2000def28d.0",
37
+ "@genesislcap/webpack-builder": "15.64.1-alpha-2000def28d.0",
38
38
  "@types/json-schema": "^7.0.11"
39
39
  },
40
40
  "dependencies": {
41
- "@genesislcap/expression-builder": "15.64.1-alpha-ddbd4ead05.0",
42
- "@genesislcap/foundation-logger": "15.64.1-alpha-ddbd4ead05.0",
41
+ "@genesislcap/expression-builder": "15.64.1-alpha-2000def28d.0",
42
+ "@genesislcap/foundation-logger": "15.64.1-alpha-2000def28d.0",
43
43
  "@microsoft/fast-components": "2.30.6",
44
44
  "@microsoft/fast-element": "1.14.0",
45
45
  "@microsoft/fast-foundation": "2.50.0",