alinea
Version:
Headless git-based CMS
23 lines (22 loc) • 812 B
TypeScript
export type EntryLocation = {
id?: string;
workspace?: string;
root?: string;
locale?: string | null;
};
export declare const navMatchers: {
readonly matchEntry: "/entry/*";
readonly matchEntryId: "/:action/:workspace/:root?/:id?";
readonly matchWorkspace: "/:action/:workspace";
readonly matchRoot: "/:action/:workspace/:root";
};
export declare function dashboardNav(defaults: Partial<EntryLocation>): {
matchEntry: "/entry/*";
matchEntryId: "/:action/:workspace/:root?/:id?";
matchWorkspace: "/:action/:workspace";
matchRoot: "/:action/:workspace/:root";
root: ({ id, ...location }: EntryLocation) => string;
entry: (location: EntryLocation) => string;
draft: (location: EntryLocation) => string;
create: (location: EntryLocation) => string;
};