@alilc/lowcode-plugin-components-pane
Version:
59 lines (58 loc) • 1.57 kB
TypeScript
import React from 'react';
interface I18nString {
type: 'i18n';
[key: string]: string;
}
export declare type Text = string | I18nString;
export interface SortMeta {
category?: Text;
group?: Text;
hidden?: boolean;
priority?: number;
}
export interface SnippetMeta {
id?: string;
componentName: string;
title: Text;
screenshot?: string | React.ReactNode;
schema: any;
}
export interface StandardComponentMeta extends SortMeta {
componentName: Text;
icon: string | React.ReactNode;
title: Text;
description: Text;
category?: Text;
keywords?: Text[];
sort?: SortMeta;
snippets?: SnippetMeta[];
}
export interface StandardMeta {
componentList: StandardComponentMeta[];
groupList: Text[];
}
export interface SortedGroups {
categories: Array<{
name: Text;
priority: number;
components: StandardComponentMeta[];
}>;
name: Text;
}
export interface IgnoreComponents {
[key: string]: string[];
}
export default function transform(raw: any, t: (input: Text) => string): {
groupList: Text[];
componentList: StandardComponentMeta[];
groups: SortedGroups[];
snippets: SnippetMeta[];
};
export declare function getTextReader(lang: string): (input: Text) => string;
export declare function createI18n(zh_CN: any, en_US: any): Text;
export declare function pipe(arr: any[]): {
pipe(fn: (item: any) => any[]): any;
run(): any;
};
export declare function textExistIn(text: Text, arr: Text[], t: (input: Text) => string): boolean;
export {};