Current Path: > home > codekrsu > > ameliagraphics.com > wp-content > plugins > extendify > > src > Draft > components
Operation : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 Software : Apache Server IP : 162.0.232.56 | Your IP: 216.73.216.111 Domains : 1034 Domain(s) Permission : [ 0755 ]
Name | Type | Size | Last Modified | Actions |
---|---|---|---|---|
image-generation | Directory | - | - | |
stock-images | Directory | - | - | |
Completion.jsx | File | 613 bytes | July 16 2024 23:59:12. | |
ConsentSidebar.jsx | File | 798 bytes | October 08 2024 14:19:28. | |
DraftMenu.jsx | File | 1248 bytes | March 04 2024 10:54:28. | |
DynamicTextarea.jsx | File | 2188 bytes | July 16 2024 23:59:12. | |
EditMenu.jsx | File | 2416 bytes | December 03 2024 01:47:48. | |
GenerateImageButtons.jsx | File | 5219 bytes | March 26 2025 18:03:22. | |
Input.jsx | File | 2585 bytes | December 03 2024 01:47:48. | |
InsertMenu.jsx | File | 7333 bytes | June 09 2025 17:02:32. | |
SelectedText.jsx | File | 1725 bytes | December 03 2024 01:47:48. | |
ToolbarMenu.jsx | File | 5120 bytes | December 03 2024 01:47:48. | |
TranslationDropdown.jsx | File | 6275 bytes | January 02 2025 21:15:44. |
import { Spinner } from '@wordpress/components'; import { __, isRTL } from '@wordpress/i18n'; import { arrowRight, Icon, arrowLeft } from '@wordpress/icons'; import classnames from 'classnames'; import { DynamicTextarea } from '@draft/components/DynamicTextarea'; import { useSelectedText } from '@draft/hooks/useSelectedText'; import { magic } from '@draft/svg'; 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-none 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', { 'cursor-pointer 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> ); };
SILENT KILLER Tool