@magicx-eng/ai-autocomplete-react 0.54.0 → 0.55.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.
Files changed (2) hide show
  1. package/REFERENCE.md +3 -2
  2. package/package.json +2 -2
package/REFERENCE.md CHANGED
@@ -492,19 +492,20 @@ other option list (a store's branches, say), and the search never runs.
492
492
  | Tapping a place already chosen | Re-opens the field focused, its answer selected |
493
493
  | Typing in the field | Searches after a short pause (2 characters or more) |
494
494
  | <kbd>↓</kbd> / <kbd>↑</kbd> | Moves through the places found |
495
+ | A space in the input right after words that exactly name the top place found (its whole name, or what its brackets hold: "sfo" for "San Francisco International Airport (SFO)") | Commits that place, as a tap would. Only once the search for those words has answered, and not while the field itself has focus |
495
496
  | <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 |
496
497
  | <kbd>Esc</kbd>, or <kbd>Backspace</kbd> in an empty field | Back to the input, the pill left open |
497
498
  | <kbd>Tab</kbd> / <kbd>Shift</kbd>+<kbd>Tab</kbd> | On to the next control / back to the input, as for any field |
498
499
 
499
500
  **The committed value** reads as the place and its region (`Seattle, WA`), with
500
501
  the server's lead-in before it when there is one (`in Seattle, WA`). A picked
501
- place also records the provider's place ID on the parameter's `metadata` under
502
+ place also records the provider's place ID and the place's name on the parameter's `metadata` under
502
503
  `LOCATION_META_KEY` (`aiaPlace`); typed text records none:
503
504
 
504
505
  ```ts
505
506
  import { LOCATION_META_KEY } from "@magicx-eng/ai-autocomplete-react";
506
507
 
507
- const place = param.metadata?.[LOCATION_META_KEY]; // { id: "ChIJ…" } | undefined
508
+ const place = param.metadata?.[LOCATION_META_KEY]; // { id: "ChIJ…", name: "Seattle" } | undefined
508
509
  ```
509
510
 
510
511
  **Re-editing** a committed place re-opens the field on it, selected, so typing
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magicx-eng/ai-autocomplete-react",
3
- "version": "0.54.0",
3
+ "version": "0.55.0",
4
4
  "description": "AI Autocomplete for React: add real-time AI suggestions to any text box and guide users to what your product can do, across search, commerce, agents, and more. Drop-in component or dropdown + hook.",
5
5
  "homepage": "https://ai-autocomplete.com/docs/react/getting-started",
6
6
  "bugs": {
@@ -34,7 +34,7 @@
34
34
  "react-dom": ">=17.0.0"
35
35
  },
36
36
  "dependencies": {
37
- "@magicx-eng/ai-autocomplete-vanilla": "0.69.0"
37
+ "@magicx-eng/ai-autocomplete-vanilla": "0.70.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@figma/code-connect": "^1.4.7",