@smallstack/svelte-ui
Version:
Tiny library for Svelte 5 and DaisyUI, published as multi entry ESM module and as web components.
57 lines (56 loc) • 2.02 kB
TypeScript
import type { Navigation } from "./navigation.js";
export declare const APP_SHELL_OPTIONS = "appShellOptions";
export declare const APP_SHELL_STATS = "appShellStats";
interface AppShellGlobalOptions {
logoUrl?: string;
/** The title will be shown next or below the logo */
title?: string;
/** defaults to primary color */
bgColor?: string;
/** defaults to primary-text color */
textColor?: string;
/** the navigation entries to show */
navigation?: Navigation;
}
export interface AppShellSidebarOptions extends AppShellGlobalOptions {
width?: number;
show?: boolean | string[];
}
export interface AppShellNavbarOptions extends AppShellGlobalOptions {
show?: boolean | string[];
/** show/hide the navigation entries inside the top navbar */
showNavigation?: boolean;
height?: number;
}
export interface AppShellAppHeaderOptions extends AppShellGlobalOptions {
show?: boolean | string[];
height?: number;
showMenuTriggerRight?: boolean | string[];
showMenuTriggerLeft?: boolean | string[];
useSafeArea?: boolean;
}
export interface AppShellTabBarOptions extends AppShellGlobalOptions {
show?: boolean | string[];
height?: number;
/** show the text below the icons */
showText?: boolean;
showSuperBtn?: boolean;
useSafeArea?: boolean;
}
export interface AppShellOptions extends AppShellGlobalOptions {
tabBar?: AppShellTabBarOptions;
sidebar?: AppShellSidebarOptions;
navbar?: AppShellNavbarOptions;
appHeader?: AppShellAppHeaderOptions;
availablePermissions?: string[];
}
export interface AppShellStats {
width: number;
height: number;
mainContentHeight: number;
mainContentWidth: number;
}
export type hasPermissionFn = (permission: string) => boolean;
export declare function filterAuthorizedNavigation(navigation: Navigation, availablePermissions: string[]): Navigation;
export declare function getComputedOptions<T>(options: AppShellOptions, navigationProp: string): T;
export {};