@lcap/builder
Version:
lcap builder utils
49 lines (48 loc) • 1.54 kB
TypeScript
import type { ViewComponentDeclaration } from '@nasl/types/nasl.ui.ast';
import type { ThemeComponentConfig } from '../build/gens/gen-theme-config';
export interface NaslUIComponentConfig extends ViewComponentDeclaration {
sourceDocURL?: string;
ideusage?: any;
show?: boolean;
ignore?: boolean;
order?: number;
extends?: Array<string | {
name: string;
excludes?: string[];
}>;
children: Array<NaslUIComponentConfig>;
}
export interface OverloadComponentContext {
rootPath: string;
naslUIConfig: NaslUIComponentConfig;
naslConfigList: NaslUIComponentConfig[];
name: string;
tagName: string;
framework: string;
libInfo: {
name: string;
version: string;
};
pkgComponentFolderPath: string;
componentFolderPath: string;
uiPkgName: string;
pkgName: string;
fork: boolean;
type: 'pc' | 'h5';
prefix: string;
replaceNames: string[];
replaceTags: string[];
replaceNameMap: Record<string, string>;
replaceTagMap: Record<string, string>;
themeConfig: ThemeComponentConfig;
isWithForm: boolean;
withFormName: string;
exportNames: string[];
findNaslUIConfig: (name: string | ((c: NaslUIComponentConfig) => boolean)) => NaslUIComponentConfig | null;
}
export declare function getProjectContext(rootPath: any): any;
export declare function getOverloadComponentContext(rootPath: any, { component, prefix, fork }: {
component: any;
prefix: any;
fork: any;
}): OverloadComponentContext;