@kubuno/drive
v0.1.5
Published
Kubuno drive client surface (@kubuno/drive) — file browser, storage explorer and dialogs reused by file-backed modules. Provided by the host at runtime via the import map; this package ships the type surface.
Downloads
783
Readme
@kubuno/drive
The drive client surface for Kubuno — reuse the file browser and storage UI in any file-backed module.
File-backed Kubuno modules (office, notes, flow, paintsharp…) don't reimplement a file picker: they reuse the drive module's client components — the generic file browser, storage explorer, and the standard file dialogs. @kubuno/drive exposes that surface. As with the rest of the SDK, the implementation is provided by the host at runtime; this package ships the type surface.
Overview
- Browsing —
ModuleFileBrowser,ModuleStartPage,StorageExplorer,FolderGlyph,fileView. - Dialogs —
MoveModal,RenameModal,BatchRenameModal,NewFolderModal,ShareModal,FileInfoModal,VersionHistoryModal. - Viewers, stores & helpers —
FilesTextViewer,UploadPanel,useMarqueeSelection,storageSource, the driveapiand dialog/media stores.
Compatibility
| @kubuno/drive | Kubuno core | @kubuno/sdk | React |
| --- | --- | --- | --- |
| 0.1.x | 0.1.x | 0.1.x | 19 |
Install
npm install @kubuno/drivePeer dependencies: @kubuno/sdk, @kubuno/ui, react, react-dom, zustand (provided by the host at runtime).
Usage
import { ModuleFileBrowser } from '@kubuno/drive'
function PickFile() {
return <ModuleFileBrowser moduleId="office" onOpen={(file) => console.log(file)} />
}Runtime note: mark
@kubuno/driveasexternalin your module build — the host serves a single shared instance via its import map. This package is build-time types only (its JS entry is a stub that throws if ever executed).
License
AGPL-3.0-or-later © Kubuno contributors.
