@foundationui/smart-input
Advanced tools
Comparing version 1.0.47 to 1.0.48
import { SmartInput } from './SmartInput'; | ||
export * from './useSmartInput'; | ||
export default SmartInput; |
@@ -0,1 +1,3 @@ | ||
import { BaseEditor } from 'slate'; | ||
import { ReactEditor } from 'slate-react'; | ||
/** | ||
@@ -9,1 +11,20 @@ * The shape of the completion response from the API. | ||
} | ||
export type CustomElement = { | ||
type: 'text' | 'completion' | undefined; | ||
children: CustomText[]; | ||
}; | ||
export type CustomText = { | ||
text: string; | ||
type: undefined; | ||
}; | ||
export type CustomDescendant = CustomElement | CustomText; | ||
export type CEditor = Omit<BaseEditor, 'children'> & ReactEditor & { | ||
children: CustomDescendant[]; | ||
}; | ||
declare module 'slate' { | ||
interface CustomTypes { | ||
Editor: CEditor; | ||
Element: CustomElement; | ||
Text: CustomText; | ||
} | ||
} |
import React, { HTMLAttributes, MutableRefObject } from 'react'; | ||
import { BaseEditor } from 'slate'; | ||
import { ReactEditor } from 'slate-react'; | ||
/** | ||
@@ -93,21 +91,2 @@ * Properties for the `SmartInput` component. | ||
export declare function SmartInput(p: SmartInputProps): JSX.Element; | ||
type CustomElement = { | ||
type: 'text' | 'completion' | undefined; | ||
children: CustomText[]; | ||
}; | ||
type CustomText = { | ||
text: string; | ||
type: undefined; | ||
}; | ||
type CustomDescendant = CustomElement | CustomText; | ||
type CEditor = Omit<BaseEditor, 'children'> & ReactEditor & { | ||
children: CustomDescendant[]; | ||
}; | ||
declare module 'slate' { | ||
interface CustomTypes { | ||
Editor: CEditor; | ||
Element: CustomElement; | ||
Text: CustomText; | ||
} | ||
} | ||
export {}; |
import { SmartInput } from './SmartInput'; | ||
export * from './useSmartInput'; | ||
export default SmartInput; |
@@ -0,1 +1,3 @@ | ||
import { BaseEditor } from 'slate'; | ||
import { ReactEditor } from 'slate-react'; | ||
/** | ||
@@ -9,1 +11,20 @@ * The shape of the completion response from the API. | ||
} | ||
export type CustomElement = { | ||
type: 'text' | 'completion' | undefined; | ||
children: CustomText[]; | ||
}; | ||
export type CustomText = { | ||
text: string; | ||
type: undefined; | ||
}; | ||
export type CustomDescendant = CustomElement | CustomText; | ||
export type CEditor = Omit<BaseEditor, 'children'> & ReactEditor & { | ||
children: CustomDescendant[]; | ||
}; | ||
declare module 'slate' { | ||
interface CustomTypes { | ||
Editor: CEditor; | ||
Element: CustomElement; | ||
Text: CustomText; | ||
} | ||
} |
import React, { HTMLAttributes, MutableRefObject } from 'react'; | ||
import { BaseEditor } from 'slate'; | ||
import { ReactEditor } from 'slate-react'; | ||
/** | ||
@@ -93,21 +91,2 @@ * Properties for the `SmartInput` component. | ||
export declare function SmartInput(p: SmartInputProps): JSX.Element; | ||
type CustomElement = { | ||
type: 'text' | 'completion' | undefined; | ||
children: CustomText[]; | ||
}; | ||
type CustomText = { | ||
text: string; | ||
type: undefined; | ||
}; | ||
type CustomDescendant = CustomElement | CustomText; | ||
type CEditor = Omit<BaseEditor, 'children'> & ReactEditor & { | ||
children: CustomDescendant[]; | ||
}; | ||
declare module 'slate' { | ||
interface CustomTypes { | ||
Editor: CEditor; | ||
Element: CustomElement; | ||
Text: CustomText; | ||
} | ||
} | ||
export {}; |
import React, { HTMLAttributes, MutableRefObject } from 'react'; | ||
import { BaseEditor } from 'slate'; | ||
import { ReactEditor } from 'slate-react'; | ||
@@ -94,22 +92,9 @@ /** | ||
declare function SmartInput(p: SmartInputProps): JSX.Element; | ||
type CustomElement = { | ||
type: 'text' | 'completion' | undefined; | ||
children: CustomText[]; | ||
}; | ||
type CustomText = { | ||
text: string; | ||
type: undefined; | ||
}; | ||
type CustomDescendant = CustomElement | CustomText; | ||
type CEditor = Omit<BaseEditor, 'children'> & ReactEditor & { | ||
children: CustomDescendant[]; | ||
}; | ||
declare module 'slate' { | ||
interface CustomTypes { | ||
Editor: CEditor; | ||
Element: CustomElement; | ||
Text: CustomText; | ||
} | ||
} | ||
export { SmartInput as default }; | ||
declare function useSmartInput(arg: { | ||
modelId: string; | ||
context?: any; | ||
apiUrl?: string; | ||
}): (e: React.ChangeEvent<HTMLInputElement>) => void; | ||
export { SmartInput as default, useSmartInput }; |
import { SmartInput } from './SmartInput'; | ||
export * from './useSmartInput'; | ||
export default SmartInput; |
@@ -0,1 +1,3 @@ | ||
import { BaseEditor } from 'slate'; | ||
import { ReactEditor } from 'slate-react'; | ||
/** | ||
@@ -9,1 +11,20 @@ * The shape of the completion response from the API. | ||
} | ||
export type CustomElement = { | ||
type: 'text' | 'completion' | undefined; | ||
children: CustomText[]; | ||
}; | ||
export type CustomText = { | ||
text: string; | ||
type: undefined; | ||
}; | ||
export type CustomDescendant = CustomElement | CustomText; | ||
export type CEditor = Omit<BaseEditor, 'children'> & ReactEditor & { | ||
children: CustomDescendant[]; | ||
}; | ||
declare module 'slate' { | ||
interface CustomTypes { | ||
Editor: CEditor; | ||
Element: CustomElement; | ||
Text: CustomText; | ||
} | ||
} |
import React, { HTMLAttributes, MutableRefObject } from 'react'; | ||
import { BaseEditor } from 'slate'; | ||
import { ReactEditor } from 'slate-react'; | ||
/** | ||
@@ -93,21 +91,2 @@ * Properties for the `SmartInput` component. | ||
export declare function SmartInput(p: SmartInputProps): JSX.Element; | ||
type CustomElement = { | ||
type: 'text' | 'completion' | undefined; | ||
children: CustomText[]; | ||
}; | ||
type CustomText = { | ||
text: string; | ||
type: undefined; | ||
}; | ||
type CustomDescendant = CustomElement | CustomText; | ||
type CEditor = Omit<BaseEditor, 'children'> & ReactEditor & { | ||
children: CustomDescendant[]; | ||
}; | ||
declare module 'slate' { | ||
interface CustomTypes { | ||
Editor: CEditor; | ||
Element: CustomElement; | ||
Text: CustomText; | ||
} | ||
} | ||
export {}; |
{ | ||
"name": "@foundationui/smart-input", | ||
"version": "1.0.47", | ||
"version": "1.0.48", | ||
"description": "Smart input/textarea component for React. Learns to provide inline, tab-completeable suggestions.", | ||
@@ -40,3 +40,2 @@ "type": "module", | ||
"slate": "^0.87.0", | ||
"slate-history": "^0.86.0", | ||
"slate-react": "^0.88.0" | ||
@@ -57,2 +56,3 @@ }, | ||
"@types/styled-components": "^5.1.26", | ||
"babel-plugin-styled-components": "^2.0.7", | ||
"formik": "^2.2.9", | ||
@@ -59,0 +59,0 @@ "next": "^13.1.1", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
4
2788
540257
19
38
15
- Removedslate-history@^0.86.0
- Removedslate-history@0.86.0(transitive)