{"_id":"@elecerp/directus-extension-filetext-interface","name":"@elecerp/directus-extension-filetext-interface","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@elecerp/directus-extension-filetext-interface","version":"1.0.0","keywords":["directus","directus-extension","directus-custom-interface","directus-extension-filetext","file-text","file-input","drag-drop"],"directus:extension":{"type":"interface","path":"dist/index.js","source":"src/index.js","host":"^9.5.2"},"scripts":{"build":"directus-extension build","start":"directus-extension build --watch"},"devDependencies":{"@directus/extensions-sdk":"9.5.2","husky":"4.3.8","lint-staged":"^12.2.2","prettier":"^2.6.2","vue":"^3.2.29"},"dependencies":{"lodash":"^4.17.21","papaparse":"^5.3.2","vue-i18n":"^9.1.10"},"license":"MIT","_id":"@elecerp/directus-extension-filetext-interface@1.0.0","description":"A text input field that supports both manual text input and file drag & drop, automatically reading file content and filling it into the input field.","_nodeVersion":"22.18.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-cDVSH7P+V6HqD+gFPPDfZ5MqRtGX5jPaf9Bk7YPJ0Il+F225wU/J5j8rhJmlZeubsnysL2y9AdpL/ejmUakmbQ==","shasum":"4f822ba255ca7a8c6ac7dc1782ae3121150e652d","tarball":"https://registry.npmjs.org/@elecerp/directus-extension-filetext-interface/-/directus-extension-filetext-interface-1.0.0.tgz","fileCount":5,"unpackedSize":15557,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCUk8vCW3VeI1htdLDWu+pzuGlePD+cekMCEyN7tbbjbAIgdSZ2gyMwlJVn3FI+ATDCvU1ueuFrmw6LAYrAk4w+0So="}]},"_npmUser":{"name":"ximolang","email":"seymoe@yeah.net"},"directories":{},"maintainers":[{"name":"dragonszy","email":"dragonszy@gmail.com"},{"name":"ximolang","email":"seymoe@yeah.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/directus-extension-filetext-interface_1.0.0_1756139023041_0.7653066866818232"},"_hasShrinkwrap":false}},"time":{"created":"2025-08-25T16:23:42.920Z","1.0.0":"2025-08-25T16:23:43.229Z","modified":"2025-08-25T16:23:43.566Z"},"maintainers":[{"name":"dragonszy","email":"dragonszy@gmail.com"},{"name":"ximolang","email":"seymoe@yeah.net"}],"description":"A text input field that supports both manual text input and file drag & drop, automatically reading file content and filling it into the input field.","keywords":["directus","directus-extension","directus-custom-interface","directus-extension-filetext","file-text","file-input","drag-drop"],"license":"MIT","readme":"# File Text - Directus Extension\n\nA text input field that supports both manual text input and file drag & drop, automatically reading file content and filling it into the input field.\n\n## Features\n\n- 📝 **Text Input**: Support for multi-line text input\n- 📁 **File Drag & Drop**: Drag and drop files to the input area\n- 📂 **File Selection**: Click to select files from file picker\n- 🔍 **Auto Read**: Option to automatically read file content\n- ✅ **File Validation**: Support for file type and size restrictions\n- 🎨 **Beautiful UI**: Modern drag & drop area and file information display\n- 🌐 **Internationalization**: Support for multiple languages\n\n## Installation\n\n```bash\nnpm install @elecerp/directus-extension-filetext-interface\n```\n\n## Usage\n\n### 1. Configure Field in Directus\n\n1. Create a text type field\n2. Select \"File Text\" interface in field settings\n3. Configure related options\n\n### 2. Configuration Options\n\n| Option | Type | Default | Description |\n|--------|------|---------|-------------|\n| `placeholder` | string | \"Please enter text or drag files here\" | Input field placeholder text |\n| `acceptFileTypes` | string | \".txt,.md,.json,.csv\" | Accepted file types, supports extensions and MIME types |\n| `maxFileSize` | number | 10 | Maximum file size (MB) |\n| `showFileInfo` | boolean | true | Whether to show file information |\n| `autoReadFile` | boolean | true | Whether to automatically read file content |\n\n### 3. Supported File Types\n\n- Text files: `.txt`, `.md`, `.log`\n- Code files: `.js`, `.ts`, `.py`, `.java`, `.c`, `.cpp`\n- Data files: `.json`, `.csv`, `.xml`\n- Markup files: `.html`, `.css`, `.sql`\n\n## Features Description\n\n### File Drag & Drop\n- Drag files to the dashed border area\n- Supported files will automatically display file information\n- If auto-read is enabled, file content will automatically fill the text field\n\n### File Selection\n- Click \"Select File\" button to choose files\n- Support for file type filtering\n- File size validation\n\n### Text Editing\n- Support for multi-line text input\n- Real-time content saving\n- Clear text functionality\n\n### Error Handling\n- Display error messages for unsupported file types\n- Display error messages for oversized files\n- Display error messages for file reading failures\n\n## Development\n\n### Build\n\n```bash\nnpm run build\n```\n\n### Development Mode\n\n```bash\nnpm run start\n```\n\n## Technical Implementation\n\n- **Vue 3**: Using Composition API\n- **Directus Extensions SDK**: 9.5.2+\n- **File API**: Using FileReader API to read file content\n- **Drag & Drop API**: Using HTML5 Drag and Drop API\n\n## Publishing\n\n1. Update version number\n2. Build project: `npm run build`\n3. Publish to npm: `npm publish --access=public`\n\n## License\n\nMIT License\n\n## Contributing\n\nWelcome to submit Issues and Pull Requests!\n\n## Changelog\n\n### v1.0.0\n- Initial version\n- Support for file drag & drop and selection\n- Support for text input and editing\n- Support for file type and size validation\n- Support for automatic file content reading","readmeFilename":"README.md","_rev":"1-f9a2f352f9c597c420ba899c32119962"}