@cryterion/expo-chat-ui 1.0.1 → 1.0.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cryterion/expo-chat-ui",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "A reusable chat UI component for Expo + React Native applications",
5
5
  "author": "cryterion",
6
6
  "license": "MIT",
@@ -30,6 +30,9 @@ export function Chat({
30
30
  emptyStateTitle,
31
31
  emptyStateSubtitle,
32
32
  keyboardVerticalOffset = 0,
33
+ autoCorrect,
34
+ spellCheck,
35
+ keyboardType,
33
36
  }: ChatProps) {
34
37
  const theme = mergeTheme(themeProp);
35
38
 
@@ -54,6 +57,9 @@ export function Chat({
54
57
  disabled={disabled || isLoading}
55
58
  theme={theme}
56
59
  placeholder={placeholder}
60
+ autoCorrect={autoCorrect}
61
+ spellCheck={spellCheck}
62
+ keyboardType={keyboardType}
57
63
  />
58
64
  </View>
59
65
  </KeyboardAvoidingView>
@@ -13,6 +13,9 @@ export function ChatInput({
13
13
  disabled,
14
14
  theme,
15
15
  placeholder = 'Type a message...',
16
+ autoCorrect = true,
17
+ spellCheck = true,
18
+ keyboardType = 'default',
16
19
  }: ChatInputProps) {
17
20
  const [text, setText] = useState('');
18
21
  const { colors } = theme;
@@ -54,6 +57,9 @@ export function ChatInput({
54
57
  editable={!disabled}
55
58
  onSubmitEditing={handleSend}
56
59
  blurOnSubmit={false}
60
+ autoCorrect={autoCorrect}
61
+ spellCheck={spellCheck}
62
+ keyboardType={keyboardType}
57
63
  />
58
64
  <TouchableOpacity
59
65
  style={[
package/src/types.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
+ import { KeyboardTypeOptions } from 'react-native';
2
3
 
3
4
  /**
4
5
  * Represents a single chat message
@@ -90,6 +91,12 @@ export interface ChatProps {
90
91
  emptyStateSubtitle?: string;
91
92
  /** Keyboard vertical offset for KeyboardAvoidingView (defaults to 0) */
92
93
  keyboardVerticalOffset?: number;
94
+ /** Enable/disable autocorrect (defaults to true) */
95
+ autoCorrect?: boolean;
96
+ /** Enable/disable spell check (defaults to true) */
97
+ spellCheck?: boolean;
98
+ /** Keyboard type (defaults to 'default') */
99
+ keyboardType?: KeyboardTypeOptions;
93
100
  }
94
101
 
95
102
  /**
@@ -136,4 +143,10 @@ export interface ChatInputProps {
136
143
  theme: ChatTheme;
137
144
  /** Placeholder text */
138
145
  placeholder?: string;
146
+ /** Enable/disable autocorrect (defaults to true) */
147
+ autoCorrect?: boolean;
148
+ /** Enable/disable spell check (defaults to true) */
149
+ spellCheck?: boolean;
150
+ /** Keyboard type (defaults to 'default') */
151
+ keyboardType?: KeyboardTypeOptions;
139
152
  }