@volter/workbench-files
v0.1.3
Published
Workbench's Files: a Finder and an Open/Save sheet over a FilesController, with a WebDAV controller for Conduit bindings
Readme
@volter/workbench-files
Workbench's Files as a module: a Finder view and an Open/Save sheet over a
FilesController, and a controller for any WebDAV binding (RFC 4918, such as a
Conduit workbench/native-root/2 binding). The Workbench desktop mounts the
same views over its own routes.
// React hosts
import { FilesView, webdavFiles } from '@volter/workbench-files';
import '@volter/workbench-files/files.css';
<div className="wbf"><FilesView controller={webdavFiles({ endpoint, name: 'Files' })} openFile={open} /></div>
// any other host (plain DOM, Preact): the mount carries its own React
import { mountFiles, webdavFiles } from '@volter/workbench-files/mount';
import '@volter/workbench-files/files.css';
const files = mountFiles(element, { controller: webdavFiles({ endpoint, name: 'Files' }), openFile: open });
files.unmount();A controller says which operations its backend has (supports); the view
offers no others. Without a Trash, a removal asks and is permanent. A host
supplies its own controller for its own file interface. The stylesheet is
scoped under .wbf, which mountFiles puts on the element.
