alinea
Version:
[](https://npmjs.org/package/alinea) [](https://packagephobia.com/result?p=alinea)
25 lines (24 loc) • 778 B
TypeScript
import { AsyncTreeDataLoader, DropTarget, ItemInstance } from '@headless-tree/core';
import { EntryPhase } from 'alinea/core';
export declare function rootId(rootName: string): string;
export interface EntryTreeItem {
id: string;
index: string;
entries: Array<{
id: string;
entryId: string;
type: string;
title: string;
phase: EntryPhase;
locale: string | null;
workspace: string;
root: string;
path: string;
parentPaths: Array<string>;
}>;
isFolder?: boolean;
children: Array<string>;
}
export declare function useEntryTreeProvider(): AsyncTreeDataLoader<EntryTreeItem> & {
onDrop(items: Array<ItemInstance<EntryTreeItem>>, target: DropTarget<EntryTreeItem>): void;
};