@magicx-eng/ai-autocomplete-react 0.1.41 → 0.1.43
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 +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +56 -26
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +56 -26
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -186,6 +186,7 @@ function App() {
|
|
|
186
186
|
| `animations?` | `boolean` | `true` | Enable/disable all SDK animations (streak + shimmer). |
|
|
187
187
|
| `dropdownTrigger?` | `"auto" \| "manual" \| "hidden"` | `"auto"` | When the dropdown appears. `"auto"` = when options available. `"manual"` = only on pill tap, closes after selection. `"hidden"` = never shows. |
|
|
188
188
|
| `closeDropdownOnBlur?` | `boolean` | `true` | When `true`, the dropdown closes if the input loses focus. Set to `false` to keep it open whenever options are available, regardless of focus. |
|
|
189
|
+
| `showNonTappableOptions?` | `boolean` | `true` | When `true`, non-tappable options are rendered alongside tappable ones in the dropdown. Set to `false` to hide non-tappable options entirely. |
|
|
189
190
|
| `autoFocus?` | `boolean` | `true` | Focus the input on mount. Set to `false` to leave focus to the consumer. |
|
|
190
191
|
| `onFocus?` | `() => void` | — | Called when the input gains focus. |
|
|
191
192
|
| `onBlur?` | `() => void` | — | Called when the input loses focus. |
|
package/dist/index.d.mts
CHANGED
|
@@ -91,6 +91,8 @@ interface AIAutocompleteProps {
|
|
|
91
91
|
dropdownTrigger?: "auto" | "manual" | "hidden";
|
|
92
92
|
/** 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. */
|
|
93
93
|
closeDropdownOnBlur?: boolean;
|
|
94
|
+
/** When true (default), non-tappable options are rendered in the dropdown alongside tappable ones. Set to false to hide them entirely. */
|
|
95
|
+
showNonTappableOptions?: boolean;
|
|
94
96
|
/** Focus the input on mount. Default: true. */
|
|
95
97
|
autoFocus?: boolean;
|
|
96
98
|
/** Called when the input gains focus. */
|
|
@@ -131,6 +133,8 @@ interface UseAIAutocompleteOptions {
|
|
|
131
133
|
dropdownTrigger?: "auto" | "manual" | "hidden";
|
|
132
134
|
/** When true (default), the dropdown closes when the input loses focus. Set to false to keep it open whenever options are available. */
|
|
133
135
|
closeDropdownOnBlur?: boolean;
|
|
136
|
+
/** When true (default), non-tappable options are rendered in the dropdown alongside tappable ones. Set to false to hide them entirely. */
|
|
137
|
+
showNonTappableOptions?: boolean;
|
|
134
138
|
/** Called when the input gains focus. */
|
|
135
139
|
onFocus?: () => void;
|
|
136
140
|
/** Called when the input loses focus. */
|
|
@@ -225,6 +229,6 @@ declare const AIAutocomplete: react.ForwardRefExoticComponent<AIAutocompleteProp
|
|
|
225
229
|
|
|
226
230
|
declare function AIAutocompleteDropdown({ suggestions, activeIndex, onSelect, onHighlight, isOpen, id, className, pills, onPillClick, showPills, isLoading, }: AIAutocompleteDropdownProps): react_jsx_runtime.JSX.Element;
|
|
227
231
|
|
|
228
|
-
declare function useAIAutocomplete({ onSubmit, onError, optionOverrides, maskCompletedText, apiConfig, columns, dropdownTrigger, closeDropdownOnBlur, onFocus, onBlur, value: controlledValue, completedParams: controlledParams, onChange: onChangeProp, onParamsChange, source, setCursor, }: UseAIAutocompleteOptions): UseAIAutocompleteReturn;
|
|
232
|
+
declare function useAIAutocomplete({ onSubmit, onError, optionOverrides, maskCompletedText, apiConfig, columns, dropdownTrigger, closeDropdownOnBlur, showNonTappableOptions, onFocus, onBlur, value: controlledValue, completedParams: controlledParams, onChange: onChangeProp, onParamsChange, source, setCursor, }: UseAIAutocompleteOptions): UseAIAutocompleteReturn;
|
|
229
233
|
|
|
230
234
|
export { AIAutocomplete, AIAutocompleteDropdown, type AIAutocompleteDropdownProps, type AIAutocompleteHandle, type AIAutocompleteProps, type APIConfig, type APIKeyConfig, type AccessTokenConfig, type AccessTokenResult, type AppearanceMode, type AutocompleteResult, type CompletedParam, type CompletedParamState, type OptionOverrides, type Segment, type Suggestion, type SuggestionOption, type TaskKind, type UseAIAutocompleteOptions, type UseAIAutocompleteReturn, useAIAutocomplete };
|
package/dist/index.d.ts
CHANGED
|
@@ -91,6 +91,8 @@ interface AIAutocompleteProps {
|
|
|
91
91
|
dropdownTrigger?: "auto" | "manual" | "hidden";
|
|
92
92
|
/** 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. */
|
|
93
93
|
closeDropdownOnBlur?: boolean;
|
|
94
|
+
/** When true (default), non-tappable options are rendered in the dropdown alongside tappable ones. Set to false to hide them entirely. */
|
|
95
|
+
showNonTappableOptions?: boolean;
|
|
94
96
|
/** Focus the input on mount. Default: true. */
|
|
95
97
|
autoFocus?: boolean;
|
|
96
98
|
/** Called when the input gains focus. */
|
|
@@ -131,6 +133,8 @@ interface UseAIAutocompleteOptions {
|
|
|
131
133
|
dropdownTrigger?: "auto" | "manual" | "hidden";
|
|
132
134
|
/** When true (default), the dropdown closes when the input loses focus. Set to false to keep it open whenever options are available. */
|
|
133
135
|
closeDropdownOnBlur?: boolean;
|
|
136
|
+
/** When true (default), non-tappable options are rendered in the dropdown alongside tappable ones. Set to false to hide them entirely. */
|
|
137
|
+
showNonTappableOptions?: boolean;
|
|
134
138
|
/** Called when the input gains focus. */
|
|
135
139
|
onFocus?: () => void;
|
|
136
140
|
/** Called when the input loses focus. */
|
|
@@ -225,6 +229,6 @@ declare const AIAutocomplete: react.ForwardRefExoticComponent<AIAutocompleteProp
|
|
|
225
229
|
|
|
226
230
|
declare function AIAutocompleteDropdown({ suggestions, activeIndex, onSelect, onHighlight, isOpen, id, className, pills, onPillClick, showPills, isLoading, }: AIAutocompleteDropdownProps): react_jsx_runtime.JSX.Element;
|
|
227
231
|
|
|
228
|
-
declare function useAIAutocomplete({ onSubmit, onError, optionOverrides, maskCompletedText, apiConfig, columns, dropdownTrigger, closeDropdownOnBlur, onFocus, onBlur, value: controlledValue, completedParams: controlledParams, onChange: onChangeProp, onParamsChange, source, setCursor, }: UseAIAutocompleteOptions): UseAIAutocompleteReturn;
|
|
232
|
+
declare function useAIAutocomplete({ onSubmit, onError, optionOverrides, maskCompletedText, apiConfig, columns, dropdownTrigger, closeDropdownOnBlur, showNonTappableOptions, onFocus, onBlur, value: controlledValue, completedParams: controlledParams, onChange: onChangeProp, onParamsChange, source, setCursor, }: UseAIAutocompleteOptions): UseAIAutocompleteReturn;
|
|
229
233
|
|
|
230
234
|
export { AIAutocomplete, AIAutocompleteDropdown, type AIAutocompleteDropdownProps, type AIAutocompleteHandle, type AIAutocompleteProps, type APIConfig, type APIKeyConfig, type AccessTokenConfig, type AccessTokenResult, type AppearanceMode, type AutocompleteResult, type CompletedParam, type CompletedParamState, type OptionOverrides, type Segment, type Suggestion, type SuggestionOption, type TaskKind, type UseAIAutocompleteOptions, type UseAIAutocompleteReturn, useAIAutocomplete };
|