@magicx-eng/ai-autocomplete-vanilla 0.46.0 → 0.47.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.
package/README.md CHANGED
@@ -953,6 +953,10 @@ When the open dropdown would run past the edge of the visible screen — most of
953
953
 
954
954
  While fitted, the dropdown root carries `data-aia-fit`, and the height it is capped at is in its `--aia-dropdown-fit-height` property. Every option shows in that one scroll, so the option list's usual limit of visible rows does not apply.
955
955
 
956
+ ### Dismissing the keyboard
957
+
958
+ On a phone or tablet, the shopper can put the keyboard away to see the whole dropdown: a tap on the page, or the keyboard's own done / hide key, closes the keyboard and leaves the dropdown open. The next tap outside the search box and dropdown closes it. Scrolling the page doesn't, and neither does tapping inside the dropdown. A tap on a link, button or other field outside it is treated as moving on, and closes the dropdown straight away as before. With a mouse, a click outside closes the dropdown at once, as it always has. While the dropdown is held open this way, `isDropdownOpen` stays `true` and `isFocused` is `false`.
959
+
956
960
  ### Selector Hooks
957
961
 
958
962
  For styling beyond the CSS variables, target these stable `data-aia-*` attributes:
package/dist/index.d.mts CHANGED
@@ -709,6 +709,13 @@ interface CoreInputState {
709
709
  skipNextFetch: boolean;
710
710
  lastRawQuery: string;
711
711
  isFocused: boolean;
712
+ /**
713
+ * The open dropdown stays up through a blur. Latched on while the panel is
714
+ * open and focused on a touch-primary device, and released by the next tap
715
+ * outside the widget, so dismissing the keyboard leaves the panel on screen.
716
+ * See controllers/holdOpenController.ts.
717
+ */
718
+ dropdownHeld: boolean;
712
719
  /**
713
720
  * Re-edit state: while non-null, the user is editing a bold completed param.
714
721
  * The snapshot stays here even after the param is removed from
@@ -1142,6 +1149,7 @@ declare class AIAutocomplete {
1142
1149
  private fetchController;
1143
1150
  private keyboardController;
1144
1151
  private pillsController;
1152
+ private holdOpen;
1145
1153
  private productsController;
1146
1154
  private optionSource;
1147
1155
  private reEdit;
package/dist/index.d.ts CHANGED
@@ -709,6 +709,13 @@ interface CoreInputState {
709
709
  skipNextFetch: boolean;
710
710
  lastRawQuery: string;
711
711
  isFocused: boolean;
712
+ /**
713
+ * The open dropdown stays up through a blur. Latched on while the panel is
714
+ * open and focused on a touch-primary device, and released by the next tap
715
+ * outside the widget, so dismissing the keyboard leaves the panel on screen.
716
+ * See controllers/holdOpenController.ts.
717
+ */
718
+ dropdownHeld: boolean;
712
719
  /**
713
720
  * Re-edit state: while non-null, the user is editing a bold completed param.
714
721
  * The snapshot stays here even after the param is removed from
@@ -1142,6 +1149,7 @@ declare class AIAutocomplete {
1142
1149
  private fetchController;
1143
1150
  private keyboardController;
1144
1151
  private pillsController;
1152
+ private holdOpen;
1145
1153
  private productsController;
1146
1154
  private optionSource;
1147
1155
  private reEdit;