@magicx-eng/ai-autocomplete-vanilla 0.62.0 → 0.63.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 +1 -0
- package/dist/index.d.mts +15 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -107,6 +107,7 @@ const ac = new AIAutocomplete(container, {
|
|
|
107
107
|
pillPlacement: "dropdown", // "inline" | "dropdown" | "hidden"
|
|
108
108
|
dropdownTrigger: "auto", // "auto" | "manual" | "hidden"
|
|
109
109
|
closeDropdownOnBlur: true, // false = keep dropdown open even when input loses focus
|
|
110
|
+
prependPlaceholder: true, // false = show the starting state's lead-in text as a hint only; a picked option is not written after it
|
|
110
111
|
showNonTappableOptions: true, // false = hide non-tappable options from the dropdown
|
|
111
112
|
locationSearch: true, // false = a location field takes typed text only, no lookups
|
|
112
113
|
showSkipButton: true, // false = hide the pill bar's trailing "skip" button
|
package/dist/index.d.mts
CHANGED
|
@@ -1208,6 +1208,12 @@ interface CoreDerivedState {
|
|
|
1208
1208
|
*/
|
|
1209
1209
|
locationView: LocationView | null;
|
|
1210
1210
|
placeholderText: string;
|
|
1211
|
+
/**
|
|
1212
|
+
* The part of `placeholderText` that leads the query: put before the first
|
|
1213
|
+
* answer and skipped over when the user retypes it. Equal to
|
|
1214
|
+
* `placeholderText`, or `""` when `prependPlaceholder` is `false`.
|
|
1215
|
+
*/
|
|
1216
|
+
leadInText: string;
|
|
1211
1217
|
/**
|
|
1212
1218
|
* The phrase the active pill's options are filtered by — what the user has
|
|
1213
1219
|
* typed for it, trimmed — or, during a re-edit, the replacement typed so
|
|
@@ -1328,6 +1334,15 @@ interface CoreOptions {
|
|
|
1328
1334
|
dropdownTrigger?: "auto" | "manual" | "hidden";
|
|
1329
1335
|
/** When true (default), the dropdown closes when the input loses focus. Set to false to keep it open whenever options are available, regardless of focus. */
|
|
1330
1336
|
closeDropdownOnBlur?: boolean;
|
|
1337
|
+
/**
|
|
1338
|
+
* Whether the starting state's lead-in text is put in front of the first
|
|
1339
|
+
* answer. Default `true`: the text shows in the empty input and picking an
|
|
1340
|
+
* option writes it before the option ("Create a" + "email"). Set to `false`
|
|
1341
|
+
* to show it as a hint only: a pick writes just the option, and typing the
|
|
1342
|
+
* text's first letters is ordinary typing. Use it where the lead-in does not
|
|
1343
|
+
* read naturally before an answer, as in verb-final languages.
|
|
1344
|
+
*/
|
|
1345
|
+
prependPlaceholder?: boolean;
|
|
1331
1346
|
/** When true (default), non-tappable options are rendered in the dropdown alongside tappable ones. Set to false to hide them entirely. */
|
|
1332
1347
|
showNonTappableOptions?: boolean;
|
|
1333
1348
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1208,6 +1208,12 @@ interface CoreDerivedState {
|
|
|
1208
1208
|
*/
|
|
1209
1209
|
locationView: LocationView | null;
|
|
1210
1210
|
placeholderText: string;
|
|
1211
|
+
/**
|
|
1212
|
+
* The part of `placeholderText` that leads the query: put before the first
|
|
1213
|
+
* answer and skipped over when the user retypes it. Equal to
|
|
1214
|
+
* `placeholderText`, or `""` when `prependPlaceholder` is `false`.
|
|
1215
|
+
*/
|
|
1216
|
+
leadInText: string;
|
|
1211
1217
|
/**
|
|
1212
1218
|
* The phrase the active pill's options are filtered by — what the user has
|
|
1213
1219
|
* typed for it, trimmed — or, during a re-edit, the replacement typed so
|
|
@@ -1328,6 +1334,15 @@ interface CoreOptions {
|
|
|
1328
1334
|
dropdownTrigger?: "auto" | "manual" | "hidden";
|
|
1329
1335
|
/** When true (default), the dropdown closes when the input loses focus. Set to false to keep it open whenever options are available, regardless of focus. */
|
|
1330
1336
|
closeDropdownOnBlur?: boolean;
|
|
1337
|
+
/**
|
|
1338
|
+
* Whether the starting state's lead-in text is put in front of the first
|
|
1339
|
+
* answer. Default `true`: the text shows in the empty input and picking an
|
|
1340
|
+
* option writes it before the option ("Create a" + "email"). Set to `false`
|
|
1341
|
+
* to show it as a hint only: a pick writes just the option, and typing the
|
|
1342
|
+
* text's first letters is ordinary typing. Use it where the lead-in does not
|
|
1343
|
+
* read naturally before an answer, as in verb-final languages.
|
|
1344
|
+
*/
|
|
1345
|
+
prependPlaceholder?: boolean;
|
|
1331
1346
|
/** When true (default), non-tappable options are rendered in the dropdown alongside tappable ones. Set to false to hide them entirely. */
|
|
1332
1347
|
showNonTappableOptions?: boolean;
|
|
1333
1348
|
/**
|