@hero-engineer/client
Version:
Build anything you want
123 lines (122 loc) • 3.09 kB
TypeScript
import { JsxChild, Node as TsNode } from 'ts-morph';
export declare type SnackBarItemType = {
id: number;
content: string;
severity: 'success' | 'info' | 'warning' | 'error';
actionLinkTo?: string;
cleared?: boolean;
};
export declare type PackageType = {
name: string;
version: string;
type: 'dependencies' | 'devDependencies';
};
export declare type BreakpointType = {
id: string;
name: string;
min: number;
max: number;
base: number;
scale: number;
media: string;
};
export declare type CssValueType = string | number;
export declare type CssAttributeType = {
cssName: string;
jsName: string;
value: CssValueType;
isImportant: boolean;
comment: string;
};
export declare type CssClassType = {
id: string;
selector: string;
declaration: string;
attributes: CssAttributeType[];
media: string;
};
export declare type CSsAttributesMapType = Record<string, {
cssNames: readonly string[];
defaultValue: CssValueType;
isValueValid: (value: CssValueType) => boolean;
converter?: (value: CssValueType, isImportant: boolean) => CssAttributeType[];
}>;
export declare type FontType = {
id: string;
name: string;
url: string;
weights: number[];
isVariable: boolean;
};
export declare type CssVariableType = {
id: string;
type: 'color' | 'spacing' | 'other';
name: string;
value: string;
};
export declare type ColorType = {
id: string;
variableName: string;
name: string;
value: string;
};
export declare type SpacingType = {
id: string;
variableName: string;
name: string;
value: string;
};
export declare type FileType = {
path: string;
code: string;
};
export declare type TabType = {
url: string;
label: string;
};
export declare type HierarchyType = {
id: string;
name: string;
type: 'component' | 'element' | 'text' | 'array' | 'children';
start: number;
element: HTMLElement | null;
children: HierarchyType[];
onFilePath: string;
};
export declare type ExtendedHierarchyContextType = {
id: string;
previousTopJsxIds: string[];
childIndex: number;
children: JsxChild[];
imports: ImportType[];
identifiers: IdentifierType[];
childrenOnFilePath: string;
};
export declare type ExtendedHierarchyType = Omit<HierarchyType, 'children'> & {
children: ExtendedHierarchyType[];
childrenElements: HTMLElement[];
childrenElementsStack: HTMLElement[];
context: ExtendedHierarchyContextType;
};
export declare type ImportType = {
type: 'default' | 'named';
source: string;
name: string;
sourceFilePath: string;
};
export declare type ExportType = {
type: 'default' | 'named';
name: string;
};
export declare type IdentifierType = {
name: string;
value: TsNode;
};
export declare type LogsType = {
typescript: boolean;
css: boolean;
};
export declare type NormalizedCssAttributesType = Record<string, CssAttributeType>;
export declare type WarningsType = {
cssClassOrdering: boolean;
};