@senka-ai/ui
Version:
A modern, type-safe Svelte 5 UI component library with full theme support, accessibility standards, and robust state management patterns
160 lines • 4.99 kB
TypeScript
/**
* packages/ui/src/lib/layout-presets.ts
* Common layout configuration presets for frequently used patterns
* Reduces verbosity and provides consistent layouts across the Senka ecosystem
* RELEVANT FILES: LayoutDiv.svelte, @senka-ai/layout-engine
*/
import type { LayoutContainer } from '@senka-ai/layout-engine';
/**
* Common layout presets for typical UI patterns
*/
export declare const LAYOUT_PRESETS: {
readonly 'page-stack': {
readonly id: "page-stack";
readonly type: "stack";
readonly direction: "vertical";
readonly gap: "spacious";
readonly fillContainer: true;
};
readonly 'page-content': {
readonly id: "page-content";
readonly type: "stack";
readonly direction: "vertical";
readonly gap: "comfortable";
readonly fillContainer: true;
};
readonly 'header-row': {
readonly id: "header-row";
readonly type: "row";
readonly gap: "normal";
readonly align: "center";
readonly justify: "space-between";
readonly fillContainer: true;
};
readonly 'header-actions': {
readonly id: "header-actions";
readonly type: "row";
readonly gap: "tight";
readonly align: "center";
readonly justify: "packed";
readonly fillContainer: false;
};
readonly 'section-stack': {
readonly id: "section-stack";
readonly type: "stack";
readonly direction: "vertical";
readonly gap: "normal";
readonly fillContainer: true;
};
readonly 'section-header': {
readonly id: "section-header";
readonly type: "stack";
readonly direction: "vertical";
readonly gap: "tight";
readonly fillContainer: true;
};
readonly 'content-grid': {
readonly id: "content-grid";
readonly type: "grid";
readonly columns: "auto";
readonly gap: "normal";
readonly align: "stretch";
readonly fillContainer: true;
};
readonly 'content-list': {
readonly id: "content-list";
readonly type: "stack";
readonly direction: "vertical";
readonly gap: "tight";
readonly fillContainer: true;
};
readonly 'card-content': {
readonly id: "card-content";
readonly type: "stack";
readonly direction: "vertical";
readonly gap: "normal";
readonly fillContainer: true;
};
readonly 'card-actions': {
readonly id: "card-actions";
readonly type: "row";
readonly gap: "tight";
readonly align: "center";
readonly justify: "packed";
readonly fillContainer: false;
};
readonly 'form-stack': {
readonly id: "form-stack";
readonly type: "stack";
readonly direction: "vertical";
readonly gap: "comfortable";
readonly fillContainer: true;
};
readonly 'form-row': {
readonly id: "form-row";
readonly type: "row";
readonly gap: "normal";
readonly align: "center";
readonly wrap: true;
readonly fillContainer: true;
};
readonly 'form-actions': {
readonly id: "form-actions";
readonly type: "row";
readonly gap: "normal";
readonly align: "center";
readonly justify: "space-between";
readonly fillContainer: true;
};
readonly 'nav-horizontal': {
readonly id: "nav-horizontal";
readonly type: "row";
readonly gap: "normal";
readonly align: "center";
readonly justify: "packed";
readonly fillContainer: false;
};
readonly 'nav-vertical': {
readonly id: "nav-vertical";
readonly type: "stack";
readonly direction: "vertical";
readonly gap: "tight";
readonly fillContainer: true;
};
readonly 'sidebar-content': {
readonly id: "sidebar-content";
readonly type: "stack";
readonly direction: "vertical";
readonly gap: "comfortable";
readonly fillContainer: true;
};
readonly 'dashboard-grid': {
readonly id: "dashboard-grid";
readonly type: "grid";
readonly columns: 3;
readonly gap: "comfortable";
readonly align: "stretch";
readonly fillContainer: true;
};
readonly 'dashboard-cards': {
readonly id: "dashboard-cards";
readonly type: "grid";
readonly columns: "auto";
readonly gap: "normal";
readonly align: "stretch";
readonly fillContainer: true;
};
};
/**
* Type for preset keys
*/
export type LayoutPreset = keyof typeof LAYOUT_PRESETS;
/**
* Get a layout preset by key
*/
export declare function getLayoutPreset(preset: LayoutPreset): LayoutContainer;
/**
* Check if a string is a valid preset key
*/
export declare function isLayoutPreset(preset: string): preset is LayoutPreset;
//# sourceMappingURL=layout-presets.d.ts.map