@magicx-eng/ai-autocomplete-vanilla 0.64.0 → 0.66.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
@@ -174,6 +174,7 @@ Product display options apply to both `renderMode: "full"` and
174
174
  |---|---|---|---|
175
175
  | `showProducts?` | `boolean` | `true` | Show product cards whenever there are products to display. |
176
176
  | `productsLayout?` | `"row" \| "list"` | `"row"` | Lay out cards as a scrolling row or a vertical list. |
177
+ | `seeAllResults?` | `boolean` | `false` | Tier 1 only. End the dropdown in a "See all results" button that submits like Enter, shown while there is typed text. |
177
178
  | `productImageFallback?` | `"image" \| "initial"` | `"image"` | Fallback for a missing or blank product image URL, or an image load error. `"image"` shows the placeholder pictogram; `"initial"` shows the title initial. A working image still takes priority. See [Product strip](#product-strip). |
178
179
 
179
180
  ### Methods
package/REFERENCE.md CHANGED
@@ -482,7 +482,8 @@ other option list (a store's branches, say), and the search never runs.
482
482
 
483
483
  | Input | Result |
484
484
  |---|---|
485
- | The pill coming up while the user is typing | Focus moves into the search field, so the place is typed straight into it |
485
+ | The pill coming up while the user is typing | The caret stays in the input; a click (or <kbd>Shift</kbd>+<kbd>Tab</kbd>) moves it into the search field |
486
+ | Tapping a place already chosen | Re-opens the field focused, its answer selected |
486
487
  | Typing in the field | Searches after a short pause (2 characters or more) |
487
488
  | <kbd>↓</kbd> / <kbd>↑</kbd> | Moves through the places found |
488
489
  | <kbd>Enter</kbd> or a tap on a place | Commits it. With nothing found, Enter commits the typed text as written. So does Enter pressed before the search answers (within the 250ms pause): nothing is highlighted yet |
@@ -598,7 +599,10 @@ The full input also accepts `--aia-input-radius` and `--aia-written-text-font-we
598
599
  | `--aia-multi-done-width` | as wide as the widest option | same | Width of the multi-select Done button; set `100%` for full width. |
599
600
  | `--aia-multi-done-min-width` | `120px` | `120px` | Narrowest the multi-select Done button gets. |
600
601
  | `--aia-time-done-bg` / `--aia-time-done-bg-hover` / `--aia-time-done-color` | `--aia-done-*` | `--aia-done-*` | Override the time wheel's Done button alone. |
601
- | `--aia-location-field-bg` | `--aia-streak-rgb` at 6% (indigo) | `--aia-streak-rgb` at 6% (white) | The location search field. |
602
+ | `--aia-see-all-bg` / `--aia-see-all-bg-hover` / `--aia-see-all-color` | `#111111` / `#333333` / `#ffffff` | `--aia-confirm-*` | The "See all results" button (`seeAllResults`). |
603
+ | `--aia-see-all-height` / `--aia-see-all-radius` / `--aia-see-all-font-size` | `48px` / `999px` / `16px` | same | Its minimum height, corner radius and text size. |
604
+ | `--aia-location-field-bg-idle` | `transparent` | `transparent` | The location search field at rest. |
605
+ | `--aia-location-field-bg` | `--aia-streak-rgb` at 6% (indigo) | `--aia-streak-rgb` at 6% (white) | The location search field on hover or focus. |
602
606
  | `--aia-location-field-radius` | `10px` | `10px` | Corner radius of the location search field. |
603
607
  | `--aia-location-font-size` | `15px` | `15px` | The location field's text and the place names. |
604
608
  | `--aia-location-row-bg-highlighted` | `--aia-streak-rgb` at 8% (indigo) | `--aia-streak-rgb` at 8% (white) | The highlighted (or hovered) place. |
package/dist/index.d.mts CHANGED
@@ -1420,6 +1420,15 @@ interface CoreOptions {
1420
1420
  * request, since its search rides the suggest cadence.
1421
1421
  */
1422
1422
  showProducts?: boolean;
1423
+ /**
1424
+ * Tier 1 ("full") only. When true, the dropdown ends in a full-width "See
1425
+ * all results" button, shown while the field holds typed text. A click
1426
+ * submits the query exactly as Enter and the submit button do (`onSubmit`
1427
+ * runs, then `resetOnSubmit` applies), so an `onSubmit` that opens your
1428
+ * results page takes the shopper there. Style it with the
1429
+ * `--aia-see-all-*` custom properties. Default: false.
1430
+ */
1431
+ seeAllResults?: boolean;
1423
1432
  /**
1424
1433
  * How the product strip lays its cards out. `"row"` (the default) is a
1425
1434
  * horizontally scrolling shelf of cards. `"list"` stacks the same cards as
@@ -2746,7 +2755,13 @@ interface RenderEditableArgs {
2746
2755
  /** When set, the matching `<strong>` is decorated with the editing class. */
2747
2756
  editingParamId: string | null;
2748
2757
  placeholderText: string;
2749
- isFocused: boolean;
2758
+ /**
2759
+ * The store's focus flag. No longer read: the caret is restored whenever the
2760
+ * editor holds DOM focus, since this flag can lag it. Kept so callers in the
2761
+ * React and Angular packages stay compatible.
2762
+ * @deprecated Not read; DOM focus decides whether the caret is restored.
2763
+ */
2764
+ isFocused?: boolean;
2750
2765
  /** Whether completed chips draw the icon of the option that answered them. Default: true. */
2751
2766
  showChipIcons?: boolean;
2752
2767
  /** Whether completed chips draw the picture of the option that answered them, in place of the icon. Default: true. */
@@ -2779,6 +2794,7 @@ declare const en: {
2779
2794
  soldOut: string;
2780
2795
  addToCart: string;
2781
2796
  submit: string;
2797
+ seeAllResults: string;
2782
2798
  scrollArrow: string;
2783
2799
  keepTyping: string;
2784
2800
  done: string;
package/dist/index.d.ts CHANGED
@@ -1420,6 +1420,15 @@ interface CoreOptions {
1420
1420
  * request, since its search rides the suggest cadence.
1421
1421
  */
1422
1422
  showProducts?: boolean;
1423
+ /**
1424
+ * Tier 1 ("full") only. When true, the dropdown ends in a full-width "See
1425
+ * all results" button, shown while the field holds typed text. A click
1426
+ * submits the query exactly as Enter and the submit button do (`onSubmit`
1427
+ * runs, then `resetOnSubmit` applies), so an `onSubmit` that opens your
1428
+ * results page takes the shopper there. Style it with the
1429
+ * `--aia-see-all-*` custom properties. Default: false.
1430
+ */
1431
+ seeAllResults?: boolean;
1423
1432
  /**
1424
1433
  * How the product strip lays its cards out. `"row"` (the default) is a
1425
1434
  * horizontally scrolling shelf of cards. `"list"` stacks the same cards as
@@ -2746,7 +2755,13 @@ interface RenderEditableArgs {
2746
2755
  /** When set, the matching `<strong>` is decorated with the editing class. */
2747
2756
  editingParamId: string | null;
2748
2757
  placeholderText: string;
2749
- isFocused: boolean;
2758
+ /**
2759
+ * The store's focus flag. No longer read: the caret is restored whenever the
2760
+ * editor holds DOM focus, since this flag can lag it. Kept so callers in the
2761
+ * React and Angular packages stay compatible.
2762
+ * @deprecated Not read; DOM focus decides whether the caret is restored.
2763
+ */
2764
+ isFocused?: boolean;
2750
2765
  /** Whether completed chips draw the icon of the option that answered them. Default: true. */
2751
2766
  showChipIcons?: boolean;
2752
2767
  /** Whether completed chips draw the picture of the option that answered them, in place of the icon. Default: true. */
@@ -2779,6 +2794,7 @@ declare const en: {
2779
2794
  soldOut: string;
2780
2795
  addToCart: string;
2781
2796
  submit: string;
2797
+ seeAllResults: string;
2782
2798
  scrollArrow: string;
2783
2799
  keepTyping: string;
2784
2800
  done: string;