UNPKG

1.48 kBTypeScriptView Raw
1import { ThemeVars } from '@storybook/theming';
2import { ModuleFn } from '../index';
3export declare type PanelPositions = 'bottom' | 'right';
4export declare type ActiveTabsType = 'sidebar' | 'canvas' | 'addons';
5export declare const ActiveTabs: {
6 SIDEBAR: "sidebar";
7 CANVAS: "canvas";
8 ADDONS: "addons";
9};
10export interface Layout {
11 initialActive: ActiveTabsType;
12 isFullscreen: boolean;
13 showPanel: boolean;
14 panelPosition: PanelPositions;
15 showNav: boolean;
16 isToolshown: boolean;
17}
18export interface UI {
19 name?: string;
20 url?: string;
21 enableShortcuts: boolean;
22 docsMode: boolean;
23}
24export interface SubState {
25 layout: Layout;
26 ui: UI;
27 selectedPanel: string | undefined;
28 theme: ThemeVars;
29}
30export interface SubAPI {
31 toggleFullscreen: (toggled?: boolean) => void;
32 togglePanel: (toggled?: boolean) => void;
33 togglePanelPosition: (position?: PanelPositions) => void;
34 toggleNav: (toggled?: boolean) => void;
35 toggleToolbar: (toggled?: boolean) => void;
36 setOptions: (options: any) => void;
37}
38export interface UIOptions {
39 name?: string;
40 url?: string;
41 goFullScreen: boolean;
42 showStoriesPanel: boolean;
43 showAddonPanel: boolean;
44 addonPanelInRight: boolean;
45 theme?: ThemeVars;
46 selectedPanel?: string;
47}
48export declare const focusableUIElements: {
49 storySearchField: string;
50 storyListMenu: string;
51 storyPanelRoot: string;
52};
53export declare const init: ModuleFn;