Skip to content
On this page

๐Ÿ“ฅ @bridge/import

Module that allows access to bridge.'s import system and register import handlers. View Source Code

js
import { ... } from '@bridge/import'

โšก Functions

addFolderImporter

TODO

  • Signature: addFolderImporter(handle: IFolderHandler)
  • Returns: Promise<void> <-IDK if this is correct
js
//TODO
await addFolderImporter()

importHandle

TODO

  • Signature: importHandle(handle: AnyHandle)
  • Returns: Promise<void>
js
//TODO
await importHandle()

registerOpenWithHandler

The registerOpenWithHandler function registers/adds a new handler in the Open With popup when you drag and drop a file onto bridge.

js
//TODO
registerOpenWithHandler()

๐Ÿ“Ÿ Interfaces

AnyHandle

ts
export type AnyHandle =
	| FileSystemFileHandle
	| FileSystemDirectoryHandle
	| VirtualHandle

IPluginOpenWithAction

ts
export interface IPluginOpenWithAction {
	icon: string
	name: string
	isAvailable?: (details: IOpenWithDetails) => Promise<boolean> | boolean
	onOpen: (details: IOpenWithDetails) => Promise<void> | void
}

IFolderHandler

ts
export interface IFolderHandler {
	icon: string
	name: string
	description: string
	onSelect: (directoryHandle: AnyDirectoryHandle) => Promise<void> | void
}

Released under the GPL-3.0 License.